[−][src]Struct nuuro::Audio
Struct for audio playback.
Methods
impl<A: AppAssetId> Audio<A>
[src]
pub fn play_sound(&mut self, sound: A::Sound, volume: f32)
[src]
Plays the given sound effect once.
The volume value 1.0
is the "normal" volume (unfiltered input).
Any value other than 1.0
will multiply each sample by this value.
pub fn play_music(&mut self, music: A::Music, volume: f32)
[src]
Plays the given music once, replacing the currently playing music, if any.
The volume value 1.0
is the "normal" volume (unfiltered input).
Any value other than 1.0
will multiply each sample by this value.
pub fn loop_music(&mut self, music: A::Music, volume: f32)
[src]
Continually loops the given music, replacing the currently playing music, if any.
The volume value 1.0
is the "normal" volume (unfiltered input).
Any value other than 1.0
will multiply each sample by this value.
pub fn stop_music(&mut self)
[src]
Stops the currently playing music, if any.
Auto Trait Implementations
impl<A> RefUnwindSafe for Audio<A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
impl<A> Send for Audio<A> where
A: Send,
A: Send,
impl<A> Sync for Audio<A> where
A: Sync,
A: Sync,
impl<A> Unpin for Audio<A> where
A: Unpin,
A: Unpin,
impl<A> UnwindSafe for Audio<A> where
A: UnwindSafe,
A: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
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>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,