Expand description
Idiomatic no_std bindings to minimp3 which don’t allocate.
§Features
float: Changes the type ofSampleto a single-precision float, and thus decoders will output float PCM.- This is a non-additive feature and will change API. Do not do this in a library without notice (why?).
mp1-mp2: Includes MP1 and MP2 decoding code.simd(default): Enables handwritten SIMD optimizations on eligible targets.std(default): Adds things that requirestd, right now that’s justDecoderOwnedfor owned data on the heap.
§Example
use rmp3::{Decoder, Frame};
let mp3 = std::fs::read("test.mp3")?;
let mut decoder = Decoder::new(&mp3);
while let Some(frame) = decoder.next() {
if let Frame::Audio(audio) = frame {
// process audio frame here!
}
}See individual documentation on Decoder and RawDecoder for more examples.
Structs§
- Audio
- Describes audio samples in a frame.
- Decoder
- High-level streaming iterator for parsing or decoding MPEG Audio data.
- Decoder
Owned std - Exactly the same as
Decoder, but owns the data. CheckDecoderfor examples. - RawDecoder
- Low-level stateless decoder for parsing or decoding MPEG Audio data.
Enums§
- Frame
- Describes a frame, which contains audio samples or other data.
Constants§
- MAX_
SAMPLES_ PER_ FRAME - Maximum amount of samples that can be yielded per frame.
Type Aliases§
- Sample
- Conditional type used to represent one PCM sample in output data.