Trait sfml::audio::SoundStream[][src]

pub trait SoundStream {
    fn get_data(&mut self) -> (&mut [i16], bool);
fn seek(&mut self, offset: Time);
fn channel_count(&self) -> u32;
fn sample_rate(&self) -> u32; }

Trait for streamed audio sources.

Required methods

fn get_data(&mut self) -> (&mut [i16], bool)[src]

Request a new chunk of audio samples from the stream source.

Returns (chunk, keep_playing), where chunk is the chunk of audio samples, and keep_playing tells the streaming loop whether to keep playing or to stop.

fn seek(&mut self, offset: Time)[src]

Change the current playing position in the stream source.

fn channel_count(&self) -> u32[src]

Return the number of channels of the stream.

fn sample_rate(&self) -> u32[src]

Get the stream sample rate of the stream.

Loading content...

Implementors

Loading content...