This example is playing back a WAV file processed by an equalizer.
This example is will run on boards marked with green checkbox. Please remember to select the board in menuconfig as discussed is section Usage below.
Board Name | Getting Started | Chip | Compatible |
---|---|---|---|
ESP32-LyraT | |||
ESP32-LyraTD-MSC | |||
ESP32-LyraT-Mini | |||
ESP32-Korvo-DU1906 | |||
ESP32-S2-Kaluga-1 Kit |
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.
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.