Hi, I'm making a game with the FlatSilverBall engine. I've got everything worked out, except for the audio. Normally in FlatRedBall I would use Xact audio, but I can't obviously in FSB.
So I start digging and found the SoundEffect class. That meets my needs, but I seem to be unable to load any soundfiles. I guess I'm just doing things wrong.
I have a .wav file added to the project and set it's build property to 'Content'. I load the effect like this:
[code] Microsoft.Xna.Framework.Content.ContentManager myXNAContentManager = new Microsoft.Xna.Framework.Content.ContentManager(FlatRedBallServices.Game.Services);
Microsoft.Xna.Framework.Audio.SoundEffect mySoundLaser = myXNAContentManager.Load<SoundEffect>(@"Content\Sound\sndLaser");
There is no exception thrown and I'm sure the file is found (otherwise it will throw an exception), but when I play the sound (mySoundLaser.Play()) I hear nothing and when I investigate it's properties (like duration) they've all thrown exceptions.
I'm sure the file doesn't get loaded properly. But how do I fix this?