Struct sdl2::audio::AudioQueue
[−]
[src]
pub struct AudioQueue<Channel: AudioFormatNum> { /* fields omitted */ }
Wraps SDL_AudioDeviceID and owns the callback data used by the audio device.
Methods
impl<Channel: AudioFormatNum> AudioQueue<Channel>
[src]
fn open_queue(a: &AudioSubsystem,
device: Option<&str>,
spec: &AudioSpecDesired)
-> Result<AudioQueue<Channel>, String>
device: Option<&str>,
spec: &AudioSpecDesired)
-> Result<AudioQueue<Channel>, String>
Opens a new audio device given the desired parameters and callback.
fn subsystem(&self) -> &AudioSubsystem
fn spec(&self) -> &AudioSpec
fn status(&self) -> AudioStatus
fn pause(&self)
Pauses playback of the audio device.
fn resume(&self)
Starts playback of the audio device.
fn queue(&self, data: &[Channel]) -> bool
Adds data to the audio queue.
fn size(&self) -> u32
fn clear(&self)
Clears all data from the current audio queue.