[−][src]Struct sdl2::audio::AudioQueue
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.
Auto Trait Implementations
impl<Channel> !RefUnwindSafe for AudioQueue<Channel>
impl<Channel> !Send for AudioQueue<Channel>
impl<Channel> !Sync for AudioQueue<Channel>
impl<Channel> Unpin for AudioQueue<Channel> where
Channel: Unpin,
Channel: Unpin,
impl<Channel> !UnwindSafe for AudioQueue<Channel>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,