Results 1 to 5 of 5

Thread: Mic

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2001
    Location
    South Africa
    Posts
    35

    Red face Mic

    How do you get input from the MIC and possibly a WebCam?

  2. #2
    Megatron
    Guest
    To get input from the Microphone, you could use the mciSendString function with the record command:
    VB Code:
    1. 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
    2.                                        
    3. Private Sub cmdRecord_Click()
    4.  
    5.     'Open a WaveAudio called Record
    6.     mciSendString "open new type waveaudio Alias rec", 0&, 0, 0
    7.     'Start Recording
    8.     mciSendString "record rec", 0&, 0, 0
    9.    
    10. End Sub
    11.  
    12. Private Sub cmdSave_Click()
    13.  
    14.     'Stops recording
    15.     mciSendString "stop rec", 0&, 0, 0
    16.     'Saves the sound
    17.     mciSendString "save rec C:\Windows\Desktop\MyWav.wav", 0&, 0, 0
    18.     'Close "Record"
    19.     mciSendString "close rec", 0&, 0, 0
    20.                                        
    21. End Sub

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2001
    Location
    South Africa
    Posts
    35
    OK Great!
    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?

  4. #4
    sunnyl
    Guest
    As for the webcam, you can try some of the controls at www.shrinkwrapvb.com They deal with video capturing.

  5. #5

    Thread Starter
    Member
    Join Date
    Jun 2001
    Location
    South Africa
    Posts
    35
    Thanks
    Checking it out

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width