Write a DirectShow audio capture and recording application with AudioLab using Delphi or C++ Builder


 

This is a step by step tutorial for writing a simple DirectShow audio capture and recording application in Delphi or C++ Builder VCL by using AudioLab. The steps are exactly identical in Delphi or C++ Builder versions 5 to 2007.

WARNING: In order to run the application in this example you must have DirectX 9.0 or higher installed on your system!

There is no code writing necessary to complete this application.

There is no need to know Delphi or C++ Builder in order to create this application.

The steps bellow are captured using Delphi 2007, however they are identical in C++ Builder and older versions of the products.


 

AudioCapture

The tutorial covers the following steps, which should take less than two minutes:

1. Add a TALDSAudioIn Component to Your Application's Form:

1.1. From the AudioLab tab of the component palette drop a ALDSAudioIn TALDSAudioIn component.

2. Add a TALDSAudioLogger Component to Your Application's Form:

1.1. From the AudioLab tab of the component palette drop a ALDSAudioLogger TALDSAudioLogger component.

3. Connect the DSAudioIn.OutputPin to DSAudioLogger.InputPin:

3.1. Select the ALDSAudioIn1 component:

Form1ALDSAudioIn1

3.2. In the dsAudioIn1 Properties select OutputPin and click on the DottedButton button:

ALDSAudioIn1PropertiesOutputPin

3.3. In the connection editor check the InputPin of the dsAudioLogger1 and click OK:

ALDSAudioIn1OutputPinEdit

4. Specify file to record in the ALDSAudioLogger1 Component:

4.1. Select the ALDSAudioLogger1 component:

Form1ALDSAudioLogger1

4.2. In the ALDSAudioLogger1 Properties select the FileName property and enter the path and the name of the file where you want to record the captured audio:

ALDSAudioLogger1PropertiesFileName

5. Run the Application:

5.1. Press (F9) to run the application.

5.2. Talk in the microphone.

5.3. Stop the application. You should have wave file recorded on your disk:

HardDrive

Here is a diagram of the OpenWire connections in this application:

DSAudioRecorderDiagram