Need clarity in ESP-ADF equalizer
Posted: Fri Apr 28, 2023 6:44 am
I'm doing an audio recording program using I2S PDM mic. I need to amplify and record the audio in vocal range of frequencies. For this I'm using the equalizer pipeline. Here I'm having some confusions in the configuration. As per the documentation (https://espressif-docs.readthedocs-host ... lizer.html) equalizer has 10 bands. But in macro DEFAULT_EQUALIZER_CONFIG() definition, gain is being set for 20 bands. It is initialized as
In equalizer example, the equalizer is configured as follows
As per the comment in set gain "The size of gain array should be the multiplication of NUMBER_BAND and number channels of audio stream data". But in DEFAULT_EQUALIZER_CONFIG() the number of channels is 1. So the The size of gain array should be NUMBER_BAND*1 that is 10. Then why there are 20 elements in the array.
Please give clarity on this.
Code: Select all
int set_value_gain[NUMBER_BAND * 2] = { -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13};
Code: Select all
equalizer_cfg_t eq_cfg = DEFAULT_EQUALIZER_CONFIG();
int set_gain[] = { -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13};
eq_cfg.set_gain = set_gain; // The size of gain array should be the multiplication of NUMBER_BAND and number channels of audio stream data. The minimum of gain is -13 dB.
equalizer = equalizer_init(&eq_cfg);
Please give clarity on this.