summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorKostadin Damyanov <maxmight@gmail.com>2015-07-26 02:18:32 +0300
committerKostadin Damyanov <maxmight@gmail.com>2015-07-26 02:18:32 +0300
commitf5bfd497aab7e24a6f4dc0315e9e9333504067a0 (patch)
treefd5e00c23b64127ef5bb5b43e9449af43b402abd /platform
parentf8db8b72155ef904b9399295d3c40737e265e2ad (diff)
Haiku: add sound support
Diffstat (limited to 'platform')
-rw-r--r--platform/haiku/detect.py5
-rw-r--r--platform/haiku/os_haiku.cpp4
-rw-r--r--platform/haiku/os_haiku.h6
3 files changed, 9 insertions, 6 deletions
diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py
index d219850bb4..f4198e50cd 100644
--- a/platform/haiku/detect.py
+++ b/platform/haiku/detect.py
@@ -52,10 +52,9 @@ def configure(env):
env.Append(CCFLAGS=['-g2', '-Wall','-DDEBUG_ENABLED','-DDEBUG_MEMORY_ENABLED'])
#env.Append(CCFLAGS=['-DFREETYPE_ENABLED'])
- env.Append(CPPFLAGS = ['-DGLEW_ENABLED'])
- env.Append(CPPFLAGS = ['-DOPENGL_ENABLED'])
+ env.Append(CPPFLAGS = ['-DGLEW_ENABLED', '-DOPENGL_ENABLED', '-DMEDIA_KIT_ENABLED'])
env.Append(CPPFLAGS = ['-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DGLES_OVER_GL'])
- env.Append(LIBS = ['be', 'game', 'GL', 'GLEW', 'z', 'network', 'bnetapi'])
+ env.Append(LIBS = ['be', 'game', 'media', 'network', 'bnetapi', 'z', 'GL', 'GLEW'])
import methods
env.Append(BUILDERS = {'GLSL120' : env.Builder(action = methods.build_legacygl_headers, suffix = 'glsl.h',src_suffix = '.glsl')})
diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp
index 2c29260281..1edb23d504 100644
--- a/platform/haiku/os_haiku.cpp
+++ b/platform/haiku/os_haiku.cpp
@@ -11,7 +11,9 @@
OS_Haiku::OS_Haiku() {
- AudioDriverManagerSW::add_driver(&driver_dummy);
+#ifdef MEDIA_KIT_ENABLED
+ AudioDriverManagerSW::add_driver(&driver_media_kit);
+#endif
};
void OS_Haiku::run() {
diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h
index a7a8bee522..f88b8182f8 100644
--- a/platform/haiku/os_haiku.h
+++ b/platform/haiku/os_haiku.h
@@ -11,7 +11,7 @@
#include "servers/audio/sample_manager_sw.h"
#include "servers/spatial_sound/spatial_sound_server_sw.h"
#include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h"
-#include "servers/audio/audio_driver_dummy.h"
+#include "drivers/media_kit/audio_driver_media_kit.h"
#include "context_gl_haiku.h"
#include "haiku_application.h"
@@ -34,7 +34,9 @@ private:
SpatialSoundServerSW* spatial_sound_server;
SpatialSound2DServerSW* spatial_sound_2d_server;
- AudioDriverDummy driver_dummy; // TODO: use a real driver
+#ifdef MEDIA_KIT_ENABLED
+ AudioDriverMediaKit driver_media_kit;
+#endif
#if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED)
ContextGL_Haiku* context_gl;