// $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.");
}
// destructor
SGSoundSample::~SGSoundSample() {
- SG_LOG( SG_GENERAL, SG_ALERT, "Deleting a sample" );
+ SG_LOG( SG_GENERAL, SG_INFO, "Deleting a sample" );
alDeleteSources(1, &source);
alDeleteBuffers(1, &buffer);
}