Files
craft-libs/crates/audio/tests/codecs/main.rs
alehel eee76c3fc2 craft-audio: AAC, ALAC, MP3, AC-3 and E-AC-3 as formats of encode and FileEncoder
EncodeFormat gains Aac and Alac (M4A through craft-media's MP4 muxer) and
Mp3, Ac3 and Eac3 (raw streams), so one call writes any of them from
WAV-order f32 audio and EncodeOptions.

- EncodeOptions::rate_control (with_bitrate, with_quality): a bit rate is
  moved to the nearest one the stream can carry; quality is AAC's VBR.
- Channels are mapped onto the codec's order by speaker, from
  EncodeOptions::layout. A layout the format has not is Unsupported
  instead of reaching the wrong speakers.
- M4A: the edit list skips the AAC priming, and the last sample's duration
  is cut so the track ends at the last frame written.
- encode_format_for, ENCODE_EXTENSIONS and EncodeFormat::ALL list the new
  formats; aac-encode and alac-encode now turn on craft-media's isobmff.

Refs #1230
2026-11-14 03:16:51 +01:00

23 lines
566 B
Rust

//! Tests of the codecs ported from FilmCraft and EffectCraft, built as one test binary: each file
//! is a module, as in their original crates.
// Index loops follow the specifications, as in FilmCraft (which allows this lint workspace-wide).
#![allow(clippy::needless_range_loop)]
use craft_media_testkit as common;
#[macro_use]
mod testkit;
mod aac;
mod ac3_encoder_oracle;
mod ac3_oracle;
mod alac;
mod concealment;
mod file_formats;
mod mp3_decoder_oracle;
mod mp3_encoder_oracle;
mod mpa_oracle;
mod opus;
mod opusenc;
mod routing_oracle;
mod track_decoder;