Thanks for looking at this--I was actually able to use `kAudioDevicePropertyVolumeScalar` by changing `kAudioObjectPropertyScopeGlobal` to `kAudioObjectPropertyScopeOutput` (or presumably `Input` for an input device). Just curious, did you find any combination of hardware where `VolumeScalar`+`ScopeGlobal` worked?
But, I don't think we want to use `kAudioDevicePropertyVolumeScalar` in any case, since it's actually controlling the system-wide volume rather than just the volume of our audio stream. Looking at `winealsa` and `winepulse`, they only use volume to scale audio data before sending it to ALSA/PulseAudio, not to control system volume. Although there are some Windows APIs that we could expose system volume control to, in general it doesn't seem like allowing apps (especially Windows apps/games of dubious quality) to change system volume is a good idea.
That just leaves `kHALOutputParam_Volume`, which can't adjust individual channels but only affects our stream. This is the method being used when I was testing your patch.
Could you change your patch to always use `kHALOutputParam_Volume` (in essence, reverting f46e9b8f120605d984f4ae14b4c815a67fbd1b59)?
(Also, I found that HALLab.app (included with the Xcode "Additional Tools" downloadable from https://developer.apple.com/download/all/) can be used to show the available volume controls. With AirPods or a USB audio device, I see channel volume controls. On the Studio Display or MacBook Pro (M2 Pro) built-in speakers, I only see the master.)