Re: AudioQueueNewOutput causes gui to lock up
Re: AudioQueueNewOutput causes gui to lock up
- Subject: Re: AudioQueueNewOutput causes gui to lock up
- From: Kyle Sluder <email@hidden>
- Date: Mon, 24 Sep 2012 18:43:39 -0700
On Mon, Sep 24, 2012, at 06:25 PM, Brian Hall wrote:
> I'm trying to write a cocoa app based on the command line sample
> "CH05_Player" in "Learning Core Audio"
>
> From what I've read in AudioQueueStart(audioQueue, NULL) should get it
> going but nothing happens unless I call CFRunLoopRun(), then the gui
> is unresponsive and the audio plays fine.
You need to start over and learn how to write a Cocoa app. The Chapter 5
sample code includes an explicit call to CFRunLoopRunInMode, which kicks
off the runloop that delivers your audio queue callbacks.
Cocoa apps don't behave this way. They call NSApplicationMain(), which
in turn starts up the main NSRunLoop via -[NSApplication run]. You must
never block the main runloop; it dictates the life of your app, not the
other way around.
--Kyle Sluder
_______________________________________________
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