• 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
How do I release multiple instance of AVAudioPlayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I release multiple instance of AVAudioPlayer


  • Subject: How do I release multiple instance of AVAudioPlayer
  • From: Sanoj Nambi <email@hidden>
  • Date: Sun, 25 Jul 2010 11:38:10 -0500

Hey all,
I have a set of buttons which on pressed plays the sound file.I have used AVAudioPlayer to play these sound files.All the buttons plays fine for sometime after which AVAudioPlayer objects are somehow released.
I guess AVAudioPlayer internally maintains a pool and flushes it if a certain number of objects are created.
I there a way to handle this issue.

here is the code snippet 
if(!AppDelegate.recordFlag)   //if it is not in recording mode
    {
       
        playBeat = [[[AVAudioPlayer alloc] initWithContentsOfURL:filePath error:&error]retain];
   
        [playBeat prepareToPlay];
        [playBeat play];
       
       // if(playBeat.playing==FALSE)
      //  {
       //     NSLog(@"play release");
         
       //     [playBeat release];
     //   }
       
  
    }

I have not released the playBeat object anywhere.
 _______________________________________________
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

  • Follow-Ups:
    • Re: How do I release multiple instance of AVAudioPlayer
      • From: uɐıʇəqɐz pnoqɥɒɯ <email@hidden>
    • Re: How do I release multiple instance of AVAudioPlayer
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: Gradual crackling/stuttering during audio capture
  • Next by Date: Re: How do I release multiple instance of AVAudioPlayer
  • Previous by thread: Re: Gradual crackling/stuttering during audio capture
  • Next by thread: Re: How do I release multiple instance of AVAudioPlayer
  • Index(es):
    • Date
    • Thread