[linux-audio-user] (no subject)

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-user] (no subject)
From: Geoff Kuenning (geoff_AT_cs.hmc.edu)
Date: Fri May 31 2002 - 11:54:59 EEST


In-reply-to: <3CF1E68C.1080605_AT_helsinki.fi> (message from Matti Sunell on Mon,
        27 May 2002 10:55:56 +0300)
Subject: Re: [linux-audio-user] Splitting stereo files with sox
X-Mailer: rmail
FCC: ~/mail/archives/outgoing.bow.current
References: <3CF142D3.8000300@helsinki.fi> <200205270613.g4R6DRR08789@bow.cs.hmc.edu> <3CF1E68C.1080605@helsinki.fi>
--text follows this line--
> > Hmmm, does 12.17.3 support "avg -f"? If so, I wrote the code involved
> > and I'll dig into it and make sure it works.
>
> Yes, but as far as I can tell looking at the waveforms (cannot listen
> to quad files), it makes a mix of the front and back channels.

Matti is correct. The avg function doesn't work correctly. Based on
my diffs, the bug was caused by a misunderstanding of the sox code on
my part, combined with a misunderstanding of my mistake on the part of
somebody else who tried to fix my error for me.

Anyway, the fix is a trivial one-liner changing a table entry:

Index: handlers.c

===================================================================
RCS file: RCS/handlers.c,v
retrieving revision 1.1
diff -u -r1.1 handlers.c
--- handlers.c 2002/05/31 08:37:03 1.1
+++ handlers.c 2002/05/31 08:37:19
@@ -375,7 +375,7 @@
  */
 
 st_effect_t st_effects[] = {
- {"avg", ST_EFF_CHAN,
+ {"avg", ST_EFF_MCHAN | ST_EFF_CHAN,
                 st_avg_getopts, st_avg_start, st_avg_flow,
                 st_effect_nothing_drain, st_avg_stop},
         {"band", 0,

I've CC'ed Chris Bagwell so he can get it into the source tree.

Note: I have tested this only a little. I made sure that "avg", "avg -l",
and "avg -r" all worked correctly for the stereo->mono mapping. I
didn't go further for a lack of time. Further troubles with the avg
effect should probably be sent to me, since I'll have time to fix them
over the summer.

-- 
    Geoff Kuenning   geoff_AT_cs.hmc.edu   http://www.cs.hmc.edu/~geoff/

If we knew what we were doing, it wouldn't be research, would it? -- Albert Einstein


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri May 31 2002 - 11:44:26 EEST