[][src]Struct riddle_audio::AudioSystemHandle

pub struct AudioSystemHandle { /* fields omitted */ }

Implementations

impl AudioSystemHandle[src]

pub fn downgrade(this: &AudioSystemHandle) -> AudioSystemWeak[src]

Downgrade this handle to a weak handle

pub fn eq(a: &AudioSystemHandle, b: &AudioSystemHandle) -> bool[src]

Test whether two handles point to the same location in memory

Methods from Deref<Target = AudioSystem>

pub fn process_frame(&self)[src]

Update the system's state.

Updates all ClipPlayer fades. This must be called periodically for the AudioSystem to function. Do not call this if the riddle crate is being used.

Example

let audio_system = AudioSystem::new()?;

// Tick the audio system every 100ms
let start_time = std::time::Instant::now();
while std::time::Instant::now() - start_time < std::time::Duration::from_secs(2) {
    audio_system.process_frame();
    std::thread::sleep(std::time::Duration::from_millis(100));
}

Trait Implementations

impl Clone for AudioSystemHandle[src]

impl Deref for AudioSystemHandle[src]

type Target = AudioSystem

The resulting type after dereferencing.

Auto Trait Implementations

impl RefUnwindSafe for AudioSystemHandle

impl Send for AudioSystemHandle

impl Sync for AudioSystemHandle

impl Unpin for AudioSystemHandle

impl UnwindSafe for AudioSystemHandle

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.