FMExChannel Class
This is a base class that provides common functionality for all audio players and streams.
Important: FMExChannel instances should not be created directly - use an appropriate subclass instead.
Properties
Expand All | Collapse All
-
Handle As Integer
Mostly for internal use. Returns the FMOD_CHANNEL handle which can be used in custom declare statements. Note that this handle will be zero unless the channel is currently playing, and the pointer will change every time the channel is stopped and re-played. To ensure proper virualization, these classes do not use persistent FMOD Ex channels nor do they re-use channel pointers. -
IsMuted As Boolean
Returns True if the channel is muted. -
IsPaused As Boolean
Returns True if the channel is paused. -
IsPlaying As Boolean
Returns True if the channel is playing. Note that paused and/or muted channels may still be considered as playing. -
Pitch As Double = 1.0
Scales the playback rate of the channel. E.g. 0.5 plays back at half speed, 1.0 is normal, and 2.0 is double speed. Pitch can be set to a negative number to reverse playback for non-streaming audio. This value is capped internally by FMOD Ex to an absolute maximum of 10.0. -
PlayCursorPosition As Integer
Sets or reads the play cursor position measured in samples for the currently playing audio or stream. -
PlayCursorTime As Integer
Sets or reads the play cursor position measured in milliseconds for the currently playing audio or stream. -
Priority As Integer = 128
When FMOD Ex runs out of available playback channels it must free up a slot by stopping one of the currently playing channels. Priority can be used to ensure more important sounds are not overridden by less important sounds. The default priority for all channels is 128, and lower values are considered more important than higher values. E.g. Use a priority of 0 for streaming music to ensure it isn't interrupted. Valid values range from 0 to 256. -
Volume As Double = 1.0
Adjusts the volume of the channel in the range of 0.0 (silence) and 1.0 (full volume).
Methods
Expand All | Collapse All
-
Level ( channeloffset As Integer ) As Double
Returns the volume level of the channel 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 channel. -
Pause
Toggles the paused state of the channel. -
RouteToSubMixer ( mixer As FMExSubMixer )
Routes this channel's audio playback to the specified sub-mixer. Pass Nil to reset the routing to the master mix. -
Stop
Stops playback immediately. -
StopLooping
Stops playback when the currently playing audio reaches its end point. This is typically only useful when playback was initiated via a PlayLooping method.