Heine

  • Home
  • Drupal
  • About
Home

XNA SoundEffect ContentLoadException

Heine —Wed, 2009/01/28 - 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:

  1. Select the file filename in the Solution Explorer.
  2. Go to its Properties tab.
  3. Set the Content Processor to Sound Effect - XNA Framework.

Done.

  • XNA
  • First steps

Comments

Thanks

Submitted by Anonymous (not verified) on Tue, 2009/03/17 - 19:12

Thanks

I was really stumped. Thanks

Submitted by Anonymous (not verified) on Wed, 2009/09/02 - 19:25

I was really stumped. Thanks for posting this.

Thanks! that looks simple but

Submitted by Aditya (not verified) on Wed, 2009/10/07 - 13:53

Thanks! that looks simple but definitely a great help!

Recent posts

  • Teampassword manager's password generator is biased
  • Other vectors for SA-CORE-2014-005?
  • Lazy loading: hook_hook_info is for hook owners only.
  • "Always offline" problem in EA's Origin due to antivirus
  • From bug to exploit - Bakery SSO
more

Security reviews

I provide security reviews of custom code, contributed modules, themes and entire sites via LimoenGroen.

Contact us for a quote.

Follow @ustima

Copyright © 2021 by Heine Deelstra. All rights reserved.

  • Home
  • Drupal
  • About