Copyright © 2006-2018 MultiMedia Soft

StartFromAsioDevice method

Previous pageReturn to chapter overviewNext page

Remarks

 

Starts a recording session getting sound data from one or more input channels of the given ASIO device.

 

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.

For further details about the use of ASIO drivers see the ASIOMan class and the How to manage ASIO drivers tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function StartFromAsioDevice (

nInputDevice as Int16,

nFirstChannel as Int16,

nTotalChannels as Int16,

strOutputPath as string

) as enumErrorCodes


 

[C#]

public enumErrorCodes StartFromAsioDevice (

Int16 nInputDevice,

Int16 nFirstChannel,

Int16 nTotalChannels,

string strOutputPath

);


 

[C++]

public: enumErrorCodes StartFromAsioDevice (

Int16 nInputDevice,

Int16 nFirstChannel,

Int16 nTotalChannels,

string strOutputPath

);


 

 

Parameter

Description

 

 

nInputDevice

Number representing the zero-based index of the ASIO device that will be used for recording. Use the value returned by the ASIO.DeviceGetCount method in order to know how many ASIO devices are currently installed inside the system and the ASIO.DeviceGetDesc method in order to retrieve the friendly name of each ASIO device.

nFirstChannel

Number representing the zero-based index of the first ASIO input channel that will be used for recording on the ASIO device set through the nInputDevice parameter.

nTotalChannels

Total number of ASIO input channels that will be mixed together, starting from the input channel set into the nFirstChannel parameter, and recorded.

All ASIO channels are in mono so let's make some example of use:

- if you should need recording the first pair of input channels, you should specify 0 for the nFirstChannel parameter and 2 for the nTotalChannels parameter.

- if you should need recording one single ASIO input channel, for example the fourth channel, you should specify 3 (remember that channels are zero-based) for the nFirstChannel parameter and 1 for the nTotalChannels parameter.

- if you should need to mix all of the available ASIO input channels of a sound card having 10 input channels, you should specify 0 for the nFirstChannel parameter and 10 for the nTotalChannels parameter.

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 last error.

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.