[][src]Struct sdl2::audio::AudioQueue

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]

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

impl<Channel> !UnwindSafe for AudioQueue<Channel>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.