Re: Using AudioQueues with AudioConverterFillComplexBuffer....
Re: Using AudioQueues with AudioConverterFillComplexBuffer....
- Subject: Re: Using AudioQueues with AudioConverterFillComplexBuffer....
- From: Dave Bender <email@hidden>
- Date: Tue, 07 Jan 2014 21:43:47 -0500
Anchorman,
I have struggled with half working CoreAudio code as well. While my use case was different, I found the following problems with AudioQueues:
-Output queue would randomly stop playing sound (ie samples pushed to the queue would not make any sound)
-Halting an output queue would actually run callbacks for the input queue within the same stack, creating awful synchronization problems
-Sometimes the sound daemon would just stop working and I'd have to reset my iPod touch.
The only way I got things working was to eliminate the use of AudioQueues and use the AudioUnits and AUGraph functionality instead.
I suspect if you keep trying to fix your AudioQueue data you will just encounter other problems.
My advice: give up on AudioQueues. Go one level deeper into AudioUnits. Spend your time learning how to communicate between threads rather than
wasting your time with the queues. AudioUnitRender in the input callback will get your higher bit rate data and you can probably even downsample it
in that callback. Save the allocated output data in a shared array. Then in your output callback check if the array has any data and play it out.
The following github project has good reference code.
-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