Skip to content

audiosampler: no float == in CircuitPython's SamplerVoice binding - #357

Merged
bdbarnett merged 1 commit into
mainfrom
fix/cp-float-equal
Oct 31, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
fix/cp-float-equal

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

CircuitPython's esp32 ports compile with -Werror=float-equal. SamplerVoice.vibrato_depth's setter compared the depth with != 0.0f, so every CircuitPython board build (LCD-7, LCD-4.3, T-Watch, the P4 DEV-KIT) stops at SamplerVoice.c:401 since #337. The shared kernels already build with the warning off for their own objects (circuitpython.mk); this binding isn't one of them, so the test becomes cents < 0.0f || cents > 0.0f, which is the same for every number.

Found by micropython-pydevices' firmware builds at the v0.6.12 pin.

CircuitPython's esp32 ports build with -Werror=float-equal, and the binding
compared the depth with != 0.0f, so every CircuitPython board build stopped
at SamplerVoice.c since #337.
@bdbarnett
bdbarnett merged commit c2495f4 into main Oct 31, 2026
31 checks passed
@bdbarnett
bdbarnett deleted the fix/cp-float-equal branch October 31, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant