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] control.Effects.ChannelsRemapApply ( nPlayer as Integer, mapChans as Long, nChannelsToMap as Integer ) as enumErrorCodes |
[C++] short control.Effects.ChannelsRemapApply ( short nPlayer, long *mapChans, short nChannelsToMap ); |
Parameter |
Description |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
nPlayer |
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 6 |
' define the map of channels Dim mapChannels(2) As Long mapChannels(0) = enumRemapChannels.REMAP_CHANNEL_1 mapChannels(1) = enumRemapChannels.REMAP_CHANNEL_0
' apply the new map Amp3dj1.Effects.ChannelsRemapApply Player_1, VarPtr(mapChannels(0)), 2
|
Visual C++ |
// define the map of channels long mapChannels[2]; mapChannels[0] = REMAP_CHANNEL_1; mapChannels[1] = REMAP_CHANNEL_0;
// apply the new map Amp3dj1.GetEffects().ChannelsRemapApply (Player_1, mapChannels, 2);
|
Mixing of left and right stereo channels:
Visual Basic 6 |
' define the map of channels Dim mapChannels(2) As Long 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 Amp3dj1.Effects.ChannelsRemapApply Player_1, VarPtr(mapChannels(0)), 2
|
Visual C++ |
// define the map of channels long mapChannels[2]; mapChannels[0] = REMAP_CHANNEL_0 | REMAP_CHANNEL_1; mapChannels[1] = REMAP_CHANNEL_0 | REMAP_CHANNEL_1;
// apply the new map Amp3dj1.GetEffects().ChannelsRemapApply (Player_1, mapChannels, 2);
|
Muting of left channel:
Visual Basic 6 |
' define the map of channels Dim mapChannels(2) As Long mapChannels(0) = enumRemapChannels.REMAP_CHANNEL_SILENT mapChannels(1) = enumRemapChannels.REMAP_CHANNEL_1
' apply the new map Amp3dj1.Effects.ChannelsRemapApply Player_1, VarPtr(mapChannels(0)), 2
|
Visual C++ |
// define the map of channels long mapChannels[2]; mapChannels[0] = REMAP_CHANNEL_SILENT; mapChannels[1] = REMAP_CHANNEL_1;
// apply the new map Amp3dj1.GetEffects().ChannelsRemapApply (Player_1, mapChannels, 2);
|
Swapping of front and rear channels on a 4 channels song:
Visual Basic 6 |
' define the map of channels Dim mapChannels(4) As Long 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 Amp3dj1.Effects.ChannelsRemapApply Player_1, VarPtr(mapChannels(0)), 4
|
Visual C++ |
// define the map of channels long mapChannels[4]; mapChannels[0] = REMAP_CHANNEL_2; mapChannels[1] = REMAP_CHANNEL_3; mapChannels[2] = REMAP_CHANNEL_0; mapChannels[3] = REMAP_CHANNEL_1;
// apply the new map Amp3dj1.GetEffects().ChannelsRemapApply (Player_1, mapChannels, 4);
|
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred (see the LastError property for further error details) |
enumErrorCodes.ERR_NOERROR (0) |
The call was successful. |