mirror of
https://github.com/m5stack/esp-adf.git
synced 2026-05-20 10:25:46 -07:00
a398c242ff
closes https://github.com/espressif/esp-adf/issues/140 closes https://github.com/espressif/esp-adf/issues/139
Playback Example of WAV File Processed by Equalizer
This example is playing back a WAV file processed by an equalizer.
Compatibility
| ESP32-LyraT | ESP32-LyraT-MSC |
|---|---|
![]() |
![]() |
![]() |
![]() |
Usage
Prepare the audio board:
- Connect speakers or headphones to the board.
- Insert a microSD card loaded with a WAV file 'test.wav' into board's card slot.
Configure the example:
- Select compatible audio board in
menuconfig>Audio HAL.
Load and run the example.
Additional Information
To change the parameters of the equalizer, edit set_gain[] table in filr equalizer_example.c. The center frequencies of equalizer are 31 Hz, 62 Hz, 125 Hz, 250 Hz, 500 Hz, 1 kHz, 2 kHz, 4 kHz, 8 kHz and 16 kHz.
To run the example of playback, the following conditions should be met:
-
The audio file should be in format supported by the equalizer:
- Sampling rate of 11025 Hz, 22050 Hz, 44100 Hz or 48000 Hz.
- Number of channels: 1 or 2.
-
Audio file format for this example is WAV.
Contents of 'document' folder:
- The 'test.wav' file is the example file with sample rate of 44100 Hz and a single audio channel.
- The 'spectrum_before.png' is the spectrum image of the original 'test.wav' file.






