Enum SpeakerMode

Source
#[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.

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

Source§

fn clone(&self) -> SpeakerMode

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SpeakerMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<SpeakerMode> for u32

Source§

fn from(enum_value: SpeakerMode) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SpeakerMode

Source§

fn eq(&self, other: &SpeakerMode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ReadableParameter for SpeakerMode

Source§

fn get_parameter(dsp: Dsp, index: c_int) -> Result<Self>

Get the parameter at index.
Source§

fn get_parameter_string(dsp: Dsp, index: c_int) -> Result<Utf8CString>

Get the parameter string at index.
Source§

impl ReadableParameterIndex<SpeakerMode> for SpeakerMode

Source§

const TYPE: DspType = DspType::Pan

What type of DSP this index is for.
Source§

fn into_index(self) -> c_int

Convert self into a DSP index.
Source§

impl ReadableParameterIndex<SpeakerMode> for SpeakerMode

Source§

const TYPE: DspType = DspType::Return

What type of DSP this index is for.
Source§

fn into_index(self) -> c_int

Convert self into a DSP index.
Source§

impl TryFrom<u32> for SpeakerMode

Source§

type Error = TryFromPrimitiveError<SpeakerMode>

The type returned in the event of a conversion error.
Source§

fn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for SpeakerMode

Source§

impl UnsafeFromPrimitive for SpeakerMode

Source§

type Primitive = u32

Source§

unsafe fn unchecked_transmute_from(number: Self::Primitive) -> Self

Transmutes into an enum from its primitive. Read more
Source§

unsafe fn from_unchecked(number: Self::Primitive) -> Self

👎Deprecated since 0.6.0: Prefer to use unchecked_transmute_from, from_unchecked will be removed in a future release.
Transmutes into an enum from its primitive. Read more
Source§

impl WritableParameter for SpeakerMode

Source§

fn set_parameter(self, dsp: Dsp, index: c_int) -> Result<()>

Set the parameter at index.
Source§

impl WritableParameterIndex<SpeakerMode> for SpeakerMode

Source§

const TYPE: DspType = DspType::Pan

What type of DSP this index is for.
Source§

fn into_index(self) -> c_int

Convert self into a DSP index.
Source§

impl WritableParameterIndex<SpeakerMode> for SpeakerMode

Source§

const TYPE: DspType = DspType::Return

What type of DSP this index is for.
Source§

fn into_index(self) -> c_int

Convert self into a DSP index.
Source§

impl Copy for SpeakerMode

Source§

impl Eq for SpeakerMode

Source§

impl StructuralPartialEq for SpeakerMode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.