Copyright © 2001-2020 MultiMedia Soft

ASIO.AttachInputChannelToPlayer method

Previous pageReturn to chapter overviewNext page

Remarks

 

Attaches one or more ASIO input channels of the given ASIO device to the given player allowing to playback incoming sound directly to the output device selected for the given player. Using input channels as playback channels allows to get sound coming from an input channel of the ASIO device, for example the Line-in or the Microphone, and to send it in playback with very low latency.

 

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.AttachInputChannelToPlayer (

nPlayer as Integer,

nDeviceIndex as Integer,

nFirstChannel as Integer,

nTotalChannels as Integer

) as enumErrorCodes


 

[C++]

short control.ASIO.AttachInputChannelToPlayer (

short nPlayer,

short nDeviceIndex,

short nFirstChannel,

short nTotalChannels

);


 

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the involved player

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 output devices enumerated through the GetOutputDevicesCount and GetOutputDeviceDesc methods which may contain both DirectSound and ASIO devices.

nFirstChannel

Number representing the zero-based index of the first ASIO input channel to attach to the player.

nTotalChannels

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

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

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

- if you should need to playback 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.

 

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful