pub trait Audio {
    fn unit_scale(&self) -> f32;
fn set_unit_scale(&mut self, scale: f32);
fn listener_position(&self) -> (f32, f32);
fn set_listener_position(&mut self, x: f32, y: f32);
fn play_sound(&mut self, sound_id: DataId<Sound>) -> Option<Voice>;
fn play_sound_with(
        &mut self,
        sound_id: DataId<Sound>,
        voice_info: &VoiceInfo
    ) -> Option<Voice>;
fn stop_voice(&mut self, voice: &Voice) -> bool;
fn voice(&self, voice: &Voice) -> Option<VoiceInfo>;
fn set_voice(&mut self, voice: &Voice, voice_info: &VoiceInfo) -> bool;
fn max_voices(&self) -> usize;
fn sync_sound_store(
        &mut self,
        sound_store: &mut DataStore<Sound>
    ) -> Result<(), PreparedStoreError>; }
Expand description

Public interface to controlling audio in your game

Required methods

Implementors