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

pulseaudio: Rework stopping code that it should prevent artifacts #965

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

illuusio
Copy link
Collaborator

@illuusio illuusio commented Oct 4, 2024

Rework stopping and stream closing code as it should prevent artifacts when closing or stopping stream. Correctly handle stream termination from callback

@illuusio illuusio force-pushed the pulseaudio-remove-last-click branch from 7c6247c to d47968e Compare October 4, 2024 06:08
@RossBencina RossBencina added the src-pulseaudio PulseAudio Host API in src/hostapi/pulseaudio label Oct 18, 2024
@philburk philburk added the P3 Priority: Normal label Oct 18, 2024
@illuusio illuusio force-pushed the pulseaudio-remove-last-click branch from d47968e to ba5ec87 Compare October 19, 2024 09:40
@illuusio illuusio added this to the V19.8 milestone Oct 19, 2024
Rework stopping and stream closing code as it should prevent artifacts
when closing or stopping stream. Correctly handle stream termination
from callback
@illuusio illuusio force-pushed the pulseaudio-remove-last-click branch from ba5ec87 to 77d4d46 Compare January 12, 2025 13:52
@illuusio
Copy link
Collaborator Author

This could take a look now that other one is fixed.

Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Priority: Normal src-pulseaudio PulseAudio Host API in src/hostapi/pulseaudio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants