Silently ignore previous errors to prevent halting the program on silly errors

This commit is contained in:
ehofman
2010-01-21 07:56:14 +00:00
committed by Tim Moore
parent 9e47911b19
commit 56d2f06631

View File

@@ -554,6 +554,9 @@ bool SGSoundMgr::load(string &samplepath, void **dbuf, int *fmt,
#if defined(ALUT_API_MAJOR_VERSION) && ALUT_API_MAJOR_VERSION >= 1
ALfloat freqf;
// ignore previous errors to prevent the system from halting on silly errors
alGetError();
alcGetError(_device);
data = alutLoadMemoryFromFile(samplepath.c_str(), &format, &size, &freqf );
freq = (ALsizei)freqf;
int error = alutGetError();