Struct cubeb_core::Stream
source · pub struct Stream(/* private fields */);
Implementations§
Methods from Deref<Target = StreamRef>§
pub fn as_ptr(&self) -> *mut cubeb_stream
sourcepub fn latency(&self) -> Result<u32>
pub fn latency(&self) -> Result<u32>
Get the latency for this stream, in frames. This is the number of frames between the time cubeb acquires the data in the callback and the listener can hear the sound.
sourcepub fn input_latency(&self) -> Result<u32>
pub fn input_latency(&self) -> Result<u32>
Get the input latency for this stream, in frames. This is the number of frames between the time the audio input device records the audio, and the cubeb callback delivers it. This returns an error if the stream is output-only.
sourcepub fn set_volume(&self, volume: f32) -> Result<()>
pub fn set_volume(&self, volume: f32) -> Result<()>
Set the volume for a stream.
sourcepub fn current_device(&self) -> Result<&DeviceRef>
pub fn current_device(&self) -> Result<&DeviceRef>
Get the current output device for this stream.
sourcepub fn set_input_mute(&self, mute: bool) -> Result<()>
pub fn set_input_mute(&self, mute: bool) -> Result<()>
Set the mute state for an input stream.
sourcepub fn set_input_processing_params(
&self,
params: InputProcessingParams
) -> Result<()>
pub fn set_input_processing_params( &self, params: InputProcessingParams ) -> Result<()>
Set the processing parameters for an input stream.
sourcepub fn device_destroy(&self, device: DeviceRef) -> Result<()>
pub fn device_destroy(&self, device: DeviceRef) -> Result<()>
Destroy a cubeb_device structure.
sourcepub fn register_device_changed_callback(
&self,
callback: cubeb_device_changed_callback
) -> Result<()>
pub fn register_device_changed_callback( &self, callback: cubeb_device_changed_callback ) -> Result<()>
Set a callback to be notified when the output device changes.
pub fn user_ptr(&self) -> *mut c_void
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Stream
impl !Send for Stream
impl !Sync for Stream
impl Unpin for Stream
impl UnwindSafe for Stream
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