Skip to content

Commit

Permalink
Use kAudioObjectPropertyElementMaster on macOS for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed Nov 20, 2024
1 parent 62b33d3 commit a74fa14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alc/backends/coreaudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,15 @@ struct DeviceHelper {
DeviceHelper()
{
AudioObjectPropertyAddress addr{kAudioHardwarePropertyDefaultOutputDevice,
kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMain};
kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster};
OSStatus status = AudioObjectAddPropertyListener(kAudioObjectSystemObject, &addr, DeviceListenerProc, nil);
if (status != noErr)
ERR("AudioObjectAddPropertyListener fail: %d", status);
}
~DeviceHelper()
{
AudioObjectPropertyAddress addr{kAudioHardwarePropertyDefaultOutputDevice,
kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMain};
kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster};
OSStatus status = AudioObjectRemovePropertyListener(kAudioObjectSystemObject, &addr, DeviceListenerProc, nil);
if (status != noErr)
ERR("AudioObjectRemovePropertyListener fail: %d", status);
Expand Down

0 comments on commit a74fa14

Please sign in to comment.