• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Resume Playback After Interrupt
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resume Playback After Interrupt


  • Subject: Re: Resume Playback After Interrupt
  • From: tahome izwah <email@hidden>
  • Date: Thu, 12 Feb 2009 14:59:38 +0100

This is a bit of a long shot but are you sure that you're not looking
at a multi-threading issue? I would move the call to AudioQueuePause
and AudioQueueStart to the main thread (look at
-performSelectorOnMainThread) to see what this does, the interrupt is
probably coming in on a different thread than your player is on.

--th

2009/2/12 Angelica Grace Tanchico <email@hidden>:
> 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
>
 _______________________________________________
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

References: 
 >Resume Playback After Interrupt (From: Angelica Grace Tanchico <email@hidden>)

  • Prev by Date: Re: Offline AUs
  • Next by Date: Re: Resume Playback After Interrupt
  • Previous by thread: Resume Playback After Interrupt
  • Next by thread: Re: Resume Playback After Interrupt
  • Index(es):
    • Date
    • Thread