Struct cubeb_core::Stream
[−]
[src]
pub struct Stream(_);
Methods
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 as_ptr(&self) -> *mut cubeb_stream
[src]
pub fn start(&self) -> Result<()>
[src]
Start playback.
pub fn stop(&self) -> Result<()>
[src]
Stop playback.
pub fn reset_default_device(&self) -> Result<()>
[src]
Reset stream to the default device.
pub fn position(&self) -> Result<u64>
[src]
Get the current stream playback position.
pub fn latency(&self) -> Result<u32>
[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<()>
[src]
Set the volume for a stream.
pub fn set_panning(&self, panning: f32) -> Result<()>
[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>
[src]
Get the current output device for this stream.
pub fn device_destroy(&self, device: DeviceRef) -> Result<()>
[src]
Destroy a cubeb_device structure.
pub fn register_device_changed_callback(
&self,
callback: cubeb_device_changed_callback
) -> Result<()>
[src]
&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
[src]
Trait Implementations
impl Drop for Stream
[src]
impl Deref for Stream
[src]
type Target = StreamRef
The resulting type after dereferencing.
fn deref(&self) -> &StreamRef
[src]
Dereferences the value.