fixed two warnings

This commit is contained in:
Volker Fischer 2015-11-13 21:13:59 +00:00
parent e674b21c0c
commit 233c34ba45

View File

@ -157,22 +157,36 @@ CSound::CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* ar
const UInt32 deviceCount = ( iPropertySize / sizeof ( AudioDeviceID ) ); const UInt32 deviceCount = ( iPropertySize / sizeof ( AudioDeviceID ) );
// always add system default devices for input and output as first entry // always add system default devices for input and output as first entry
lNumDevs = 0; lNumDevs = 0;
strDriverNames[lNumDevs] = "System Default In/Out Devices"; strDriverNames[lNumDevs] = "System Default In/Out Devices";
iPropertySize = sizeof ( AudioDeviceID ); iPropertySize = sizeof ( AudioDeviceID );
if ( AudioHardwareGetProperty ( kAudioHardwarePropertyDefaultInputDevice, AudioObjectPropertyAddress ePropertyInDevAddress = { kAudioHardwarePropertyDefaultInputDevice,
&iPropertySize, kAudioObjectPropertyScopeGlobal,
&audioInputDevice[lNumDevs] ) ) kAudioObjectPropertyElementMaster };
if ( AudioObjectGetPropertyData ( kAudioObjectSystemObject,
&ePropertyInDevAddress,
0,
NULL,
&iPropertySize,
&audioInputDevice[lNumDevs] ) )
{ {
throw CGenErr ( tr ( "CoreAudio input AudioHardwareGetProperty call failed. " throw CGenErr ( tr ( "CoreAudio input AudioHardwareGetProperty call failed. "
"It seems that no sound card is available in the system." ) ); "It seems that no sound card is available in the system." ) );
} }
iPropertySize = sizeof ( AudioDeviceID ); iPropertySize = sizeof ( AudioDeviceID );
if ( AudioHardwareGetProperty ( kAudioHardwarePropertyDefaultOutputDevice, AudioObjectPropertyAddress ePropertyOutDevAddress = { kAudioHardwarePropertyDefaultOutputDevice,
&iPropertySize, kAudioObjectPropertyScopeGlobal,
&audioOutputDevice[lNumDevs] ) ) kAudioObjectPropertyElementMaster };
if ( AudioObjectGetPropertyData ( kAudioObjectSystemObject,
&ePropertyOutDevAddress,
0,
NULL,
&iPropertySize,
&audioOutputDevice[lNumDevs] ) )
{ {
throw CGenErr ( tr ( "CoreAudio output AudioHardwareGetProperty call failed. " throw CGenErr ( tr ( "CoreAudio output AudioHardwareGetProperty call failed. "
"It seems that no sound card is available in the system." ) ); "It seems that no sound card is available in the system." ) );