[][src]Struct miniaudio::Context

#[repr(transparent)]pub struct Context(_);

Methods

impl Context[src]

pub fn alloc(
    backends: Option<&[Backend]>,
    config: Option<&ContextConfig>
) -> Result<Arc<Context>, Error>
[src]

  • 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]

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]

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]

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]

Trait Implementations

impl Drop for Context[src]

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]

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.