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

RE: AudioQueueOflineRender() and 'alac' files on iPhone


  • Subject: RE: AudioQueueOflineRender() and 'alac' files on iPhone
  • From: "Andrew E. Davidson" <email@hidden>
  • Date: Wed, 25 Mar 2009 09:19:53 -0700

Hi Rolf

You mention that you use a second high priority thread. What is the
advantage of using an extra thread?

Thanks

Andy

________________________________

Replace Ads with your Stuff! Learn how @  www.prowebsurfer.com
> -----Original Message-----
> From: coreaudio-api-bounces+andy=email@hidden
> [mailto:coreaudio-api-bounces+andy=email@hidden] On
> Behalf Of Roni Music
> Sent: Wednesday, March 25, 2009 8:54 AM
> To: email@hidden
> Subject: AudioQueueOflineRender() and 'alac' files on iPhone
>
>
>
> 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:
> api/email@hidden
>
> 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

References: 
 >AudioQueueOflineRender() and 'alac' files on iPhone (From: "Roni Music" <email@hidden>)

  • Prev by Date: AudioQueueOflineRender() and 'alac' files on iPhone
  • Next by Date: Re: How to show the wave of the audio file in my application when sound is playing?
  • Previous by thread: AudioQueueOflineRender() and 'alac' files on iPhone
  • Next by thread: Re: AudioQueueOflineRender() and 'alac' files on iPhone
  • Index(es):
    • Date
    • Thread