Date: Sat, 12 Sep 1998 12:06:16 +0200 (MET DST) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: wilson@krdl.org.sg (Wilson Tam) Cc: luigi@iet.unipi.it, freebsd-stable@FreeBSD.ORG Subject: Re: sound driver (pcm) block size must <= 2000 ? Message-ID: <199809121006.MAA20647@labinfo.iet.unipi.it> In-Reply-To: <Pine.BSF.3.96.980912105837.27335B-100000@witamach.krdl.org.sg> from "Wilson Tam" at Sep 12, 98 11:00:55 am
next in thread | previous in thread | raw e-mail | index | archive | help
> Luigi, > > I have a problem with the pcm sound driver for my creative card. The > problem is when I try to issue the command: > > dd if=/dev/dsp of=record.raw bs=8000 count=1 > > The size of output file 'record.raw' always equal to 2000 rather than 8000 > bytes specified by the 'bs'. However if I change the block size (bs) to well... to avoid too high latency, the audio driver defaults to using 0.25s of data unless you specify a different blocksize using the appropriate ioctl(). This is not such a great idea i agree, but programs tend to use large blocksizes like 64K in a rad() call, and this makes redirection from /dev/audio almost unusable. While I or someone else write a more general program for audio grabbing/editing, you might try to use a blocksize <= 0.25s in your dd call to be sure that you do not get a short read (or, i think there are options for dd to read the desired amount of data). cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809121006.MAA20647>