Skip to content

[pull] master from MusicPlayerDaemon:master - #97

Merged
pull[bot] merged 11 commits into
CartoonFan:masterfrom
MusicPlayerDaemon:master
Jul 17, 2026
Merged

[pull] master from MusicPlayerDaemon:master#97
pull[bot] merged 11 commits into
CartoonFan:masterfrom
MusicPlayerDaemon:master

Conversation

@pull

@pull pull Bot commented Jul 17, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

0x0003 and others added 11 commits July 14, 2026 12:49
Break() only sets a flag without waking select(), so the
console handler thread and service dispatcher thread can
never actually stop the event loop. Use InjectBreak()
instead, which writes to the wake pipe to interrupt select().

Without this, ^c in a console and "net stop mpd" both fail to
shut down MPD gracefully - the process must be hard-killed,
losing the state file.
Windows FILETIME has 100ns precision but the database stores
mtimes as time_t (seconds).  After restart, the comparison
between the full-precision FILETIME value and the
second-precision DB value always mismatches, forcing a full
rescan on every startup.

Truncate both sides of the comparison to seconds so this works
whether song->mtime came from the filesystem (same session) or
from a DB reload (restart).
…e_format()

If the device has no stream with a matching linear PCM format, the
function returned output_format.mSampleRate from an uninitialized
struct - undefined behavior.  With DSD enabled, this garbage value
decided whether the DoP fallback to PCM was taken.

Value-initialize output_format so the function deterministically
returns 0 (kAudioStreamAnyRate) in that case, which the caller
already interprets correctly as "the requested sample rate is not
available".  While at it, declare output_stream with its proper type
AudioStreamID instead of int.
The best-score variable was declared inside the stream loop, so it
was reset to zero for every output stream.  On a device with more
than one output stream, a worse-scoring format found in a later
stream could overwrite a better-scoring format already selected from
an earlier stream.  Move the variable out of the loop so the
selection considers all streams together.
GetVolume() truncated the scaled volume, so e.g. 89.99 became 89 and
a SetVolume()/GetVolume() round trip could drift downwards.  Round
to the nearest integer instead, like the other mixer plugins (Alsa,
Wasapi, Winmm, PipeWire).
@pull pull Bot locked and limited conversation to collaborators Jul 17, 2026
@pull pull Bot added the ⤵️ pull label Jul 17, 2026
@pull
pull Bot merged commit 6c3d649 into CartoonFan:master Jul 17, 2026
3 of 4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants