AudioPlayer

Trait AudioPlayer 

Source
pub trait AudioPlayer {
    type Sound;
    type Handle: AudioHandle;

    // Required methods
    fn play(&self, sound: &Self::Sound) -> Self::Handle;
    fn play_loop(&self, sound: &Self::Sound) -> Self::Handle;
    fn load_sound(&self, bytes: &'static [u8]) -> Self::Sound;
}

Required Associated Types§

Required Methods§

Source

fn play(&self, sound: &Self::Sound) -> Self::Handle

Source

fn play_loop(&self, sound: &Self::Sound) -> Self::Handle

Source

fn load_sound(&self, bytes: &'static [u8]) -> Self::Sound

Implementations on Foreign Types§

Source§

impl<A: AudioPlayer> AudioPlayer for Option<A>

Source§

type Sound = Option<<A as AudioPlayer>::Sound>

Source§

type Handle = Option<<A as AudioPlayer>::Handle>

Source§

fn play(&self, sound: &Self::Sound) -> Self::Handle

Source§

fn play_loop(&self, sound: &Self::Sound) -> Self::Handle

Source§

fn load_sound(&self, bytes: &'static [u8]) -> Self::Sound

Implementors§