Re: AudioQueueDispose delay
Re: AudioQueueDispose delay
- Subject: Re: AudioQueueDispose delay
- From: Graham Cox <email@hidden>
- Date: Thu, 23 Jul 2015 10:03:29 +1000
> On 22 Jul 2015, at 11:57 pm, Umut Can Genlik <email@hidden> wrote:
>
> According to documentation
> err = AudioQueueDispose(queue, true);
> I use true so dispose of AudioQueue happens immediately, although it does
> dispose queue immediately sometimes , other times it has delay 3-4 seconds
> up to 13 seconds on the device. err = AudioQueueStop(queue, true) has the
> same problem as well.
By “immediately” they actually mean “synchronously”, so the function waits until the various buffers are removed before returning. This can obviously take a variable amount of time, since the underlying stuff is asynchronous. Maybe just passing false will do the job for you, in that it will return immediately (thus the documentation’s use of “immediately” here actually makes the meaning of the word the opposite of its normal meaning), even if it takes some further seconds to remove the underlying queues. I expect in that case the return value to be of little value.
—Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden