|
From: Sergei S. <ser...@ya...> - 2012-12-03 03:49:30
|
>________________________________ > From: Ulrich Klauer <ul...@ch...> >To: sox...@li... >Sent: Monday, December 3, 2012 5:40 AM >Subject: Re: [SoX-users] Converting a wav file to 20-bit depth > >R R <el...@li...>: > >> I thought 20-bit depth format was simply 24-bit data with the LSBs >> padded to 0. Is this correct? > >Essentially, yes. There is also a wValidBitsPerSample header entry >that says "20" instead of "24". Unfortunately, the SoX WAVE format >driver is restricted to 8/16/24/32 bit. > >> Or sox doesn't support 20-bit conversion? Or the wav format itself >> doesn't support 20-bit? >> If not, suggestions on any other methods/tools are welcome. > >If it is sufficient for you to have 20-bit values in the file, but >still a header saying "24", then you can use the -p option to dither: > sox input.wav -b 24 output.wav dither -p 20 > >If you need a correct header, probably the easiest way to achieve this >is changing the generated file afterwards with a hex editor or similar >(change the byte at position 38/0x26 from 24/0x18 into 20/0x14). > >Ulrich > > Is there at all sense in supporting 20 (rather than 24) bits ? I mean, say, does USB audio protocol allow 20 bits, thus saving some bandwidth ? Regards, Sergei. |