Click to See Complete Forum and Search --> : Sound buffer sizes /Stereo as 2 monos?


Gyannea
February 24th, 2003, 07:38 AM
Two questions about the Windows Sound System:

In DOS, double buffering the sound card had a limit on the buffer size due to the 64K limit of the DMA. In Windows, you set up your sound system giving it sample rate, channels, bits, etc., as well as creating buffers (two for double buffering). When the received samples fills one buffer, a message is received, you handle the data and the sound card fills the other buffer. It was these buffers that were limite in size due to the DMA. How about in Windows? I find no mention on the limit of the size of these buffers in books like Petzold, etc.

Maybe there isn't a limit, but that limit is hidden by the system but practice, it's more efficient to keep the buffer sizes within the DMA transfer limits as one did in DOS. Does anyone know the answer to this?

Here's another goodie:

Is there a way to use the two channels of a sound card as two independent mono channels?

Now clearly one can do this, but when one records (or playsback) stereo, the data for each channel is stored every other byte. I was wondering if one could set up a mono double buffering system for each channel (same sampling rate, of course) without eventually having to combine the data into interlaced stereo?

Thanks for any insight into how this really works!

Horst
February 25th, 2003, 01:16 AM
To your first question. As far as I know there is only one limit to buffer sizes: available memory. I have not tried to check how big buffer can be, as I only tried to get relative small parts in recording. In replay I have already combined several recorded data packages and never run into problems.

To your second question. No. You need to combine left and right channel. This is sadly a system expectancy. (You can bet I would like this feature)

Hope this helped.

Horst

Gyannea
February 25th, 2003, 04:59 AM
The idea of memory-restricted buffer size DOES bother me; if one can actually have huge buffers, my guess is that the system is somehow hiding the 64K limit which is built into the sound card and DMA chip; unless there is new hardware that I have not heard of on these cards. My fear is that there will be a timing delay when the buffers get too large even with double buffering as the system has to execute some overhead to continue to feed in (or read out) data when the 64K buffer is filled or emptied.

Wouldn't it be neat if stereo were simply the use of two independent mono channels? Think of the things one could do with that!