pub struct Mixer { /* private fields */ }Implementations§
Source§impl Mixer
impl Mixer
pub fn new(rate: u32, channels: u16) -> Self
pub fn rate(&self) -> u32
pub fn channels(&self) -> u16
pub fn clock(&self) -> u64
pub fn set_seed(&mut self, seed: u64)
pub fn set_master_volume(&mut self, volume: f32)
pub fn set_master_muted(&mut self, muted: bool)
pub fn master_volume(&self) -> f32
pub fn master_muted(&self) -> bool
pub fn set_limiter(&mut self, threshold: Option<f32>)
pub fn limiter(&self) -> Option<f32>
pub fn set_channel_volume(&mut self, channel: ChannelId, volume: f32)
pub fn set_channel_muted(&mut self, channel: ChannelId, muted: bool)
pub fn channel_volume(&self, channel: ChannelId) -> f32
pub fn channel_gain(&self, channel: ChannelId) -> f32
pub fn master_gain(&self) -> f32
pub fn channel_muted(&self, channel: ChannelId) -> bool
pub fn set_channel_pitch(&mut self, channel: ChannelId, ratio: f32)
pub fn glide_channel_pitch( &mut self, channel: ChannelId, ratio: f32, seconds: f32, )
pub fn channel_pitch(&self, channel: ChannelId) -> f32
pub fn set_channel_lowpass(&mut self, channel: ChannelId, hz: Option<f32>)
pub fn set_channel_highpass(&mut self, channel: ChannelId, hz: Option<f32>)
pub fn glide_channel_lowpass( &mut self, channel: ChannelId, hz: Option<f32>, seconds: f32, )
pub fn glide_channel_highpass( &mut self, channel: ChannelId, hz: Option<f32>, seconds: f32, )
pub fn channel_lowpass(&self, channel: ChannelId) -> Option<f32>
pub fn channel_highpass(&self, channel: ChannelId) -> Option<f32>
pub fn set_ducking(&mut self, ducking: Option<Ducking>)
pub fn ducking(&self) -> Option<Ducking>
pub fn ducked_db(&self) -> f32
pub fn play(&mut self, clip: &Clip, level: Level) -> VoiceId
pub fn play_at(&mut self, at: u64, clip: &Clip, level: Level) -> VoiceId
pub fn play_on( &mut self, channel: ChannelId, clip: &Clip, level: Level, ) -> VoiceId
pub fn play_at_on( &mut self, channel: ChannelId, at: u64, clip: &Clip, level: Level, ) -> VoiceId
pub fn play_music( &mut self, track: &MusicTrack, fade_seconds: f32, level: Level, ) -> VoiceId
pub fn stop_music(&mut self, fade_seconds: f32)
pub fn music(&self) -> Option<VoiceId>
pub fn music_position(&self) -> Option<f64>
pub fn stop(&mut self, id: VoiceId, fade_seconds: f32)
pub fn set_volume(&mut self, id: VoiceId, volume: f32)
pub fn set_pan(&mut self, id: VoiceId, pan: f32)
pub fn set_pitch(&mut self, id: VoiceId, ratio: f32)
pub fn glide_pitch(&mut self, id: VoiceId, ratio: f32, seconds: f32)
pub fn pitch(&self, id: VoiceId) -> Option<f32>
pub fn set_resample(&mut self, id: VoiceId, resample: Resample)
pub fn set_gain(&mut self, id: VoiceId, gain: f32)
pub fn glide_gain(&mut self, id: VoiceId, gain: f32, seconds: f32)
pub fn tone( &mut self, channel: ChannelId, wave: Wave, hz: f32, volume: f32, ) -> VoiceId
pub fn tone_in( &mut self, offset: u64, channel: ChannelId, wave: Wave, hz: f32, volume: f32, ) -> VoiceId
pub fn set_envelope(&mut self, id: VoiceId, envelope: Option<Envelope>)
pub fn envelope_level(&self, id: VoiceId) -> Option<f32>
pub fn pcm_stream( &mut self, channel: ChannelId, channels: u16, capacity_seconds: f32, level: Level, ) -> (VoiceId, PcmSender)
pub fn set_tone_frequency(&mut self, id: VoiceId, hz: f32)
pub fn glide_tone_frequency(&mut self, id: VoiceId, hz: f32, seconds: f32)
pub fn sound(&mut self, clip: &Clip, spec: SoundSpec) -> SoundId
pub fn tone_sound( &mut self, wave: Wave, hz: f32, seconds: Option<f32>, spec: SoundSpec, ) -> SoundId
pub fn trigger(&mut self, sound: SoundId) -> Option<VoiceId>
pub fn trigger_in(&mut self, offset: u64, sound: SoundId) -> Option<VoiceId>
pub fn trigger_at(&mut self, at: u64, sound: SoundId) -> Option<VoiceId>
pub fn trigger_with(&mut self, sound: SoundId, volume: f32) -> Option<VoiceId>
pub fn trigger_in_with( &mut self, offset: u64, sound: SoundId, volume: f32, ) -> Option<VoiceId>
pub fn trigger_at_with( &mut self, at: u64, sound: SoundId, volume: f32, ) -> Option<VoiceId>
pub fn voices_of(&self, sound: SoundId) -> usize
pub fn voice_count(&self) -> usize
pub fn render(&mut self, frames: usize) -> Vec<f32>
pub fn render_into(&mut self, out: &mut [f32])
Source§impl Mixer
impl Mixer
pub fn stream_vorbis( &mut self, channel: ChannelId, source: &VorbisSource, looping: Option<(u64, u64)>, level: Level, ) -> Result<VoiceId, String>
pub fn play_music_vorbis( &mut self, source: &VorbisSource, looping: Option<(u64, u64)>, fade_seconds: f32, level: Level, ) -> Result<VoiceId, String>
Auto Trait Implementations§
impl Freeze for Mixer
impl RefUnwindSafe for Mixer
impl Send for Mixer
impl Sync for Mixer
impl Unpin for Mixer
impl UnsafeUnpin for Mixer
impl UnwindSafe for Mixer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more