Results 1 to 4 of 4

Thread: select the LINEIN using API's

  1. #1
    Guest
    How can I select the LINE IN (or MIC) input to the soundcard for recording using API's (or other VB coding)?
    Are the relevant API's documented anywhere on the web?

  2. #2
    Guest
    You want to record WAV files? Use mciSendString API.
    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
    Guest
    I am experimenting with FFT code from DEETH which uses
    waveiopen, etc api's to read the sound buffer and analyzise it. I need only to direct the sound input from the LINEIN or MIC inputs.

    PS. your VBFE link does work!

  4. #4
    Fanatic Member pradeepkrao's Avatar
    Join Date
    Sep 2001
    Location
    New Jersey
    Posts
    534

    Megatron

    I have a small doubt..

    How can i get the audio level ...
    i tried using

    PHP Code:
    Text1.Text mciSendString("status MP3Play level"yn1Len(yn1), 0
    but doesnt work.. Please help me out...

    Thanks in advance,
    Pradeep
    Learn by others experience as you cannot live long to experience them all.
    www.freewebs.com/pradeepkrao

    LOOK AT MY GAMES AT MY WEB SITE.

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