[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: convert digital sound

A standard PC sound card has 16-bit audio output that runs through an
internal mixer.  The mixer has Wave and Master attenuators which would be
effectively in series for this use.  The dynamic range of the mixer is usually
50 dB or more, but the exact range, number of steps, and step sizes will
differ depending upon the model... there is no Windows standard for this,
and in fact there is no way under Windows to get this information from the
driver or card; you would need to perform a manual calibration.

Depending upon your exact application, the extra "volume bits" you could
get from this mixer may or may not be useful.  The problem has to do with
the way Windows operates with sound output devices.  In general, your
software fills a series of buffers that it passes to the sound card driver via
the Windows waveOutWrite function.  Windows notifies the program when it
has finished with a buffer, so another one can be sent.  But the sending of
a buffer is not well correlated with sound output of any particular sample;
there can be a substantial delay due to Windows and sound card overhead
and internal buffering.

The mixer, on the other hand, is treated as a separate device.  When you
send a command to change the settings, it happens "immediately" (for
Windows, that's whenever it gets around to it, but usually in a msec or so).
So the upshot is that it is very hard to contorl both the mixer and wave
outputs together on a sample-by-sample basis.  However, it is fine for
changing the level of stimuli on different presentations, for example, where
there is silence between presentations during which you can change the

If you want true 24-bit sound cards, or higher sample rates than 48000 Hz,
check out the listings at <www.pcavtech.com>.

Hope this helps!

Robert Masta

         D A Q A R T A
Data AcQuisition And Real-Time Analysis
 Shareware from Interstellar Research