views:

603

answers:

2

Has anyone converted a WMA to a WAV using Windows Media Encoder? If so, do you have a short code snippet of how you did it? All samples I've seen have been for WAV to WMA, not the other way around.

+2  A: 

The reason that all of the samples you've seen have been for WAV to WMA is that you're looking at Windows Media Encoder. You want to decode WMA to WAV. Look at the Windows Media Format SDK instead.

Stu Mackellar
A: 

Follow up Question:

I know I might be asking for much, but is there a managed version of this? I've seen a codeplex project that does this, but is there something more MS-blessed? I worry that the quality of the codeplex code is not production ready, and I don't trust myself to cleanly p-invoke the un-managed api.

Peter Walke
No. WMF is a COM API, but there's no supplied type library so you can't easily use it from .Net directly. Probably the best way to do this is to create a wrapper assembly in C++/CLI that talks to the COM API and then exposes your required functionality as a managed interface.
Stu Mackellar
Managed WMF I use every day: http://windowsmedianet.sourceforge.net/
Daniel Mošmondor