Turns out that all I had to do was to declare the userData struct as a iVar in the header file. Rookie mistake... I've never had to wrap plain C code up in Objective-c before :-)
Thanks for all the responses!!!
Kasper
On Jan 27, 2011, at 23:24 PM, Kasper Welner wrote: Thanks, but this is just regular cocoa for osx, not iOS. And the only thing in my nib is a IKImageView, which is just there so I don't have a blank window. Maybe I should try putting it all together again in a new Xcode project...
Den 27/01/2011 kl. 23.05 skrev "McGrath, Christopher" < email@hidden>:
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
|