WaveFormatConversionStream on WP7

Nov 15, 2012 at 11:01 AM

I'm trying to implement a converter such that the 16KHz audio that is recorded by WP7's microphone can be down sampled to 8KHz, ideally ALaw, as is required by an API I'm using and I'd like to use WaveFormatConversionStream.

I've been using PAR for WP7 as an example as it includes a subset of NAudio that works on the phone, WaveFormatConversionStream isn't included in that by default and I was wondering if it will even function on the phone as I'm not sure what codecs are included on the platform.

Has anyone succeeded in this or is it not feasible?  Any tips welcome if another method is possible too.

Thanks,
JB

Coordinator
Nov 16, 2012 at 10:31 AM

You can't use WaveFormatConversionStream on the Windows Phone as it calls into the ACM APIs which are not available.

However, I have implemented fully managed a-law encoding and decoding in NAudio, so you could use that instead.

Nov 16, 2012 at 10:42 AM

Ah, good to hear it is possible and thanks for setting me on the right track.  No pun intended...
I'll have a look for the ALaw conversion methods and will give them a go.

Thanks,
JB