[−][src]Struct sdl2::AudioSubsystem
Methods
impl AudioSubsystem
[src]
impl AudioSubsystem
[src]
pub fn open_playback<'a, CB, F, D>(
&self,
device: D,
spec: &AudioSpecDesired,
get_callback: F
) -> Result<AudioDevice<CB>, String> where
CB: AudioCallback,
F: FnOnce(AudioSpec) -> CB,
D: Into<Option<&'a str>>,
[src]
&self,
device: D,
spec: &AudioSpecDesired,
get_callback: F
) -> Result<AudioDevice<CB>, String> where
CB: AudioCallback,
F: FnOnce(AudioSpec) -> CB,
D: Into<Option<&'a str>>,
Opens a new audio device given the desired parameters and callback.
pub fn open_capture<'a, CB, F, D>(
&self,
device: D,
spec: &AudioSpecDesired,
get_callback: F
) -> Result<AudioDevice<CB>, String> where
CB: AudioCallback,
F: FnOnce(AudioSpec) -> CB,
D: Into<Option<&'a str>>,
[src]
&self,
device: D,
spec: &AudioSpecDesired,
get_callback: F
) -> Result<AudioDevice<CB>, String> where
CB: AudioCallback,
F: FnOnce(AudioSpec) -> CB,
D: Into<Option<&'a str>>,
Opens a new audio device for capture (given the desired parameters and callback). Supported since SDL 2.0.5
pub fn open_queue<'a, Channel, D>(
&self,
device: D,
spec: &AudioSpecDesired
) -> Result<AudioQueue<Channel>, String> where
Channel: AudioFormatNum,
D: Into<Option<&'a str>>,
[src]
&self,
device: D,
spec: &AudioSpecDesired
) -> Result<AudioQueue<Channel>, String> where
Channel: AudioFormatNum,
D: Into<Option<&'a str>>,
Opens a new audio device which uses queueing rather than older callback method.
pub fn current_audio_driver(&self) -> &'static str
[src]
pub fn num_audio_playback_devices(&self) -> Option<u32>
[src]
pub fn audio_playback_device_name(&self, index: u32) -> Result<String, String>
[src]
Trait Implementations
impl Clone for AudioSubsystem
[src]
fn clone(&self) -> AudioSubsystem
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for AudioSubsystem
[src]
Auto Trait Implementations
impl !Send for AudioSubsystem
impl !Sync for AudioSubsystem
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,