test for an AL or ALC error before calling an ALUT function.

This commit is contained in:
ehofman 2010-01-13 14:29:59 +00:00 committed by Tim Moore
parent 56919ae45f
commit 176e760de1

View File

@ -552,6 +552,8 @@ bool SGSoundMgr::load(string &samplepath, void **dbuf, int *fmt,
#if defined(ALUT_API_MAJOR_VERSION) && ALUT_API_MAJOR_VERSION >= 1
ALfloat freqf;
testForALError("load file");
testForALCError("load file");
data = alutLoadMemoryFromFile(samplepath.c_str(), &format, &size, &freqf );
freq = (ALsizei)freqf;
int error = alutGetError();