pub struct WaveWriter<T> where
    T: Seek + Write
{ pub pcm_format: PcmFormat, /* private fields */ }
Expand description

Helper struct that takes ownership of a writer and can be used to write data to a PCM wave file.

Fields

pcm_format: PcmFormat

Represents the PCM format for this wave file.

Implementations

Returns a new wave writer for the given writer.

Panics

Panics if num_channels or sample_rate is zero, or if bits_per_sample doesn’t match 8, 16, 24, or 32.

Writes a single sample as an unsigned 8-bit value.

Writes a single sample as a signed 16-bit value.

Writes a single sample as a signed 24-bit value. The value will be truncated to fit in a 24-bit value.

Writes a single sample as a signed 32-bit value.

Updates the header at the beginning of the file with the new chunk sizes.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.