News:

Please help making MegaGlest rock-stable by testing the pre-release snapshots.

Main Menu

Annoying error

Started by Alphaman1990, 16 February 2009, 16:09:13

Alphaman1990

I start a game normally and sometimes it will start, actually most times. but in the rare chance it will say (X) Error: unhandled exception  failed to lock direct sound buffer.

and because of this error if i do get in the game with no problems i will start a scenario, tutorial, custom game but maybe 5/7 minutes ( max ) later this error will pop up and i will not be able to continue my game.

please does anyone have awnsers for me?

hailstone

I'm not sure how to fix it but I can provide some information.

The exception is thrown in shared_lib/sources/sound/ds8/sound_player_ds8.cpp , StrSoundBuffer::fillDsBuffer()

Some information on the method that failed: http://msdn.microsoft.com/en-us/library/ms897826.aspx

I think Glest should have also specified the error that is returned but doesn't, here are possible errors:
DSERR_BUFFERLOST     The buffer memory has been lost and must be restored.
DSERR_INVALIDCALL     This function is not valid for the current state of this object.
DSERR_INVALIDPARAM     An invalid parameter was passed to the returning function.
DSERR_PRIOLEVELNEEDED     The caller does not have the priority level required for the function to succeed.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

martiño

This is a know error. Update your sound card drivers, update to the latest directx and if needed disable sound hardware acceleration.

hailstone

#3
I did record this on the wiki but the FAQ page link was removed from the front page and I had forgotten.

https://docs.megaglest.org/FAQ
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/