From c26a1b9d7b9ad82d782c574087054b4c49b28821 Mon Sep 17 00:00:00 2001 From: Anton Yabchinskiy Date: Thu, 20 Nov 2014 03:15:45 +0300 Subject: Use libao driver on X11 platform --- platform/x11/detect.py | 5 +++++ platform/x11/os_x11.cpp | 4 ++++ platform/x11/os_x11.h | 5 +++++ 3 files changed, 14 insertions(+) (limited to 'platform/x11') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 1c8d231d4a..d879354f74 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -111,6 +111,11 @@ def configure(env): env.ParseConfig('pkg-config freetype2 --cflags --libs') env.Append(CCFLAGS=['-DFREETYPE_ENABLED']) + + if env['ao'] == 'yes': + env.ParseConfig('pkg-config ao --cflags --libs') + env.Append(CPPFLAGS=['-DAO_ENABLED']) + env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED']) env.Append(CPPFLAGS=["-DALSA_ENABLED"]) diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 4c45fcfaaf..b11fd76249 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1384,6 +1384,10 @@ OS_X11::OS_X11() { AudioDriverManagerSW::add_driver(&driver_alsa); #endif +#ifdef AO_ENABLED + AudioDriverManagerSW::add_driver(&driver_ao); +#endif + minimized = false; xim_style=NULL; mouse_mode=MOUSE_MODE_VISIBLE; diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index 2ffca0e042..815896bc37 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -43,6 +43,7 @@ #include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h" #include "drivers/rtaudio/audio_driver_rtaudio.h" #include "drivers/alsa/audio_driver_alsa.h" +#include "drivers/ao/audio_driver_ao.h" #include "servers/physics_2d/physics_2d_server_sw.h" #include @@ -129,6 +130,10 @@ class OS_X11 : public OS_Unix { AudioDriverALSA driver_alsa; #endif +#ifdef AO_ENABLED + AudioDriverAO driver_ao; +#endif + enum { JOYSTICKS_MAX = 8, MAX_JOY_AXIS = 32768, // I've no idea -- cgit v1.2.3