AudioFileClose() crashing on iOS after playback
AudioFileClose() crashing on iOS after playback
- Subject: AudioFileClose() crashing on iOS after playback
- From: Chris Santoro <email@hidden>
- Date: Fri, 1 Oct 2010 01:12:55 -0400
Hi Everyone,
I'm trying to do some simple file playback on the
iPhone (SDK 4.1). I wrote an audio engine using RemoteIO that does
recording (with input monitoring), and playback. Everything works fine
except for the playback at the moment. Whenever I try to close the file
that I've been playing back (for instance, when hitting the end of the file), I
get an EXC_BAD_ACCESS. The audio file handle that I'm trying to close
is not NULL. It's still a good file for all I know. The code is modeled
after AudioPlayer in SpeakHere, and does everything the same as far as I
can tell, except I'm using rIO instead of Audio Queue Services. Audio
format is Linear PCM.
My playback callback uses AudioFileReadBytes() and continues to read
bytes from the file until it reads less than the requested number. Then
it calls a Stop() function that calls AudioOutputUnitStop() and
AudioFileClose(). It crashes when trying to close the file. The entire file plays back successfully before crashing on AudioFileClose().
Any ideas on what could cause AudioFileClose() to crash in this scenario?
Here's the stack trace if it helps. I'm stumped.
#0 0x3510741c in objc_msgSend
#1 0x35750c74 in CFRelease
#2 0x360a5964 in AudioFileObject::~AudioFileObject
#3 0x360a58ec in CAFAudioFile::~CAFAudioFile
#4 0x360a57f0 in AudioFileObjectHandle::~AudioFileObjectHandle
#5 0x360a5130 in AudioFileClose
#6 0x000438ea in IOEngine::StopPlayback at IOEngine.mm:526
#7 0x000449c6 in IOEngine::outputCallback at IOEngine.mm:116
Thanks,
Chris
_______________________________________________
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