CyborgEars
Active member
For our Audio project presented in this thread, we've been using the SGTL5000 hardware abstraction class control_sgtl5000.cpp (part of the audio library created by Paul).
We've found several minor and a few major things that could be improved.
Lacking/misleading function documentation: GEQ settings
When one tries to set the GEQ equalizer ('graphical', 5 band) via
eqBand(uint8_t bandNum, float n), eqBands(float bass, float mid_bass, float midrange, float mid_treble, float treble) or eqBands(float bass, float treble)
one does not know which values correspond to the -11.75dB to +12dB range the GEQ can regulate.
Internally, those equalizer functions call
dap_audio_eq_band(uint8_t bandNum, float n)
which has the following parameter documentation: // by signed percentage -100/+100;
HoweverUsing -100 as an input for an equalizer band is wrong, as we had to find out the hard way!
Figuring out the required values from the datasheet and looking at the function reveal that the input range is in fact limited to -1 to 1.
Also, there is also no code example showing the use of the GEQ, which increases the necessity for better code documentation.
Depending on our project progress, we might be able to push a patch with some better documentation soon.
[more issues will be posted later]
We've found several minor and a few major things that could be improved.
Lacking/misleading function documentation: GEQ settings
When one tries to set the GEQ equalizer ('graphical', 5 band) via
eqBand(uint8_t bandNum, float n), eqBands(float bass, float mid_bass, float midrange, float mid_treble, float treble) or eqBands(float bass, float treble)
one does not know which values correspond to the -11.75dB to +12dB range the GEQ can regulate.
Internally, those equalizer functions call
dap_audio_eq_band(uint8_t bandNum, float n)
which has the following parameter documentation: // by signed percentage -100/+100;
HoweverUsing -100 as an input for an equalizer band is wrong, as we had to find out the hard way!
Figuring out the required values from the datasheet and looking at the function reveal that the input range is in fact limited to -1 to 1.
Also, there is also no code example showing the use of the GEQ, which increases the necessity for better code documentation.
Depending on our project progress, we might be able to push a patch with some better documentation soon.
[more issues will be posted later]