Struct sdl2::AudioSubsystem [−][src]
pub struct AudioSubsystem { /* fields omitted */ }Methods
impl AudioSubsystem[src]
impl AudioSubsystemimpl AudioSubsystem[src]
impl AudioSubsystempub 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]
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>>, 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]
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>>, 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]
pub fn open_queue<'a, Channel, D>(
&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 current_audio_driver(&self) -> &'static strpub fn num_audio_playback_devices(&self) -> Option<u32>[src]
pub fn num_audio_playback_devices(&self) -> Option<u32>pub fn audio_playback_device_name(&self, index: u32) -> Result<String, String>[src]
pub fn audio_playback_device_name(&self, index: u32) -> Result<String, String>Trait Implementations
impl Debug for AudioSubsystem[src]
impl Debug for AudioSubsystemfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for AudioSubsystem[src]
impl Clone for AudioSubsystemfn clone(&self) -> AudioSubsystem[src]
fn clone(&self) -> AudioSubsystemReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
Auto Trait Implementations
impl !Send for AudioSubsystem
impl !Send for AudioSubsystemimpl !Sync for AudioSubsystem
impl !Sync for AudioSubsystem