From 8d1599415990914a4fa5684fecad8bc3b31c241b Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Fri, 13 Nov 2015 22:27:25 +0000 Subject: [PATCH] fixed another warning --- mac/sound.cpp | 18 ++++++++++-------- mac/sound.h | 5 ++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/mac/sound.cpp b/mac/sound.cpp index fb176720..5d0aea41 100755 --- a/mac/sound.cpp +++ b/mac/sound.cpp @@ -347,10 +347,13 @@ QString CSound::LoadAndInitializeDriver ( int iDriverIdx ) // TODO why is only the input enough...? // setup callback for xruns (only for input is enough) - AudioDeviceAddPropertyListener ( audioInputDevice[lCurDev], - 0, - true, - kAudioDeviceProcessorOverload, + AudioObjectPropertyAddress stPropertyAddress; + stPropertyAddress.mSelector = kAudioDeviceProcessorOverload; + stPropertyAddress.mScope = kAudioObjectPropertyScopeGlobal; + stPropertyAddress.mElement = kAudioObjectPropertyElementMaster; + + AudioObjectAddPropertyListener ( audioInputDevice[lCurDev], + &stPropertyAddress, deviceNotification, this ); } @@ -539,13 +542,12 @@ UInt32 CSound::SetBufferSize ( AudioDeviceID& audioDeviceID, OSStatus CSound::deviceNotification ( AudioDeviceID, UInt32, - Boolean, - AudioDevicePropertyID inPropertyID, - void* inRefCon ) + const AudioObjectPropertyAddress* inAddresses, + void* inRefCon ) { CSound* pSound = static_cast ( inRefCon ); - if ( inPropertyID == kAudioDeviceProcessorOverload ) + if ( inAddresses->mSelector == kAudioDeviceProcessorOverload ) { // xrun handling (it is important to act on xruns under CoreAudio // since it seems that the xrun situation stays stable for a diff --git a/mac/sound.h b/mac/sound.h index 634a7fd7..0d8e27b7 100755 --- a/mac/sound.h +++ b/mac/sound.h @@ -71,9 +71,8 @@ protected: // callbacks static OSStatus deviceNotification ( AudioDeviceID, UInt32, - Boolean, - AudioDevicePropertyID inPropertyID, - void* inRefCon ); + const AudioObjectPropertyAddress* inAddresses, + void* inRefCon ); static OSStatus processInput ( void* inRefCon, AudioUnitRenderActionFlags* ioActionFlags,