FMExChannel2D Class
This is a base class that provides panning and speaker-routing functionality for all non-3D audio players and streams.
Important: FMExChannel2D instances should not be created directly - use an appropriate subclass instead.
Properties
Expand All | Collapse All
-
Pan As Double
Adjusts the stereo-image panning of the channel in the range of -1.0 (full left) and 1.0 (full right). The default is centered (0.0).
Methods
Expand All | Collapse All
-
SetSpeakerLevels ( speaker As Integer, ParamArray levels As Single )
Sets the volume level of each channel in the audio for the given speaker index. The number of levels should match the number of channels in the audio - e.g. mono would use 1 level, stereo would require 2, etc. Levels range from 0.0 (silence) to 1.0 (full volume). The speaker parameter should be one of the constants listed below, or a number ranging from 0 to 15 inclusive when using the raw speaker mode. The following example swaps the left and right channels of a stereo sound:' myPlayer created elsewhere - e.g. an FMExAudioPlayer instance or FMExStream myPlayer.SetSpeakerLevels( FMExConfig.kSpeakerIndexFrontLeft, 0.0, 1.0 ) myPlayer.SetSpeakerLevels( FMExConfig.kSpeakerIndexFrontRight, 1.0, 0.0 )
Speaker constants:- FMExConfig.kSpeakerIndexMono
- FMExConfig.kSpeakerIndexFrontLeft
- FMExConfig.kSpeakerIndexFrontRight
- FMExConfig.kSpeakerIndexLowFreqency
- FMExConfig.kSpeakerIndexFrontCenter
- FMExConfig.kSpeakerIndexBackLeft
- FMExConfig.kSpeakerIndexBackRight
- FMExConfig.kSpeakerIndexSideLeft
- FMExConfig.kSpeakerIndexSideRight
Tip: This method is mostly useful when using the raw output to route audio on multichannel hardware, but can also be used to down-mix multichannel audio samples to stereo, or pan mono/stereo sounds to surround speakers, or implement custom panning power-laws.