OgreAL under Linux

TentacleGuy

11-04-2007 14:39:39

Hi,

I tried to compile OgreAL under Linux (Ubuntu Edgy) and it fails because of its dependencies.

It searchs for a file named "xram.h"...

I installed openal version 0.0.8 but it seems to me that only openal 1.1 contains this file.

But this version doesn't exist for linux.

How may I get platformindependent sound in my game?

Thanks
Philipp

CaseyB

11-04-2007 14:56:25

There is code in the OgreALPrereqs.h that takes care of that #if OGRE_COMPILER == OGRE_COMPILER_MSVC
# include "al.h"
# include "alc.h"
# include "AL/alut.h"
# include "xram.h"
# ifdef OGRE_AL_EXPORT
# define OgreAL_Export __declspec(dllexport)
# else
# define OgreAL_Export __declspec(dllimport)
# endif
#elif OGRE_COMPILER == OGRE_COMPILER_GNUC
# include "AL/al.h"
# include "AL/alc.h"
# include "AL/alut.h"
# if defined(OGRE_AL_EXPORT) && OGRE_COMP_VER >= 400
# define OgreAL_Export __attribute__ ((visibility("default")))
# else
# define OgreAL_Export
# endif
// fake EAX/X-RAM
typedef ALenum (*EAXGetBufferMode)(ALuint buffer, ALint *pReserved);
typedef ALboolean (*EAXSetBufferMode)(ALsizei n, ALuint *buffers, ALint value);
#else // Other Compilers
# include "al.h"
# include "alc.h"
# include "alut.h"
# include "xram.h"
# define OgreAL_Export
#endif
The middle case is the one that should be active under Linux and it doens't include xram.h and it fakes out the Xram functions so it should work just fine. It might be that your compiler is falling into the else catchall case. Try removing the xram include from there and adding those two typedefs. If that works then I need to update my compiler test.

TentacleGuy

13-04-2007 09:36:10

it seems to work, thanks.

But I'm going to test the functionality later.

CaseyB

13-04-2007 15:31:33

Did you have to change anything? If so I'd like to know so I can work it in.

TentacleGuy

13-04-2007 15:43:56

I just removed the block at the top and the bottom...

CaseyB

13-04-2007 16:32:34

That means that it failed the#elif OGRE_COMPILER == OGRE_COMPILER_GNUC :? Ok, I'll look into it, thanks!!

What flavor of Linux are you running? And which version of gcc?

TentacleGuy

23-04-2007 20:10:53

Ubuntu Feisty (last week edgy).

gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)