[music-dsp] NT4 + SBLive + waveOutWrite = ?
sbenno at gardena.net
Wed Feb 23 11:57:19 EST 2000
On Mon, 21 Feb 2000, Derek DiFilippo wrote:
> I'm interested in the best case performance (perfectly friendly OS
> scheduling), as well as the average case (moderate OS activity).
> My audio application lives inside another application that strictly
> enforces a 1kHz control loop. I'm only interested in sending
> audio *out* during this control loop --- no capturing required. Ideally,
> I'd like 1ms latency but I know that's a crazy dream.
really crazy :-)
I think you can get 20ms latency if you optimize everything but you
need DirectX + realtime scheduling.
Anyway one of the low-latency soft-synth which seem to
tolerate heavy disk activity during realtime playback are
Seer Reality and Gigasampler. (I don't know if these programs
run on NT)
But you have to use _WEIRD_ tricks to achieve these results,
like embedding your application in the soundcard's driver,
or manually reprogram IRQ handlers etc.
> Apparently my output buffers can be quite small, on the order of a few
> hundred bytes. But my ears tell me that these little buffers only end up
> waiting for a big honking DMA transfer.
You have to set the buffersize of the card when opening the audio device.
for example 4 fragment of 256 bytes are about 6ms.
> I found some DMA information in the Cakewalk audio options. According to
> this program, my default DMA buffer is 11024kb. So, given 44.1kHz stereo
> 16bit sound, my guess at total latency is 11kb/(2*2*44) ~= 63ms.
> Cakewalk also lets me change the DMA value to conveniently low values,
> e.g. 1408 bytes. The setting persists if I quit and restart the
> program. Is this the magic latency trick I've been looking for?
> I'm not convinced (perceptually) that it is.
No you have to set your DMA buffer yourself when opening the device,
check your audio API docs.
dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
More information about the music-dsp