openal_test1_SOURCES = openal_test1.cxx
openal_test2_SOURCES = openal_test2.cxx
-openal_test1_LDADD = -lsgdebug -lopenal
+openal_test1_LDADD = -lsgdebug $(openal_LIBS)
openal_test2_LDADD = \
$(top_builddir)/simgear/sound/libsgsound.a \
-lsgdebug -lsgmisc -lsgstructure $(openal_LIBS)
#include <stdio.h>
-#include <AL/al.h>
-#include <AL/alut.h>
+#if defined( __APPLE__ )
+# define AL_ILLEGAL_ENUM AL_INVALID_ENUM
+# define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION
+# include <OpenAL/al.h>
+# include <OpenAL/alut.h>
+#else
+# include <AL/al.h>
+# include <AL/alut.h>
+#endif
#include <simgear/debug/logstream.hxx>
// $Id$
-#include <AL/al.h>
-#include <AL/alut.h>
+#if defined( __APPLE__ )
+# define AL_ILLEGAL_ENUM AL_INVALID_ENUM
+# define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION
+# include <OpenAL/al.h>
+# include <OpenAL/alut.h>
+#else
+# include <AL/al.h>
+# include <AL/alut.h>
+#endif
#include <simgear/debug/logstream.hxx>
#include <simgear/misc/sg_path.hxx>
}
// Load the sample file
+#if defined (__APPLE__)
+ alutLoadWAVFile( (ALbyte *)samplepath.c_str(),
+ &format, &data, &size, &freq );
+#else
alutLoadWAVFile( (ALbyte *)samplepath.c_str(),
&format, &data, &size, &freq, &loop );
+#endif
if (alGetError() != AL_NO_ERROR) {
throw sg_exception("Failed to load wav file.");
}
#include <simgear/compiler.h>
-#include <AL/al.h>
+#if defined(__APPLE__)
+# define AL_ILLEGAL_ENUM AL_INVALID_ENUM
+# define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION
+# include <OpenAL/al.h>
+# include <OpenAL/alut.h>
+#else
+# include <AL/al.h>
+# include <AL/alut.h>
+#endif
#include <simgear/debug/logstream.hxx>
#include <iostream>
-#include <AL/al.h>
-#include <AL/alut.h>
-#include <AL/alc.h>
+#if defined(__APPLE__)
+# include <OpenAL/al.h>
+# include <OpenAL/alut.h>
+# include <OpenAL/alc.h>
+#else
+# include <AL/al.h>
+# include <AL/alut.h>
+# include <AL/alc.h>
+#endif
#include <simgear/debug/logstream.hxx>
#include <simgear/misc/sg_path.hxx>
#include STL_STRING
#include <map>
-#include <AL/al.h>
+#if defined( __APPLE__ )
+# include <OpenAL/al.h>
+#else
+# include <AL/al.h>
+#endif
#include "sample_openal.hxx"