RE: AudioQueue run loop newbie question
RE: AudioQueue run loop newbie question
- Subject: RE: AudioQueue run loop newbie question
- From: "McGrath, Christopher" <email@hidden>
- Date: Fri, 28 Jan 2011 09:05:10 +1100
- Thread-topic: AudioQueue run loop newbie question
Title: RE: AudioQueue run loop newbie question
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=email@hidden 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