When piping operations using SoX, I've noticed that files get shorter than they should:
sox -n -r 44100 silence.wav trim 0 1 sox --combine sequence silence.wav combined.wav soxi -D combined.wav > 1.000000
The resulting file gets shorter:
sox -n -r 44100 silence.wav trim 0 1 sox --combine sequence "|sox silence.wav -p" combined.wav soxi -D combined.wav > 0.998549 seconds
Tested with SoX version 14.4.1 on Windows 7 64 Family Edition. (On Windows, create a copy of sox.exe named soxi.exe for soxi to work.)
I'll spare you the rest of the details but there's basically a loss of 0.001451 sec for EACH pipe operation. (A little less at higher sampling rates.) For anything where accuracy is important, those milliseconds add up and do become significant, creating lags between where you expect the audio to be and where it really is.
Before I submit a bug report to the SoX team, I'd like to figure out if it really is a bug or isn't rather command-line related. Would anyone be kind enough to run both sets of commands on their system and post the results?
Thanks in advance -