Package: sox
Version: 14.3.1-1
Severity: minor
Tags: patch upstream

*** Please type your report below this line ***

The following error message is misleading:

%sox -r441000 -s foo.raw foo.wav
sox FAIL formats: bad input format for file `foo.raw': data encoding was not 
specified

since the encoding (-s) was actually specified. What's missing is
the sample size, but it took me to RTFS to find out what it wanted.
This works:

%sox -r441000 -s -2 foo.raw foo.wav

The patch below changes the wording to make it clearer.

Also, it fixes a bad line break in the help output, since
"floating-point" is an actual value for the argument.

-- System Information:
Debian Release: 6.0.2
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.2.2 (SMP w/6 CPU cores)
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages sox depends on:
ii  libc6                  2.13-10           Embedded GNU C Library: Shared lib
ii  libgomp1               4.7.0-1           GCC OpenMP (GOMP) support library
ii  libgsm1                1.0.13-3          Shared libraries for GSM speech co
ii  libltdl7               2.2.6b-2          A system independent dlopen wrappe
ii  libmagic1              5.04-5            File type determination library us
ii  libopencore-amrnb0     0.1.2-1           Adaptive Multi Rate speech codec -
ii  libopencore-amrwb0     0.1.2-1           Adaptive Multi-Rate - Wideband spe
ii  libpng12-0             1.2.44-1+squeeze1 PNG library - runtime
ii  libsndfile1            1.0.21-3+squeeze1 Library for reading/writing audio 
ii  libsox-fmt-alsa        14.3.1-1          SoX alsa format I/O library
ii  libsox-fmt-base        14.3.1-1          Minimal set of SoX format librarie
ii  libsox1b               14.3.1-1          SoX library of audio effects and p
ii  zlib1g                 1:1.2.3.4.dfsg-3  compression library - runtime

sox recommends no packages.

Versions of packages sox suggests:
pn  libsox-fmt-all                <none>     (no description available)

-- no debconf information

--- sox-14.3.1/sox-14.3.1/src/formats.c.orig    2012-06-05 02:52:12.000000000 
+0200
+++ sox-14.3.1/sox-14.3.1/src/formats.c 2012-06-05 02:52:16.000000000 +0200
@@ -336,7 +336,7 @@
     return SOX_EOF;
   }
   if (!ft->signal.precision) {
-    lsx_fail_errno(ft,SOX_EFMT,"data encoding was not specified");
+    lsx_fail_errno(ft,SOX_EFMT,"data encoding or sample size was not 
specified");
     return SOX_EOF;
   }
   return SOX_SUCCESS;
--- sox-14.3.1/sox-14.3.1/src/sox.c.orig        2012-06-05 02:43:31.000000000 
+0200
+++ sox-14.3.1/sox-14.3.1/src/sox.c     2012-06-05 02:43:43.000000000 +0200
@@ -1832,8 +1832,9 @@
 "-v|--volume FACTOR       Input file volume adjustment factor (real number)",
 "--ignore-length          Ignore input file length given in header; read to 
EOF",
 "-t|--type FILETYPE       File type of audio",
-"-s/-u/-f/-U/-A/-i/-a/-g  Encoding 
type=signed-integer/unsigned-integer/floating",
-"                         point/mu-law/a-law/ima-adpcm/ms-adpcm/gsm-full-rate",
+"-s/-u/-f/-U/-A/-i/-a/-g  Encoding type=signed-integer/unsigned-integer/",
+"                         floating-point/mu-law/a-law/ima-adpcm/ms-adpcm/",
+"                         gsm-full-rate",
 "-e|--encoding ENCODING   Set encoding (ENCODING in above list)",
 "-b|--bits BITS           Encoded sample size in bits",
 "-1/-2/-3/-4/-8           Encoded sample size in bytes",



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to