output/osx: make AudioObjectPropertyAddress variables static constexpr

This commit is contained in:
Max Kellermann 2020-05-27 19:48:46 +02:00
parent aa7dc62f72
commit 7fdbaa6156

View File

@ -197,7 +197,7 @@ int
OSXOutput::GetVolume() OSXOutput::GetVolume()
{ {
Float32 vol; Float32 vol;
AudioObjectPropertyAddress aopa = { static constexpr AudioObjectPropertyAddress aopa = {
kAudioHardwareServiceDeviceProperty_VirtualMasterVolume, kAudioHardwareServiceDeviceProperty_VirtualMasterVolume,
kAudioObjectPropertyScopeOutput, kAudioObjectPropertyScopeOutput,
kAudioObjectPropertyElementMaster, kAudioObjectPropertyElementMaster,
@ -223,7 +223,7 @@ void
OSXOutput::SetVolume(unsigned new_volume) OSXOutput::SetVolume(unsigned new_volume)
{ {
Float32 vol = new_volume / 100.0; Float32 vol = new_volume / 100.0;
AudioObjectPropertyAddress aopa = { static constexpr AudioObjectPropertyAddress aopa = {
kAudioHardwareServiceDeviceProperty_VirtualMasterVolume, kAudioHardwareServiceDeviceProperty_VirtualMasterVolume,
kAudioObjectPropertyScopeOutput, kAudioObjectPropertyScopeOutput,
kAudioObjectPropertyElementMaster kAudioObjectPropertyElementMaster
@ -549,7 +549,7 @@ static void
osx_output_hog_device(AudioDeviceID dev_id, bool hog) osx_output_hog_device(AudioDeviceID dev_id, bool hog)
{ {
pid_t hog_pid; pid_t hog_pid;
AudioObjectPropertyAddress aopa = { static constexpr AudioObjectPropertyAddress aopa = {
kAudioDevicePropertyHogMode, kAudioDevicePropertyHogMode,
kAudioObjectPropertyScopeOutput, kAudioObjectPropertyScopeOutput,
kAudioObjectPropertyElementMaster kAudioObjectPropertyElementMaster