I would do the following:
Make sure your AudioSession is set up for PlayAndRecord
Have an input and an output queue. Have them both prepared (AudioQueuePrepare)
When you want to use one you start it. When you are finished with it, pause it (don't stop it). I would then Reset the other queue, start it (you reset it so that if you had any state left from last time it is cleaned out first)
So you have this:
while (audio_required) Start Input Pause Input Reset Output Start Output Pause Output Reset Input
Bill
On Aug 23, 2010, at 1:21 PM, Jgreen.bus wrote: Well I'm using separate audio queues for recording and playing. I just haven't been able to have my record queue and playback queue running at sametime .
My recorder is basically in a listening mode. The goes to a capturing mode after some trigger. Another trigger stops capturing and starts playback of the data I was just capturing.
What I would like to do is to have my recording queue go straight back to listening, but right now I'm having to stop and start it.
When Ive tried to go back to listening without stopping it fails.
If I'm able to do this is really what I'm trying to figure out.
Sent from my iPhone On Aug 23, 2010, at 2:34 PM, Chris Polcyn < email@hidden> wrote: Hi Joey,
I did this recently by using separate Audio Queues for recording and playback, and a third for synchronization purposes only. I don't think there is a way to have a single Audio Queue do both recording and playback.
Chris Polcyn On Sat, Aug 21, 2010 at 6:42 PM, Joey Green <email@hidden> wrote:
Let me describe my problem first.
I record audio through the mic. Once recording is done, I immediately start playback. Once playing is done, I immediately start recording. The problem I have is after playback is done it takes almost a second for AudioQueueStart to start back my recoding audio queue. The user is going to expect to be able to start making noise as soon as the playback is over. This needs to be less OR maybe have some other recorder going while we are doing playback.
So, is there a way to have a AQ player and recorder going at the same time?
Is there something I'm overlooking that would be easier than having a recorder and player going at the same time?
I don't keep the files that I'm recording/playing. So maybe there is a way to use just buffers that I don't see.
_______________________________________________
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
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
|