Game Development Community

Linux/Windows Platform code discrepancy question

by Mark Kinkead · in Torque Game Builder · 09/25/2005 (7:37 pm) · 1 replies

This involves the OpenAL libray and EAX extensions. I had set things up to where the DLL on the user's machine would be called first, and now I am getting some errors when a card does not support EAX.


In the Windows code,
if(bindOpenALFunctions())
{
	// if EAX is available bind it's function pointers
	//if (alIsExtensionPresent((ALubyte*)"EAX" ))
	      bindEAXFunctions();
	return(true);
}

You can see that the call to "BindEAXFunctions" is always called, due to the conditional being commented out.

In the Linux code:

if(bindOpenALFunctions())
      {
         // if EAX is available bind it's function pointers
         if (alIsExtensionPresent((ALubyte*)"EAX" ))
            bindEAXFunctions();
         return(true);
      }

The conditional is not commented out.

When I have a DLL that does not support EAX, and I get the following error messages when it calls BindEAXFunctions:

Missing OpenAL Extension function 'EAXSet'
Missing OpenAL Extension function 'EAXGet'


This error does not _appear_ to prove fatal to the sound or the program, but there is a discrepancy in that the condition was removed from one platform and not another. Can this become fatal later in a program's life? And why has the conditional been commented out in the windows version but not the Linux version?

--Mark

#1
09/26/2005 (8:22 am)
I can't answer your exact question, but keep in mind that by nature platform specific code is---platform specific. It may be that the change simply didn't get propagated, or it may be that on linux the conditional was required, but wasn't on windows. Hard to tell without re-researching that specific issue.