From: Takashi Iwai Subject: Re: [patch] problem w/ arecord "split interleaved files" feature Date: Tue, 25 Apr 2006 16:38:20 +0200 Message-ID: References: <1145943804.2670.43.camel@flanders> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <1145943804.2670.43.camel@flanders> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Dave Maley Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Tue, 25 Apr 2006 01:43:24 -0400, Dave Maley wrote: > > Hello, > > My first post to the alsa-devel list, and I'm not subscribed so please > cc: me directly on any responses ... This is in reference to a patch > which was incorporated into alsa-utils-1.0.11, originally posted here: > > http://thread.gmane.org/gmane.linux.alsa.devel/29025/focus=29098 > > The max_filesize for wave files as currently implemented it's actually > splitting files a good bit before reaching 2GB. > > A little background as to why this matters (to me at least). I use > arecord to transfer DAT's to my computer, and many of these DAT's are 3 > hours in length. So for this I'd typically do something to the effect > of: > > > [dave@flanders ~]$ arecord -t wav -f dat -d 10800 foo.wav > > > Since max_filesize is set to 2000000000 arecord splits the resulting > file a bit over 170 minutes. Not a huge problem, except I pipe the > above command to sox for down-sampling to 44.1KHz: > > > [dave@flanders ~]$ arecord -q -t wav -f dat -d 10800 | sox -t wav -r > 48000 -c 2 - -t wav -r 44100 -c 2 foo.wav resample > > > It seems this new split feature doesn't work properly when writing to a > pipe (or at least when piping to sox). A quick look at an strace shows > constant write errors, and foo.wav grows in size until the disk is full. I guess it's rather a bug of sox. arecord quits when the data size reaches to max_filesize in the case of pipe output (since obviously you cannot split the output). sox should quits, too, when receiving EPIPE error. > A quick fix for this is to set max_filesize to 2147483648. Not sure if > this is a "proper" fix however I have tested it and it seems to work > just fine for me. Please consider the attached patch. Well, I'm not sure whether exactly 2GB is allowed. Does anyone know the exact specification of WAV (PCM) format? Takashi ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642