This project has moved. For the latest updates, please go here.

Converting m4a to wav

Oct 10, 2013 at 12:51 PM

I'm able to convert an .m4a file from an iPhone (presumably ALAC codec) on my Windows 7 computer using the latest version of NAudio (1.7), but when trying to run the same code on Windows Server 2008 R2 I get the following error:

Exception from HRESULT: 0xC00D5212

I believe this means I'm missing the ALAC codec on the server, I have tried installing QuickTime but no luck.

So, does anyone know if this exception is a result of a missing codec, and has anyone had any luck installing this on a server?

Here's the code:
        WaveStream waveStream = new MediaFoundationReader(filePath);
        WaveFileWriter.CreateWaveFile(wavOutputPath, waveStream);

Thanks, love the library!
Oct 10, 2013 at 1:36 PM
have you tried installing the "Desktop Experience" component of Windows Server? That seems to have the codecs in. I don't know if the MP4 one is included.
Marked as answer by alansmithee on 10/11/2013 at 7:37 AM
Oct 11, 2013 at 2:28 AM
Thanks Mark! I did have the Desktop Experience installed, but after your suggestion I checked again and there was a hotfix, that when applied, installed the necessary codecs and my code was able to run. Here's the hotfix I installed:

Thanks again!
Marked as answer by alansmithee on 10/11/2013 at 7:38 AM