FMExSubMixer Class
Sub-mixers are used to group and control audio playback from various audio players and/or streams before being sent to the master mixer, or to provide an auxiliary mix that's entirely independent from the master mix. Use the FMExChannel.RouteToSubMixer method to configure audio routings through sub-mixers.
Important: Use the FMEx.CreateSubMixer method to create a new sub-mixer. This class cannot be constructed using the New keyword.
Important: You must successfully initialize FMOD Ex via the FMEx.StartUp method before creating FMExSubMixer objects. Also note that all existing FMExSubMixer instances become invalidated after calling FMEx.ShutDown. Please see the Restarting FMOD Ex section for details on how to properly restart FMOD Ex should the need arise.
Properties
-
Handle As Integer
Mostly for internal use. Returns an FMOD_CHANNELGROUP handle which can be used in custom declare statements. -
IsMuted As Boolean
Returns True if the sub-mixer is muted. -
IsPaused As Boolean
Returns True if the sub-mixer is paused. -
Pitch As Double = 1.0
Scales the playback rate of the sub-mixer. E.g. 0.5 plays back at half speed, 1.0 is normal, and 2.0 is double speed. This value is capped internally by FMOD Ex to a value between 0.0 and 10.0. -
Volume As Double = 1.0
Adjusts the volume for the sub-mixer in the range of 0.0 (silence) to 1.0 (full volume).
Methods
-
Level ( channeloffset As Integer ) As Double
Returns the volume level of the sub-mixer for the given speaker index. Levels range from 0.0 to 1.0. channeloffset should be one of the constants listed below, or a number ranging from 0 to 15 inclusive when using the raw speaker mode. Note that the number of valid output channels depends on the current speaker mode and driver capabilities.
Channel Offset constants:- FMExConfig.kSpeakerIndexMono
- FMExConfig.kSpeakerIndexFrontLeft
- FMExConfig.kSpeakerIndexFrontRight
- FMExConfig.kSpeakerIndexLowFreqency
- FMExConfig.kSpeakerIndexFrontCenter
- FMExConfig.kSpeakerIndexBackLeft
- FMExConfig.kSpeakerIndexBackRight
- FMExConfig.kSpeakerIndexSideLeft
- FMExConfig.kSpeakerIndexSideRight
-
Mute
Toggles the muted state of the sub-mixer. -
Pause
Toggles the paused state of the sub-mixer.