Jump to content

Multi-Channel Sound Recorder

- - - - -

  • Please log in to reply
No replies to this topic

#1
Xerox

Xerox

    Newbie

  • Members
  • Pip
  • 1 posts
I just joined this site because I've been doing a bit of programming lately, and I've really run into a brick wall as to how to take my project further, even with all the help that's available on the internet.

I'm working on a sound recorder in Visual Studio 2008, and I currently have it up to the point where I can record from the Media Control Interface using the mcisendstring command. Very similar to a program seen here:

    Public Class Form1

        Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer

        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

            Button1.Enabled = False

            Button2.Enabled = True

            mciSendString("open new Type waveaudio Alias recsound", "", 0, 0)

            mciSendString("record recsound", "", 0, 0)

            Label1.Text = "Recording..."

            Label1.Visible = True

        End Sub

        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

            Button1.Enabled = True

            Button2.Enabled = False

            Button3.Enabled = True

            mciSendString("save recsound c:\recsound.wav", "", 0, 0)

            mciSendString("close recsound", "", 0, 0)

            MsgBox("File Created: C:\recsound.wav")

            Label1.Text = "Stopped..."

            Label1.Visible = False

            My.Computer.Audio.Stop()

        End Sub

        Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

            Label1.Text = "Playing..."

            Label1.Visible = True

            My.Computer.Audio.Play("c:\recsound.wav", AudioPlayMode.Background)

        End Sub

    End Class 

This method records using the current input of the Windows MCI; however, what I'm trying to accomplish next is the ability to record multiple channels simultaneously using many different inputs. Does anybody know if this is possible using mciSendString, or should I go a different route? (Or even with a different programming language entirely?) I'm open to any ideas; I know very little about audio, but I know plenty about programming. Thank you for your help.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users