fixed the last remaining compiler warning in this file

This commit is contained in:
Volker Fischer 2015-11-13 22:38:44 +00:00
parent 8d15994159
commit 2607d43af5

View file

@ -142,15 +142,27 @@ CSound::CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* ar
UInt32 iPropertySize;
AudioObjectPropertyAddress stPropertyAddress;
stPropertyAddress.mScope = kAudioObjectPropertyScopeGlobal;
stPropertyAddress.mElement = kAudioObjectPropertyElementMaster;
// first get property size of devices array and allocate memory
AudioHardwareGetPropertyInfo ( kAudioHardwarePropertyDevices,
&iPropertySize,
NULL );
stPropertyAddress.mSelector = kAudioHardwarePropertyDevices;
AudioObjectGetPropertyDataSize ( kAudioObjectSystemObject,
&stPropertyAddress,
0,
NULL,
&iPropertySize );
AudioDeviceID* audioDevices = (AudioDeviceID*) malloc ( iPropertySize );
// now actually query all devices present in the system
AudioHardwareGetProperty ( kAudioHardwarePropertyDevices,
stPropertyAddress.mSelector = kAudioHardwarePropertyDevices;
AudioObjectGetPropertyData ( kAudioObjectSystemObject,
&stPropertyAddress,
0,
NULL,
&iPropertySize,
audioDevices );
@ -163,8 +175,6 @@ CSound::CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* ar
iPropertySize = sizeof ( AudioDeviceID );
stPropertyAddress.mSelector = kAudioHardwarePropertyDefaultInputDevice;
stPropertyAddress.mScope = kAudioObjectPropertyScopeGlobal;
stPropertyAddress.mElement = kAudioObjectPropertyElementMaster;
if ( AudioObjectGetPropertyData ( kAudioObjectSystemObject,
&stPropertyAddress,
@ -179,8 +189,6 @@ CSound::CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* ar
iPropertySize = sizeof ( AudioDeviceID );
stPropertyAddress.mSelector = kAudioHardwarePropertyDefaultOutputDevice;
stPropertyAddress.mScope = kAudioObjectPropertyScopeGlobal;
stPropertyAddress.mElement = kAudioObjectPropertyElementMaster;
if ( AudioObjectGetPropertyData ( kAudioObjectSystemObject,
&stPropertyAddress,