possible fix for a crash for some external audio interfaces

This commit is contained in:
Volker Fischer 2015-07-05 09:35:04 +00:00
parent 0afcb177a5
commit 75e38864d9

View File

@ -252,12 +252,13 @@ void CSound::GetAudioDeviceInfos ( const AudioDeviceID DeviceID,
char* sC_strPropValue =
(char*) malloc ( CFStringGetLength ( sPropertyStringValue ) + 1 );
CFStringGetCString ( sPropertyStringValue,
sC_strPropValue,
CFStringGetLength ( sPropertyStringValue ) + 1,
kCFStringEncodingISOLatin1 );
strDeviceName = sC_strPropValue;
if ( CFStringGetCString ( sPropertyStringValue,
sC_strPropValue,
CFStringGetLength ( sPropertyStringValue ) + 1,
kCFStringEncodingISOLatin1 ) )
{
strDeviceName = sC_strPropValue;
}
}
// check if device is input or output or both (is that possible?)