pub struct XboxADPCMEncoder<'a, E> { /* private fields */ }
Expand description

XboxADPCM encoder implementation.

Implementations

Initialize an encoder with the given channel count, and lookahead for the given sink.

Higher lookahead may slightly reduce noise, but it will also exponentially increase encoding time.

Panics

Panics if num_channels is not between 1 and 8

Encode with the given samples using some samples.

Note that this may not always encode all samples passed and may store some in a buffer. To flush the buffer, run XboxADPCMEncoder::finish.

Panics

Panics if the input has the wrong number of channels or the samples are wrong.

Finish encoding and then resets the encoder.

This will encode all remaining samples, filling any unused samples with silence. If a simple reset is desired without any further writes, call XboxADPCMEncoder::reset instead.

Reset the encoder immediately without writing any more samples.

Any samples yet to be encoded will be dropped. If this is not desired, call XboxADPCMEncoder::finish instead.

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.