Re: Speeding HAL plugin loop rate
Re: Speeding HAL plugin loop rate
- Subject: Re: Speeding HAL plugin loop rate
- From: "Mike Kluev" <email@hidden>
- Date: Mon, 19 Jan 2009 16:54:07 +0300
On Tue, 06 Jan 2009 12:31:00 Jeff Moore <email@hidden> wrote:
How are you measuring this? It sounds like you are just counting time
between calls to an IOProc, which is not the way to track the time
since those measurements would include any scheduling latency.
I measure time between calls and average this time over a period
of several seconds. The latency between calls is almost the same
and small variations to latencies should become close to zero by
averaging, no?
FWIW, the timing code the the SampleHardwarePlugin does all it's math
assuming a rate scalar of 1.0. You can see this in how
SHP_Device::TranslateTime is implemented.
I found that if I make small adjustments to the outNextWakeUpTime
within HP_Thread::CalculateNextWakeUpTime I can speed or slow down
the rate of I/O proc:
....
theSampleTime.mSampleTime -= myDeltaSamples;
mDevice->TranslateTime(theSampleTime, outNextWakeUpTime);
theSampleTime.mSampleTime += myDeltaSamples;
....
This works, but again, I haven't done thorough testing.
Is this a no-no for some reason?
Mike
_______________________________________________
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