fixed the last remaining compiler warning in this file
This commit is contained in:
parent
8d15994159
commit
2607d43af5
|
@ -142,15 +142,27 @@ CSound::CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* ar
|
||||||
UInt32 iPropertySize;
|
UInt32 iPropertySize;
|
||||||
AudioObjectPropertyAddress stPropertyAddress;
|
AudioObjectPropertyAddress stPropertyAddress;
|
||||||
|
|
||||||
|
stPropertyAddress.mScope = kAudioObjectPropertyScopeGlobal;
|
||||||
|
stPropertyAddress.mElement = kAudioObjectPropertyElementMaster;
|
||||||
|
|
||||||
// first get property size of devices array and allocate memory
|
// first get property size of devices array and allocate memory
|
||||||
AudioHardwareGetPropertyInfo ( kAudioHardwarePropertyDevices,
|
stPropertyAddress.mSelector = kAudioHardwarePropertyDevices;
|
||||||
&iPropertySize,
|
|
||||||
NULL );
|
AudioObjectGetPropertyDataSize ( kAudioObjectSystemObject,
|
||||||
|
&stPropertyAddress,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
&iPropertySize );
|
||||||
|
|
||||||
AudioDeviceID* audioDevices = (AudioDeviceID*) malloc ( iPropertySize );
|
AudioDeviceID* audioDevices = (AudioDeviceID*) malloc ( iPropertySize );
|
||||||
|
|
||||||
// now actually query all devices present in the system
|
// now actually query all devices present in the system
|
||||||
AudioHardwareGetProperty ( kAudioHardwarePropertyDevices,
|
stPropertyAddress.mSelector = kAudioHardwarePropertyDevices;
|
||||||
|
|
||||||
|
AudioObjectGetPropertyData ( kAudioObjectSystemObject,
|
||||||
|
&stPropertyAddress,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
&iPropertySize,
|
&iPropertySize,
|
||||||
audioDevices );
|
audioDevices );
|
||||||
|
|
||||||
|
@ -163,8 +175,6 @@ CSound::CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* ar
|
||||||
|
|
||||||
iPropertySize = sizeof ( AudioDeviceID );
|
iPropertySize = sizeof ( AudioDeviceID );
|
||||||
stPropertyAddress.mSelector = kAudioHardwarePropertyDefaultInputDevice;
|
stPropertyAddress.mSelector = kAudioHardwarePropertyDefaultInputDevice;
|
||||||
stPropertyAddress.mScope = kAudioObjectPropertyScopeGlobal;
|
|
||||||
stPropertyAddress.mElement = kAudioObjectPropertyElementMaster;
|
|
||||||
|
|
||||||
if ( AudioObjectGetPropertyData ( kAudioObjectSystemObject,
|
if ( AudioObjectGetPropertyData ( kAudioObjectSystemObject,
|
||||||
&stPropertyAddress,
|
&stPropertyAddress,
|
||||||
|
@ -179,8 +189,6 @@ CSound::CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* ar
|
||||||
|
|
||||||
iPropertySize = sizeof ( AudioDeviceID );
|
iPropertySize = sizeof ( AudioDeviceID );
|
||||||
stPropertyAddress.mSelector = kAudioHardwarePropertyDefaultOutputDevice;
|
stPropertyAddress.mSelector = kAudioHardwarePropertyDefaultOutputDevice;
|
||||||
stPropertyAddress.mScope = kAudioObjectPropertyScopeGlobal;
|
|
||||||
stPropertyAddress.mElement = kAudioObjectPropertyElementMaster;
|
|
||||||
|
|
||||||
if ( AudioObjectGetPropertyData ( kAudioObjectSystemObject,
|
if ( AudioObjectGetPropertyData ( kAudioObjectSystemObject,
|
||||||
&stPropertyAddress,
|
&stPropertyAddress,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user