How do I release multiple instance of AVAudioPlayer
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