Re: [linux-audio-dev] RTC Rate on Slower Machines

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] RTC Rate on Slower Machines
From: David Olofson (david_AT_gardena.net)
Date: Mon Feb 12 2001 - 17:34:52 EET


On Monday 12 February 2001 16:00, Vektor Sigma wrote:
> Paul,
>
> I'm using the wonderful RTC to help me sync, but a frequency of
> 8192hz seems too much for my older P166MMX: it stutters often and
> seemed broken.

Ouch. That's high even for an RTLinux periodic thread on that CPU!
:-) (There are architectures with more efficient IRQ handling...)

> So, in my app I now use an environment variable to let the user
> pick a slower resolution. A rate of 1024hz works alright for the
> older box. My question is: is there any way I can detect an
> appropriate setting? I definitely don't want the user to always
> have to set this manually, as most users won't understand it.

You could try 1024 and measure the jitter using the TSC or something.
Obviously, it's pointless setting the period much shorter than the
average jitter, as there's just... well, jitter, down there! :-)

(Similar to using lots of more bits than you've got SNR for; to some
extent it gives you lower distortion, but at some point it becomes a
pointless waste of expensive converters.)

> Do you think 1024hz is a more reasonable default, and then
> require the user to have at least a decent pentium?

Well, Windows doesn't deal with anything smaller than a ms, so
(older) MIDI sequencers usually set a multimedia timer up at 1000 Hz
or lower. Newer applications use the new buffered/timestamped MIDI
API, but I doubt the internal Windows timing accuracy is any better
than the old 1 ms. Not sure, though, but I never noticed any
difference, except that the newer API slightly reduces the number of
noticable MIDI latency peaks.

//David

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------> http://www.linuxaudiodev.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> david_AT_linuxdj.com -'


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Mon Feb 12 2001 - 23:00:46 EET