Merge pull request #10692 from marcelofg55/wasapi_driver
Added new WASAPI driver for Windows
This commit is contained in:
@@ -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'])
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user