• 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
AudioQueueDispose delay
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioQueueDispose delay


  • Subject: AudioQueueDispose delay
  • From: Umut Can Genlik <email@hidden>
  • Date: Wed, 22 Jul 2015 09:57:20 -0400

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.

My understanding is that both functions try to flush-release buffers
already and about to be enqueued...
so I even help my call-back function to flush the buffers if
AudioQueueDispose is going to be called.

static void MyAQOutputCallBack(void *inUserData, AudioQueueRef inAQ,
AudioQueueBufferRef inCompleteAQBuffer)
{
  if (player.shouldDispose) {
        printf("player shouldDispose !!!!!!!!!!!\n\n\n\n\n\n");
        OSStatus dispose = AudioQueueFlush (inAQ);
        return;
    }
}

Since I am going to record something using AudioQueues after playing a
track, I need this functions returned without delays. couple hundred
milliseconds delay is okay but 3-4 seconds? that is unacceptable.

Other AudioQueue functions also being called on the same thread and they
seem working fine.

I have also tried to call this on main thread to make sure if it is going
to change anything or not

[self performSelectorOnMainThread:@selector(tryOnMain) withObject:nil
waitUntilDone:NO];

or

dispatch_sync(dispatch_get_main_queue(),^{ didnt do any difference

Any idea what might be happening?
_______________________________________________

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


  • Follow-Ups:
    • Re: AudioQueueDispose delay
      • From: Graham Cox <email@hidden>
    • Re: AudioQueueDispose delay
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: resolving alias
  • Next by Date: Re: resolving alias
  • Previous by thread: Re: resolving alias
  • Next by thread: Re: AudioQueueDispose delay
  • Index(es):
    • Date
    • Thread