Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

audio: use audio_thread_priority instead of libc #74

Merged
merged 8 commits into from
Nov 15, 2023
Merged

audio: use audio_thread_priority instead of libc #74

merged 8 commits into from
Nov 15, 2023

Conversation

hinto-janai
Copy link
Owner

Cross-platform - works without permissions.

https://github.com/mozilla/audio_thread_priority

The `self.output.write()` call blocks as long as it has to
anyway, so lowering the message `recv()` timeout shouldn't
churn the CPU _that_ much more.

Benefit is that in low CPU time situations, we'll be less
likely to have choppy audio.
We can get away with a lower buffer here, `25ms` should be enough.

The benefit is that pausing (and implicitly `flush()`'ing)
will only take `25ms`~ now instead of `50ms` which was noticeable.
@hinto-janai hinto-janai added the shukusai Internals (shukusai) related label Nov 14, 2023
@hinto-janai hinto-janai merged commit 7781e95 into main Nov 15, 2023
@hinto-janai hinto-janai deleted the atp branch November 15, 2023 13:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
shukusai Internals (shukusai) related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant