This project has moved and is read-only. For the latest updates, please go here.

Converting m4a to wav

Oct 10, 2013 at 1:51 PM
Hi,

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!
Alan
Oct 10, 2013 at 2: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 3: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:

http://support.microsoft.com/kb/2483177

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