Quote:
Originally Posted by
jake120 
the audio flow is not blocked it is slown down... how:
what used to happen was the samples sent to RAM were bigger than the space that could be held and played simultaniously and the extra effects on top of that would bog down the computer trying to play the sound.
the technical limits of the RAM somewhat played a part with speed of fetch from CPU registers but overall it is mostly a problem of doing too much at the same time and the computer would not be able to do both efficiently.
Most things happening "simultaneously" in computers are a lie. RAM cannot read and write at the same time, even in different places*. What happens is that soundcard and media player take turns reading and writing blocks of several samples.
Soundcard always has one block loaded to its internal memory and plays from this block at its own pace. A the same time, it fetches next block from RAM as fast as possible. Once this block is fetched, it notifies the CPU so that media player can prepare yet another block.
Media player can prepare next block very quickly because it maintains its own buffer of several milliseconds of predecoded audio, another buffer of undecoded data already read from the HDD, and yet another buffer of data being (slowly, since HDDs are slow) read from HDD.
The HDD send data in packets of few hundred to few thousand bytes. Other devices may also perform similar transfers at the time. All these transfers are interleaved with reads performed by soundcard, because RAM cannot perform multiple operations at the same time. Hence they
do delay soundcard reads, but soundcard doesn't care because it plays an old block from its internal memory and waiting for some few kilobyte transfer to finish before fetching next block takes less time than playing this old block.
* Concurrent operations can only be performed on different RAM sticks.