possible fix for a crash for some external audio interfaces
This commit is contained in:
parent
0afcb177a5
commit
75e38864d9
1 changed files with 7 additions and 6 deletions
|
@ -252,13 +252,14 @@ void CSound::GetAudioDeviceInfos ( const AudioDeviceID DeviceID,
|
||||||
char* sC_strPropValue =
|
char* sC_strPropValue =
|
||||||
(char*) malloc ( CFStringGetLength ( sPropertyStringValue ) + 1 );
|
(char*) malloc ( CFStringGetLength ( sPropertyStringValue ) + 1 );
|
||||||
|
|
||||||
CFStringGetCString ( sPropertyStringValue,
|
if ( CFStringGetCString ( sPropertyStringValue,
|
||||||
sC_strPropValue,
|
sC_strPropValue,
|
||||||
CFStringGetLength ( sPropertyStringValue ) + 1,
|
CFStringGetLength ( sPropertyStringValue ) + 1,
|
||||||
kCFStringEncodingISOLatin1 );
|
kCFStringEncodingISOLatin1 ) )
|
||||||
|
{
|
||||||
strDeviceName = sC_strPropValue;
|
strDeviceName = sC_strPropValue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// check if device is input or output or both (is that possible?)
|
// check if device is input or output or both (is that possible?)
|
||||||
// we do this by trying to set the current device for the audio unit
|
// we do this by trying to set the current device for the audio unit
|
||||||
|
|
Loading…
Reference in a new issue