3-Band equalizer not catch sampling rate #2360
-
|
Hello @pschatzmann. I try to play a WAV at 11.KHz / 8bits with player. Previous to play the file is adapted sampling rate, channels on player, eq and kitstream (i2s) ... but I noticed that 3-band eq don't it. Real audio Info is the audio info of the source (WAVdecoder). You can see that Equalizer not change to 11KHz/1 channels. Thanks in advance. My log. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 9 replies
-
|
My guess is that the equalizer is still using its default config because it is not receiving the decoder The So I would check two things:
Conceptually the setup should end up doing something equivalent to: ConfigEqualizer3Bands cfg = eq.defaultConfig();
cfg.sample_rate = 11025;
cfg.channels = 1;
cfg.bits_per_sample = 16;
eq.begin(cfg);or, better, let the audio pipeline call If you share the small part where |
Beta Was this translation helpful? Give feedback.
-
|
How does your processing chain look like ? |
Beta Was this translation helpful? Give feedback.
-
|
Hi again. I don't know but I continue having problems with 3-band eq and audio chain. My audio chain is. Player (working with WAV file) -> EQ -> volumeStream -> kitStream (board) Player, volumeStream and kitStream are adapted well, sampling rate is detected for them, but EQ not. |
Beta Was this translation helpful? Give feedback.
-
|
The same propagation rule probably applies to
So I would check that the object which now receives the WAV decoder.addNotifyAudioChange(eq);
eq.addNotifyAudioChange(volumeStream);
volumeStream.addNotifyAudioChange(kitStream);The exact source object may be different in your sketch, but the important part is that |
Beta Was this translation helpful? Give feedback.
-
|
I committed some corrections and tested with the following sketch: #include "AudioTools.h"
I2SStream i2s;
Equalizer3Bands eq(i2s);
VolumeStream vol(eq);
void setup() {
Serial.begin(115200);
delay(5000);
// starting with 44100, stereo 16 bits
Serial.println("starting....");
vol.begin();
eq.begin();
i2s.begin();
// update audio info to 8000 1 channel
vol.setAudioInfo(AudioInfo(8000,1,16));
// check result at end of chain
AudioInfo info = i2s.audioInfo();
Serial.println(info.sample_rate);
Serial.println(info.channels);
}
void loop() {} |
Beta Was this translation helpful? Give feedback.
-
|
Hi @pschatzmann . Now works fine. I have forcing the audioInfo of VolumeStream previous to kitStream and last Equalizer, then playing is ok. I have a doubt. Why "bits_per_sample" in the case of WAV that I have testing (is 8 bits) appears as 16 bits? I think even the decoder works by default at 16 bits although file is in 8 bits. Thanks in advanced. |
Beta Was this translation helpful? Give feedback.
-
|
As the documentation describes, the decoder can translate 8 bits audiomatically to 16 bits. This setting is acive by default and you can deactivate it: Note that none of the other classes will be able to handle the unsigned 8 bits provided by the codec... |
Beta Was this translation helpful? Give feedback.
I committed some corrections
and tested with the following sketch: