Struct sdl2::AudioSubsystem
source · pub struct AudioSubsystem { /* private fields */ }
Implementations§
source§impl AudioSubsystem
impl AudioSubsystem
sourcepub fn open_playback<'a, CB, F, D>(
&self,
device: D,
spec: &AudioSpecDesired,
get_callback: F,
) -> Result<AudioDevice<CB>, String>
pub fn open_playback<'a, CB, F, D>( &self, device: D, spec: &AudioSpecDesired, get_callback: F, ) -> Result<AudioDevice<CB>, String>
Opens a new audio device given the desired parameters and callback.
sourcepub fn open_capture<'a, CB, F, D>(
&self,
device: D,
spec: &AudioSpecDesired,
get_callback: F,
) -> Result<AudioDevice<CB>, String>
pub fn open_capture<'a, CB, F, D>( &self, device: D, spec: &AudioSpecDesired, get_callback: F, ) -> Result<AudioDevice<CB>, String>
Opens a new audio device for capture (given the desired parameters and callback). Supported since SDL 2.0.5
sourcepub fn open_queue<'a, Channel, D>(
&self,
device: D,
spec: &AudioSpecDesired,
) -> Result<AudioQueue<Channel>, String>
pub fn open_queue<'a, Channel, D>( &self, device: D, spec: &AudioSpecDesired, ) -> Result<AudioQueue<Channel>, String>
Opens a new audio device which uses queueing rather than older callback method.
pub fn current_audio_driver(&self) -> &'static str
pub fn num_audio_playback_devices(&self) -> Option<u32>
pub fn audio_playback_device_name(&self, index: u32) -> Result<String, String>
Trait Implementations§
source§impl Clone for AudioSubsystem
impl Clone for AudioSubsystem
source§fn clone(&self) -> AudioSubsystem
fn clone(&self) -> AudioSubsystem
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for AudioSubsystem
impl RefUnwindSafe for AudioSubsystem
impl !Send for AudioSubsystem
impl !Sync for AudioSubsystem
impl Unpin for AudioSubsystem
impl UnwindSafe for AudioSubsystem
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)