Skip to content

Add hardware latency stats#15

Merged
iancharest merged 1 commit into
mainfrom
codex/hardware-latency-reporting
Jun 12, 2026
Merged

Add hardware latency stats#15
iancharest merged 1 commit into
mainfrom
codex/hardware-latency-reporting

Conversation

@iancharest

Copy link
Copy Markdown
Contributor

Summary

  • Add hardware_latency to StreamStats
  • Report macOS Core Audio latency plus safety offset for input/output streams
  • Keep Linux/miniaudio hardware_latency=None until a reliable backend value is available
  • Define estimated_latency as queued latency plus hardware latency when available, otherwise queued latency
  • Update docs, changelog, and validation coverage

Validation

  • clang -bundle -undefined dynamic_lookup -I/opt/homebrew/opt/python@3.14/Frameworks/Python.framework/Versions/3.14/include/python3.14 src/tachyaudio/_native.c -o src/tachyaudio/_native.cpython-314-darwin.so -framework AudioToolbox -framework CoreAudio -framework CoreFoundation
  • PYTHONPATH=src python3 -m unittest discover -s tests
  • python3 -m compileall -q src tests examples
  • Unsandboxed macOS smoke test:
    • OutputStream: hardware_latency=0.003
    • InputStream: hardware_latency=0.0010416666666666667

Closes #5.

@iancharest iancharest merged commit b41be57 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.

Add hardware latency reporting

1 participant