[−][src]Struct cubeb_backend::Stream
Implementations
impl Stream[src]
pub unsafe fn from_ptr(ptr: *mut cubeb_stream) -> Stream[src]
pub fn as_ptr(&self) -> *mut cubeb_stream[src]
Methods from Deref<Target = StreamRef>
pub fn start(&self) -> Result<(), Error>[src]
Start playback.
pub fn stop(&self) -> Result<(), Error>[src]
Stop playback.
pub fn reset_default_device(&self) -> Result<(), Error>[src]
Reset stream to the default device.
pub fn position(&self) -> Result<u64, Error>[src]
Get the current stream playback position.
pub fn latency(&self) -> Result<u32, Error>[src]
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.
pub fn input_latency(&self) -> Result<u32, Error>[src]
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.
pub fn set_volume(&self, volume: f32) -> Result<(), Error>[src]
Set the volume for a stream.
pub fn set_name(&self, name: &CStr) -> Result<(), Error>[src]
Change a stream's name
pub fn current_device(&self) -> Result<&DeviceRef, Error>[src]
Get the current output device for this stream.
pub fn device_destroy(&self, device: DeviceRef) -> Result<(), Error>[src]
Destroy a cubeb_device structure.
pub fn register_device_changed_callback(
&self,
callback: Option<unsafe extern "C" fn(*mut c_void)>
) -> Result<(), Error>[src]
&self,
callback: Option<unsafe extern "C" fn(*mut c_void)>
) -> Result<(), Error>
Set a callback to be notified when the output device changes.
pub fn user_ptr(&self) -> *mut c_void[src]
pub fn as_ptr(&self) -> *mut cubeb_stream[src]
Trait Implementations
impl AsRef<StreamRef> for Stream[src]
impl Borrow<StreamRef> for Stream[src]
impl Deref for Stream[src]
impl DerefMut for Stream[src]
impl Drop for Stream[src]
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
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>,