Repository navigation
PulseAudio plugin: drain stream upon closing; change codestyle - #1405
Conversation
|
There's a history to why it's not drained, see 7adf497. At a glance it seems like this would reintroduce the "hang at quit while paused" issue? The information that the stream stops early is interesting though, it's not something I've noticed. |
|
You're right. I thing the following algorithm will solve it:
Also we can add a time event (pa_context_rttime_new) to stop draining after some time. I don't think adding a timeout is necessary though since we know that the stream is not paused. I use pipewire with pulseaudio frontend, so it might handle closing differently. |
|
I realized that I shouldn't have removed the Looks like at this point it's better to rewrite commit history. But will github accept Aside from this mess, all mentioned issues are fixed. |
|
push -f is okay. For the record it probably would have been better to keep the refactoring in a separate PR to make it easier to review and potentially object to (although it looks fine to me). |
0714534 to
c713341
Compare
|
Ok, so I added |
|
Upon a first glance, it seems sane enough, and the commits are split well. I'll do some testing later this week. |
|
Playback and pause/stop works fine for me in Termux (with PulseAudio 17.0) and Fedora 41 (with PipeWire 1.2.7). Still need to test exiting in various conditions. |
pgaskin
left a comment
There was a problem hiding this comment.
Works well on PW and PA, LGTM.
|
@flyingmutant rebase merge? |
Drain stream before closing. Do it only if the stream is playing to avoid "hang at quit while paused" issue.
e96b05b to
29cb48c
Compare
|
Thanks! In the future, it is probably best to avoid "style" reworks because they make history/blame harder to follow, and also make the review itself harder (although in this case the commits are well-split indeed). |
|
Oh, I didn't think of the review process. I agree that style changes were unnecessary for this one and will avoid such changes in the future. |
https://build.opensuse.org/request/show/1394501 by user mia + anag_factory - Update to 2.13.0 * Set the minimum requested AAudio buffer capacity gh#cmus/cmus#1386 * Check for libavutil pkg-config gh#cmus/cmus#1388 * Add sort by duration gh#cmus/cmus#1440 * Respect scroll_offset setting when resizing window gh#cmus/cmus#1413 * Try to fallback to any plugin upon failure to init output plugin gh#cmus/cmus#1416 * PulseAudio bugfixes and APPLICATION_ID gh#cmus/cmus#1405 * ip/ffmpeg fixes and ffmpeg 8.0 support gh#cmus/cmus#1444 * CUE handling improvements and replaygain/genre support gh#cmus/cmus#1406 * Fix for missing Icecast streaming bitrate display. gh#cmus/cmus#1451 * op/mixer_alsa: alsamixer's volume scale; setting mixer control like aplay does it gh#cmus/cmus#1445 * ip/ffmpeg: fix seeking and
I noticed that PulseAudio plugin stops playback before the stream has ended (at least 0.2 sec remains), so here's the fix.