pub struct SyroStream { /* private fields */ }Expand description
Implementations§
Source§impl SyroStream
impl SyroStream
Sourcepub fn reset(
data: Vec<u8>,
compression: Option<u32>,
) -> Result<Vec<i16>, SyroError>
pub fn reset( data: Vec<u8>, compression: Option<u32>, ) -> Result<Vec<i16>, SyroError>
Generate stream from a .alldata file
Sourcepub fn add_sample(
&mut self,
index: u32,
data: Vec<i16>,
sample_rate: u32,
compression: Option<u32>,
) -> Result<&mut Self, SyroError>
pub fn add_sample( &mut self, index: u32, data: Vec<i16>, sample_rate: u32, compression: Option<u32>, ) -> Result<&mut Self, SyroError>
Add a sample at the given index
The index must be in the range 0-99. If compression is desired it has to be in the range of 8-16 bits.
Note: there are currently no guards against using samples that are too large.
Sourcepub fn erase_sample(&mut self, index: u32) -> Result<&mut Self, SyroError>
pub fn erase_sample(&mut self, index: u32) -> Result<&mut Self, SyroError>
Erase the sample at the given index
The index must be in the range 0-99
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SyroStream
impl RefUnwindSafe for SyroStream
impl !Send for SyroStream
impl !Sync for SyroStream
impl Unpin for SyroStream
impl UnwindSafe for SyroStream
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