sox - simple command including '-r' produces different file result each time
I am using sox to convert sampling rate in a .WAV file, but the output file is not identical each time sox is run (on an identical input file.)
During debug of my project (which processes some files previosuly processed by sox), I have discovered that sox is producing a different file each time it is run, and this caused some fruitless debugging of the dependent project.
Although sequentially processing the same input file produces an output file that sounds the same to the ear, the sequentially processed output files are not the same bit-by-bit. My debug work depends on having consistent source test data (which I am using sox to generate).
Here is a shell script I am using to run a test to isolate the problem I am having with sox:
echo "sum input.wav:"
sum input.wav
echo "sox input.wav -r 8000 output.wav"
sox input.wav -r 8000 output.wav
echo "sum output.wav:"
sum output.wav
Here is the first run of the shell script:
sum input.wav:
01408 142
sox input.wav -r 8000 output.wav
sum output.wav:
16351 103
Here is the next run of the shell script:
sum input.wav:
01408 142
sox input.wav -r 8000 output.wav
sum output.wav:
52497 103
The input file is unchanged (based on sum)
The output file is not identical (based on sum)
Is there a default option in sox that introduces something random into it's process?
If not, is there some other reason sox does not produce an identical output each time it is run?
Can I get sox to produce an identical output each time it is run?
Thank you very much
|