Skip to content

Add WAV playback example#19

Merged
iancharest merged 3 commits into
mainfrom
codex/play-wav-example
Jun 12, 2026
Merged

Add WAV playback example#19
iancharest merged 3 commits into
mainfrom
codex/play-wav-example

Conversation

@iancharest

@iancharest iancharest commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add examples/play_wav.py for dependency-free WAV playback.
  • Include a mono 48 kHz 32-bit float WAV example clip.
  • Support PCM WAV and IEEE float WAV loading without relying on Python's wave module for float WAV.
  • Remove runtime resampling to avoid interpolation artifacts and clipping.
  • Stream playback with prebuffering and queue-aware pacing to avoid underruns/crackle.
  • Keep WAV assets out of source distributions; the sample clip is repository-only.

Validation

  • PYTHONPATH=src python3 -m unittest discover -s tests
  • python3 -m compileall -q src tests examples
  • PYTHONPATH=src python3 examples/play_wav.py --duration 5 --volume 0.25
  • 5-second playback smoke test reported underruns=0 and overruns=0.

@iancharest iancharest merged commit 327f966 into main Jun 12, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant