Trait AudioPlayer

Source
pub trait AudioPlayer {
    type Sound;

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

Required Associated Types§

Required Methods§

Source

fn play(&self, sound: &Self::Sound, properties: AudioProperties)

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 = &'static [u8]

Source§

fn play(&self, sound: &Self::Sound, properties: AudioProperties)

Source§

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

Implementors§