Re: Resume Playback After Interrupt
Re: Resume Playback After Interrupt
- Subject: Re: Resume Playback After Interrupt
- From: Christopher Atlan <email@hidden>
- Date: Thu, 12 Feb 2009 15:31:30 +0100
Hi Angie,
check out QA1558: Audio Queue – Handling Playback Interruptions
http://developer.apple.com/iphone/library/qa/qa2008/qa1558.html
Christopher
Am 12.02.2009 um 08:25 schrieb Angelica Grace Tanchico:
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
_______________________________________________
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