Re: weird "An impossible ALUT error condition was reported?!?" problem
Chris Robinson <[email protected]>
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <[email protected]> |
On Sunday 11 April 2010 9:50:54 am Sammy Fischer wrote:
> I'm getting "impossible ALUT error condition was reported?!?" errors in
> my program, and it's driving me crazy.
>
> I create 2 buffers from files (both samples play alright, if I switch
> them out), then create sources using
>
>
> ALuint createNewSource( ALuint buffer, float minGain, float maxGain,
> bool looping, float maxDistance, float rolloff, float refDistance) {
> ALuint s;
> cout << "retrieving Buffer Nr." << buffer <<endl;
> mError = alGetError ();
> if (mError != ALUT_ERROR_NO_ERROR)
> {
> cout << "WHY?!" << endl;
> LogManager::getSingletonPtr()->logMessage(alutGetErrorString
> (mError));
> return ALUT_ERROR_INVALID_OPERATION;
> }
Hi.
It looks like you're using alutGetErrorString to get a string of an AL error.
IIRC, alutGetErrorString is only for ALUT's error codes. If you want to get a
string from alGetError's return value, use alGetString (similarly, use
alcGetString for alcGetError return values):
ALenum err = alGetError();
if(err != AL_NO_ERROR)
{
LogManager::getSingletonPtr()->logMessage(alGetString(err));
...
}
...and...
ALCenum err = alcGetError(mDevice);
if(err != ALC_NO_ERROR)
{
LogManager::getSingletonPtr()->logMessage(alcGetString(mDevice, err));
...
}
> Anybody got ANY idea what could be happening to stop me from creating
> sources from the second buffer? As I said, switching the sound files
> showed me that the files in themselves are working. and the two ~shield~
> sounds work perfectly (no matter which wav is actually used). I use the
> same methods for both sounds.
>
> oO
>
> I'll gladly give more informations or paste more code if needed. It's
> REALLY driving me crazy right now.
I can't immediately see anything wrong with the code you pasted, and its
difficult to guess without knowing the actual error. Given that the error
seems to happen at the beginning of the function, the error is likely being
generated in a different function and isn't checked, so the createNewSource
function picks it up before doing anything. Make sure to check for errors in
other places where you call AL functions.
If you still have trouble and you're on Linux, and you have/can build a
version of the lib with debug info enabled, you can run with GDB and set a
breakpoint on alSetError (a function inside the lib). It will then break when
an error is generated and the backtrace can help pinpoint which call is
causing an error and why.
_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal