test for an AL or ALC error before calling an ALUT function.
This commit is contained in:
parent
56919ae45f
commit
176e760de1
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user