-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] master from MusicPlayerDaemon:master #32
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
Conversation
protcol -> protocol comand -> command Found by Debian's lintian spellchecker
…" mode This fixes another cause for the "single" mode drain/resume bug. The first (generic) cause was fixed by commit 9ab928a, and this is the PipeWire-specific cause for another bug with the same symptoms: When draining the PipeWire output at the end of a song in "single" mode, PipeWireOutput::Process() returns without queueing the buffer that was allocated by pw_stream_dequeue_buffer(). This leaves libpipewire stuck and playback cannot be resumed. The solution is to move the `drain_requested` check and the pw_stream_flush() to the beginning of the method before the pw_stream_dequeue_buffer() call. That way, we can return without still owning a buffer that we will never give back. Closes #2315
Reviewer's GuideThis PR pulls upstream changes, enhancing the PipeWire output plugin with drain and buffer-safety improvements, adds a relaxed empty check to RingBuffer, bumps the game-music-emu dependency and CMake flags, updates Meson build settings, and fixes minor typos. Sequence Diagram for Drain Request Handling in PipeWireOutputsequenceDiagram
participant C as Caller
participant PWO as PipeWireOutput
participant RB as ring_buffer
participant PWS as pw_stream
C->>PWO: Process()
PWO->>PWO: check drain_requested
alt drain_requested is true
PWO->>RB: IsEmptyRelaxed()
RB-->>PWO: isEmpty
alt isEmpty is true
PWO->>PWS: pw_stream_flush(stream, true)
PWO-->>C: return
end
end
Note over PWO: Continues if not drained or not empty
PWO-->>C: (continues processing or returns)
Sequence Diagram for Buffer Underrun Handling in PipeWireOutputsequenceDiagram
participant C as Caller
participant PWO as PipeWireOutput
participant RB as ring_buffer
participant PWS as pw_stream
C->>PWO: Process()
Note over PWO: Assuming not handling drain as per previous diagram
PWO->>PWS: pw_stream_dequeue_buffer(stream)
PWS-->>PWO: buffer b
alt buffer b is not null and dest.data() is not null
PWO->>PWO: Prepare dest from buffer b
PWO->>RB: ReadFramesTo(dest, chunk_size)
RB-->>PWO: nbytes
alt nbytes == 0 (Buffer Underrun)
PWO->>PWO: PcmSilence(dest.first(nbytes), sample_format)
PWO->>PWO: LogWarning("Decoder is too slow...")
end
PWO->>PWS: pw_stream_queue_buffer(stream, b)
else buffer b is null or dest.data() is null
PWO->>PWO: Log warning or return
end
PWO-->>C: (return)
Class Diagram for PipeWireOutput and RingBuffer UpdatesclassDiagram
class PipeWireOutput {
+Process() : void
}
class RingBuffer {
+IsEmptyRelaxed() : bool
}
PipeWireOutput ..> RingBuffer : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Hard-Coded Secrets (2)
More info on how to fix Hard-Coded Secrets in General. 👉 Go to the dashboard for detailed results. 📥 Happy? Share your feedback with us. |
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )
Summary by Sourcery
Improve PipeWire output plugin with proper drain handling and safer buffer operations, enhance ring buffer API, bump game-music-emu dependency and modernize build settings, and fix minor typos in client messaging.
Bug Fixes:
Enhancements:
Build: