Struct Ops

Source
#[repr(C)]
pub struct Ops {
Show 24 fields pub init: Option<unsafe extern "C" fn(context: *mut *mut cubeb, context_name: *const c_char) -> c_int>, pub get_backend_id: Option<unsafe extern "C" fn(context: *mut cubeb) -> *const c_char>, pub get_max_channel_count: Option<unsafe extern "C" fn(context: *mut cubeb, max_channels: *mut c_uint) -> c_int>, pub get_min_latency: Option<unsafe extern "C" fn(context: *mut cubeb, params: cubeb_stream_params, latency_ms: *mut c_uint) -> c_int>, pub get_preferred_sample_rate: Option<unsafe extern "C" fn(context: *mut cubeb, rate: *mut u32) -> c_int>, pub get_supported_input_processing_params: Option<unsafe extern "C" fn(c: *mut cubeb, params: *mut cubeb_input_processing_params) -> c_int>, pub enumerate_devices: Option<unsafe extern "C" fn(context: *mut cubeb, devtype: cubeb_device_type, collection: *mut cubeb_device_collection) -> c_int>, pub device_collection_destroy: Option<unsafe extern "C" fn(context: *mut cubeb, collection: *mut cubeb_device_collection) -> c_int>, pub destroy: Option<unsafe extern "C" fn(context: *mut cubeb)>, pub stream_init: Option<unsafe extern "C" fn(context: *mut cubeb, stream: *mut *mut cubeb_stream, stream_name: *const c_char, input_device: cubeb_devid, input_stream_params: *mut cubeb_stream_params, output_device: cubeb_devid, output_stream_params: *mut cubeb_stream_params, latency: c_uint, data_callback: cubeb_data_callback, state_callback: cubeb_state_callback, user_ptr: *mut c_void) -> c_int>, pub stream_destroy: Option<unsafe extern "C" fn(stream: *mut cubeb_stream)>, pub stream_start: Option<unsafe extern "C" fn(stream: *mut cubeb_stream) -> c_int>, pub stream_stop: Option<unsafe extern "C" fn(stream: *mut cubeb_stream) -> c_int>, pub stream_get_position: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, position: *mut u64) -> c_int>, pub stream_get_latency: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, latency: *mut u32) -> c_int>, pub stream_get_input_latency: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, latency: *mut u32) -> c_int>, pub stream_set_volume: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, volumes: c_float) -> c_int>, pub stream_set_name: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, name: *const c_char) -> c_int>, pub stream_get_current_device: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, device: *mut *mut cubeb_device) -> c_int>, pub stream_set_input_mute: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, mute: c_int) -> c_int>, pub stream_set_input_processing_params: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, params: cubeb_input_processing_params) -> c_int>, pub stream_device_destroy: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, device: *mut cubeb_device) -> c_int>, pub stream_register_device_changed_callback: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, device_changed_callback: cubeb_device_changed_callback) -> c_int>, pub register_device_collection_changed: Option<unsafe extern "C" fn(context: *mut cubeb, devtype: cubeb_device_type, callback: cubeb_device_collection_changed_callback, user_ptr: *mut c_void) -> c_int>,
}

Fields§

§init: Option<unsafe extern "C" fn(context: *mut *mut cubeb, context_name: *const c_char) -> c_int>§get_backend_id: Option<unsafe extern "C" fn(context: *mut cubeb) -> *const c_char>§get_max_channel_count: Option<unsafe extern "C" fn(context: *mut cubeb, max_channels: *mut c_uint) -> c_int>§get_min_latency: Option<unsafe extern "C" fn(context: *mut cubeb, params: cubeb_stream_params, latency_ms: *mut c_uint) -> c_int>§get_preferred_sample_rate: Option<unsafe extern "C" fn(context: *mut cubeb, rate: *mut u32) -> c_int>§get_supported_input_processing_params: Option<unsafe extern "C" fn(c: *mut cubeb, params: *mut cubeb_input_processing_params) -> c_int>§enumerate_devices: Option<unsafe extern "C" fn(context: *mut cubeb, devtype: cubeb_device_type, collection: *mut cubeb_device_collection) -> c_int>§device_collection_destroy: Option<unsafe extern "C" fn(context: *mut cubeb, collection: *mut cubeb_device_collection) -> c_int>§destroy: Option<unsafe extern "C" fn(context: *mut cubeb)>§stream_init: Option<unsafe extern "C" fn(context: *mut cubeb, stream: *mut *mut cubeb_stream, stream_name: *const c_char, input_device: cubeb_devid, input_stream_params: *mut cubeb_stream_params, output_device: cubeb_devid, output_stream_params: *mut cubeb_stream_params, latency: c_uint, data_callback: cubeb_data_callback, state_callback: cubeb_state_callback, user_ptr: *mut c_void) -> c_int>§stream_destroy: Option<unsafe extern "C" fn(stream: *mut cubeb_stream)>§stream_start: Option<unsafe extern "C" fn(stream: *mut cubeb_stream) -> c_int>§stream_stop: Option<unsafe extern "C" fn(stream: *mut cubeb_stream) -> c_int>§stream_get_position: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, position: *mut u64) -> c_int>§stream_get_latency: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, latency: *mut u32) -> c_int>§stream_get_input_latency: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, latency: *mut u32) -> c_int>§stream_set_volume: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, volumes: c_float) -> c_int>§stream_set_name: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, name: *const c_char) -> c_int>§stream_get_current_device: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, device: *mut *mut cubeb_device) -> c_int>§stream_set_input_mute: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, mute: c_int) -> c_int>§stream_set_input_processing_params: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, params: cubeb_input_processing_params) -> c_int>§stream_device_destroy: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, device: *mut cubeb_device) -> c_int>§stream_register_device_changed_callback: Option<unsafe extern "C" fn(stream: *mut cubeb_stream, device_changed_callback: cubeb_device_changed_callback) -> c_int>§register_device_collection_changed: Option<unsafe extern "C" fn(context: *mut cubeb, devtype: cubeb_device_type, callback: cubeb_device_collection_changed_callback, user_ptr: *mut c_void) -> c_int>

Auto Trait Implementations§

§

impl Freeze for Ops

§

impl RefUnwindSafe for Ops

§

impl Send for Ops

§

impl Sync for Ops

§

impl Unpin for Ops

§

impl UnwindSafe for Ops

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.