Here a c/p of the method I have initializing all the sound information.
protected override void Initialize()
{
audioEngine = new AudioEngine("MySounds.xgs");
//Assume the default names for the wave and sound bank.
//To change these names, change properties in XACT.
waveBank = new WaveBank(audioEngine, "Wave Bank.xwb");
soundBank = new SoundBank(audioEngine, "Sound Bank.xsb");
base.Initialize();
}
Here is a C/P of the exception that I am receiving.
System.IO.FileNotFoundException was unhandled Message="Could not find file 'C:\\Users\\Mars\\Desktop\\HDG\\My Games\\Apress\\Tut1\\Tut1\\bin\\x86\\Debug\\MySounds.xgs'." Source="mscorlib" FileName="C:\\Users\\Mars\\Desktop\\HDG\\My Games\\Apress\\Tut1\\Tut1\\bin\\x86\\Debug\\MySounds.xgs"
StackTrace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.File.OpenRead(String path)
at Microsoft.Xna.Framework.Audio.AudioEngine..ctor(String settingsFile, TimeSpan lookAheadTime, Guid rendererId)
at Microsoft.Xna.Framework.Audio.AudioEngine..ctor(String settingsFile)
at Tut1.Game1.Initialize() in C:\Users\Mars\Desktop\HDG\My Games\Apress\Tut1\Tut1\Game1.cs:line 33
at Microsoft.Xna.Framework.Game.Run()
at Tut1.Program.Main(String[] args) in C:\Users\Mars\Desktop\HDG\My Games\Apress\Tut1\Tut1\Program.cs:line 14
I just removed the extension to test and added it back both ways give me errors.
Joe