Re: manualy setting output as for .s32 extension

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

> Hi SoX users,
>
> This command works for me:
> 1) sox --channels 1 --rate 48000 in_signal.wav in_signal.s32
>
> Now, I'd like to change the output filename extension. In that case SoX
> can't deduce the format from the extension, so I have to tell it the
> details. I tried the following line:
> 2) sox --bits 32 --channels 1 --encoding signed-integer --rate 48000
> in_signal.wav --type raw in_signal.q31
>
> However, I am not getting the same output as using the first command.
>
> What's done wrong in the second command?

You're options you've added apply to the input file, not the output, and
probably don't do what you want.  With a WAV input, you should not
normally need to specify channel count or sample rate unless the file
header is incorrect (it happens).

All you need to do here is say --type s32 before the output file
(instead of raw).

-- 
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.