[][src]Struct cubeb_backend::StreamRef

pub struct StreamRef(_);

Methods

impl StreamRef[src]

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 set_volume(&self, volume: f32) -> Result<(), Error>[src]

Set the volume for a stream.

pub fn set_panning(&self, panning: f32) -> Result<(), Error>[src]

If the stream is stereo, set the left/right panning. If the stream is mono, this has no effect.

panning a number from -1.0 to 1.0. -1.0 means that the stream is fully mixed in the left channel, 1.0 means the stream is fully mixed in the right channel. 0.0 is equal power in the right and left channel (default).

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]

Set a callback to be notified when the output device changes.

pub fn user_ptr(&self) -> *mut c_void[src]

impl StreamRef[src]

pub unsafe fn from_ptr<'a>(ptr: *mut cubeb_stream) -> &'a StreamRef[src]

pub unsafe fn from_ptr_mut<'a>(ptr: *mut cubeb_stream) -> &'a mut StreamRef[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 Debug for StreamRef[src]

Auto Trait Implementations

impl Send for StreamRef

impl !Sync for StreamRef

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]