Commit c975d8b9 authored by Dave Hocker's avatar Dave Hocker Committed by Max Kellermann

Fix deprecation warnings caused by name changes in OSX audio inerfaces

parent 2730f918
...@@ -160,13 +160,13 @@ OSXOutput::Create(EventLoop &, const ConfigBlock &block) ...@@ -160,13 +160,13 @@ OSXOutput::Create(EventLoop &, const ConfigBlock &block)
static constexpr AudioObjectPropertyAddress default_system_output_device{ static constexpr AudioObjectPropertyAddress default_system_output_device{
kAudioHardwarePropertyDefaultSystemOutputDevice, kAudioHardwarePropertyDefaultSystemOutputDevice,
kAudioObjectPropertyScopeOutput, kAudioObjectPropertyScopeOutput,
kAudioObjectPropertyElementMaster, kAudioObjectPropertyElementMain,
}; };
static constexpr AudioObjectPropertyAddress default_output_device{ static constexpr AudioObjectPropertyAddress default_output_device{
kAudioHardwarePropertyDefaultOutputDevice, kAudioHardwarePropertyDefaultOutputDevice,
kAudioObjectPropertyScopeOutput, kAudioObjectPropertyScopeOutput,
kAudioObjectPropertyElementMaster kAudioObjectPropertyElementMain
}; };
const auto &aopa = const auto &aopa =
...@@ -195,9 +195,9 @@ int ...@@ -195,9 +195,9 @@ int
OSXOutput::GetVolume() OSXOutput::GetVolume()
{ {
static constexpr AudioObjectPropertyAddress aopa = { static constexpr AudioObjectPropertyAddress aopa = {
kAudioHardwareServiceDeviceProperty_VirtualMasterVolume, kAudioHardwareServiceDeviceProperty_VirtualMainVolume,
kAudioObjectPropertyScopeOutput, kAudioObjectPropertyScopeOutput,
kAudioObjectPropertyElementMaster, kAudioObjectPropertyElementMain,
}; };
const auto vol = AudioObjectGetPropertyDataT<Float32>(dev_id, const auto vol = AudioObjectGetPropertyDataT<Float32>(dev_id,
...@@ -211,9 +211,9 @@ OSXOutput::SetVolume(unsigned new_volume) ...@@ -211,9 +211,9 @@ OSXOutput::SetVolume(unsigned new_volume)
{ {
Float32 vol = new_volume / 100.0; Float32 vol = new_volume / 100.0;
static constexpr AudioObjectPropertyAddress aopa = { static constexpr AudioObjectPropertyAddress aopa = {
kAudioHardwareServiceDeviceProperty_VirtualMasterVolume, kAudioHardwareServiceDeviceProperty_VirtualMainVolume,
kAudioObjectPropertyScopeOutput, kAudioObjectPropertyScopeOutput,
kAudioObjectPropertyElementMaster kAudioObjectPropertyElementMain
}; };
UInt32 size = sizeof(vol); UInt32 size = sizeof(vol);
OSStatus status = AudioObjectSetPropertyData(dev_id, OSStatus status = AudioObjectSetPropertyData(dev_id,
...@@ -366,25 +366,25 @@ osx_output_set_device_format(AudioDeviceID dev_id, ...@@ -366,25 +366,25 @@ osx_output_set_device_format(AudioDeviceID dev_id,
static constexpr AudioObjectPropertyAddress aopa_device_streams = { static constexpr AudioObjectPropertyAddress aopa_device_streams = {
kAudioDevicePropertyStreams, kAudioDevicePropertyStreams,
kAudioObjectPropertyScopeOutput, kAudioObjectPropertyScopeOutput,
kAudioObjectPropertyElementMaster kAudioObjectPropertyElementMain
}; };
static constexpr AudioObjectPropertyAddress aopa_stream_direction = { static constexpr AudioObjectPropertyAddress aopa_stream_direction = {
kAudioStreamPropertyDirection, kAudioStreamPropertyDirection,
kAudioObjectPropertyScopeOutput, kAudioObjectPropertyScopeOutput,
kAudioObjectPropertyElementMaster kAudioObjectPropertyElementMain
}; };
static constexpr AudioObjectPropertyAddress aopa_stream_phys_formats = { static constexpr AudioObjectPropertyAddress aopa_stream_phys_formats = {
kAudioStreamPropertyAvailablePhysicalFormats, kAudioStreamPropertyAvailablePhysicalFormats,
kAudioObjectPropertyScopeOutput, kAudioObjectPropertyScopeOutput,
kAudioObjectPropertyElementMaster kAudioObjectPropertyElementMain
}; };
static constexpr AudioObjectPropertyAddress aopa_stream_phys_format = { static constexpr AudioObjectPropertyAddress aopa_stream_phys_format = {
kAudioStreamPropertyPhysicalFormat, kAudioStreamPropertyPhysicalFormat,
kAudioObjectPropertyScopeOutput, kAudioObjectPropertyScopeOutput,
kAudioObjectPropertyElementMaster kAudioObjectPropertyElementMain
}; };
OSStatus err; OSStatus err;
...@@ -484,7 +484,7 @@ osx_output_hog_device(AudioDeviceID dev_id, bool hog) noexcept ...@@ -484,7 +484,7 @@ osx_output_hog_device(AudioDeviceID dev_id, bool hog) noexcept
static constexpr AudioObjectPropertyAddress aopa = { static constexpr AudioObjectPropertyAddress aopa = {
kAudioDevicePropertyHogMode, kAudioDevicePropertyHogMode,
kAudioObjectPropertyScopeOutput, kAudioObjectPropertyScopeOutput,
kAudioObjectPropertyElementMaster kAudioObjectPropertyElementMain
}; };
pid_t hog_pid; pid_t hog_pid;
...@@ -538,7 +538,7 @@ IsAudioDeviceName(AudioDeviceID id, const char *expected_name) noexcept ...@@ -538,7 +538,7 @@ IsAudioDeviceName(AudioDeviceID id, const char *expected_name) noexcept
static constexpr AudioObjectPropertyAddress aopa_name{ static constexpr AudioObjectPropertyAddress aopa_name{
kAudioObjectPropertyName, kAudioObjectPropertyName,
kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster, kAudioObjectPropertyElementMain,
}; };
char actual_name[256]; char actual_name[256];
...@@ -561,7 +561,7 @@ FindAudioDeviceByName(const char *name) ...@@ -561,7 +561,7 @@ FindAudioDeviceByName(const char *name)
static constexpr AudioObjectPropertyAddress aopa_hw_devices{ static constexpr AudioObjectPropertyAddress aopa_hw_devices{
kAudioHardwarePropertyDevices, kAudioHardwarePropertyDevices,
kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster, kAudioObjectPropertyElementMain,
}; };
const auto ids = const auto ids =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment