• 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: AudioQueue run loop newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioQueue run loop newbie question


  • Subject: Re: AudioQueue run loop newbie question
  • From: Samuel Kitono <email@hidden>
  • Date: Fri, 28 Jan 2011 05:15:34 +0700

That is what i though at first but seeing his callback it doesnt seem he uses any AVAssetReader call. And the funny thing he said that audio queue doesn't work without the while loop. I figure it must be something to do with threading with the audio queue.

On Fri, Jan 28, 2011 at 5:05 AM, McGrath, Christopher <email@hidden> wrote:

This is a long shot.

I had a similar problem and it was unrelated to the setup of the Audio Queue. I had an
AVAssetReader to source sourcing video frames, and I think the act of using these AVFoundation
classes meant that iOS thought "Oh, the iPod has started playing. Let's mute the application audio",
and so the audio stopped and the callback wasn't called again.

Try adding these lines of code to your applicationDidFinishLaunching - they tell iOS that it's ok to
keep the application audio playing while the iPod is playing.

    // Registers this class as the delegate of the audio session.
    [[AVAudioSession sharedInstance] setDelegate: self];
   
    // The AmbientSound category allows application audio to mix with Media Player
    // audio. The category also indicates that application audio should stop playing
    // if the Ring/Siilent switch is set to "silent" or the screen locks.
    [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryAmbient error: nil];
    // Activates the audio session.
   
    NSError *activationError = nil;
    [[AVAudioSession sharedInstance] setActive: YES error: &activationError];





-----Original Message-----
From: coreaudio-api-bounces+cmcgr=dolby.com@lists.apple.com on behalf of Kasper Welner
Sent: Fri 1/28/2011 9:01 AM
To: email@hidden
Subject: Re: AudioQueue run loop newbie question

I tried to NSLog it. Its getting called 3 times when I call it myself, and then the AudioQueue makes exactly 3 callbacks.  Probably because I have 3 buffers.  If I remove the initial call to the callback function, it is never triggered by anyone...




On Jan 27, 2011, at 22:45 PM, Samuel Kitono wrote:

> Can you elaborate more when you remove the while loop to call the audio queue. It just freezes and no error reported?

 _______________________________________________
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

 _______________________________________________
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: 
 >AudioQueue run loop newbie question (From: Kasper Welner <email@hidden>)
 >Re: AudioQueue run loop newbie question (From: Kasper Welner <email@hidden>)
 >Re: AudioQueue run loop newbie question (From: Samuel Kitono <email@hidden>)
 >Re: AudioQueue run loop newbie question (From: Kasper Welner <email@hidden>)
 >Re: AudioQueue run loop newbie question (From: Samuel Kitono <email@hidden>)
 >Re: AudioQueue run loop newbie question (From: Kasper Welner <email@hidden>)
 >RE: AudioQueue run loop newbie question (From: "McGrath, Christopher" <email@hidden>)

  • Prev by Date: RE: AudioQueue run loop newbie question
  • Next by Date: Re: AudioQueue run loop newbie question
  • Previous by thread: RE: AudioQueue run loop newbie question
  • Next by thread: Re: AudioQueue run loop newbie question
  • Index(es):
    • Date
    • Thread