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

PulseAPI hang ups on 5.2.0 when used repeatedly from a child thread #392

Open
ggarra13 opened this issue Mar 18, 2023 · 3 comments
Open

Comments

@ggarra13
Copy link

My video player application:

https://www.github.com/ggarra13/mrv2
https://www.github.com/ggarra13/tlRender  # auxiliary video library that uses RtAudio

uses RtAudio, currently 5.2.0. The application is heavily multithreaded and, after some setup calls in the main thread, calls RtAudio functions from a child thread for each video loaded.
I found that the pulse api of RtAudio was misbehaving, due to the server not returning on time and the function getDeviceCount() returning 0 as rt_pa_info.dev would sometimes be empty.
I created a patch, which I can no longer apply to the current HEAD and which I attach here. It caches the rt_pa_info.dev vector after the first call to the server. Also, I am calling pa_operation_unref from each pa_context_* call, as it seems that might be missing.
I am attaching the diff to the 5.2.0 branch in case it is useful.

5.2.0.txt

I tried porting to the current HEAD (beta), and after some code changes -- DeviceInfo.probed gone, setErorCallback, openStream with no error callback--but the results were worse. The playback would not work at all as the RtAudo error callback would report that the device ID was not initialized (or something similar).

@garyscavone
Copy link
Contributor

I'm afraid I cannot investigate this problem without a significant amount of further details. I will close this issue if there is no further communications within the next month or so.

@luzpaz
Copy link
Contributor

luzpaz commented Dec 23, 2023

ping @ggarra13

@ggarra13
Copy link
Author

@garyscavone I am sorry I haven't followed through. Not sure how else I can help out to debug it, as providing a simple test is not easy at all. If there has been progress with the latest HEAD, I can try checking it again.

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

3 participants