[go: up one dir, main page]

[][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> !Send for AudioQueue<Channel>

impl<Channel> !Sync for AudioQueue<Channel>

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

The type returned in the event of a conversion error.

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