Expand description
Audio decoding: the one path playback, seeking, durations, waveforms and the tempo all read audio through.
open returns an AudioSource, a stream of interleaved f32
blocks that can seek. The main backend is symphonia (pure Rust,
MPL-2.0) with its MP3, AAC, ALAC, FLAC, Vorbis, PCM and ADPCM decoders
in MP4/M4A, Ogg, WAV, FLAC, MP3 and ADTS files, plus the pure-Rust
opus-decoder crate for Opus (in Ogg or M4A, which Eagle’s Chromium
player also plays). A file that doesn’t decode returns an
AudioError and callers fall back (the viewer shows the reason, the
waveform is flat, no duration is stored). When an LGPL FFmpeg is
installed (falcon-ffmpeg, loaded at run time), open tries it after
symphonia, which covers the soundtracks of video files.
Structs§
- Block
- Decoded audio: interleaved samples in -1..=1, never empty.
- Ffmpeg
Source - A file’s sound decoded by FFmpeg, as stereo
f32at 48 kHz. - Symphonia
Source - A file decoded by symphonia.
Enums§
- Audio
Error - Why a file can’t be decoded.
Constants§
- DECODED
- Audio formats that decode, by extension, with the codecs each may hold.
Traits§
- Audio
Source - A decoded audio stream.
Functions§
- open
- Opens an audio file (
extis a hint; the contents decide). Backends are tried in turn; the first error is kept when none can.