Jump to content

Mac Os Openal Issue (Maybe A Beginning Of Solution ?)


Ethan
 Share

Recommended Posts

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 you

Ethan.

Edited by Ethan
Link to comment
Share on other sites

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 to

static 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.)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...