Calling AudioQueueStop on playback queue invokes input callbacks on recording queue
Calling AudioQueueStop on playback queue invokes input callbacks on recording queue
- Subject: Calling AudioQueueStop on playback queue invokes input callbacks on recording queue
- From: Dave Bender <email@hidden>
- Date: Thu, 08 Aug 2013 13:31:33 -0400
I was experiencing double locking behaviour in an AudioQueueInput callback function, giving me a [NSLock lock]: deadlock error. Turns out, my stack trace looked a bit like this:
1 [NSLock lock] //tries to acquire same lock in my TimeoutFunction
2 MyAQInputCallback //associated with my record queue
3 ClientAudioQueue::CallInputCallback(....)
---------------
14 AudioQueueStop() // on my playback Queue
14 TimeoutFunction() //acquires lock before AudioQueueStop call
16 __NSFireTimer
At the base of this stack trace is a timeout function. However, the AudioQueueStop() call was on my PLAYBACK queue, not my recording queue. I do not understand why stopping the playback queue should invoke callbacks for the record queue. Is this a bug?
I would think so, because this behaviour implies calling AudioQueueStop() in your AQInputCallback function could cause infinite mutual recursion.
-Dave
_______________________________________________
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