You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When LEVEL_DETECTOR_SPL_8BIT_000_POINT was introduced it was set to 35.0, but the default value for LevelDetectorSPL.minVal was already set to 52.0, so with the default values LevelDetectorSPL.getLevel() would have never return a value below 52 dB:
However, at that time, the uBit.audio.levelSPL constructor in codal-microbit-v2 was setting minVal to 0, it was only changed to 52.0 a year later, so until then uBit.audio.levelSPL->getValue() could return values lower than 52.0, and that explains why earlier measurements could detect 35-40ish dB: 02a85fa
Because the
LevelDetectorSPL
minVal is set to 52:codal-microbit-v2/source/MicroBitAudio.cpp
Line 82 in bd446c4
And
LevelDetectorSPL
will clamp the lower end of thelevel
value tominVal
:https://github.com/lancaster-university/codal-core/blob/509086cc8590465041b15493ab52b56e7071c110/source/streams/LevelDetectorSPL.cpp#L142-L147
The text was updated successfully, but these errors were encountered: