From owner-freebsd-stable Sat Sep 12 04:58:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA26738 for freebsd-stable-outgoing; Sat, 12 Sep 1998 04:58:38 -0700 (PDT) (envelope-from owner-freebsd-stable@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id EAA26729 for ; Sat, 12 Sep 1998 04:58:32 -0700 (PDT) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id MAA20647; Sat, 12 Sep 1998 12:06:16 +0200 From: Luigi Rizzo Message-Id: <199809121006.MAA20647@labinfo.iet.unipi.it> Subject: Re: sound driver (pcm) block size must <= 2000 ? To: wilson@krdl.org.sg (Wilson Tam) Date: Sat, 12 Sep 1998 12:06:16 +0200 (MET DST) Cc: luigi@iet.unipi.it, freebsd-stable@FreeBSD.ORG In-Reply-To: from "Wilson Tam" at Sep 12, 98 11:00:55 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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