Struct openal::source::Stream
[−]
[src]
pub struct Stream<'a> { /* fields omitted */ }
Represents a streaming source for the Listener
.
Stream sources will have buffers getting in and out of them, they're useful for playing music and other kind of streaming sounds.
Methods
impl<'a> Stream<'a>
[src]
fn push<T: Sample>(
&mut self,
channels: u16,
data: &[T],
rate: u32
) -> Result<(), Error>
&mut self,
channels: u16,
data: &[T],
rate: u32
) -> Result<(), Error>
Pushes the data into the source.
fn pop(&mut self) -> Result<Buffer, Error>
Removes a buffer from the front of the queue.
fn clear(&mut self) -> Result<(), Error>
Removes the processed buffers from the queue.
Methods from Deref<Target = Source<'a>>
fn stream(self) -> Stream<'a>
Returns a streaming source.
fn state(&self) -> State
Gets the state.
fn play(&mut self)
Plays the source.
fn pause(&mut self)
Pauses the source.
fn stop(&mut self)
Stops the source.
fn rewind(&mut self)
Rewinds the source.
fn cone_inner_angle(&self) -> f32
Gets the cone inner angle.
fn set_cone_inner_angle(&mut self, value: f32)
Sets the cone inner angle.
fn cone_outer_angle(&self) -> f32
Gets the cone outer angle.
fn set_cone_outer_angle(&mut self, value: f32)
Sets the cone outer angle.
fn pitch(&self) -> f32
Gets the pitch.
fn set_pitch(&mut self, value: f32)
Sets the pitch.
fn position(&self) -> Position
Gets the position.
fn set_position(&self, value: &Position)
Sets the position.
fn direction(&self) -> Direction
Gets the direction.
fn set_direction(&self, value: &Direction)
Sets the direction.
fn velocity(&self) -> Velocity
Gets the velocity.
fn set_velocity(&self, value: &Velocity)
Sets the velocity.
fn is_relative(&self) -> bool
Checks if the source is relative.
fn enable_relative(&mut self)
Makes the source relative.
fn disable_relative(&mut self)
Makes the source absolute.
fn is_looping(&self) -> bool
Checks if the source is looping.
fn enable_looping(&mut self)
Makes the source looping.
fn disable_looping(&mut self)
Makes the source one-shot.
fn gain(&self) -> f32
Gets the gain.
fn set_gain(&mut self, value: f32)
Sets the gain.
fn min_gain(&self) -> f32
Gets the minimum gain.
fn set_min_gain(&mut self, value: f32)
Sets the minimum gain.
fn max_gain(&self) -> f32
Gets the maximum gain.
fn set_max_gain(&mut self, value: f32)
Sets the minimum gain.
fn offset(&self, offset: Offset) -> Offset
Gets the offset in the specified representation.
fn set_offset(&mut self, value: Offset)
Sets the offset.
fn queued(&self) -> usize
Gets how many buffers are queued.
fn processed(&self) -> usize
Gets how many buffers have been processed.
fn push<'b: 'a>(&'b mut self, buffer: &'b Buffer<'b>) -> Result<(), Error>
Pushes a buffer into the source's queue.
Trait Implementations
impl<'a> Deref for Stream<'a>
[src]
type Target = Source<'a>
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
The method called to dereference a value