Re: AU processor load
Re: AU processor load
- Subject: Re: AU processor load
- From: tahome izwah <email@hidden>
- Date: Tue, 27 Jan 2009 10:18:31 -0700
Sure, that's easy. On entry of your callback (before doing any DSP) simply do:
UnsignedWide start, end;
Microseconds(&start);
------------------------------------------------------------------------------------------
DSP code goes here
------------------------------------------------------------------------------------------
Microseconds(&end);
double microsecondsForDsp = end.lo - start.lo;
double microsecondsForBuffer = 1000000. * inNumberFrames / mSampleRate;
double cpuLoadPercent = 100. * microsecondsForDsp / microsecondsForBuffer;
That's really all you need to do.
Hope this helps,
--th
2009/1/26 Ethan Funk <email@hidden>:
> Is there an easy way to track the processor load from with in a AU render
> callback? I am NOT using AUGraphs in my application and am instead using
> the callbacks to connect AUs, but I still need a way to gauge how much of
> the total available processor(s) time I am spending in the render callback
> chain so I can report processor load to the user.
>
> Thanks,
> Ethan...
>
_______________________________________________
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