diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-28 22:53:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-28 22:53:53 +0200 |
commit | 3ce6972d2cfe8f18e1b1fdafe59570671d2fadbd (patch) | |
tree | f5480e191d6bcf858638d5ae9d6a535dc2fe1a04 /platform/windows | |
parent | 9a0ace41b07090b73fbebd9f40b769710159e1cc (diff) | |
parent | 8e814774b13dd382530ad75738c4b731770b3900 (diff) |
Merge pull request #10692 from marcelofg55/wasapi_driver
Added new WASAPI driver for Windows
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/detect.py | 4 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 3 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 882e1a808e..d239ccf7d2 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -171,6 +171,7 @@ def configure(env): env.Append(CCFLAGS=['/DWINDOWS_ENABLED']) env.Append(CCFLAGS=['/DOPENGL_ENABLED']) env.Append(CCFLAGS=['/DRTAUDIO_ENABLED']) + env.Append(CCFLAGS=['/DWASAPI_ENABLED']) env.Append(CCFLAGS=['/DTYPED_METHOD_BIND']) env.Append(CCFLAGS=['/DWIN32']) env.Append(CCFLAGS=['/DWINVER=%s' % winver, '/D_WIN32_WINNT=%s' % winver]) @@ -252,8 +253,9 @@ def configure(env): env.Append(CCFLAGS=['-DWINDOWS_ENABLED', '-mwindows']) env.Append(CCFLAGS=['-DOPENGL_ENABLED']) env.Append(CCFLAGS=['-DRTAUDIO_ENABLED']) + env.Append(CCFLAGS=['-DWASAPI_ENABLED']) env.Append(CCFLAGS=['-DWINVER=%s' % winver, '-D_WIN32_WINNT=%s' % winver]) - env.Append(LIBS=['mingw32', 'opengl32', 'dsound', 'ole32', 'd3d9', 'winmm', 'gdi32', 'iphlpapi', 'shlwapi', 'wsock32', 'ws2_32', 'kernel32', 'oleaut32', 'dinput8', 'dxguid']) + env.Append(LIBS=['mingw32', 'opengl32', 'dsound', 'ole32', 'd3d9', 'winmm', 'gdi32', 'iphlpapi', 'shlwapi', 'wsock32', 'ws2_32', 'kernel32', 'oleaut32', 'dinput8', 'dxguid', 'ksuser']) env.Append(CPPFLAGS=['-DMINGW_ENABLED']) diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 7b12482383..deb9c25576 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2359,6 +2359,9 @@ OS_Windows::OS_Windows(HINSTANCE _hInstance) { #endif user_proc = NULL; +#ifdef WASAPI_ENABLED + AudioDriverManager::add_driver(&driver_wasapi); +#endif #ifdef RTAUDIO_ENABLED AudioDriverManager::add_driver(&driver_rtaudio); #endif diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 01d904a4cc..0c5965bf51 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -32,6 +32,7 @@ #include "context_gl_win.h" #include "drivers/rtaudio/audio_driver_rtaudio.h" +#include "drivers/wasapi/audio_driver_wasapi.h" #include "os/input.h" #include "os/os.h" #include "power_windows.h" @@ -123,6 +124,9 @@ class OS_Windows : public OS { PowerWindows *power_manager; +#ifdef WASAPI_ENABLED + AudioDriverWASAPI driver_wasapi; +#endif #ifdef RTAUDIO_ENABLED AudioDriverRtAudio driver_rtaudio; #endif |