Copyright © 2006-2019 MultiMedia Soft

StartFromWasapiLoopbackDevice method

Previous pageReturn to chapter overviewNext page

Remarks

 

Starts a recording session through the given WASAPI loopback device previously started through the WASAPI.DeviceStartExcusive or WASAPI.DeviceStartShared methods. You can know if a WASAPI device is already started through the WASAPI.DeviceIsStarted method.

 

Recording from a loopback device is only possible if the corresponding output device has not been started in exclusive mode; A loopback device can only deliver audio data when the corresponding output device is effectively producing audio data.

 

Calling this method will cause the control to fire a RecordingStarted event. The recording session can be stopped at any time through a call to the Stop method.

 

This method is only intended for usage with Windows Vista and later versions.

For further details about the use of WASAPI see the WASAPI object and the How to manage audio flow through WASAPI tutorial.

For details about the encoding format and parameters applied during recording see the How to perform a recording session section.

 

 

Syntax

 

[Visual Basic]

control.StartFromWasapiLoopbackDevice (

nLoopbackDevice as integer,

strOutputPath as string,

) as enumErrorCodes


StartFromWasapiCaptureDevice

 

[C++]

short control.StartFromWasapiLoopbackDevice (

short nLoopbackDevice,

LPCTSTR strOutputPath

);


 

 

Parameter

Description

 

 

nLoopbackDevice

Number representing the zero-based index of the WASAPI loopback device of interest. The total number of available WASAPI loopback devices can be obtained using the WASAPI.DeviceGetCount method having the nDeviceType parameter set to WASAPI_DEVICE_TYPE_LOOPBACK..

 

If the multimedia engine shouldn't find any enabled or valid input or output device, the container application would be notified through the WarnNoInputDevice and WarnNoOutputDevice events.

strOutputPath

String representing the absolute pathname of the output file that will contain recorded data. If this pathname should contain invalid characters, they would be automatically changed into an underscore '_' character.

If this parameter is left empty, recorded data will be stored inside a memory buffer.

 

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred, check the LastError property value in order to see the error code meaning

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.