|
From: Ulrich K. <ul...@ch...> - 2012-12-03 03:41:00
|
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 |