RE: [GD-Windows] Streaming WAVE audio
Brought to you by:
vexxed72
From: Jon W. <hp...@mi...> - 2004-07-14 06:41:37
|
> 2) On some system there appears to be a minimum required buffer size, > e.g. at least 250ms. On systems like these I got silence at best, and > lock up at worst. I didn't spend a lot of time investigating this > because 250ms is pretty short buffer. I was shooting for 4/8/16k buffer > sizes at that time. In the end I don't think it matters. 250 ms is a REALLY BIG buffer. 250 ms of latency means you pull the trigger now, and hear the gunshot sound when the target's already dead. (When I say "buffer" I really mean "WAVHDR chunk"). I've found that once I went above 40 ms buffers, and used at least 3 buffers, any hardware I tested on worked well. Less that that in either variable caused problems. Note that the scheduler on Win98 is VERY jittery -- 20 ms scheduling jitter is common, and it can jerk higher than that, even on a quiescent system with a fast CPU. > Furthermore I recommend not using the ACM to up/down sample as it > appears to perform point sampling(!) which can produce terrible audio. I always code my own re-sampler, which sits at the reader/input stage of the mixer, which I also code on my own, for the WAVE output. I prefer to use cubic Hermite interpolation, which runs fast and sounds good. Cheers, / h+ |