#99
Makefile: pass 48000 Hz sample rate to eq-w0.py
scripts/eq-w0.py expects the sample rate in Hz as its second argument to precalculate angular frequencies (w0) for the 10 Graphic EQ bands.
In the Makefile, it was being called with 8 instead of 48000, which generated coefficients for an 8 Hz sample rate (giving 31.25 Hz a phase of 3.9 instead of ~0.00065). This caused the biquad filters to produce garbage values and silenced the Graphic EQ effect.
This defines SAMPLE_RATE = 48000 in the Makefile and passes it to eq-w0.py, while also using it across the PLAY and ffmpeg rules for consistency. It also adds a test in tests/eq.c that checks the table values and basic filter response.
Activity
2copilot-pull-request-reviewer[bot]reviewed1mo ago
🟢 Approval recommended
The Makefile fix directly addresses the described root cause and the added test meaningfully guards against regressions in EQ table generation and basic filter behavior.
Pull request overview
Fixes the Graphic EQ coefficient generation by passing the correct 48 kHz sample rate to
scripts/eq-w0.py, and adds a regression test to ensure the precomputed EQ band table matches the expected sin/cos values and that the EQ biquads produce finite output.Changes:
SAMPLE_RATE = 48000in the Makefile and use it consistently forffplay,ffmpeg, andbuild/eq-w0.hgeneration.eq-w0.pyinvocation argument (8) with$(SAMPLE_RATE)to generate correctEQ_W0values.tests/eq.cand wire it intomake testastest-eq.File summaries
EQ_W0table values and basic EQ filter stability/finite output.Review details
💡 Add a
code-reviewagent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.