Struct screech::stream::Stream[][src]

pub struct Stream {
    pub points: Vec<Point>,
}
Expand description

Struct representing a stream of audio data

Fields

points: Vec<Point>

Vec containing all audio points

Implementations

Create zero initialized (silent) stream

Returns the length of the stream

Get point for provided position argument, errors when the index does not exist in the stream

Mix 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

Amplify a stream by decibels

note clamps values at -1.0 and 1.0

Returns a slice of the points into a new Stream

Returns a slice of the stream that loops around when going out of bounds

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Create new stream based on f32 points

Create new stream based on i16 points, converts i16 to point value (f32 between -1.0 and 1.0)

Create new stream based on i32 points, converts i32 to point value (f32 between -1.0 and 1.0)

Create new stream based on u8 points, converts u8 to point value (f32 between -1.0 and 1.0)

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.