Re: sox can't encode to 16-bit

Måns Rullgård <[email protected]>
Newsgroups gmane.comp.audio.sox
Message-ID <[email protected]>
Toru Yagi <[email protected]> writes:

> Hi all, 
>
> I'm trying to record by sox, splitting the input to multiple files: 
>
> $ sox --version 
> sox:      SoX v14.4.1 
>
> $ rec -c 2 -b 16 -r 48000 -p trim 0 20 | 
> sox -V3 -c 2 -b 16 -r 48000 -p test.wav trim 0 10 : newfile : restart 
>
> I want to record 16-bit wav files, but the files generated are 32-bit ones. 

Put the "-b 16" option immediately before the output file argument.  You
can also drop all the format options preceding the -p since the pipe
format already includes all information.

That said, why don't you do the splitting directly with the rec command?
This should work:

$ rec -c 2 -b 16 -r 48000 test.wav trim 0 10 : newfile : restart

-- 
Måns Rullgård
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.