Re: Audio File Conversion



On Wed, 5 Apr 2006 18:41:01 -0700, TryingMyBest wrote:

Update. It's close. I managed to get an mp3 converted to a wav in 16 bit
44khz g.711 encoded. A few problems still though.

-Can't seem to get the PCM filter to go down to 16000 and 8 bit mono.
-The WAV header in the dest file is incorrect. The type was not set to u-law

It's possible you might have to use 2 PCM filters. I'm not sure if the PCM
filter can convert sample rate and mix channels at the same time. So try a
PCM filter to reduce the sample rate and another behind it to mix to mono
if necessary. You don't want to mix to 8-bit, the u-Law filter requires a
16-bit input.

To configure the PCM filter find it's output pin before connecting. Get
the IAMStreamConfig interface from the unconnected pin. You can use a
combination of GetFormat(), GetStreamCaps(), and SetFormat() to configure
the pin before connection.

--
http://www.chrisnet.net/code.htm
http://www.avdevforum.com/AV
.