* Fix wrongly triggered error messages about OpenAL audio contexts

(The error state simply wasn't cleared before calling a function that could produce an error)

Patch by vs2k5

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1803 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2007-06-04 10:01:52 +00:00
parent b6a27628ba
commit d1336810a9
1 changed files with 8 additions and 2 deletions

View File

@ -202,11 +202,17 @@ void sound_Update( void )
// }// <=== whats up with this You trying to make those local only ??
cdAudio_Update();
// Reset the current error state
alcGetError(device);
alcProcessContext(context);
err = alcGetError(device);
if(err != ALC_NO_ERROR) {
if (err != ALC_NO_ERROR)
{
debug(LOG_ERROR, "Error while processing audio context: %s",
alGetString(err));
alGetString(err));
}
}