Copyright © 2006-2019 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 Audio Sound Recorder API in conjunction with Audio DJ Studio API, you should prefer calling this method using the same ASIO.DeviceStart method available inside Audio DJ Studio API 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 API in conjunction with Audio DJ Studio API, as seen inside the AsioStreamMixer sample,  you should prefer calling this method using the same ASIO.DeviceStart method available inside Audio DJ Studio API 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 Audio Sound Recorder API in conjunction with Audio DJ Studio API 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 method call was successful.