From 8981ff8a84e8cc6967afe3a11613e7d72d8ac599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 13 Oct 2016 20:58:40 +0200 Subject: [PATCH] rtaudio: Split thirdparty files --- drivers/SCsub | 3 ++- drivers/rtaudio/SCsub | 18 ++++++++++++++++-- drivers/rtaudio/audio_driver_rtaudio.cpp | 2 ++ drivers/rtaudio/audio_driver_rtaudio.h | 3 ++- thirdparty/README.md | 11 +++++++++++ {drivers => thirdparty}/rtaudio/RtAudio.cpp | 0 {drivers => thirdparty}/rtaudio/RtAudio.h | 0 7 files changed, 33 insertions(+), 4 deletions(-) rename {drivers => thirdparty}/rtaudio/RtAudio.cpp (100%) rename {drivers => thirdparty}/rtaudio/RtAudio.h (100%) diff --git a/drivers/SCsub b/drivers/SCsub index 3862a095bab..8538f2745d2 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -18,7 +18,8 @@ SConscript("png/SCsub"); if (env["builtin_zlib"]=="yes"): SConscript("builtin_zlib/SCsub"); -SConscript("rtaudio/SCsub"); +if (env["platform"] == "windows"): + SConscript("rtaudio/SCsub"); SConscript("nrex/SCsub"); SConscript("chibi/SCsub"); if (env["tools"]=="yes"): diff --git a/drivers/rtaudio/SCsub b/drivers/rtaudio/SCsub index 6699efef756..836c84c43c2 100644 --- a/drivers/rtaudio/SCsub +++ b/drivers/rtaudio/SCsub @@ -1,4 +1,18 @@ Import('env') -Export('env'); -env.add_source_files(env.drivers_sources,"*.cpp") +# Not cloning the env, the includes need to be accessible for platform/ + +# Thirdparty source files +thirdparty_dir = "#thirdparty/rtaudio/" +thirdparty_sources = [ + "RtAudio.cpp", +] +thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] + +env.add_source_files(env.drivers_sources, thirdparty_sources) +env.Append(CPPPATH = [thirdparty_dir]) + +# Driver source files +env.add_source_files(env.drivers_sources, "*.cpp") + +Export('env') diff --git a/drivers/rtaudio/audio_driver_rtaudio.cpp b/drivers/rtaudio/audio_driver_rtaudio.cpp index 1bea828680e..fbe7ac68d42 100644 --- a/drivers/rtaudio/audio_driver_rtaudio.cpp +++ b/drivers/rtaudio/audio_driver_rtaudio.cpp @@ -27,8 +27,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "audio_driver_rtaudio.h" + #include "globals.h" #include "os/os.h" + #ifdef RTAUDIO_ENABLED const char* AudioDriverRtAudio::get_name() const { diff --git a/drivers/rtaudio/audio_driver_rtaudio.h b/drivers/rtaudio/audio_driver_rtaudio.h index ccb3d005c10..82055f6d177 100644 --- a/drivers/rtaudio/audio_driver_rtaudio.h +++ b/drivers/rtaudio/audio_driver_rtaudio.h @@ -32,7 +32,8 @@ #ifdef RTAUDIO_ENABLED #include "servers/audio/audio_server_sw.h" -#include "drivers/rtaudio/RtAudio.h" + +#include class AudioDriverRtAudio : public AudioDriverSW { diff --git a/thirdparty/README.md b/thirdparty/README.md index 39809e079c6..f3a18df668c 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -147,6 +147,17 @@ Files extracted from upstream source: - all of them: rg_etc1.{cpp,h} +## rtaudio + +- Upstream: http://www.music.mcgill.ca/~gary/rtaudio/ +- Version: 4.1.2 +- License: MIT-like + +Files extracted from upstream source: + +- RtAudio.{cpp,h} + + ## theora - Upstream: https://www.theora.org diff --git a/drivers/rtaudio/RtAudio.cpp b/thirdparty/rtaudio/RtAudio.cpp similarity index 100% rename from drivers/rtaudio/RtAudio.cpp rename to thirdparty/rtaudio/RtAudio.cpp diff --git a/drivers/rtaudio/RtAudio.h b/thirdparty/rtaudio/RtAudio.h similarity index 100% rename from drivers/rtaudio/RtAudio.h rename to thirdparty/rtaudio/RtAudio.h