• 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: AudioFileClose() crashing on iOS after playback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioFileClose() crashing on iOS after playback


  • Subject: Re: AudioFileClose() crashing on iOS after playback
  • From: Kyle Sluder <email@hidden>
  • Date: Sat, 2 Oct 2010 18:46:22 -0700

On Oct 2, 2010, at 3:54 PM, Chris Santoro <email@hidden> wrote:

> I want to start playing a file given some CFString theFilePath which I do not own. I want to use AudioFileOpenURL, so I first I create a URL.
>
> CFURLRef audioFileURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, theFilePath, kCFURLPOSIXPathStyle, false);
>
> Then I open the audio file, where mPlaybackFile is a member of the class that's currently doing all this.
>
> AudioFileOpenURL (audioFileURL, kAudioFileReadPermission, 0, &mPlaybackFile);
>
> I've got my file handle (mPlaybackFile), and now (I think) I don't need the URL I used to open the file. So I release it.
> CFRelease(audioFileURL);

Unless Core Audio is not following the CF memory management rules, you need to retain mPlaybackFile.

--Kyle Sluder _______________________________________________
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: 
 >Re: AudioFileClose() crashing on iOS after playback (From: Doug Wyatt <email@hidden>)
 >Re: AudioFileClose() crashing on iOS after playback (From: Chris Santoro <email@hidden>)
 >Re: AudioFileClose() crashing on iOS after playback (From: Brian Willoughby <email@hidden>)
 >Re: AudioFileClose() crashing on iOS after playback (From: Chris Santoro <email@hidden>)

  • Prev by Date: Re: AudioFileClose() crashing on iOS after playback
  • Next by Date: Re: CocoaAUHost-like example for Carbon UIs
  • Previous by thread: Re: AudioFileClose() crashing on iOS after playback
  • Next by thread: Re: AudioFileClose() crashing on iOS after playback
  • Index(es):
    • Date
    • Thread