[plug] Converting WAVs with 0-bit sample size?

Andrew Furey andrew.furey at gmail.com
Mon Aug 6 22:26:41 WST 2007


On 27/07/07, Andrew Furey <andrew.furey at gmail.com> wrote:
> I then converted it to MS-style WAV with
> sox -g plugtest.gsm -a plugtest.wav
>
> So far so good, but if I convert it to MP3 with bog-standard
> lame plugtest.wav plugtest.mp3
>
> it produces the third file, which is obviously garbage.

Doing some more testing, file(1) identifies the .WAV file as "MS
ADPCM". If I open it in Goldwave and re-save it, it becomes "MS PCM"
(and lame then converts it correctly).

Further research shows that sox's "-s" option (rather than -a) does
the trick. So doing
sox -g plugtest.gsm -s plugtest.wav
lame plugtest.wav plugtest.mp3

produces a valid MP3.

Thanks everyone for your suggestions... I can now get on and implement
the rest :)

Andrew

-- 
Linux supports the notion of a command line or a shell for the same
reason that only children read books with only pictures in them.
Language, be it English or something else, is the only tool flexible
enough to accomplish a sufficiently broad range of tasks.
                          -- Bill Garrett



More information about the plug mailing list