This is my third attempt to get this email to the list. It seems that it is impossible to include any code without exceeding the message size limit. So here is the question text only, although I don't see how a meaningful question can be posted without any context.
I'm running into problems with AudioQueue AudioQueueEnqueueBuffer.
This is in XCode 3.14 on a Mac running 10.5.8, building for Mac 10.5 and higher. I managed to get the playback code from the SpeakHere sample code to
run with some modifications. It will now play back aiff files (and probably other uncompressed formats) but fails with AppleLossless files. No errors are thrown in reading the audio file, or in creating or inititializing the audioQueue. When it reaches the BufferCallback I just get the spinning beachball and no sound output.
I incorporated the file format and decoders code from the AudioQueueTools sample code and can see that the file format and appropriate decoder are being found on the system.
//AudioQueueEnqueueBuffer(inAQ, inCompleteAQBuffer, 0, NULL);
UInt32 inNumberPacketDescs = (THIS->mPacketDescriptions ? nPackets:0);
//NSLog(@"inNumberPacketDescs: %d", inNumberPacketDescs); //returns 0 for both aiff and AppleLossless
//OSStatus result = AudioQueueEnqueueBuffer(inAQ, inCompleteAQBuffer, ( THIS->mPacketDescriptions ? nPackets:0), THIS->mPacketDescriptions);
OSStatus result = AudioQueueEnqueueBuffer(inAQ, inCompleteAQBuffer, inNumberPacketDescs, THIS->mPacketDescriptions);
//version below works with aiff, not with AppleLossless format
//OSStatus result = AudioQueueEnqueueBuffer(inAQ, inCompleteAQBuffer, 0, THIS->mPacketDescriptions);