Re: [alsa-devel] Question about Conversion to S24_LE from S24_3LE
At Thu, 16 Aug 2012 09:37:18 +0900 (JST), etsuko suzuki wrote:
Hi.
I am Etsuko. Kaz is my coworker.
This was my question, so I had to post this mail myself. However my mail was not posted from my E-mail address.
Did you subscribe to the ML? Otherwise a post would need a manual approval and it misses sometimes timeframe that the ML server keeps a pending post.
Therefore he had posted this instead of me.
I am challenging once again using the different mail address.
It depends on what format is used in the original PCM stream.
I recorded this file from 16bits wav file.
OK, it's clear now.
It'd make sense to have 00 in LSB if it was converted from 16 to 24bit.
Does this mean the following?
ex.)
0000030 ffffc300 ffffc600 ffffca00 ffffd300
++====** ++ : padding == : PCM data ** : This is added when it was converted from 16 to 24bit.
Yes. When the original source is 16bit, ALSA-lib format conversion just shifts the bits. It's suboptimal, but fast. That's the reason of the left 00.
I'd like to ask one more. I read the following, in order to know about wav file.
http://msdn.microsoft.com/en-us/windows/hardware/gg463006.aspx
In this, I found the statement 'left-alinged'. (In 'Details about wValidBitsPerSample')
I understood 'left-alinged' was 'LSB padding'. So I thought S24_LE was LSB padding.
No. S24_LE has the MSB padding of 8 bits in 32 bit container.
Does the format in the ALSA driver differ from the format in wav file?
You need to use S32_LE instead.
HTH,
Takashi
participants (1)
-
Takashi Iwai