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.
Thanks
Anonymous (not verified) — Tue, 17/03/2009 - 19:12Thanks
I was really stumped. Thanks
Anonymous (not verified) — Wed, 02/09/2009 - 18:25I was really stumped. Thanks for posting this.
Thanks! that looks simple but
Aditya (not verified) — Wed, 07/10/2009 - 12:53Thanks! that looks simple but definitely a great help!
Post new comment