cwpcm straight to dsp is way fast

Ariff Abdullah ariff at FreeBSD.org
Sun Jan 15 01:25:40 PST 2006


On Sun, 15 Jan 2006 03:54:56 -0500
"Michael W. Oliver" <michael at gargantuan.com> wrote:
> Hey guys,
> 
> I am using cwpcm to generate morse, and when using this:
> 
>   echo "sos sos sos" | cwpcm -w 20 -F 24 -f 800 | sox -r 8000 -bu -t
>   raw - sos.wav lowpass 1500
> 
> I get a wav file that sounds perfect.  However, when using this:
> 
>   echo "sos sos sos" | cwpcm -w 20 -F 24 -f 800 >/dev/dsp
>     -or-
>   echo "sos sos sos" | cwpcm -w 20 -F 24 -f 800 >sos.raw && cat
>   sos.raw >/dev/dsp
> 
> I get horrible noise from speakers.  I am _guessing_ that it has
> something to do with the rate at which dsp is processing that raw
> data, but I don't know how to fix it so that I can just play the
> code without creating the wav file.
> 
Since you have sox, how about something like this:

echo "sos sos sos" | cwpcm -w 20 -F 24 -f 800 | \
	play -b -u -r 8000 -t raw -


--
Ariff Abdullah
FreeBSD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-multimedia/attachments/20060115/28838b7f/attachment.bin


More information about the freebsd-multimedia mailing list