-
Notifications
You must be signed in to change notification settings - Fork 323
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: Rework stopping code that it should prevent artifacts #965
base: master
Are you sure you want to change the base?
Conversation
7c6247c
to
d47968e
Compare
d47968e
to
ba5ec87
Compare
Rework stopping and stream closing code as it should prevent artifacts when closing or stopping stream. Correctly handle stream termination from callback
ba5ec87
to
77d4d46
Compare
This could take a look now that other one is fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github won't let me add a comment to an unchanged line, but at line 429 call to pa_steam_write
, nothing has been copied to bufferData
yet. Furthermore, bufferData
memory is invalidated by the call (see https://freedesktop.org/software/pulseaudio/doxygen/stream_8h.html#a4fc69dec0cc202fcc174125dc88dada7 ) so subsequent calls to the buffer processor may crash.
I suggest moving the calls to PaUtil_EndBufferProcessing
and PaUtil_EndCpuLoadMeasurement
prior to the call to pa_stream_write
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully I understood correctly what you meant with this but now it should be like that.
@illuusio we're awaiting your response to latest review. |
Sorry been bit busy but now it should be fixed as soon as I got the commits in 🦄 |
Ok this PR seems this one needs bit more work I separated that output thing to PR #1005 . Let's get that first in so I can solve last bits in this. Sorry about bit of wasting of your time.. |
Rework stopping and stream closing code as it should prevent artifacts when closing or stopping stream. Correctly handle stream termination from callback