Expand description
§Kithara Decode
Audio decoding library with pluggable backends.
Provides generic decoder infrastructure supporting Symphonia (software),
Apple AudioToolbox, and Android MediaCodec backends.
§Usage
Use DecoderFactory for runtime codec selection:
ⓘ
use kithara_decode::{DecoderFactory, DecoderConfig};
let decoder = DecoderFactory::create_from_media_info(source, &media_info, config)?;Structs§
- Codec
Priming - Decoder
Config - Configuration for
DecoderFactory. - Decoder
Factory - Factory for creating decoders with a single, strict backend selection.
- Decoder
Track Info - Decoder-owned per-track playback contract.
- Gapless
Info - Gapless trim contract for one decoded track.
- Gapless
Trimmer - Stateful PCM trimmer that applies one track’s gapless contract.
- PcmChunk
- PCM chunk containing interleaved audio samples with automatic pool recycling.
- PcmMeta
- Timeline metadata for a PCM chunk.
- PcmSpec
- PCM specification - core audio format information
- Silence
Trim Params - Tunables for
GaplessMode::SilenceTrim. - Track
Metadata - Audio track metadata extracted from Symphonia tags.
Enums§
- Decode
Error - Errors that can occur during audio decoding.
- Decoder
Backend - Explicit backend selection for
DecoderFactory. - Decoder
Chunk Outcome - Outcome of an
Decoder::next_chunkcall. - Decoder
Seek Outcome - Outcome of a
Decoder::seekcall. - Error
Class - Single-discriminant classification of a
DecodeError. - Gapless
Mode - How gapless PCM trimming is applied on top of decoder-reported [
GaplessInfo]. - Input
Read Outcome - Outcome of a
DecoderInput::try_readcall.
Traits§
- Decoder
- Trait for runtime-polymorphic audio decoders.
- Decoder
Input - Combined trait for decoder input sources.
Functions§
- duration_
for_ frames - Convert PCM frame count at a given sample rate into a saturating
Duration. - frames_
for_ duration - Convert
Durationback into PCM frame count at a given sample rate. - probe_
mp4_ gapless - Stream the MP4 boxes in
readerand derive aGaplessInfoif any recognised source is present. ReturnsOk(None)when the file is well-formed but carries no gapless metadata.
Type Aliases§
- Decode
Result - Result type for decode operations.
- Gapless
Output - Inline batch of chunks released by one
GaplessTrimmeroperation.