let volumePropertyAddress = AudioObjectPropertyAddress(
mSelector: kAudioHardwareServiceDeviceProperty_VirtualMainVolume,
mScope: kAudioDevicePropertyScopeOutput,
mElement: kAudioObjectPropertyElementMaster
)
let status = AudioObjectSetPropertyData(deviceId, &theAddress, 0, nil, size, &theValue)
Then App freezes. Is it not possible to call the AudioObjectSetPropertyData method on the main thread