From f3a68c76a32c7467b0c9493e7f4cc16de2b2c227 Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 27 Jan 2026 22:22:24 +0100 Subject: feat(spectool): Add MP3 support for audio analysis Leverages the built-in MP3 decoder in miniaudio to allow spectool's 'analyze' command to process .mp3 files in addition to .wav files. Updates the tool's command-line help text and the project's HOWTO.md to reflect the new capability. --- HOWTO.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'HOWTO.md') diff --git a/HOWTO.md b/HOWTO.md index afd517e..6a4d723 100644 --- a/HOWTO.md +++ b/HOWTO.md @@ -38,3 +38,33 @@ cd build ctest cd .. ``` + +## Tools + +### Spectrogram Tool (`spectool`) + +A command-line tool for analyzing WAV and MP3 files into spectrograms and playing them back. + +#### Building the Tool + +To build `spectool`, you need to enable the `DEMO_BUILD_TOOLS` option in CMake. + +```bash +cmake -S . -B build -DDEMO_BUILD_TOOLS=ON +cmake --build build +``` +The executable will be located at `build/spectool`. + +#### Usage + +**Analyze an audio file:** +```bash +./build/spectool analyze path/to/input.wav path/to/output.spec +# or +./build/spectool analyze path/to/input.mp3 path/to/output.spec +``` + +**Play a spectrogram file:** +```bash +./build/spectool play path/to/input.spec +``` -- cgit v1.2.3