Skip to content

test(app): add FFT-based frequency preservation tests for AudioMixer#57

Merged
pasrom merged 1 commit intomainfrom
test/frequency-preservation
Mar 22, 2026
Merged

test(app): add FFT-based frequency preservation tests for AudioMixer#57
pasrom merged 1 commit intomainfrom
test/frequency-preservation

Conversation

@pasrom
Copy link
Copy Markdown
Owner

@pasrom pasrom commented Mar 22, 2026

Summary

  • Add FFT-based frequency preservation tests for AudioMixer (prevent "Mickey Mouse voice" from wrong sample rate ratios)

Test plan

  • swift test passes
  • ./scripts/lint.sh passes
  • CI passes

Prevent "Mickey Mouse voice" bugs where wrong sample rate ratios
shift audio frequencies during resampling. Uses vDSP FFT to verify
a 440Hz sine tone survives the full resample pipeline unchanged.

7 new tests:
- 48k→16k, 44.1k→16k, 16k→16k frequency preservation
- Negative test: wrong source rate must shift frequency
- File round-trip (saveWAV → resampleFile → load → FFT)
- WAV header sample rate correctness (48k, 16k, 44.1k)
- M4A fixture → 16k frequency preservation
@github-actions github-actions bot added the chore Maintenance or non-functional changes label Mar 22, 2026
@pasrom pasrom changed the title test(app): add comprehensive test coverage and workflow integration tests test(app): add FFT-based frequency preservation tests for AudioMixer Mar 22, 2026
@pasrom pasrom merged commit 60b86dd into main Mar 22, 2026
9 checks passed
@pasrom pasrom deleted the test/frequency-preservation branch March 22, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance or non-functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant