Ethan Posted April 20, 2011 Report Share Posted April 20, 2011 (edited) Hello,After, have debug the program, it seem that there are a problem with the "define function AL_CHECK"who use al_check().#define AL_CHECK al_check(__func__,__LINE__)static void al_check(const char* caller, int line){ ALenum err = alGetError(); if(err != AL_NO_ERROR) al_ReportError(err, caller, line);}For what I understand, before take the last error, it is necessary to clear the error state.So I have called alGetError(), beforeALenum err...And now I have the sound, in main menu, and when I play.But the sound is not perfect.I launched the game in windowed mode.But now there are a new issue, when I return to the main menu, and I quit, I have this error:h_mgr.cpp(659): Function call failed: return value was -100021 (Invalid Handle (argument))What do you think ?Than youEthan. Edited April 20, 2011 by Ethan Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted April 22, 2011 Report Share Posted April 22, 2011 For what I understand, before take the last error, it is necessary to clear the error state.So I have called alGetError(), beforeALenum err...Do you mean you've changed it tostatic void al_check(const char* caller, int line){ alGetError(); ALenum err = alGetError(); if(err != AL_NO_ERROR) al_ReportError(err, caller, line);}or something like that? In that case the first line will capture any real error that has occurred, and then ignore the return value, and the "ALenum err = alGetError()" will always return no error because the error state was cleared. So this will just hide any real errors that occur - I don't think it'll ever really fix anything. (We should never trigger any OpenAL errors so it shouldn't be necessary to clear the error state at all, as far as I'm aware.) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.