[GLLUG] Bash Beep

Matt Graham danceswithcrows at usa.net
Tue Jul 22 12:09:10 EDT 2003


On Tuesday 22 July 2003 10:33, after a long battle with technology, Jo 
Dillon wrote:
> On Tue, Jul 22, 2003 at 10:18:31AM -0400, Brian Hoort wrote:
> > So .au is raw audio?
>
>   8-bit raw audio samples, yes...or you could probably
> cat foo.wav > /dev/dsp, if I recall correctly...

"cat foo.wav > /dev/dsp" doesn't always work correctly.  It'll only work 
right if the /dev/dsp device has been set up so that it's expecting the 
right kind of data at the correct sampling rate.  If /dev/dsp expects 
data sampled at 22050 Hz, and you cat data sampled at 11025 Hz, you'll 
get something that sounds like the Chipmunks.  cat data sampled at 
44100 Hz, and you'll get Barry White on Quaaludes.  The "play" or 
"wavplay" commands check the sampling rate of the .wav file, then feed 
ioctls to /dev/dsp to make it expect the right kind of data, so it 
sounds reasonably good.

-- 
   Q: How many surrealists does it take to change a light bulb?
   A: Two. One to hold the giraffe and the other to fill the bathtub
   with brightly colored machine tools.
There is no Darkness in Eternity/But only Light too dim for us to see



More information about the linux-user mailing list