Your message dated Sun, 6 May 2007 11:24:06 -0400
with message-id <[EMAIL PROTECTED]>
and subject line sox: silence removal plugin command-line parsing problem
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: sox
Version: 12.17.7-3
Severity: normal
Tags: patch

The sox manpage references being able to remove silence in the
middle of file using the silence plugin, but when trying it, the
arguments parsing code would always indicate that an invalid
argument was specified.  It turns out that silence removal in
the middle of a file does work if the command-line arguments
are passing in as specified in the manpage.

I'm attaching a patch file that includes the patch for 
silence.c and corrects a simple typo in the manpage regarding
the silence plugin.

Thanks!
tony

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages sox depends on:
ii  libc6                        2.3.5-4     GNU C Library: Shared libraries an
ii  libmad0                      0.15.1b-2.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

sox recommends no packages.

-- no debconf information
diff -ruN sox-12.17.7-old/sox.1 sox-12.17.7/sox.1
--- sox-12.17.7-old/sox.1       2004-12-20 11:43:48.000000000 -0800
+++ sox-12.17.7/sox.1   2005-08-22 17:40:58.000000000 -0700
@@ -1186,7 +1186,7 @@
 .br
 When trimming silence from the beginning of a sound file, you specify a 
duration of audio that is above a given silence threshold before audio data is 
processed.  You can also specify the count of periods of none-silence you want 
to detect before processing audio data.  Specify a period of 0 if you do not 
want to trim data from the front of the sound file.
 .br
-When optionally trimming silence form the end of a sound file, you specify the 
duration of audio that must be below a given threshold before stopping to 
process audio data.  A count of periods that occur below the threshold may also 
be specified.  If this options are not specified then data is not trimmed from 
the end of the audio file.  If \fIbelow_periods\fR is negative, it is treated 
as a positive value and is also used to indicate the effect should restart 
processing as specified by the \fIabove_periods\fR, making it suitable for 
removing periods of silence in the middle of a sound file.
+When optionally trimming silence from the end of a sound file, you specify the 
duration of audio that must be below a given threshold before stopping to 
process audio data.  A count of periods that occur below the threshold may also 
be specified.  If this options are not specified then data is not trimmed from 
the end of the audio file.  If \fIbelow_periods\fR is negative, it is treated 
as a positive value and is also used to indicate the effect should restart 
processing as specified by the \fIabove_periods\fR, making it suitable for 
removing periods of silence in the middle of a sound file.
 .br
 Duration counts may be in the format of time, hh:mm:ss.frac, or in the exact 
count of samples.
 .br
diff -ruN sox-12.17.7-old/src/silence.c sox-12.17.7/src/silence.c
--- sox-12.17.7-old/src/silence.c       2004-09-27 19:33:09.000000000 -0700
+++ sox-12.17.7/src/silence.c   2005-08-22 17:39:17.000000000 -0700
@@ -164,8 +164,12 @@
         {
             silence->stop_periods = -silence->stop_periods;
             silence->restart = 1;
-            st_fail("Periods must not be greater then zero");
-            return(ST_EOF);
+            /* 20050822/tm - negative stop_periods == silence remove
+                        * throughout a file (refer to manpage)
+                        *
+                        * st_fail("Periods must not be greater then zero");
+             * return(ST_EOF); 
+                        */
         }
         else
             silence->restart = 0;

--- End Message ---
--- Begin Message ---
notfound 324616 13.0.0
thx
--
Hello Tony,
thank you for reporting this bug and providing a patch.
Based on the source code, I believe this has been fixed in sox >= 13.0.0.

-Pascal
--
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
LACIME: École de technologie supérieure (http://lacime.etsmtl.ca)

--- End Message ---

Reply via email to