From 51c9ffaec0bea17fd9fc50e536b78963ea104356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 20 Feb 2019 13:00:19 +0100 Subject: Drop RtAudio driver on Windows We've been defaulting to WASAPI since 3.0 and it's superior to RtAudio in all aspects. Obsoletes and closes #25503. Also enable WINMIDI on MinGW, this had been missed initially. Fix os_windows.cpp and crash_handler_windows.cpp which had weird dependencies on RtAudio.h's includes (ugh). --- platform/server/os_server.h | 1 - platform/windows/crash_handler_windows.cpp | 3 ++- platform/windows/detect.py | 6 +++--- platform/windows/os_windows.cpp | 4 +--- platform/windows/os_windows.h | 4 ---- 5 files changed, 6 insertions(+), 12 deletions(-) (limited to 'platform') diff --git a/platform/server/os_server.h b/platform/server/os_server.h index 312b5811d1..eebe8ae777 100644 --- a/platform/server/os_server.h +++ b/platform/server/os_server.h @@ -32,7 +32,6 @@ #define OS_SERVER_H #include "drivers/dummy/texture_loader_dummy.h" -#include "drivers/rtaudio/audio_driver_rtaudio.h" #include "drivers/unix/os_unix.h" #include "main/input_default.h" #ifdef __APPLE__ diff --git a/platform/windows/crash_handler_windows.cpp b/platform/windows/crash_handler_windows.cpp index f93a449c7b..4006c4c60e 100644 --- a/platform/windows/crash_handler_windows.cpp +++ b/platform/windows/crash_handler_windows.cpp @@ -30,9 +30,9 @@ #include "crash_handler_windows.h" +#include "core/os/os.h" #include "core/project_settings.h" #include "main/main.h" -#include "os_windows.h" #ifdef CRASH_HANDLER_EXCEPTION @@ -41,6 +41,7 @@ #include #include #include +#include #pragma comment(lib, "psapi.lib") #pragma comment(lib, "dbghelp.lib") diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 9b07a7d469..426a5e9e61 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -205,8 +205,8 @@ def configure_msvc(env, manual_msvc_config): print("Missing environment variable: WindowsSdkDir") env.AppendUnique(CPPDEFINES = ['WINDOWS_ENABLED', 'OPENGL_ENABLED', - 'RTAUDIO_ENABLED', 'WASAPI_ENABLED', - 'WINMIDI_ENABLED', 'TYPED_METHOD_BIND', + 'WASAPI_ENABLED', 'WINMIDI_ENABLED', + 'TYPED_METHOD_BIND', 'WIN32', 'MSVC', 'WINVER=%s' % env["target_win_version"], '_WIN32_WINNT=%s' % env["target_win_version"]]) @@ -326,8 +326,8 @@ def configure_mingw(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=['-DWINMIDI_ENABLED']) env.Append(CCFLAGS=['-DWINVER=%s' % env['target_win_version'], '-D_WIN32_WINNT=%s' % env['target_win_version']]) env.Append(LIBS=['mingw32', 'opengl32', 'dsound', 'ole32', 'd3d9', 'winmm', 'gdi32', 'iphlpapi', 'shlwapi', 'wsock32', 'ws2_32', 'kernel32', 'oleaut32', 'dinput8', 'dxguid', 'ksuser', 'imm32', 'bcrypt','avrt']) diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index b8a6de1fd1..9f15e7aad7 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -52,6 +52,7 @@ #include "windows_terminal_logger.h" #include +#include #include #include #include @@ -3021,9 +3022,6 @@ OS_Windows::OS_Windows(HINSTANCE _hInstance) { #ifdef WASAPI_ENABLED AudioDriverManager::add_driver(&driver_wasapi); #endif -#ifdef RTAUDIO_ENABLED - AudioDriverManager::add_driver(&driver_rtaudio); -#endif #ifdef XAUDIO2_ENABLED AudioDriverManager::add_driver(&driver_xaudio2); #endif diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 8ca58b534a..e27dbbe530 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -36,7 +36,6 @@ #include "core/os/os.h" #include "core/project_settings.h" #include "crash_handler_windows.h" -#include "drivers/rtaudio/audio_driver_rtaudio.h" #include "drivers/unix/ip_unix.h" #include "drivers/wasapi/audio_driver_wasapi.h" #include "drivers/winmidi/midi_driver_winmidi.h" @@ -142,9 +141,6 @@ class OS_Windows : public OS { #ifdef WASAPI_ENABLED AudioDriverWASAPI driver_wasapi; #endif -#ifdef RTAUDIO_ENABLED - AudioDriverRtAudio driver_rtaudio; -#endif #ifdef XAUDIO2_ENABLED AudioDriverXAudio2 driver_xaudio2; #endif -- cgit v1.2.3