Trait AudioDriver

Source
pub trait AudioDriver {
    // Required methods
    fn play_pulse(&mut self, channel: Channel, pulse_options: PulseOptions);
    fn play_custom_wave(
        &mut self,
        channel: Channel,
        wave_options: CustomWaveOptions,
    );
    fn play_noise(&mut self, channel: Channel, noise_options: NoiseOptions);
    fn stop(&mut self, channel: Channel);
    fn set_gain(&mut self, channel: Channel, gain: f32);
    fn set_stereo_gain(
        &mut self,
        channel: Channel,
        stereo_channel: StereoChannel,
        gain: f32,
    );
    fn set_frequency(&mut self, channel: Channel, frequency: f32);
    fn mute_all(&mut self);
    fn unmute_all(&mut self);
    fn set_master_volume(&mut self, value: u8);
}

Required Methods§

Source

fn play_pulse(&mut self, channel: Channel, pulse_options: PulseOptions)

Source

fn play_custom_wave( &mut self, channel: Channel, wave_options: CustomWaveOptions, )

Source

fn play_noise(&mut self, channel: Channel, noise_options: NoiseOptions)

Source

fn stop(&mut self, channel: Channel)

Source

fn set_gain(&mut self, channel: Channel, gain: f32)

Source

fn set_stereo_gain( &mut self, channel: Channel, stereo_channel: StereoChannel, gain: f32, )

Source

fn set_frequency(&mut self, channel: Channel, frequency: f32)

Source

fn mute_all(&mut self)

Source

fn unmute_all(&mut self)

Source

fn set_master_volume(&mut self, value: u8)

Implementors§