Audio implementation of Win32 Multimedia API

Applies To

OS:
VB:
NT, 9x, 2000
5, 6

By Brian Yule (byule at PembrokeTechnology.com)
Download the project (40 kb)


Related:
Visual Basic TAPI Implementation

This audio implementation is written to:

This code has been used for:

The code comes as standard .VBP with a bunch of classes that you can reuse and a form to drive the classes and show the implementation. The record new records a WAVE file to the C:\\MEDIA\ Directory. The file is named Untitled.Wav. When the file is recorded the list will refresh with the new file located in the list for playing!

It doesn't have any dependencies! At the same time, the project is a complete wrapper around winmm.dll that ships with Windows. Below is an example of how easy it is to drive the classes:

Add the following to a Form

'Start Recording
Private Sub cmdRecord_Click()
    Call s.Record(File1.Path & BACKSLASH & SaveFileName)
End Sub

'Append Recording to an existing file
Private Sub cmdAppend_Click()
    If Dir(File1.Path & "\Untitled.wav") <> vbNullString Then
        Call s.Record(File1.Path & BACKSLASH & SaveFileName, True)
    End If
End Sub

'End Recording
Private Sub cmdEndRecord_Click()
    Call s.EndRecord
End Sub

Download the project (40 kb)