Copyright © 2005-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 ASIOMan class and the How to manage ASIO drivers tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function AttachInputChannelToPlayer (

nPlayerIndex as Int16,

nDeviceIndex as Int16,

nFirstChannel as Int16,

nTotalChannels as Int16

) as enumErrorCodes


 

[C#]

public enumErrorCodes AttachInputChannelToPlayer (

Int16 nPlayerIndex,

Int16 nDeviceIndex,

Int16 nFirstChannel,

Int16 nTotalChannels

);


 

[C++]

public: enumErrorCodes AttachInputChannelToPlayer (

Int16 nPlayerIndex,

Int16 nDeviceIndex,

Int16 nFirstChannel,

Int16 nTotalChannels

);


 

Parameter

Description

 

 

nPlayerIndex

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 (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.