LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   sox package, Slackware 13.1, fails on sox 1.wav -e stat (http://www.linuxquestions.org/questions/slackware-14/sox-package-slackware-13-1-fails-on-sox-1-wav-e-stat-878686/)

burbabro 05-03-2011 11:22 PM

sox package, Slackware 13.1, fails on sox 1.wav -e stat
 
I think there is a problem with the sox package that comes with Slackware 13.1.
I would appreciate any advice. I'm using the same file, 1.wav, in both cases. The output of file 1.wav is
1.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz

On 12.1, I can run
sox 1.wav -e stat 2> /tmp/stat.txt

bash-3.1$ cat /tmp/stat.txt
Samples read: 37096920
Length (seconds): 420.600000
Scaled by: 2147483647.0
Maximum amplitude: 0.977203
Minimum amplitude: -0.922394
Midline amplitude: 0.027405
Mean norm: 0.038253
Mean amplitude: -0.000031
RMS amplitude: 0.070757
Maximum delta: 1.246124
Minimum delta: 0.000000
Mean delta: 0.051312
RMS delta: 0.095067
Rough frequency: 9430
Volume adjustment: 1.023

However, on 13.1,
sox 1.wav -e stat 2> /tmp/stat.txt

bash-4.1$ cat /tmp/stat.txt
sox FAIL sox: --encoding: `stat' is not one of: signed-integer, unsigned-integer
, floating-point, ms-adpcm, ima-adpcm, oki-adpcm, gsm-full-rate, u-law, mu-law,
a-law.

On 12.1,
2.6.27.7-smp
sox-12.18.1-i486-1

On 13.1,
2.6.33.4-smp
sox-14.3.0-i486-3

andrew.46 05-04-2011 02:26 AM

Syntax has changed I believe, the following works for me:

Code:

$ sox test.wav --show-progress -n stat

Input File    : 'test.wav'
Channels      : 2
Sample Rate    : 44100
Precision      : 16-bit
Duration      : 00:09:24.55 = 24896512 samples = 42341 CDDA sectors
File Size      : 99.6M
Bit Rate      : 1.41M
Sample Encoding: 16-bit Signed Integer PCM

In:100%  00:09:24.55 [00:00:00.00] Out:24.9M [-=====|===== ] Hd:2.2 Clip:0   
Samples read:          49793024
Length (seconds):    564.546757
Scaled by:        2147483647.0
Maximum amplitude:    0.735199
Minimum amplitude:    -0.771790
Midline amplitude:    -0.018295
Mean    norm:          0.032635
Mean    amplitude:    -0.000006
RMS    amplitude:    0.056420
Maximum delta:        0.789154
Minimum delta:        0.000000
Mean    delta:        0.038044
RMS    delta:        0.064604
Rough  frequency:        8036
Volume adjustment:        1.296
Done.

This is on 13.37 with SoX v14.3.2...


All times are GMT -5. The time now is 07:31 AM.