Skip to content

StartAudioRecording

function

Delphi
function StartAudioRecording: Boolean;
C++Builder
bool __fastcall StartAudioRecording();
C#
public bool StartAudioRecording();
VB.NET
Public Function StartAudioRecording() As Boolean
C++/Qt
BOOL StartAudioRecording ();

Starts the recording of the audio stream only, by using the current audio capture device.

However, if the current video capture device has an audio output, it is used first. To make sure that the current audio capture device is used, and not an audio stream coming out of the current video capture device, set VideoDevice to -1 to keep the video devices disabled.

StartAudioRecording takes no parameter. By default (HoldRecording = false), the recording starts as soon as the recording graph is built (after a variable number of seconds, depending on the video capture device, audio/video compressors, etc.).

To start the file at a precise moment, set the HoldRecording property to true before calling StartAudioRecording: the recording graph is built and runs in preview mode, and the writing to the file is held until ResumeRecording is invoked.

The OnRecordingReadyToStart event then occurs when the graph is built, to signal that ResumeRecording can be invoked, at once or later.

See the recording chapter for more information.