Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Killing/restarting pulseaudio server causes RtAudio to run in fast-forward #299

Open
nyanpasu64 opened this issue Jun 21, 2021 · 1 comment

Comments

@nyanpasu64
Copy link
Contributor

I'm using a slightly modified version of 32df948.

When I start RtAudio in PulseAudio mode, then run killall pulseaudio in a terminal window, then RtAudio apps run the audio callback in fast-forward, discarding all audio data synthesized and immediately calling it again for more audio. This causes the audio thread to eat an entire CPU core.

(Why do I do it? On my machine, my 3.5mm headphone jack sometimes disappears from PulseAudio's output list, and restarting PulseAudio fixes the issue.)

Is it possible to change RtAudio to not burn a full CPU core? (I don't know how to handle errors though, whether to take the nuclear option and throw an uncaught exception like unplugging a headphone jack on Windows, or to stop the audio thread only, or something else. I hear that RtAudio's error handling is in flux, with discussions over how to redesign it.)

@garyscavone
Copy link
Contributor

garyscavone commented Jun 22, 2021 via email

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

No branches or pull requests

2 participants