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

Stabilizing AudioQueue


  • Subject: Stabilizing AudioQueue
  • From: Nick Zitzmann <email@hidden>
  • Date: Sun, 14 Sep 2008 00:38:29 -0600

I'm trying to work with the AudioQueue class, but I keep running into problems with it that I need help solving.

My application creates several Objective-C objects that have an internal AudioQueue. The queue is fed a stream of linear PCM. I've based my code on the AudioQueueTools example code, and in my playback function, I use memcpy() to copy an internal buffer of PCM into each AudioQueueBufferRef.

When the very first object with PCM is created, everything works fine. It's starting with the second object that things start to fall apart. First off, I've found that calling AudioQueueDispose() with inImmediate set to true causes a buffer overrun that trips Guard Malloc when the app next creates a new AudioQueue and calls AudioQueueAllocateBuffer(). I have filed bug #6218335 on this matter.

So when the buffer is disposed with inImmediate set to false, the buffer no longer overruns, but now when AudioQueueStart() is called, it works for the first few AudioQueues that come and go, but after a while no sound effects are played. When I examined the thread that's supposed to render the audio, it appears to be throwing a C++ exception of some sort in AUNetSendEntry(), which might explain things, but AudioQueueStart() still returns noErr.

Has anyone ever tried allocating and deallocating more than one AudioQueue in an application, and if so, have you ever had these problems? I need multiplexing, so going to a single AudioQueue is not an option.

Alternately, does anyone have any working alternative classes to AudioQueue that I can use?

Nick Zitzmann
<http://seiryu.home.comcast.net/>
S/MIME signature available upon request




_______________________________________________ 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
  • Follow-Ups:
    • Re: Stabilizing AudioQueue
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: iPhoneOS AudioQueueOfflineRender
  • Next by Date: Re: Stabilizing AudioQueue
  • Previous by thread: iPhoneOS AudioQueueOfflineRender
  • Next by thread: Re: Stabilizing AudioQueue
  • Index(es):
    • Date
    • Thread