Copyright © 2006-2018 MultiMedia Soft

ASIO.DeviceStart method

Previous pageReturn to chapter overviewNext page

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 Active Sound Recorder in conjunction with Active DJ Studio, you should prefer calling this method using the same ASIO.DeviceStart method available inside Active 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 ASIO object section and the How to manage ASIO drivers tutorial.

 

 

Syntax

 

[Visual Basic]

control.ASIO.DeviceStart (

nDeviceIndex as Integer,

nSampleRate as Long,

nChannelMode as enumAsioChannelModes,

nOutputChannelFirst as Integer

) as enumErrorCodes


 

[C++]

short control.ASIO.DeviceStart (

short nDeviceIndex,

long nSampleRate,

short nChannelMode,

short 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: If you are using Active Sound Recorder in conjunction with Active DJ Studio, as seen inside the AsioStreamMixer sample, you should prefer calling this method using the sane ASIO.DeviceStart method available inside Active DJ Studio so you would have a better control over the playback mode.

 

Supported values are the following:

Mnemonic constant

Value

Meaning

ASIO_CHANNEL_MODE_MULTI

0

Enables multichannel playback mode.

ASIO_CHANNEL_MODE_STEREO

1

Enables stereo playback mode.

When NOT using Active Sound Recorder in conjunction with Active DJ Studio you can use this setting.

ASIO_CHANNEL_MODE_MIRROR_STEREO

2

Enables stereo channels mirroring playback mode.

ASIO_CHANNEL_MODE_MIRROR_MONO

3

Enables mono channel mirroring playback mode.

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 volume has been changed correctly