Merged up to trunk R732

git-svn-id: svn://localhost/ardour2/branches/midi@735 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2006-08-01 19:18:12 +00:00
parent 79fc27de2e
commit 0565c75ce8
28 changed files with 450 additions and 99 deletions

View file

@ -253,3 +253,21 @@ path_expand (string path)
#endif
}
#ifdef HAVE_COREAUDIO
string
CFStringRefToStdString(CFStringRef stringRef)
{
CFIndex size =
CFStringGetMaximumSizeForEncoding(CFStringGetLength(stringRef) ,
kCFStringEncodingUTF8);
char *buf = new char[size];
std::string result;
if(CFStringGetCString(stringRef, buf, size, kCFStringEncodingUTF8)) {
result = buf;
}
delete [] buf;
return result;
}
#endif // HAVE_COREAUDIO