Results 1 to 2 of 2

Thread: recording sound

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    u.s.a
    Posts
    127

    Post

    How can I record to a .wav from a mocrophone??
    I tried the MMcontrol but I can't seem to record to the .wav I want.
    Is there an API that will do the job?
    Is there sample code for the MMcontrol (other then the code in msdn-which is usless).

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Here's a simple example of how to use the MMControl to Record a Wav and Save it.
    Code:
    Private Sub cmdSave_Click()
        MMControl1.Command = "Save"
    End Sub
    
    Private Sub Form_Load()
        With MMControl1
            .DeviceType = "WaveAudio"
            .FileName = "C:\New.wav"
            .RecordMode = mciRecordOverwrite
            .UpdateInterval = 10
            .Command = "Open"
        End With
    End Sub
    
    Private Sub MMControl1_StatusUpdate()
        With MMControl1
            Caption = (.Position / 1000) & "/" & (.TrackLength / 1000)
        End With
    End Sub
    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Certified AllExperts Expert

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