Skip to main content
← PSoXide SDK guides and examples · SDK 80d1c329e977 · All Cargo features enabled; check feature gates before use.

Center

Enum Center 

Source
pub enum Center {
    Unity,
    Minus3Db,
}
Expand description

Which centre loss a PanLaw::EqualPower has.

§Example

use psx_sfx::space::{Center, PanLaw};

let (l, r) = PanLaw::EqualPower(Center::Unity).apply(8000, 0);
assert_eq!((l, r), (8000, 8000));
let (l, _) = PanLaw::EqualPower(Center::Minus3Db).apply(8000, 0);
assert!(l < 8000);

Variants§

§

Unity

A centred sound keeps its full level on both ears and the louder side of an off-centre sound clamps at that level: a loud mono sound loses nothing, but power is no longer exactly constant near the middle.

§

Minus3Db

The textbook law: a centred sound is 3 dB down on each ear, and the sum of squares is constant across the whole pan range.

Trait Implementations§

Source§

impl Clone for Center

Source§

fn clone(&self) -> Center

Returns a duplicate of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Center

Source§

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

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

impl PartialEq for Center

Source§

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

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

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 Copy for Center

Source§

impl Eq for Center

Source§

impl StructuralPartialEq for Center

Auto Trait Implementations§

§

impl Freeze for Center

§

impl RefUnwindSafe for Center

§

impl Send for Center

§

impl Sync for Center

§

impl Unpin for Center

§

impl UnsafeUnpin for Center

§

impl UnwindSafe for Center

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

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
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.