Re: AudioQueue run loop newbie question
Re: AudioQueue run loop newbie question
- Subject: Re: AudioQueue run loop newbie question
- From: Samuel Kitono <email@hidden>
- Date: Fri, 28 Jan 2011 03:50:31 +0700
printf("Playing...\n");
do {
}
while (
0 ==
0);
these lines shouldn't be necessary. If your audio queue
doesnt run without this then something is wrong with your setup of audio
queue. For example what kind of thread that you use for audio queue?
On Thu, Jan 27, 2011 at 7:46 PM, Kasper Welner
<email@hidden> wrote:
This is my first post on this mailing list.
I just began learning about AudioQueues from the CoreAudio book (rough cuts).
I did the AudioQueue playback example tutorial, which is basically the same as the apple tutorial example. Everything is working fine.
The problems start when I try to implement the code in an app with a GUI. I tested it by pasting the code into the 'init' method of a NSObject subclass. The only way I can get the queue to do the callback is by inserting an empty DO...WHILE loop in the end of my init, but that makes the GUI freeze (obviously...)!!
I studied the Speak Here example, and tried to find a loop of some kind or a CFRunLoopRunInMode but, it basically looks like everything just works as soon as AudioQueueStart is called... Is this stuff working in a different way on the iOS (compared to OSX)?
Clearly, there is something fundamental that I don't understand about how things work...
Kasper
@implementation KWPlayer
-(void) start
{
CheckError(
AudioQueueStart(queue, NULL),
"AudioQueueStart failed");
printf("Playing...\n");
do {
} while (0 == 0); WHY IS THIS MAKING IT PLAY???
}
@end
_______________________________________________
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