-
Notifications
You must be signed in to change notification settings - Fork 290
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
PulseAudio: time is spent perhaps due to insufficient checking of state in PaPulseAudio_CloseStreamCb function #895
Comments
Thank you for bringing this up. I have to test this. Could you please open PR for this as it's easier to follow than just having patch.. |
…pen (PortAudio#895) Fixing situation when Portaudio pulseaudio stream is created but never opened but just closed. application like Audacity does it like that with stream and that caused long delay before closing as stream could not be in correct state
Now there is fix mostly based on your patch: #897. Could you please test is doesn't cause any problems. |
#897 has been merged. @tatsuki-makino please confirm that it fixes this issue |
Thank you for accepting the fix. One thing that still bothers me is that if we leave the condition for exiting this loop after |
what kind of resource leak, how? |
If the input and output streams are NULL under this condition, it means that pa_stream_unref has been executed before that. |
I've been making it less than 5000 as I don't know does any TCP connection will be available after 10 minutes if it's terminating. It should be like 30 secs max. |
Could you take a look at #914 which should fix rest of this bug. |
Describe the bug
It uses about 50 seconds (usleep(10000) * 5000) per stream, probably due to insufficient checking of state in PaPulseAudio_CloseStreamCb function.
To Reproduce
Expected behavior
Audacity works smoothly.
Actual behavior
The user has to wait about 10 minutes before the window appears.
When touching a device associated with PulseAudio, we get the feeling that a glitch is accumulating.
Desktop (please complete the following information):
Additional context
A patch of the experiment is attached.
Instead of just one state, have the inline function PA_STREAM_IS_GOOD check the condition.
However, I do not know if this condition is correct :)
It needs to be verified by someone who is familiar with PulseAudio.
switch and PA_DEBUG are included to know the state.
patch.txt
The text was updated successfully, but these errors were encountered: