Commit Graph
2 Commits
Author SHA1 Message Date
alehelandClaude Opus 5.5 7c652beec4 craft-audio: review fixes, round 1 (#446)
- `Encoder::with_application` checks the channel count before clamping
  the bitrate, so 86 channels or more return `Error::Channels` instead
  of panicking in `clamp`. Tested with 86 and 255.
- The ffmpeg oracle test skips a missing `opus`/`libopus` decoder
  through the testkit's `skip`, so `CRAFT_MEDIA_REQUIRE_ORACLES=1` fails
  it.
- README: the encode example pads at least the pre-skip after the audio
  before rounding up to a frame, so the encoder delay is flushed; the
  MP4 note says an explicit edit replaces the `media_start` edit and
  gives its fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:09:46 -05:00
alehelandClaude Opus 5.5 bdf8cb2a19 craft-audio: Opus encoder
EffectCraft's `effectcraft-opusenc` as `opus::encoder` (and
`opus::Encoder`) behind `opus-encode`: SILK, hybrid and CELT, 48 kHz,
20 ms frames, mono or stereo. The constructors and `encode_float`
return `Result` instead of panicking. `Bandwidth` is one type for the
decoder and the encoder, and the two `Mode` enums convert into each
other. `encode` now turns on `opus-encode`.

The encoder tests (modes, ffmpeg's two Opus decoders as oracles) and
`TrackDecoder` on Opus without an `OpusHead` come with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:09:46 -05:00