Copyright © 2006-2019 MultiMedia Soft

StartFromDirectSoundDevice method

Previous pageReturn to chapter overviewNext page

Remarks

 

Starts a recording session through the given input device and channel.

 

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.

 

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

 

 

Syntax

 

[Visual Basic]

control.StartFromDirectSoundDevice (

nInputDevice as integer,

nInputChannel as integer,

strOutputPath as string

) as enumErrorCodes


 

[C++]

short control.StartFromDirectSoundDevice (

short nInputDevice,

short nInputChannel,

LPCTSTR strOutputPath

);


 

 

Parameter

Description

 

 

nInputDevice

Number representing the zero-based index of the DirectSound input device (sound card) that will be used for recording. Use the value returned by the GetInputDevicesCount method in order to know how many input devices are currently installed on the system and the GetInputDeviceDesc method in order to retrieve the friendly name of each input device.

 

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.

nInputChannel

Number representing the zero-based index of the input channel (Microphone, Stereo Mix, Line-In, etc.) that will be used for recording on the input device set through the nInputDevice parameter (use -1 for setting the system default input channel).

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.