• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AudioFileOpenURL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >AudioFileOpenURL (From: Ashley Allen <email@hidden>)

  • Prev by Date: AudioFileOpenURL
  • Next by Date: Re: AudioFileOpenURL
  • Previous by thread: AudioFileOpenURL
  • Next by thread: Re: AudioFileOpenURL
  • Index(es):
    • Date
    • Thread