XNA
XNA SoundEffect ContentLoadException
Heine — Wed, 28/01/2009 - 21:59
It took me about 10 minutes to find out why the code below for a SoundEffect throws a ContentLoadException:
explosionSoundEffect = Content.Load<SoundEffect>("filename");
Error loading "[filename]". File contains Microsoft.Xna.Framework.Media.Song but trying to load as Microsoft.Xna.Framework.Audio.SoundEffect.
To save you the trouble:
- Select the file
filenamein the Solution Explorer. - Go to its Properties tab.
- Set the
Content ProcessortoSound Effect - XNA Framework.
Done.