[−][src]Struct miniaudio::Context
Methods
impl Context
[src]
pub fn alloc(
backends: Option<&[Backend]>,
config: Option<&ContextConfig>
) -> Result<Arc<Context>, Error>
[src]
backends: Option<&[Backend]>,
config: Option<&ContextConfig>
) -> Result<Arc<Context>, Error>
-
backends
- A list of backends to try initializing, in priority order. Can be None, in which case it uses default priority order. -
config
- Optional context configuration.
pub fn backend(&self) -> Backend
[src]
pub fn thread_priority(&self) -> ThreadPriority
[src]
pub fn device_info_capacity(&self) -> u32
[src]
pub fn playback_device_info_count(&self) -> u32
[src]
pub fn capture_device_info_count(&self) -> u32
[src]
pub fn playback_device_infos(&self) -> &[DeviceInfo]
[src]
pub fn capture_device_info(&self) -> &[DeviceInfo]
[src]
pub fn is_backend_asynchronous(&self) -> bool
[src]
pub fn with_devices<F>(&self, f: F) -> Result<(), Error> where
F: FnOnce(&[DeviceInfo], &[DeviceInfo]),
[src]
F: FnOnce(&[DeviceInfo], &[DeviceInfo]),
Retrieves basic information about every active playback and capture device. This function will allocate memory internally for device lists. This function will not call the closure if an error occurred.
pub fn with_playback_devices<F>(&self, f: F) -> Result<(), Error> where
F: FnOnce(&[DeviceInfo]),
[src]
F: FnOnce(&[DeviceInfo]),
Retrieves basic information about every active playback device. This function will allocate memory internally for device lists. This function will not call the closure if an error occurred.
pub fn with_capture_devices<F>(&self, f: F) -> Result<(), Error> where
F: FnOnce(&[DeviceInfo]),
[src]
F: FnOnce(&[DeviceInfo]),
Retrieves basic information about every active capture device. This function will allocate memory internally for device lists. This function will not call the closure if an error occurred.
pub fn enumerate_devices<F>(&self, callback: F) -> Result<(), Error> where
F: for<'r, 's> FnMut(&'r Context, DeviceType, &'s DeviceInfo) -> bool,
[src]
F: for<'r, 's> FnMut(&'r Context, DeviceType, &'s DeviceInfo) -> bool,
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,