Package: sox
Version: 12.17.7-2
Severity: normal

I pipe all my system beeps through sox as a workaround for ALSA getting it
wrong on 8-bit sounds. However recently I noticed (on a machine I don't use
much) that sox seems to get mono-to-multichannel conversions wrong.

Consider the following shell script (assuming you have kcontrol and
vorbis-tools also installed):

   #!/bin/sh
   for c in 1 2 4; do
           for r in 11025 22049 22051 33075 44100 48000; do
                  sox /usr/share/sounds/KDE_Startup.wav -r$r -c$c 
kdestartup-r$r-c$c.ogg resample
                  ogginfo kdestartup-r$r-c$c.ogg|grep 'file\|Playback'|awk 
'{print $3}'
           done
           echo
   done

(sox cowardly refuses to resample when input and output sample rates are the
same so I used 1Hz either side instead.)

Consider its output:

   "kdestartup-r11025-c1.ogg"...
   0m:08.280s
   "kdestartup-r22049-c1.ogg"...
   0m:08.280s
   "kdestartup-r22051-c1.ogg"...
   0m:08.280s
   "kdestartup-r33075-c1.ogg"...
   0m:08.280s
   "kdestartup-r44100-c1.ogg"...
   0m:08.280s
   "kdestartup-r48000-c1.ogg"...
   0m:08.280s

   "kdestartup-r11025-c2.ogg"...
   0m:08.385s
   "kdestartup-r22049-c2.ogg"...
   0m:08.386s
   "kdestartup-r22051-c2.ogg"...
   0m:08.386s
   "kdestartup-r33075-c2.ogg"...
   0m:07.482s
   "kdestartup-r44100-c2.ogg"...
   0m:06.512s
   "kdestartup-r48000-c2.ogg"...
   0m:06.474s

   "kdestartup-r11025-c4.ogg"...
   0m:07.208s
   "kdestartup-r22049-c4.ogg"...
   0m:04.404s
   "kdestartup-r22051-c4.ogg"...
   0m:04.402s
   "kdestartup-r33075-c4.ogg"...
   0m:04.695s
   "kdestartup-r44100-c4.ogg"...
   0m:03.447s
   "kdestartup-r48000-c4.ogg"...
   0m:03.658s

Now, I would have expected that the resulting files would be the same length
(ie. about 8.3 seconds) in every case. The ones that aren't also sound
broken (skips).

The same behaviour occurs when outputting to WAV and raw formats.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing'), (98, 'unstable'), (1, 'experimental')
Architecture: i386 (i586)
Kernel: Linux 2.6.12-rc2
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)

Versions of packages sox depends on:
ii  libc6                       2.3.2.ds1-20 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

-MD

-- 
-------------------------------------------------------------------------------
Michael Deegan           Hugaholic          http://wibble.darktech.org/gallery/
------------------------- Nyy Tybel Gb Gur Ulcabgbnq! -------------------------


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to