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<'a, Channel: AudioFormatNum> AudioQueue<Channel>
[src]
pub fn open_queue<D: Into<Option<&'a str>>>(
a: &AudioSubsystem,
device: D,
spec: &AudioSpecDesired
) -> Result<AudioQueue<Channel>, String>
[src]
a: &AudioSubsystem,
device: D,
spec: &AudioSpecDesired
) -> Result<AudioQueue<Channel>, String>
Opens a new audio device given the desired parameters and callback.
pub fn subsystem(&self) -> &AudioSubsystem
[src]
pub fn spec(&self) -> &AudioSpec
[src]
pub fn status(&self) -> AudioStatus
[src]
pub fn pause(&self)
[src]
Pauses playback of the audio device.
pub fn resume(&self)
[src]
Starts playback of the audio device.
pub fn queue(&self, data: &[Channel]) -> bool
[src]
Adds data to the audio queue.
pub fn size(&self) -> u32
[src]
pub fn clear(&self)
[src]
Clears all data from the current audio queue.