]> git.mxchange.org Git - simgear.git/commitdiff
Silently ignore previous errors to prevent halting the program on silly errors
authorehofman <ehofman>
Thu, 21 Jan 2010 07:56:14 +0000 (07:56 +0000)
committerTim Moore <timoore33@gmail.com>
Thu, 21 Jan 2010 10:07:58 +0000 (11:07 +0100)
simgear/sound/soundmgr_openal.cxx

index 51b66a71630375b2ab755ff19b23ae353121378a..16c17315b739245a00efff3c427c8b0d24e6df7c 100644 (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();