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.

 

After calling this method, the container application is notified through the CallbackForRecordersEvents delegate invoked with the nEvent parameter set to EV_REC_START.

 

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]

Public Function StartFromDirectSoundDevice (

nInputDevice as Int16,

nInputChannel as Int16,

strOutputPath as string

) as enumErrorCodes


 

[C#]

public enumErrorCodes StartFromDirectSoundDevice (

Int16 nInputDevice,

Int16 nInputChannel,

string strOutputPath

);


 

[C++]

public: enumErrorCodes StartFromDirectSoundDevice (

Int16 nInputDevice,

Int16 nInputChannel,

string 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.

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 the recorded data. If this pathname should contain invalid characters, they would be automatically changed into an underscore '_' character..

If the string is left empty, the recording session will be performed in memory.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred. Check the LastError property value in order to see the last error.

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.