"Specified stream is not a wave file." When content is a wave file

I am trying to add background music to my game. I converted some songs to wave format, and added them to the content manager. When I tried to run, the Content.Load function threw a NotSupportedException with the message “Specified stream is not a wave file.”.

My LoadContent code looks like this:


My ContentManager settings look like this:

Name | MenuSong0.wav
Build Action | Build
Importer | Wav Importer - MonoGame
Processor | Song - MonoGame
Quality | Best

I don’t know what the problem could be. The wav files run fine in media players, so the files themselves do not seem to be the issue.

Managed to find the problem after hacking around with the code a bit longer.

I assumed the extension could be omitted in the C# code, as it can for loading textures. I was wrong.

The following code:

Needed to be changed to:

That’s not the fix. There is something else going here, and there seem to be many issues with sound effect and music in the content pipeline and playback. I’ll have to concentrate some effort in cleaning this area up.