Struct cubeb::StreamRef
[−]
[src]
pub struct StreamRef(_);
Methods
impl StreamRef
[src]
fn start(&self) -> Result<(), Error>
[src]
Start playback.
fn stop(&self) -> Result<(), Error>
[src]
Stop playback.
fn reset_default_device(&self) -> Result<(), Error>
[src]
Reset stream to the default device.
fn position(&self) -> Result<u64, Error>
[src]
Get the current stream playback position.
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.
fn set_volume(&self, volume: f32) -> Result<(), Error>
[src]
Set the volume for a stream.
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).
fn current_device(&self) -> Result<&DeviceRef, Error>
[src]
Get the current output device for this stream.
fn device_destroy(&self, device: DeviceRef) -> Result<(), Error>
[src]
Destroy a cubeb_device structure.
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.