BASS.NET API for the Un4seen BASS Audio LibraryBASS_BFX_MIX ClassBASS.NET API for the Un4seen BASS Audio Library
Used with BASS_ChannelSetFX(Int32, BASSFXType, Int32), BASS_FXSetParameters(Int32, Object) and BASS_FXGetParameters(Int32, Object) to retrieve and set the parameters of the DSP effect Swap/Remap/Downmix.
Inheritance Hierarchy

SystemObject
  Un4seen.Bass.AddOn.FxBASS_BFX_MIX

Namespace: Un4seen.Bass.AddOn.Fx
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

[SerializableAttribute]
[StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public sealed class BASS_BFX_MIX

The BASS_BFX_MIX type exposes the following members.

Constructors

  NameDescription
Public methodBASS_BFX_MIX(Int32)
Constructor assigning a linear 1:1 remap (0=CHAN1, 1=CHAN2 etc.).
Public methodCode exampleBASS_BFX_MIX(BASSFXChan)
Constructor already setting the channel order.
Top
Methods

  NameDescription
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Protected methodFinalize
Default Finilizer.
(Overrides ObjectFinalize.)
Top
Fields

  NameDescription
Public fieldlChannel
Array of channels to mix together using BASSFXChan flag's (lChannel[0]=1st=left, lChannel[0]=2nd=right channel etc.).
Top
Remarks

This effect mixes those channels together which are specified in the 'lChannel' array. Where each array element represent the target channel (0=CHAN1, 1=CHAN2 etc.) it's value represents the source channels which should be mixed together. If you set a BASS_BFX_CHANNONE flag on a channel, then it will be muted. This allows you to either downmix, remap or swap any channels with/to any channel.

Example 1: Downmix Channel 1 with Channel 5 and put it in Channel 1

lChannel[0] = BASSFXChan.BASS_BFX_CHAN1 | BASSFXChan.BASS_BFX_CHAN5

Example 2: Swap channel 1 and channel 2

lChannel[0] = BASSFXChan.BASS_BFX_CHAN2
lChannel[1] = BASSFXChan.BASS_BFX_CHAN1

Example 3: Duplicate channel 1 to channel 2

lChannel[0] = BASSFXChan.BASS_BFX_CHAN1
lChannel[1] = BASSFXChan.BASS_BFX_CHAN1

Example 4: Remap channel 1 so it will be in channel 2 and 3

lChannel[0] = BASSFXChan.BASS_BFX_CHANNONE
lChannel[1] = BASSFXChan.BASS_BFX_CHAN1
lChannel[2] = BASSFXChan.BASS_BFX_CHAN1

Example 5: Downmix 5.1 to Stereo

lChannel[0] = BASSFXChan.BASS_BFX_CHAN1 | BASSFXChan.BASS_BFX_CHAN3 | BASSFXChan.BASS_BFX_CHAN5
lChannel[1] = BASSFXChan.BASS_BFX_CHAN2 | BASSFXChan.BASS_BFX_CHAN4 | BASSFXChan.BASS_BFX_CHAN6
lChannel[2] = BASSFXChan.BASS_BFX_CHANNONE
lChannel[3] = BASSFXChan.BASS_BFX_CHANNONE
lChannel[4] = BASSFXChan.BASS_BFX_CHANNONE
lChannel[5] = BASSFXChan.BASS_BFX_CHANNONE

Multi-channel index is as follows:

Mono0=left.
Stereo0=left, 1=right.
3 channels0=left-front, 1=right-front, 2=center.
4 channels0=left-front, 1=right-front, 2=left-rear/side, 3=right-rear/side.
6 channels (5.1)0=left-front, 1=right-front, 2=center, 3=LFE, 4=left-rear/side, 5=right-rear/side.
8 channels (7.1)0=left-front, 1=right-front, 2=center, 3=LFE, 4=left-rear/side, 5=right-rear/side, 6=left-rear center, 7=right-rear center.

See Also

Reference