#[repr(u32)]pub enum SpeakerMode {
Default = 0,
Raw = 1,
Mono = 2,
Stereo = 3,
Quad = 4,
Surround = 5,
FivePointOne = 6,
SevenPointOne = 7,
SevenPointOneFour = 8,
}
Expand description
Speaker mode types.
Note below the phrase ‘sound channels’ is used. These are the subchannels inside a sound, they are not related and have nothing to do with the FMOD class “Channel”.
For example a mono sound has 1 sound channel, a stereo sound has 2 sound channels, and an AC3 or 6 channel wav file have 6 “sound channels”.
FMOD_SPEAKERMODE_RAW
This mode is for output devices that are not specifically mono/stereo/quad/surround/5.1 or 7.1, but are multi-channel.
- Use
SystemBuilder::software_format
to specify the number of speakers you want to address, otherwise it will default to 2 (stereo). - Sound channels map to speakers sequentially, so a mono sound maps to output speaker 0, stereo sound maps to output speaker 0 & 1.
- The user assumes knowledge of the speaker order.
Speaker
enumerations may not apply, so raw channel indices should be used. - Multi-channel sounds map input channels to output channels 1:1.
- Speaker levels must be manually set with
ChannelControl::set_mix_matrix
. ChannelControl::set_pan
andChannelControl::set_mix_levels_output
do not work.
FMOD_SPEAKERMODE_MONO
This mode is for a 1 speaker arrangement.
- Panning does not work in this speaker mode.
- Mono, stereo and multi-channel sounds have each sound channel played on the one speaker at unity.
- Mix behavior for multi-channel sounds can be set with
ChannelControl::set_mix_matrix
.
FMOD_SPEAKERMODE_STEREO
This mode is for 2 speaker arrangements that have a left and right speaker.
- Mono sounds default to an even distribution between left and right. They can be panned with
ChannelControl::set_pan
. - Stereo sounds default to the middle, or full left in the left speaker and full right in the right speaker.
They can be cross faded with
ChannelControl::set_pan
. - Multi-channel sounds have each sound channel played on each speaker at unity.
- Mix behavior for multi-channel sounds can be set with
ChannelControl::set_mix_matrix
.
FMOD_SPEAKERMODE_QUAD
This mode is for 4 speaker arrangements that have a front left, front right, surround left and a surround right speaker.
- Mono sounds default to an even distribution between front left and front right. They can be panned with
ChannelControl::set_pan
. - Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right.
They can be cross faded with
ChannelControl::set_pan
. - Multi-channel sounds default to all of their sound channels being played on each speaker in order of input.
- Mix behavior for multi-channel sounds can be set with
ChannelControl::set_mix_matrix
.
FMOD_SPEAKERMODE_SURROUND
This mode is for 5 speaker arrangements that have a left/right/center/surround left/surround right.
- Mono sounds default to the center speaker. They can be panned with
ChannelControl::set_pan
. - Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right.
They can be cross faded with
ChannelControl::set_pan
. - Multi-channel sounds default to all of their sound channels being played on each speaker in order of input.
- Mix behavior for multi-channel sounds can be set with
ChannelControl::set_mix_matrix
.
FMOD_SPEAKERMODE_5POINT1
This mode is for 5.1 speaker arrangements that have a left/right/center/surround left/surround right and a subwoofer speaker.
- Mono sounds default to the center speaker. They can be panned with
ChannelControl::set_pan
. - Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right.
They can be cross faded with
ChannelControl::set_pan
. - Multi-channel sounds default to all of their sound channels being played on each speaker in order of input.
- Mix behavior for multi-channel sounds can be set with
ChannelControl::set_mix_matrix
.
FMOD_SPEAKERMODE_7POINT1
This mode is for 7.1 speaker arrangements that have a left/right/center/surround left/surround right/rear left/rear right and a subwoofer speaker.
- Mono sounds default to the center speaker. They can be panned with
ChannelControl::set_pan
. - Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right.
They can be cross faded with
ChannelControl::set_pan
. - Multi-channel sounds default to all of their sound channels being played on each speaker in order of input.
- Mix behavior for multi-channel sounds can be set with
ChannelControl::set_mix_matrix
.
See the FMOD Studio Mixing Guide for graphical depictions of each speaker mode.
Variants§
Default = 0
Default speaker mode for the chosen output mode which will resolve after SystemBuilder::build
.
Raw = 1
Assume there is no special mapping from a given channel to a speaker, channels map 1:1 in order.
Use SystemBuilder::software_format
to specify the speaker count.
Mono = 2
1 speaker setup (monaural).
Stereo = 3
2 speaker setup (stereo) front left, front right.
Quad = 4
4 speaker setup (4.0) front left, front right, surround left, surround right.
Surround = 5
5 speaker setup (5.0) front left, front right, center, surround left, surround right.
FivePointOne = 6
6 speaker setup (5.1) front left, front right, center, low frequency, surround left, surround right.
SevenPointOne = 7
8 speaker setup (7.1) front left, front right, center, low frequency, surround left, surround right, back left, back right.
SevenPointOneFour = 8
12 speaker setup (7.1.4) front left, front right, center, low frequency, surround left, surround right, back left, back right, top front left, top front right, top back left, top back right.
Trait Implementations§
Source§impl Clone for SpeakerMode
impl Clone for SpeakerMode
Source§fn clone(&self) -> SpeakerMode
fn clone(&self) -> SpeakerMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SpeakerMode
impl Debug for SpeakerMode
Source§impl From<SpeakerMode> for u32
impl From<SpeakerMode> for u32
Source§fn from(enum_value: SpeakerMode) -> Self
fn from(enum_value: SpeakerMode) -> Self
Source§impl PartialEq for SpeakerMode
impl PartialEq for SpeakerMode
Source§impl ReadableParameter for SpeakerMode
impl ReadableParameter for SpeakerMode
Source§fn get_parameter_string(dsp: Dsp, index: c_int) -> Result<Utf8CString>
fn get_parameter_string(dsp: Dsp, index: c_int) -> Result<Utf8CString>
index
.Source§impl TryFrom<u32> for SpeakerMode
impl TryFrom<u32> for SpeakerMode
Source§type Error = TryFromPrimitiveError<SpeakerMode>
type Error = TryFromPrimitiveError<SpeakerMode>
Source§impl TryFromPrimitive for SpeakerMode
impl TryFromPrimitive for SpeakerMode
const NAME: &'static str = "SpeakerMode"
type Primitive = u32
type Error = TryFromPrimitiveError<SpeakerMode>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Source§impl UnsafeFromPrimitive for SpeakerMode
impl UnsafeFromPrimitive for SpeakerMode
type Primitive = u32
Source§unsafe fn unchecked_transmute_from(number: Self::Primitive) -> Self
unsafe fn unchecked_transmute_from(number: Self::Primitive) -> Self
Source§unsafe fn from_unchecked(number: Self::Primitive) -> Self
unsafe fn from_unchecked(number: Self::Primitive) -> Self
unchecked_transmute_from
, from_unchecked
will be removed in a future release.