Package: sox
Version: 12.17.7-2
Severity: normal
Tags: patch

Hi,

This was reported earlier (see #242051) by so I'll just report
the same thing again. Apparently the upstream version was fixed and
then got broken again...


the swap filter doesn't work with the arguments '1 1' because
the filter routine 'st_swap_start' overwrites these values with 
the values of '2 1'. 

included is a simple patch that fixes this.

best regards,
Jan Willem

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.11.4
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages sox depends on:
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  libmad0                     0.15.1b-1.1  MPEG audio decoder library
ii  libogg0                     1.1.2-1      Ogg Bitstream Library
ii  libvorbis0a                 1.1.0-1      The Vorbis General Audio Compressi
ii  libvorbisenc2               1.1.0-1      The Vorbis General Audio Compressi
ii  libvorbisfile3              1.1.0-1      The Vorbis General Audio Compressi

-- no debconf information
diff --unified --recursive --new-file sox-12.17.4/swap.c sox-fixed/swap.c
--- sox-12.17.4/swap.c  2001-10-26 03:15:04.000000000 +0200
+++ sox-fixed/swap.c    2004-04-04 15:51:23.000000000 +0200
@@ -70,6 +70,13 @@
        swap->order[3]--;
 
     }
+    else { /* no swap order given, set the defaults */
+        swap->order[0] = 1;
+        swap->order[1] = 0;
+        swap->order[2] = 3;
+        swap->order[3] = 2;
+    }
+
     return (ST_SUCCESS);
 }
 
@@ -105,16 +112,6 @@
            st_fail("invalid swap channel options used");
     }
 
-    /* If nothing set then default to the following order */
-    if (!swap->order[0] && !swap->order[1] &&
-        !swap->order[2] && !swap->order[3])
-    {
-        swap->order[0] = 1;
-        swap->order[1] = 0;
-        swap->order[2] = 3;
-        swap->order[3] = 2;
-    }
-
     return (ST_SUCCESS);
 }
 

Reply via email to