Regarding
mcc's wondering as to why no sound is produced when there is no variation:
It's really pretty simple.
/dev/audio doesn't interperet each byte as a
frequency or
wavelength or any other representation of a
tone. Instead, it interprets the data more like an
amplitude. As you may remember from
physics, sound is produced by
vibration (usually, vibrating air). This means that sound is a
wave. The energy in a wave is determined, primarily, by the difference in
amplitude (the "height" of the wave, when graphed) between the peak and the valley. If you send a stream of the same byte constantly, you get no sound since there is no energy in the wave.
It'll take a little
experimenting to figure out exactly how
/dev/audio translates the bytes to amplitudes, but that's the general idea. (I think I just figured out what I'm going to waste MY weekend on...)