pub struct AudioStream<'a>(/* private fields */);
Implementations§
Source§impl<'a> AudioStream<'a>
impl<'a> AudioStream<'a>
Sourcepub unsafe fn unwrap(self) -> AudioStream
pub unsafe fn unwrap(self) -> AudioStream
Take the raw ffi type. Must manually free memory by calling the proper unload function
Source§impl<'aud> AudioStream<'aud>
impl<'aud> AudioStream<'aud>
pub fn is_audio_stream_valid(&self) -> bool
pub fn sample_rate(&self) -> u32
pub fn sample_size(&self) -> u32
pub fn channels(&self) -> u32
pub unsafe fn inner(self) -> AudioStream
Sourcepub fn update<T: AudioSample>(&mut self, data: &[T])
pub fn update<T: AudioSample>(&mut self, data: &[T])
Updates audio stream buffers with data.
Sourcepub fn is_playing(&self) -> bool
pub fn is_playing(&self) -> bool
Checks if audio stream is currently playing.
Sourcepub fn set_volume(&self, volume: f32)
pub fn set_volume(&self, volume: f32)
Sets volume for audio stream (1.0
is max level).
Sourcepub fn is_processed(&self) -> bool
pub fn is_processed(&self) -> bool
Sets pitch for audio stream (1.0
is base level).
pub fn set_pan(&self, pan: f32)
Trait Implementations§
Source§impl<'a> AsMut<AudioStream> for AudioStream<'a>
impl<'a> AsMut<AudioStream> for AudioStream<'a>
Source§fn as_mut(&mut self) -> &mut AudioStream
fn as_mut(&mut self) -> &mut AudioStream
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl<'a> AsRef<AudioStream> for AudioStream<'a>
impl<'a> AsRef<AudioStream> for AudioStream<'a>
Source§fn as_ref(&self) -> &AudioStream
fn as_ref(&self) -> &AudioStream
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<'a> Debug for AudioStream<'a>
impl<'a> Debug for AudioStream<'a>
Source§impl<'a> Deref for AudioStream<'a>
impl<'a> Deref for AudioStream<'a>
Source§impl<'a> DerefMut for AudioStream<'a>
impl<'a> DerefMut for AudioStream<'a>
Auto Trait Implementations§
impl<'a> Freeze for AudioStream<'a>
impl<'a> RefUnwindSafe for AudioStream<'a>
impl<'a> !Send for AudioStream<'a>
impl<'a> !Sync for AudioStream<'a>
impl<'a> Unpin for AudioStream<'a>
impl<'a> UnwindSafe for AudioStream<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more