• 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
AudioQueueOflineRender() and 'alac' files on iPhone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioQueueOflineRender() and 'alac' files on iPhone


  • Subject: AudioQueueOflineRender() and 'alac' files on iPhone
  • From: "Roni Music" <email@hidden>
  • Date: Wed, 25 Mar 2009 16:54:26 +0100



I'm using AudioQueueOflineRender() on the iPhone OS 2.2.1

decoding data in a secondary high priority thread that fills my buffer and then playing back the samples using kAudioUnitSubType_RemoteIO.

I try to keep around 1000 ms of decoded audio samples in my buffer.



It works like a charm except for 'alac' files.

When calling AudioQueueOflineRender() and asking for 2048 frames

and timing that call it looks like this:



100 ms

1 ms

113 ms

1 ms

107 ms

1 ms

etc



which works fine but occasionally, say once every 2-3 minutes, the AudioQueueOflineRender() call takes

more than 1000 ms, even 1500 ms, which makes my buffer run dry and I have glitches in the audio output.



This never happens for any other file type such as mp3, aac/m4a etc.



I can increase my buffer size to say 2000 ms for 'alac' files only which fixes the problem but makes the app much less responsive and startup time also increases. And it feels like a "hack".



Is this normal or is it a known problem with 'alac' files?



I've tried to use the CFRunLoopRef from my secondary thread when setting up AudioQueueNewOutput() since this is the thread that calls AudioQueueOflineRender() but it makes no difference and I'm also not sure if this is correct?

The "mandatory" zero frame AudioQueueOflineRender() call has a tendency to deadlock when doing it this way so it doesn't seem to be the way to go.



Any advice?



Thanks,

Rolf






_______________________________________________ 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: AudioQueueOflineRender() and 'alac' files on iPhone
      • From: William Stewart <email@hidden>
    • RE: AudioQueueOflineRender() and 'alac' files on iPhone
      • From: "Andrew E. Davidson" <email@hidden>
  • Prev by Date: Audio Feature App
  • Next by Date: RE: AudioQueueOflineRender() and 'alac' files on iPhone
  • Previous by thread: Re: Audio Feature App
  • Next by thread: RE: AudioQueueOflineRender() and 'alac' files on iPhone
  • Index(es):
    • Date
    • Thread