X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FAudio%2Fopenal_wrapper.hpp;h=379949fd6e0d3f88c1cbe3006b05d4e64aa7c40b;hb=6c2be7b3030442d0ffda2d712ef2159283de2f22;hp=d1220309c64cab9405a9e9816e8e0b49be37c8a1;hpb=03fbcc5b5e18dbf62c48849fc8d02cd250aa744e;p=lugaru.git
diff --git a/Source/Audio/openal_wrapper.hpp b/Source/Audio/openal_wrapper.hpp
index d122030..379949f 100644
--- a/Source/Audio/openal_wrapper.hpp
+++ b/Source/Audio/openal_wrapper.hpp
@@ -1,6 +1,6 @@
/*
Copyright (C) 2003, 2010 - Wolfire Games
-Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
+Copyright (C) 2010-2017 - Lugaru contributors (see AUTHORS file)
This file is part of Lugaru.
@@ -21,15 +21,15 @@ along with Lugaru. If not, see .
#ifndef _OPENAL_WRAPPER_HPP_
#define _OPENAL_WRAPPER_HPP_
-#include "MacCompatibility.hpp"
#include "Math/XYZ.hpp"
+#include "Platform/Platform.hpp"
#ifdef __APPLE__
- #include
- #include
+#include
+#include
#else
- #include
- #include
+#include
+#include
#endif
#include
@@ -68,17 +68,16 @@ along with Lugaru. If not, see .
#endif /* DLL_EXPORTS */
#endif /* if 0 */
+typedef struct OPENAL_SAMPLE OPENAL_SAMPLE;
+typedef OPENAL_SAMPLE OPENAL_STREAM;
+typedef struct OPENAL_DSPUNIT OPENAL_DSPUNIT;
-typedef struct OPENAL_SAMPLE OPENAL_SAMPLE;
-typedef OPENAL_SAMPLE OPENAL_STREAM;
-typedef struct OPENAL_DSPUNIT OPENAL_DSPUNIT;
-
-#define OPENAL_LOOP_OFF 0x00000001 /* For non looping samples. */
-#define OPENAL_LOOP_NORMAL 0x00000002 /* For forward looping samples. */
-#define OPENAL_HW3D 0x00001000 /* Attempts to make samples use 3d hardware acceleration. (if the card supports it) */
-#define OPENAL_2D 0x00002000 /* Tells software (not hardware) based sample not to be included in 3d processing. */
-#define OPENAL_FREE -1 /* value to play on any free channel, or to allocate a sample in a free sample slot. */
-#define OPENAL_ALL -3 /* for a channel index , this flag will affect ALL channels available! Not supported by every function. */
+#define OPENAL_LOOP_OFF 0x00000001 /* For non looping samples. */
+#define OPENAL_LOOP_NORMAL 0x00000002 /* For forward looping samples. */
+#define OPENAL_HW3D 0x00001000 /* Attempts to make samples use 3d hardware acceleration. (if the card supports it) */
+#define OPENAL_2D 0x00002000 /* Tells software (not hardware) based sample not to be included in 3d processing. */
+#define OPENAL_FREE -1 /* value to play on any free channel, or to allocate a sample in a free sample slot. */
+#define OPENAL_ALL -3 /* for a channel index , this flag will affect ALL channels available! Not supported by every function. */
#ifdef __cplusplus
extern "C" {
@@ -87,22 +86,22 @@ extern "C" {
#undef AL_API
#define AL_API
- AL_API void OPENAL_3D_Listener_SetAttributes(const float *pos, const float *vel, float fx, float fy, float fz, float tx, float ty, float tz);
- AL_API signed char OPENAL_3D_SetAttributes(int channel, const float *pos);
- AL_API signed char OPENAL_3D_SetAttributes_(int channel, const XYZ &pos);
- AL_API signed char OPENAL_Init(int mixrate, int maxsoftwarechannels, unsigned int flags);
- AL_API void OPENAL_Close();
- AL_API OPENAL_SAMPLE *OPENAL_Sample_Load(int index, const char *name_or_data, unsigned int mode, int offset, int length);
- AL_API void OPENAL_Sample_Free(OPENAL_SAMPLE *sptr);
- AL_API signed char OPENAL_SetFrequency(int channel, bool slomo = false);
- AL_API signed char OPENAL_SetVolume(int channel, int vol);
- AL_API signed char OPENAL_SetPaused(int channel, signed char paused);
- AL_API void OPENAL_SetSFXMasterVolume(int volume);
- AL_API signed char OPENAL_StopSound(int channel);
- AL_API signed char OPENAL_Stream_SetMode(OPENAL_STREAM *stream, unsigned int mode);
- AL_API void OPENAL_Update();
- void PlaySoundEx(int chan, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused);
- void PlayStreamEx(int chan, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused);
+AL_API void OPENAL_3D_Listener_SetAttributes(const float* pos, const float* vel, float fx, float fy, float fz, float tx, float ty, float tz);
+AL_API signed char OPENAL_3D_SetAttributes(int channel, const float* pos);
+AL_API signed char OPENAL_3D_SetAttributes_(int channel, const XYZ& pos);
+AL_API signed char OPENAL_Init(int mixrate, int maxsoftwarechannels, unsigned int flags);
+AL_API void OPENAL_Close();
+AL_API OPENAL_SAMPLE* OPENAL_Sample_Load(int index, const char* name_or_data, unsigned int mode, int offset, int length);
+AL_API void OPENAL_Sample_Free(OPENAL_SAMPLE* sptr);
+AL_API signed char OPENAL_SetFrequency(int channel, bool slomo = false);
+AL_API signed char OPENAL_SetVolume(int channel, int vol);
+AL_API signed char OPENAL_SetPaused(int channel, signed char paused);
+AL_API void OPENAL_SetSFXMasterVolume(int volume);
+AL_API signed char OPENAL_StopSound(int channel);
+AL_API signed char OPENAL_Stream_SetMode(OPENAL_STREAM* stream, unsigned int mode);
+AL_API void OPENAL_Update();
+void PlaySoundEx(int chan, OPENAL_SAMPLE* sptr, OPENAL_DSPUNIT* dsp, signed char startpaused);
+void PlayStreamEx(int chan, OPENAL_SAMPLE* sptr, OPENAL_DSPUNIT* dsp, signed char startpaused);
#ifdef __cplusplus
}