Effects.ChannelsRemapApply method |
|
Remarks
Applies a remapping or swapping or mixing of audio channels of the song loaded into the given player. This effect can be reset through the Effects.ChannelsRemapReset method.
See the How to apply special effects to a playing sound section for further details.
Syntax
[Visual Basic] Public Function ChannelsRemapApply ( nPlayerIndex as Int16, mapChans as Int32, nChannelsToMap as Int16 ) as enumErrorCodes |
[C#] public enumErrorCodes ChannelsRemapApply ( Int16 nPlayerIndex, enumRemapChannels[] mapChans, Int16 nChannelsToMap ); |
[C++] public: enumErrorCodes ChannelsRemapApply ( Int16 nPlayerIndex, enumRemapChannels __gc[] mapChans, Int16 nChannelsToMap ); |
Parameter |
Description |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
nPlayerIndex |
Number representing the zero-based index of the involved player |
||||||||||||||||||||||||||||||
mapChans |
The map of available channels, can be a combination of the following values:
|
||||||||||||||||||||||||||||||
nChannelsToMap |
Number of channels covered by the map. |
Multi-channel order of each channel is as follows:
• | 3 channels left-front, right-front, center. |
• | 4 channels left-front, right-front, left-rear/side, right-rear/side. |
• | 5 channels left-front, right-front, center, left-rear/side, right-rear/side. |
• | 6 channels (5.1) left-front, right-front, center, LFE, left-rear/side, right-rear/side. |
• | 8 channels (7.1) left-front, right-front, center, LFE, left-rear/side, right-rear/side, left-rear center, right-rear center. |
The following snippets show some possible combination.
Swapping of left and right stereo channels:
Visual Basic |
' define the map of channels Dim mapChannels As enumRemapChannels() = New enumRemapChannels(2){} mapChannels(0) = enumRemapChannels.REMAP_CHANNEL_1 mapChannels(1) = enumRemapChannels.REMAP_CHANNEL_0
' apply the new map audioDjStudio1.Effects.ChannelsRemapApply (Player_1, mapChannels, 2)
|
C# |
// define the map of channels enumRemapChannels[] mapChannels = new enumRemapChannels[2]; mapChannels[0] = enumRemapChannels.REMAP_CHANNEL_1; mapChannels[1] = enumRemapChannels.REMAP_CHANNEL_0;
// apply the new map audioDjStudio1.Effects.ChannelsRemapApply (Player_1, mapChannels, 2);
|
Mixing of left and right stereo channels:
Visual Basic |
' define the map of channels Dim mapChannels As enumRemapChannels() = New enumRemapChannels(2){} mapChannels(0) = enumRemapChannels.REMAP_CHANNEL_0 Or enumRemapChannels.REMAP_CHANNEL_1 mapChannels(1) = enumRemapChannels.REMAP_CHANNEL_0 Or enumRemapChannels.REMAP_CHANNEL_1
' apply the new map audioDjStudio1.Effects.ChannelsRemapApply (Player_1, mapChannels, 2)
|
C# |
// define the map of channels enumRemapChannels[] mapChannels = new enumRemapChannels[2]; mapChannels[0] = enumRemapChannels.REMAP_CHANNEL_0 | enumRemapChannels.REMAP_CHANNEL_1; mapChannels[1] = enumRemapChannels.REMAP_CHANNEL_0 | enumRemapChannels.REMAP_CHANNEL_1;
// apply the new map audioDjStudio1.Effects.ChannelsRemapApply (Player_1, mapChannels, 2);
|
Muting of left channel:
Visual Basic |
' define the map of channels Dim mapChannels As enumRemapChannels() = New enumRemapChannels(2){} mapChannels(0) = enumRemapChannels.REMAP_CHANNEL_SILENT mapChannels(1) = enumRemapChannels.REMAP_CHANNEL_1
' apply the new map audioDjStudio1.Effects.ChannelsRemapApply (Player_1, mapChannels, 2)
|
C# |
// define the map of channels enumRemapChannels[] mapChannels = new enumRemapChannels[2]; mapChannels[0] = enumRemapChannels.REMAP_CHANNEL_SILENT; mapChannels[1] = enumRemapChannels.REMAP_CHANNEL_1;
// apply the new map audioDjStudio1.Effects.ChannelsRemapApply (Player_1, mapChannels, 2);
|
Swapping of front and rear channels on a 4 channels song:
Visual Basic |
' define the map of channels Dim mapChannels As enumRemapChannels() = New enumRemapChannels(4){} mapChannels(0) = enumRemapChannels.REMAP_CHANNEL_2 mapChannels(1) = enumRemapChannels.REMAP_CHANNEL_3 mapChannels(2) = enumRemapChannels.REMAP_CHANNEL_0 mapChannels(3) = enumRemapChannels.REMAP_CHANNEL_1
' apply the new map audioDjStudio1.Effects.ChannelsRemapApply (Player_1, mapChannels, 4)
|
C# |
// define the map of channels enumRemapChannels[] mapChannels = new enumRemapChannels[4]; mapChannels[0] = enumRemapChannels.REMAP_CHANNEL_2; mapChannels[1] = enumRemapChannels.REMAP_CHANNEL_3; mapChannels[2] = enumRemapChannels.REMAP_CHANNEL_0; mapChannels[3] = enumRemapChannels.REMAP_CHANNEL_1;
// apply the new map audioDjStudio1.Effects.ChannelsRemapApply (Player_1, mapChannels, 4);
|
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. |