Re: Slow growth of latency in AudioUnit render callbacks
Re: Slow growth of latency in AudioUnit render callbacks
- Subject: Re: Slow growth of latency in AudioUnit render callbacks
- From: Chris Jones <email@hidden>
- Date: Tue, 23 Apr 2019 22:10:07 +0100
Hey Matt
I think you were right, I've been bashing my head against the Varispeed
node and been unable to keep it in sync with the input/output devices, so
I'm looking at the aggregate device option instead.
You mentioned copying the data over in a single IO callback - I'm not quite
sure what you meant by that? Would I just setup an input callback and send
the incoming samples directly to the output device?
Cheers,
Chris
On Thu, 18 Apr 2019 at 19:33, Matt Ingalls <email@hidden> wrote:
> if i remember correctly, that sends audio from one device to another?
> and there’s no compensation in that code for clock drift?
>
> i would instead use an aggregate device (created in Audio MIDI Setup, or
> you can do it programmatically with a little pain)
> with both devices, enabling drift correction. then copy one to the other
> in the single i/o callback.
>
> -m
>
>
> > On Apr 18, 2019, at 1:40 AM, Chris Jones <email@hidden> wrote:
> >
> > Hey folks
> >
> > I'm experimenting with the old CAPlayThrough example code and I'm
> hitting a situation I don't understand yet.
> >
> > Over a period of about an hour on my 4GHz i7 iMac, the audio being
> played-through gets more and more delayed. Initial latency looks to be
> about 150ms and grows up to about 500ms at which point it decays into
> digital noise and then goes silent (the latter I believe being CoreAudio
> discarding my late data).
> >
> > Other than converting some of the C++ objects to ObjC, I don't think
> I've diverged significantly from the original code, but it's hard to
> compare the running performance because the CAPlayThrough sample doesn't
> really build anymore. I've been careful to avoid making ObjC method calls
> in the callbacks (there's one, but it's only called before data starts
> flowing) and data accessed from the ObjC objects is all done via ivars.
> >
> > I'm happy to post the code, if someone would like to have a look at it,
> or I'd be very grateful for some pointers on what I might be doing wrong.
> >
> > --
> > Cheers,
> >
> > Chris
> > _______________________________________________
> > 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
>
>
--
Cheers,
Chris
_______________________________________________
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