[−][src]Struct korg_syro::SyroStream
Builder struct for syrostream data.
Output from the generate or reset methods is uncompressed PCM data that can be used to write a .wav file.
Implementations
impl SyroStream
[src]
pub fn reset(
data: Vec<u8>,
compression: Option<u32>
) -> Result<Vec<i16>, SyroError>
[src]
data: Vec<u8>,
compression: Option<u32>
) -> Result<Vec<i16>, SyroError>
Generate stream from a .alldata file
pub fn add_sample(
&mut self,
index: u32,
data: Vec<i16>,
sample_rate: u32,
compression: Option<u32>
) -> Result<&mut Self, SyroError>
[src]
&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.
pub fn erase_sample(&mut self, index: u32) -> Result<&mut Self, SyroError>
[src]
Erase the sample at the given index
The index must be in the range 0-99
pub fn generate(self) -> Result<Vec<i16>, SyroError>
[src]
Generates the syro stream
Ouptut is uncompressed PCM data
Trait Implementations
impl Default for SyroStream
[src]
fn default() -> SyroStream
[src]
Auto Trait Implementations
impl RefUnwindSafe for SyroStream
impl !Send for SyroStream
impl !Sync for SyroStream
impl Unpin for SyroStream
impl UnwindSafe for SyroStream
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,