Results 1 to 3 of 3

Thread: Multimedia Q: Setting recording source

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    6

    Question

    Not quite Graphics & Gaming, but kinda in the same field

    I'm looking for an mci string or API call which will allow me to set the recording source for the computer's sound card. Ideally I'd like to toggle between the line-in devce and cd-audio device.

    Any help would be appreciated.

    --
    Regards,

    Chris Platts

  2. #2
    Guest
    Use the mciSendString API to record sounds. Make a Form with 2 CommandButtons (cmdRecord and cmdSave) and put the following code into your Form.

    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 record", 0&, 0, 0
        'Start Recording
        mciSendString "record record", 0&, 0, 0
        
    End Sub
    
    Private Sub cmdSave_Click()
    
        'Stops recording
        mciSendString "stop record", 0&, 0, 0
        'Saves the sound
        mciSendString "save record C:\Windows\Desktop\MyWav.wav", 0&, 0, 0
        'Close "Record"
        mciSendString "close record", 0&, 0, 0
                                           
    End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    6

    Cheers... but....

    Does this actually set the recording *source*?

    I understand that the code you've posted allows me to perform the recording - that I can do fine. But I need to set the source - as you would throught the sound card's mixer. I need to be able to switch between recording the CD Audio input and the Line input.

    Any ideas?
    --
    Regards,

    Chris Platts

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