RE: AudioQueueOflineRender() and 'alac' files on iPhone
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 15:04:09 -0700
Hi Bill
Which tech note are you referring to?
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 William Stewart
> Sent: Wednesday, March 25, 2009 2:40 PM
> To: Roni Music
> Cc: email@hidden
> Subject: Re: AudioQueueOflineRender() and 'alac' files on iPhone
>
> Have you looked at the tech note we have on this? That comes with an
> alac file for testing, so I believe this is working
>
> Bill
>
> On Mar 25, 2009, at 8:54 AM, Roni Music wrote:
>
> >
> >
> > 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
>
> _______________________________________________
> 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