pub struct FormattedSoundStream {
pub sample_rate: PosFloat,
pub speaker_layout: SpeakerLayout,
pub reader: FormattedSoundReader,
}Expand description
Describes an sound stream actively being decoded from the game data. It has a particular sample rate (which we will convert), a particular speaker layout (which we may also convert), and a callback that will return decoded samples as needed. SMS will either cache this or stream it directly… because of the latter case, mind your thread safety!
Fields§
§sample_rate: PosFloat§speaker_layout: SpeakerLayout§reader: FormattedSoundReaderImplementations§
Source§impl FormattedSoundStream
impl FormattedSoundStream
Sourcepub fn can_be_cloned(&self) -> bool
pub fn can_be_cloned(&self) -> bool
Returns true if this stream can be cheaply cloned, false otherwise.
This function will always return the same value for the same stream.
Sourcepub fn attempt_clone(&self) -> FormattedSoundStream
pub fn attempt_clone(&self) -> FormattedSoundStream
Attempt to clone the stream, if the stream can be cloned cheaply. PANICS if the stream cannot be cloned cheaply.
Auto Trait Implementations§
impl Freeze for FormattedSoundStream
impl !RefUnwindSafe for FormattedSoundStream
impl Send for FormattedSoundStream
impl !Sync for FormattedSoundStream
impl Unpin for FormattedSoundStream
impl !UnwindSafe for FormattedSoundStream
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