Resume Playback After Interrupt
Resume Playback After Interrupt
- Subject: Resume Playback After Interrupt
- From: Angelica Grace Tanchico <email@hidden>
- Date: Thu, 12 Feb 2009 15:25:12 +0800
- Importance: Normal
Hi!
I've created an audio session with PlayAndRecord audio category. It works fine (can play and record at the same time) until an interrupt (incoming call) is received.
I tried following the SpeakHere sample to handle interrupt.
I have this interrupt callback:
void interruptCallBack(void *inUserdata, UInt32 state) { if (state == kAudioSessionBeginInterruption) { AudioQueuePause(gQueuePlayer); AudioQueuePause(gQueueRec); } else if (state == kAudioSessionEndInterruption) { UInt32 sessCategory = kAudioSessionCategory_PlayAndRecord;
AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessCategory), &sessCategory);
AudioQueueStart(gQueuePlayer);
AudioQueueStart(gQueueRec); } }
** gQueuePlayer and gQueueRec are the AudioQueueRef variables for the player and recorder.
After receiving an interrupt, only the recorder seems to resume. Based on the log I added in the playerCallback() and recorderCallback(), there were NO logs at all from the playerCallback() while the recorderCallback() is running fine. Meaning, the player did not resume.
I have checked the sequence of the function calls and I think there is no problem in the sequence. I have no idea what's wrong with my app.
I hope you could help me with this. Thanks in advance.
Regards, Angie
Always-on security tools provide safer ways to connect and share anywhere. Find out more. Windows Live
|
_______________________________________________
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