Audition

Struct Audition 

Source
pub struct Audition {
    pub system: System,
    pub sampler: Sampler,
    pub music: Music,
    pub voices: VecMap<Voice>,
}
Expand description

A high-level interface to an FMOD System

Fields§

§system: System§sampler: Sampler§music: Music§voices: VecMap<Voice>

Implementations§

Source§

impl Audition

Source

pub fn new() -> Self

Create with default FMOD system

Source

pub fn with_system(system: System) -> Self

Create with provided initialized FMOD system

Source

pub fn set_master_volume(&self, volume: f32)

Sets the master volume on the master channel group

Source

pub fn load_samples(&mut self, samples: VecMap<String>)

Load sound sample files with given filenames.

Source

pub fn load_samples_memory(&mut self, samples: VecMap<&[u8]>)

Load sound sample files from memory.

Source

pub fn load_samples_pcm(&mut self, samples: VecMap<&[i16]>)

Load sound sample files from PCM data.

Source

pub fn load_songs_midi(&mut self, songs: VecMap<(String, String)>)

Load standard MIDI files (.mid) with given soundfont file paths (.dls)

Source

pub fn load_songs_midi_memory(&mut self, songs: VecMap<(&[u8], String)>)

Load standard MIDI files (.mid) from memory, with given soundfont file paths (.dls)

Source

pub fn new_voice(&mut self) -> Id

Source

pub fn remove_voice(&mut self, voice_id: Id) -> Option<Voice>

Source

pub fn update(&mut self)

Convennience method to call the update() method of the FMOD system

Trait Implementations§

Source§

impl Debug for Audition

Source§

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

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

impl Default for Audition

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Audition

Source§

fn eq(&self, other: &Audition) -> 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 StructuralPartialEq for Audition

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> 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, 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.