[lug] sound recording roadblocks and solutions

Alan Robertson alanr at suse.com
Wed Sep 6 12:44:16 MDT 2000


Neal McBurnett wrote:
> 
> Once upon a time, D. Stimits <stimits at idcomm.com> wrote:
> > > The sound howto says to just cat /dev/audio to a file.  This
> > > results in files that are very small, and which can be played back by
> > > catting back to /dev/audio, but which other recommended tools (see
> > > below) can't seem to handle at all.  I can't figure out what
> > > the sampling rate or bits/sample are, they seem to be even less that
> > > 8000 Hz, 8 bits/sample.
> >
> > 8 bits/sample is resolution. 8 bits will give good quality, but maybe
> > not what you want if you are working with good music.
> >
> > 8000 Hz is the sample rate...how often those 8 bits are sampled.
> > Generally, I think both the bits/sample and sample rate must be matched
> > if you are mixing sounds.
> 
> Thanks.  I tried this, and I don't doubt that it is correct, but then I
> don't see why this doesn't work:
> 
>  cat /dev/audio > adev.wav
>  cat adev.wav > /dev/audio
>   sounds ok
>  rawplay -v -f u8 -s 8000 adev.wav
>   loud static for a fraction of the playing time
>  rawplay -c 1 -v -f u8 -s 8000 adev.wav
>   loud static


Because the file formats are different.  /dev/audio does NOT produce a wav
file, in spite of the fact that you named the output file ".wav" :-).  It
produces a .au (sun format) file.

	-- Alan Robertson
	   alanr at suse.com




More information about the LUG mailing list