output/PipeWire: call pw_stream_flush() in Cancel()
Clear not only MPD's ring buffer, but also libpipewire's buffers, to avoid playing some audio from the previous song after a manual song change. Fixes part 1 of https://github.com/MusicPlayerDaemon/MPD/issues/1354
This commit is contained in:
@@ -895,7 +895,12 @@ PipeWireOutput::Cancel() noexcept
|
||||
if (drained)
|
||||
return;
|
||||
|
||||
/* clear MPD's ring buffer */
|
||||
ring_buffer->reset();
|
||||
|
||||
/* clear libpipewire's buffer */
|
||||
pw_stream_flush(stream, false);
|
||||
drained = true;
|
||||
}
|
||||
|
||||
bool
|
||||
|
Reference in New Issue
Block a user