Aggiornamento: se anziché "wav" in uscita si utilizza il formato "nativo" di sox, il problema non si manifesta:
codice:
$ cat orig/STE-000.wav | /usr/bin/sox -V3 -t wav - -t sox -r 384000 -b 32 --buffer=8192 - gain -h rate -v -M -b 90.7 384000 > test.sox
/usr/bin/sox: SoX v14.4.1
Input File : '-' (wav)
Channels : 2
Sample Rate : 48000
Precision : 24-bit
Duration : 00:38:06.69 = 109761216 samples ~ 171502 CDDA sectors
Sample Encoding: 24-bit Signed Integer PCM
Endian Type : little
Reverse Nibbles: no
Reverse Bits : no
Output File : '-' (sox)
Channels : 2
Sample Rate : 384000
Precision : 32-bit
Duration : 00:38:06.69 = 878089728 samples ~ 171502 CDDA sectors
Sample Encoding: 32-bit Signed Integer PCM
Endian Type : little
Reverse Nibbles: no
Reverse Bits : no
Comment : 'Processed by SoX'
/usr/bin/sox INFO sox: effects chain: input 48000Hz 2 channels
/usr/bin/sox INFO sox: effects chain: gain 48000Hz 2 channels
/usr/bin/sox INFO sox: effects chain: rate 384000Hz 2 channels
/usr/bin/sox INFO sox: effects chain: output 384000Hz 2 channels
codice:
soxi test.sox
Input File : 'test.sox'
Channels : 2
Sample Rate : 384000
Precision : 32-bit
Duration : 00:38:06.69 = 878089728 samples ~ 171502 CDDA sectors
File Size : 7.02G
Bit Rate : 24.6M
Sample Encoding: 32-bit Signed Integer PCM
Comment : 'Processed by SoX'
a questo punto, ho voluto verificare cosa succedesse ad es. con aiff:
codice:
$ cat orig/STE-000.wav | /usr/bin/sox -V3 -t wav - -t aiff -r 384000 -b 32 --buffer=8192 - gain -h rate -v -M -b 90.7 384000 > test.aiff
/usr/bin/sox: SoX v14.4.1
Input File : '-' (wav)
Channels : 2
Sample Rate : 48000
Precision : 24-bit
Duration : 00:38:06.69 = 109761216 samples ~ 171502 CDDA sectors
Sample Encoding: 24-bit Signed Integer PCM
Endian Type : little
Reverse Nibbles: no
Reverse Bits : no
Output File : '-' (aiff)
Channels : 2
Sample Rate : 384000
Precision : 32-bit
Duration : 00:38:06.69 = 878089728 samples ~ 171502 CDDA sectors
Sample Encoding: 32-bit Signed Integer PCM
Endian Type : big
Reverse Nibbles: no
Reverse Bits : no
Comment : 'Processed by SoX'
/usr/bin/sox INFO sox: effects chain: input 48000Hz 2 channels
/usr/bin/sox INFO sox: effects chain: gain 48000Hz 2 channels
/usr/bin/sox INFO sox: effects chain: rate 384000Hz 2 channels
/usr/bin/sox INFO sox: effects chain: output 384000Hz 2 channels
/usr/bin/sox WARN aiff: file size too big for accurate AIFF header
...e qui già viene fuori una sopresa: quel warning che ci avvisa che "il file è troppo grande e l'header potrebbe non essere accurato" (con wav non accadeva).
Avvio soxi e, seconda sorpresa: invece di rispondere pressoché istantaneamente (come avveniva sia con formato wav che "sox"), qui ci mette una vita: a giudicare da htop, sta leggendo sequenzialmente l'intero file! ![sadlike](images/smilies/sadlike.gif)
Quando alla fine ritorna, siamo punto e a capo: stesso problema che con wav.
codice:
$ soxi test.aiff
Input File : 'test.aiff'
Channels : 2
Sample Rate : 384000
Precision : 32-bit
Duration : 00:14:48.59 = 341218816 samples ~ 66644.3 CDDA sectors
File Size : 7.02G
Bit Rate : 63.2M
Sample Encoding: 32-bit Signed Integer PCM
Comment : 'Processed by SoX'