Re: Using AudioQueues with AudioConverterFillComplexBuffer....
Re: Using AudioQueues with AudioConverterFillComplexBuffer....
- Subject: Re: Using AudioQueues with AudioConverterFillComplexBuffer....
- From: Ron Burgundy <email@hidden>
- Date: Thu, 09 Jan 2014 08:38:27 -0700
I got it working! I used some of your suggestions combined with another class from my application that already played through a stream of audio that had the same absd as the one that im creating. Its a bit hacky, but its working. using AudioFileStreamParseBytes with an AudioFileStreamID created with the newly downsampled raw data. Using a queue of buffers that is created separately and nothing is done to the output queue from the input callback anymore. The only issue i have left is creating a rolling wave form with the audio. i have a feeling this part probably wont work or be possible with audio queues, but if it has to be set aside for now while i make the rest of the app work it should probably be okay.
I do have one (hopefully) final question related to plotting an audio stream.
In the EZAudio project (which i was initially trying to incorporate to handle displaying a waveform + doing playthrough) it uses the AmazingAudioEngine's AEFloatConverter to take the input format and convert it to a float based format using an AudioConverterNew before it displays it in an audio plot.
not sure why (if?) this is necessary or just makes it easier to display a waveform. Any feedback would be greatly appreciated! thanks.
On Jan 8, 2014, at 9:22 AM, Dave Bender < email@hidden> wrote: I feel your pain. OK here are a few things I would change:
AudioQueues are finicky things, and input callbacks should not touch output queues. Your callback is already in an AudioQueue stack frame, and you risk reentering the AudioQueue code and causing havoc. So:
-Do not schedule output in your input callback, use performSelectorOnMainThread and intermediate function to do that task -Do not call AudioQueueAllocateBuffer in your input callback. Preallocate a pool of output buffers and use those.
As for debugging tips: -Try to record your output sound on another machine. See if there is a pattern in how long each burst of static lasts and if it relates to your buffer size.
|
_______________________________________________
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