• 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: Speeding HAL plugin loop rate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Speeding HAL plugin loop rate
      • From: "Mike Kluev" <email@hidden>
    • Re: Speeding HAL plugin loop rate
      • From: Jeff Moore <email@hidden>
  • Prev by Date: noise at the beginning and the end of the playback of audio files (using AudioFilePlayer)
  • Next by Date: Re: noise at the beginning and the end of the playback of audio files (using AudioFilePlayer)
  • Previous by thread: Re: Speeding HAL plugin loop rate
  • Next by thread: Re: Speeding HAL plugin loop rate
  • Index(es):
    • Date
    • Thread