• 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
AudioQueueNewOutput hangs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioQueueNewOutput hangs


  • Subject: AudioQueueNewOutput hangs
  • From: "Rosco Schock" <email@hidden>
  • Date: Thu, 8 May 2008 10:42:03 -0400

I am developing an IPhone app using the SDK but the question is not iPhone specific. Right now I have a test app with code taken from the guide at

http://beta.devworld.apple.com/documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/AQPlayback/chapter_4_section_1.html#//apple_ref/doc/uid/TP40005343-CH3-SW1

It was working fine for a while but now it hangs on AudioQueueNewOutput.
I am running from within XCode and click "Run >> Stop" when debugging to start testing again.

<code snippet>
- (void)applicationDidFinishLaunching:(UIApplication *)application {   
    [NSThread detachNewThreadSelector:@selector(threadWorker:) toTarget:self withObject:nil];
}

- (void)threadWorker:(id)anObject {
    bool done;
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    AQPlayerState aqData;
   
    const char *filePath = "/testing.mp3";
    CFURLRef audioFileURL = CFURLCreateFromFileSystemRepresentation( NULL, (const UInt8 *) filePath, strlen (filePath), false );
    AudioFileOpenURL ( audioFileURL, fsRdPerm, 0, &aqData.mAudioFile );
    UInt32 dataFormatSize = sizeof (aqData.mDataFormat);   
    AudioFileGetProperty ( aqData.mAudioFile, kAudioFilePropertyDataFormat, &dataFormatSize, &aqData.mDataFormat );
    CFRelease (audioFileURL);

    OSStatus stat = AudioQueueNewOutput ( &aqData.mDataFormat, HandleOutputBuffer, &aqData, CFRunLoopGetCurrent(), kCFRunLoopCommonModes, 0, &aqData.mQueue );
    ...
    ...
    ...
    [pool release];
}
</code snippet>

I have a good callback and user data structure.
The mDataFormat looks valid for a mp3.
But now when i try to step over AudioQueueNewOutput, it just hangs.
Rebooting doesn't help. I have even reinstalled the SDK.
iTunes plays audio fine.

Is this a problem with XCode or GDB?
What can I do to reset whatever is stuck and not letting me play sounds.

Thanks for your help,
-Rosco
 _______________________________________________
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: AudioQueueNewOutput hangs
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: AudioQueue and seeking through file
  • Next by Date: Re: AudioQueueNewOutput hangs
  • Previous by thread: Re: Stereo panning with the HAL
  • Next by thread: Re: AudioQueueNewOutput hangs
  • Index(es):
    • Date
    • Thread