From: Dave Maley <dmaley@nc.rr.com>
To: alsa-devel@lists.sourceforge.net
Subject: [patch] problem w/ arecord "split interleaved files" feature
Date: Tue, 25 Apr 2006 01:43:24 -0400 [thread overview]
Message-ID: <1145943804.2670.43.camel@flanders> (raw)
[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]
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.
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.
Thanks,
Dave
[-- Attachment #2: arecord_split.patch --]
[-- Type: text/x-patch, Size: 456 bytes --]
--- alsa-utils-1.0.11/aplay/aplay.c.orig 2006-04-25 01:37:13.000000000 -0400
+++ alsa-utils-1.0.11/aplay/aplay.c 2006-04-25 01:38:24.000000000 -0400
@@ -128,7 +128,7 @@
} fmt_rec_table[] = {
{ NULL, end_raw, N_("raw data"), LLONG_MAX },
{ begin_voc, end_voc, N_("VOC"), 16000000 },
- { begin_wave, end_wave, N_("WAVE"), 2000000000 },
+ { begin_wave, end_wave, N_("WAVE"), 2147483648 },
{ begin_au, end_au, N_("Sparc Audio"), LLONG_MAX }
};
next reply other threads:[~2006-04-25 5:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-25 5:43 Dave Maley [this message]
2006-04-25 14:38 ` [patch] problem w/ arecord "split interleaved files" feature Takashi Iwai
2006-04-25 21:07 ` Dave Maley
2006-04-26 14:11 ` Takashi Iwai
2006-04-26 21:56 ` Dave Maley
2006-04-30 17:03 ` Dave Maley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1145943804.2670.43.camel@flanders \
--to=dmaley@nc.rr.com \
--cc=alsa-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.