Re: AudioFileOpenURL
Re: AudioFileOpenURL
- Subject: Re: AudioFileOpenURL
- From: David Duncan <email@hidden>
- Date: Wed, 1 Apr 2009 10:33:39 -0700
On Apr 1, 2009, at 10:25 AM, Ashley Allen wrote: Another issue I seem to be running into relates to printing CFURL's. My prints keep returning null values even though XCode debugger shows they have proper values. I am doing the following:
CFShow(CFStringGetCStringPtr(CFURLGetString(sound_uri), kCFStringEncodingUTF8));
CFShow doesn't print C strings, it prints Core Foundation data types. CFShow(sound_uri) is what you really want here. The sound_uri was created as follows:
CFStringRef urlstring = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, string, NULL, NULL, kCFStringEncodingUTF8); CFURLRef sound_uri = CFURLCreateWithString(kCFAllocatorDefault, urlstring, NULL);
Where does 'string' come from? Assuming its a file path, you would want to use CFURLCreateFromFileSystemRepresentation() instead. -- David Duncan Apple DTS Animation and Printing
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden