]> git.jsancho.org Git - lugaru.git/commitdiff
Experiment to wedge OpenAL in here...
authorRyan C. Gordon <icculus@icculus.org>
Mon, 8 Aug 2005 03:22:57 +0000 (03:22 +0000)
committerRyan C. Gordon <icculus@icculus.org>
Mon, 8 Aug 2005 03:22:57 +0000 (03:22 +0000)
Source/openal_wrapper.cpp [new file with mode: 0644]
makefile

diff --git a/Source/openal_wrapper.cpp b/Source/openal_wrapper.cpp
new file mode 100644 (file)
index 0000000..632ba06
--- /dev/null
@@ -0,0 +1,135 @@
+
+#if USE_OPENAL
+
+#include "MacCompatibility.h"
+#include "fmod.h"
+
+//#include "al.h"
+
+void F_API FSOUND_3D_Listener_SetAttributes(const float *pos, const float *vel, float fx, float fy, float fz, float tx, float ty, float tz)
+{
+}
+
+signed char F_API FSOUND_3D_SetAttributes(int channel, const float *pos, const float *vel)
+{
+    return 0;
+}
+
+void F_API FSOUND_3D_SetDopplerFactor(float scale)
+{
+}
+
+signed char F_API FSOUND_Init(int mixrate, int maxsoftwarechannels, unsigned int flags)
+{
+    return 0;
+}
+
+void F_API FSOUND_Close()
+{
+}
+
+FSOUND_SAMPLE *F_API FSOUND_GetCurrentSample(int channel)
+{
+    return 0;
+}
+
+signed char F_API FSOUND_GetPaused(int channel)
+{
+    return 0;
+}
+
+unsigned int F_API FSOUND_GetLoopMode(int channel)
+{
+    return 0;
+}
+
+signed char F_API FSOUND_IsPlaying(int channel)
+{
+    return 0;
+}
+
+int F_API FSOUND_PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused)
+{
+    return 0;
+}
+
+#undef FSOUND_Sample_Load
+FSOUND_SAMPLE * F_API FSOUND_Sample_Load(int index, const char *name_or_data, unsigned int mode, int offset, int length)
+{
+    return 0;
+}
+
+void F_API FSOUND_Sample_Free(FSOUND_SAMPLE *sptr)
+{
+}
+
+signed char F_API FSOUND_Sample_SetMode(FSOUND_SAMPLE *sptr, unsigned int mode)
+{
+    return 0;
+}
+
+signed char F_API FSOUND_Sample_SetMinMaxDistance(FSOUND_SAMPLE *sptr, float min, float max)
+{
+    return 0;
+}
+
+signed char F_API FSOUND_SetFrequency(int channel, int freq)
+{
+    return 0;
+}
+
+signed char F_API FSOUND_SetVolume(int channel, int vol)
+{
+    return 0;
+}
+
+signed char F_API FSOUND_SetPaused(int channel, signed char paused)
+{
+    return 0;
+}
+
+void F_API FSOUND_SetSFXMasterVolume(int volume)
+{
+}
+
+signed char F_API FSOUND_StopSound(int channel)
+{
+    return 0;
+}
+
+FSOUND_STREAM * F_API FSOUND_Stream_Open(const char *name_or_data, unsigned int mode, int offset, int length)
+{
+    return 0;
+}
+
+signed char F_API FSOUND_Stream_Close(FSOUND_STREAM *stream)
+{
+    return 0;
+}
+
+FSOUND_SAMPLE * F_API FSOUND_Stream_GetSample(FSOUND_STREAM *stream)
+{
+    return 0;
+}
+
+int F_API FSOUND_Stream_PlayEx(int channel, FSOUND_STREAM *stream, FSOUND_DSPUNIT *dsp, signed char startpaused)
+{
+    return 0;
+}
+
+signed char F_API FSOUND_Stream_Stop(FSOUND_STREAM *stream)
+{
+    return 0;
+}
+
+signed char F_API FSOUND_Stream_SetMode(FSOUND_STREAM *stream, unsigned int mode)
+{
+    return 0;
+}
+
+void F_API FSOUND_Update()
+{
+}
+
+#endif
+
index 30f94cd703a187dd8152d81512e90b6c52f7e6a3..a77ff9930cd373260510d4c48a19aa918f8c5b38 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,6 +1,7 @@
 
 macosx := false
 use_devil := false
+use_fmod := false
 
 BINDIR := bin
 RUNDIR := run
@@ -50,6 +51,11 @@ else
     INCLUDES += -I$(ZLIBDIR) -I$(LIBPNGDIR) -I$(JPEGLIBDIR)
 endif
 
+ifeq ($(strip $(use_fmod)),false)
+    DEFINES += -DUSE_OPENAL=1
+endif
+
+
 CFLAGS := -g -c $(OPT) $(INCLUDES) $(DEFINES) -fsigned-char -pipe
 CFLAGS += -w
 
@@ -60,12 +66,16 @@ ifeq ($(strip $(macosx)),true)
   APPLDFLAGS := $(SDLDIR)/lib/libSDL-1.2.0.dylib $(SDLDIR)/lib/libSDLmain-osx.a
 else
   CFLAGS += -DPLATFORM_LINUX=1
-  LDFLAGS := ./libSDL-1.2.so.0 ./libfmod.so
+  LDFLAGS := ./libSDL-1.2.so.0
   POSTLDFLAGS := /usr/lib/libGLU.a
 
   ifeq ($(strip $(use_devil)),true)
     LDFLAGS += ./libIL.so.1 ./libILU.so.1 ./libILUT.so.1
   endif
+
+  ifeq ($(strip $(use_fmod)),true)
+       ./libfmod.so
+  endif
 endif
 
 CXXFLAGS := $(CFLAGS)
@@ -98,6 +108,7 @@ SRCS := \
        logger/logger.cpp \
        WinInput.cpp \
        OpenGL_Windows.cpp \
+       openal_wrapper.cpp \
 
 SRCS := $(foreach f,$(SRCS),$(SRCDIR)/$(f))