ASIO.DeviceStart method |
|
Remarks
Starts the given ASIO device.
This call is mandatory in order to start working with a specific ASIO device; if you simply need to render audio data incoming from one or more input channels directly to one or more output channels, a possible alternative to this method is to invoke the ASIO.DeviceListenInputStart method.
IMPORTANT NOTE: When using Audio Sound Recorder in conjunction with Audio DJ Studio, you should prefer calling this method using the same ASIO.DeviceStart method available inside Audio DJ Studio so you would have a better control over the playback mode.
A started device can be stopped at any time through the ASIO.DeviceStop method.
You can know if a certain device is started or stopped through the ASIO.DeviceIsStarted method.
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 DeviceStart ( nDeviceIndex as Int16, nSampleRate as Int32, nChannelMode as enumAsioChannelModes, nOutputChannelFirst as Int16 ) as enumErrorCodes |
[C#] public enumErrorCodes DeviceStart ( Int16 nDeviceIndex, Int32 nSampleRate, enumAsioChannelModes nChannelMode, Int16 nOutputChannelFirst ); |
[C++] public: enumErrorCodes DeviceStart ( Int16 nDeviceIndex, Int32 nSampleRate, enumAsioChannelModes nChannelMode, Int16 nOutputChannelFirst ); |
Parameter |
Description |
|||||||||||||||
|
|
|||||||||||||||
nDeviceIndex |
Number representing the zero-based index of the ASIO device. This index is related to available ASIO devices so it must be the related to the enumeration performed through the ASIO.DeviceGetCount and ASIO.DeviceGetDesc methods: it must not be confused with indexes related to generic input devices enumerated through the GetInputDevicesCount and GetInputDeviceDesc methods which may contain both DirectSound and ASIO devices. |
|||||||||||||||
nSampleRate |
Sample rate to set into the ASIO device (0=leave current). |
|||||||||||||||
nChannelMode |
Channel mode.
IMPORTANT NOTE: When using Audio Sound Recorder in conjunction with Audio DJ Studio, as seen inside the AsioStreamMixer sample, you should prefer calling this method using the same ASIO.DeviceStart method available inside Audio DJ Studio so you would have a better control over the playback mode.
Supported values are the following:
|
|||||||||||||||
nOutputChannelFirst |
Zero-based index of the first output channel used for sound rendering: this parameter is only used when the nChannelMode parameter is set to ASIO_CHANNEL_MODE_STEREO and is ignored in all other cases. |
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred (see the LastError property for further error details) |
enumErrorCodes.ERR_NOERROR (0) |
The method call was successful. |