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

Does a sound card have to be installed to do upsampling?

Nov 30, 2010 at 9:44 PM

I'm trying to run audio upsampling on an Amazon ECS instance, running Windows Server Datacenter. (No sound cards installed)

It Runs Fine On My Machine (win 7 64-bit), but running on WSD, I get either

Unhandled Exception: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {F447B69E-1884-4A7E-8055-346F74D6EDB3} failed due to the following error: 80040154.   at NAudio.Dmo.Resampler..ctor()   at NAudio.Wave.ResamplerDmoStream..ctor(IWaveProvider inputProvider, WaveFormat outputFormat)

(if compiled for any cpu or x86)


Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'NAudio, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

(if compiled for x64)

I'm assuming the latter error is due to the non-64-bit nature of the current naudio code base.

So, I did some reading, grabbed the source, and did 3 different compiles (any cpu, x86, x64) of the WPF demo app. They all die, but due to the way the demo app is set up I can't see the specific error.

Is the fact that the WPF demo doesn't run due to the fact that by default the Windows Audio Service is not turned on, or that there is not an audio card installed?

Dec 4, 2010 at 12:08 PM

not every version of windows has the DMO resampler object. You could try to see if there is an ACM resampler you could use instead. (use WaveFormatConversionStream)

And yes, NAudio 1.3 doesn't work in x64. The very latest code might be better.