I see you've solved your issue on a real PC.
But please paste the method that contains the Assert() to give the chance to help you, without a context is impossible to say what cause the problem.
Also, for virtual machines, you need to properly configure the virtual sound card. I don't know what virtualization software you use, but all needs this configuration.
Heh... I wasn't looking for help, but I really do appreciate the gesture. I was looking to provide help to anybody else who has the issue. My virtual sound cards are all configured correctly, as I can play sound through all of them. I think this is just a case of the sound cards being strange enough due to the virtualization that OpenAL is just having a hard time with it.
I will also add that if you download the latest version of the software listed in the book, it is NOT the same as the code listed in the book. The author has made updates which, while improving the code, will make it difficult for you to work your way through the book at certain points because certain members have been eliminated and/or replaced. Specifically, the FontParser in the book has been changed to handle Kerning, but in doing so he removed the Load method and replaced it with a CreateFont method that works a little differently. Here is an example of the correct usage of the new CreateFont method:
_titleFont = GameEngine.FontParser.CreateFont("title_font.fnt", _textureManager);
Also, the "title_font.fnt" file will need to be modified. Open it in Notepad and find the line that has "title_font_0.tga" on it, and replace it with "title_font.tga" or the font renderer will not be able to find the .tga file.
For completeness sake, I will post the new version of the method in question, since you asked. =D The last assert it the one that fails.
public void LoadSound(string soundId, string path)
// Generate a buffer.
int buffer = -1;
Al.alGenBuffers(1, out buffer);
int errorCode = Al.alGetError();
System.Diagnostics.Debug.Assert(errorCode == Al.AL_NO_ERROR);
IntPtr data = Alut.alutLoadMemoryFromFile(path, out format, out size, out frequency);
errorCode = Al.alGetError();
System.Diagnostics.Debug.Assert(data != IntPtr.Zero);
// Load wav data into the generated buffer.
Al.alBufferData(buffer, format, data, size, (int)frequency);
// Every seems ok, add it to the library.
_soundIdentifier.Add(soundId, new SoundSource(buffer, path));
Again, I hope this helps some of you out there that might be using the book.
Edited by Lance42, 17 August 2012 - 05:43 PM.