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 for Option<A>where A: AudioPlayer,

§

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

§

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

source§

fn play( &self, sound: &<Option<A> as AudioPlayer>::Sound ) -> <Option<A> as AudioPlayer>::Handle

source§

fn play_loop( &self, sound: &<Option<A> as AudioPlayer>::Sound ) -> <Option<A> as AudioPlayer>::Handle

source§

fn load_sound(&self, bytes: &'static [u8]) -> <Option<A> as AudioPlayer>::Sound

Implementors§