Skip to content

Commit

Permalink
[CoreAudioAE] Fix CFString copy function in CCoreAudioHardware::GetOu…
Browse files Browse the repository at this point in the history
…tputDeviceName

Using UTF8 encoding might fail and return NULL. Instead we pass
CFStringGetSystemEncoding().
  • Loading branch information
Tobias Hieta committed Jan 15, 2013
1 parent d0ace3d commit f27cd2b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -329,7 +329,7 @@ void CCoreAudioHardware::GetOutputDeviceName(std::string& name)
if (ret != noErr)
return;

const char *cstr = CFStringGetCStringPtr(theDeviceName, kCFStringEncodingUTF8);
const char *cstr = CFStringGetCStringPtr(theDeviceName, CFStringGetSystemEncoding());
if (cstr)
name = cstr;
CFRelease(theDeviceName);
Expand Down

0 comments on commit f27cd2b

Please sign in to comment.