Once again about the latency


I'm just another developer who discovered all these complexities about
DirectSound latency and small buffers. Still confused by some aspects
so would like to describe my case and ask some questions.

I made test of two machines,

1. Onboard Sound (C-Media AC97), DirectX 9.0c, Secondary 70 ms without
problems, starting 65 and below crackings are heard in most cases, both
approaches (notifications and GetCurrentPositon + Timers) lead to the
same result. The only improvements I can make when I use
GetCurrentPositon updating a small block ahead of WritePosition leaving
much larger space till PlayPosition. But the latter sometimes lead to
cracking too.

2. CMedia PCI card, DirectX, 9.0b, Secdonary 20 ms with notifications
is ok, for GetCurrentPositon + Timers the result ~ 50 ms, cracking is
heard below. In this case I also used a test to measure real latency.
Two microphones used to make a stereo recording, one placed near the
keyboard, another near the speaker, the result is recorded on a MD unit
and later both channels are analized to see what is the delay between
the click sound and the wave sound from the speaker. The test showed
the latency 60-70 ms. So 20 ms secondary buffer ended up with 60 ms
real world delay, what is it? KMixer's 30 ms? should I increase this 30
by my 20 or are they concurrent in terms of calculating total latency?

So my questions parabaly are:
- Can I detect programmatically the minimal buffer size properly
handled or do I have to ask the user for the audible test?
- Will DirectKS approach probably give a better result in any case or
it depends on the soundcard/driver?
- Due to bug issues DirectX FAQ does'nt recommend using notifications
at all. In my case it gives much better results at least in one case.
Can someone suggest some more or less universal and reliable approach
to get decent latency regardless of the soundcard/driver?
- I read different topics about the latency, did something new appear
recently in this area? I read the Cakewalk paper made on some 2000
conference suggesting solving the latency issue on Windows, but it
appeared to be depended on futher manufacturers/driver makers actions.

Thanks in advance,