[][src]Struct korg_syro::SyroStream

pub struct SyroStream { /* fields omitted */ }

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]

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]

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]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.