Struct screech::Stream [−][src]
Expand description
Struct representing a stream of audio data
Fields
samples: Vec<f32>
Vec containing all audio points, multiple channels are interleaved
channels: usize
amount of channels
Implementations
Create new stream based on provided samples
Returns the length of the stream
note this does not take into account the amount of channels
Get sample for provided position argument, errors when the index does not exist in the stream
Mix together multiple streams into the given stream
note the size of the stream is unchanged, if the other streams are shorter it inserts silence (0.0) if the other streams are longer the remaining points are ignored
note this is a naive mix, it does not take into account the channel size, it assumes you are mixing together channels of the same size
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Stream
impl UnwindSafe for Stream
Blanket Implementations
Mutably borrows from an owned value. Read more