Crate rustwav

Source

Re-exports§

pub use wavcore::Mp3EncoderOptions;
pub use wavcore::Mp3Channels;
pub use wavcore::Mp3Quality;
pub use wavcore::Mp3Bitrate;
pub use wavcore::Mp3VbrMode;
pub use wavcore::OpusEncoderOptions;
pub use wavcore::OpusBitrate;
pub use wavcore::OpusEncoderSampleDuration;
pub use FileSizeOption::NeverLargerThan4GB;
pub use FileSizeOption::AllowLargerThan4GB;
pub use FileSizeOption::ForceUse4GBFormat;

Modules§

decoders
The decoders for the WaveReader, each of these provides the same API for it to use. You can use it too.
encoders
The encoders for the WaveWriter, each of these provides the same API for it to use. You can use it too.
string_io
utils
The utility for both you and me to convert waveform format.

Macros§

force_borrow
Not for you to use. Force borrow a thing while cheating the compiler.
force_borrow_mut
Not for you to use. Force borrow a thing as mutable while cheating the compiler.

Structs§

FlacEncoderParams
Parameters for the encoder to encode the audio.
FrameIntoIter
The audio frame iterator was created from the WaveReader to decode the audio frames.
FrameIter
The audio frame iterator was created from the WaveReader to decode the audio frames.
MonoIntoIter
The audio frame iterator was created from the WaveReader to decode the mono audio.
MonoIter
The audio frame iterator was created from the WaveReader to decode the mono audio.
ReadBridge
The ReadBridge hides a dyn Reader and acts like a struct that implements Read + Seek + Debug.
Resampler
How the Resampler works For audio stretching:
SharedReader
Multi-thread safe shared reader (no, I don’t like this, I use force_borrow_mut!())
SharedWriter
Multi-thread safe shared writer (no, I don’t like this, I use force_borrow_mut!())
Spec
The spec info for a generic audio file.
StereoIntoIter
The audio frame iterator was created from the WaveReader to decode the stereo audio.
StereoIter
The audio frame iterator was created from the WaveReader to decode the stereo audio.
WaveReader
The WaveReader is dedicated to reading a WAV file and provides you with samples as you want.
WaveWriter
The WaveWriter is dedicated to creating a WAV file.
WriteBridge
The WriteBridge hides a dyn Writer and acts like a struct that implements Write + Seek + Debug.
i24
The tuple struct is little-endian
u24
The tuple struct is little-endian

Enums§

AdpcmSubFormat
When to encode audio to ADPCM format, choose one of the subformats.The value of the subformat is the format_tag field of the fmt chunk.
AudioError
The error info for processing an audio file
AudioReadError
The error info for reading an audio file
AudioWriteError
The error info for writing an audio file
DataFormat
Specify the audio codecs of the WAV file.
FileSizeOption
These options are used to specify what type of WAV file you want to create.
FlacCompression
The compression level of the FLAC file
SampleFormat
The rough type of the sample format.
WaveDataSource
The data source for the WaveReader, currently we have a file reader or a file path.

Constants§

FORMATS
The list for the command line program to parse the argument and we have the pre-filled encoder initializer parameter structs for each format.

Traits§

Reader
The Reader trait, Read + Seek + Debug
SampleFrom
The SampleFrom as a utility for SampleType to use the overloading to() method.
SampleType
The SampleType for audio processing.The to_*() methods are for scaling the sample to the another format.The as_*() methods are for casting the sample to the another format.
Writer
The Writer trait, Write + Seek + Debug

Functions§

test
The test() function
test_wav
A function dedicated to testing WAV encoding and decoding. This function is actually a main() function for a command-line program that parses args and returns an ExitCode.
transfer_audio_from_decoder_to_encoder
Transfer audio from the decoder to the encoder with resampling.