How do you get input from the MIC and possibly a WebCam?
Printable View
How do you get input from the MIC and possibly a WebCam?
To get input from the Microphone, you could use the mciSendString function with the record command:
VB Code:
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As Any, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long Private Sub cmdRecord_Click() 'Open a WaveAudio called Record mciSendString "open new type waveaudio Alias rec", 0&, 0, 0 'Start Recording mciSendString "record rec", 0&, 0, 0 End Sub Private Sub cmdSave_Click() 'Stops recording mciSendString "stop rec", 0&, 0, 0 'Saves the sound mciSendString "save rec C:\Windows\Desktop\MyWav.wav", 0&, 0, 0 'Close "Record" mciSendString "close rec", 0&, 0, 0 End Sub
OK Great! :D
Also, Do you know how I could monitor the MIC levels so that I only record when the input amplitude is above a certain level?
Thanks
PS. Also the WebCam thing?
As for the webcam, you can try some of the controls at www.shrinkwrapvb.com They deal with video capturing.
Thanks
Checking it out