Skip to content

[pull] master from MusicPlayerDaemon:master - #98

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

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

Conversation

@pull

@pull pull Bot commented Jul 18, 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 : )

Most of the code base has already been converted to "#pragma once";
this converts the remaining old-style include guards in the Apple
support library.
The two-argument ThrowOSStatus() concatenated the caller-supplied
prefix and the CFErrorRef description without any separator,
producing messages like "Unable to open OS X componentThe operation
could not be completed".  Insert ": " between the two parts.
A type-safe wrapper for AudioObjectSetPropertyData() which throws on
error, mirroring the existing AudioObjectGetPropertyDataT().  To be
used by the osx output plugin.
Instead of hiding the macOS 12 SDK rename behind ad-hoc preprocessor
macros, define the new "Main" identifiers as constexpr aliases for
the old "Master" identifiers when building with an older SDK.  The
code can then use the current CoreAudio names directly.
Replace the manual AudioObjectSetPropertyData() calls in SetVolume()
and osx_output_hog_device() with the new type-safe wrapper, removing
the size/status boilerplate.  The hog-mode failure message now
contains the error description instead of a bare numeric OSStatus.
Throw via Apple::ThrowOSStatus() where a raw OSStatus was previously
formatted as a bare number or discarded entirely:

- osx_output_set_device_format() included only the numeric error
  code when changing the physical stream format failed

- Play() threw "Unable to restart audio output after pause", which
  was misleading (the first start takes this path, too) and dropped
  the OSStatus
Replace the hand-rolled shift loop with the existing utility from
util/RoundPowerOfTwo.hxx.
Replace the manual AudioObjectGetPropertyData() call with the
type-safe wrapper.  The behavior is unchanged: a lookup failure is
still ignored and leaves dev_id as kAudioDeviceUnknown, to be
resolved later by osx_output_set_device().
Nothing in this plugin uses Mutex, Cond or StringBuffer (FmtBuffer
comes from lib/fmt/ToBuffer.hxx).  The CoreServices umbrella header
is a leftover from the pre-AudioComponent Component Manager API and
is not needed by the current code.
Use meson's native framework dependency instead of raw link_args.
Drop CoreServices, which is no longer used, and name AudioToolbox
and CoreFoundation explicitly instead of relying on framework
re-exports for AudioComponent/AudioHardwareService and CFError/
CFString.
- pass AudioStreamBasicDescription by reference to
  StreamDescriptionToString()
- remove the unused format_string variable
- use static_cast instead of a C-style cast in the render callback
- compare the AudioComponent against nullptr instead of 0
- mark sample_rate [[maybe_unused]] to fix an unused-variable
  warning when building without ENABLE_DSD
@pull pull Bot locked and limited conversation to collaborators Jul 18, 2026
@pull pull Bot added the ⤵️ pull label Jul 18, 2026
@pull
pull Bot merged commit 791fee6 into CartoonFan:master Jul 18, 2026
2 of 3 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.

1 participant