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

AudioQueue run loop newbie question


  • Subject: AudioQueue run loop newbie question
  • From: Kasper Welner <email@hidden>
  • Date: Thu, 27 Jan 2011 13:46:51 +0100

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

  • Follow-Ups:
    • Re: AudioQueue run loop newbie question
      • From: Samuel Kitono <email@hidden>
    • Re: AudioQueue run loop newbie question
      • From: Kasper Welner <email@hidden>
  • Prev by Date: Re: kAudioQueueErr_InvalidCodecAccess (-66672) when using ExtAudioFile on iOS 4.2
  • Next by Date: AudioQueue Tools with 4 Channels
  • Previous by thread: Re: kAudioQueueErr_InvalidCodecAccess (-66672) when using ExtAudioFile on iOS 4.2
  • Next by thread: Re: AudioQueue run loop newbie question
  • Index(es):
    • Date
    • Thread