Add Ogg Vorbis decoding support via microVorbis#15
Merged
Conversation
Decode Ogg Vorbis alongside the existing FLAC/MP3/Opus/WAV codecs, following the same patterns. - Add AudioFileType::VORBIS, AudioDecoder::decode_vorbis(), and build wiring (CMake option, FetchContent of micro-vorbis v0.1.0, Kconfig, idf_component.yml dependency). - Detect plain Ogg (audio/ogg, application/ogg, .ogg) as Vorbis; Opus needs an explicit signal (audio/opus, codecs=opus, .opus). The classification is the same in every build: a type whose codec is compiled out yields NONE rather than the other Ogg codec. - Extend the decode_benchmark example with a Vorbis clip. - Update README, INTEGRATION, and CLAUDE docs.
There was a problem hiding this comment.
Pull request overview
Adds Ogg Vorbis decoding to micro-decoder (alongside the existing FLAC/MP3/Opus/WAV support) using the micro-vorbis library, and updates build/config wiring plus documentation/examples to match the new codec matrix and Ogg detection rules.
Changes:
- Introduces
AudioFileType::VORBISand a Vorbis decode path inAudioDecoderbacked bymicro_vorbis::OggVorbisDecoder. - Updates format detection logic so “plain Ogg” resolves to Vorbis and Opus requires an explicit signal (content-type or
.opusextension), with “compiled-out codec => NONE” behavior. - Adds build system toggles/dependencies (CMake, Kconfig, ESP-IDF component manifest) and extends the decode benchmark + docs/README accordingly.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/types.cpp |
Updates Content-Type / extension detection to distinguish Opus vs Vorbis within Ogg. |
src/audio_decoder.h |
Adds micro-vorbis include, decoder method declaration, and Vorbis decoder member. |
src/audio_decoder.cpp |
Wires Vorbis into start()/decode switch and implements decode_vorbis(). |
include/micro_decoder/types.h |
Adds AudioFileType::VORBIS and adjusts enum numeric assignments. |
cmake/host.cmake |
Adds host CMake option + FetchContent wiring for micro-vorbis. |
cmake/esp-idf.cmake |
Maps CONFIG_MICRO_DECODER_CODEC_VORBIS to MICRO_DECODER_CODEC_VORBIS. |
Kconfig |
Adds MICRO_DECODER_CODEC_VORBIS toggle. |
idf_component.yml |
Adds micro-vorbis managed dependency and updates description. |
examples/decode_benchmark/src/main.cpp |
Adds a Vorbis clip to the benchmark run list. |
examples/decode_benchmark/sdkconfig.defaults |
Enables Vorbis in the benchmark default config. |
examples/decode_benchmark/README.md |
Updates benchmark docs/results to include Vorbis. |
examples/decode_benchmark/convert_audio.py |
Adds Vorbis encode step when generating embedded test audio. |
README.md |
Updates top-level feature/docs text to include Vorbis. |
docs/INTEGRATION.md |
Documents Ogg ambiguity rules and adds a recognized types table including Vorbis. |
CLAUDE.md |
Updates internal “codec listing order” convention to include Vorbis. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
A bare substring search would read codecs=notopus or opusenc as Opus. Match opus as a whole token instead, bounded by non-alphanumeric chars.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Decode Ogg Vorbis alongside the existing FLAC/MP3/Opus/WAV codecs, following the same patterns.