summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-10-13 20:58:40 +0200
committerRémi Verschelde <rverschelde@gmail.com>2016-10-15 12:01:25 +0200
commit8981ff8a84e8cc6967afe3a11613e7d72d8ac599 (patch)
tree49b083ad60ddb647b8b0ec99a79cd5ae434067a2
parent5c12c9e69b85023934dc85f3aada03da150556be (diff)
rtaudio: Split thirdparty files
-rw-r--r--drivers/SCsub3
-rw-r--r--drivers/rtaudio/SCsub18
-rw-r--r--drivers/rtaudio/audio_driver_rtaudio.cpp2
-rw-r--r--drivers/rtaudio/audio_driver_rtaudio.h3
-rw-r--r--thirdparty/README.md11
-rw-r--r--thirdparty/rtaudio/RtAudio.cpp (renamed from drivers/rtaudio/RtAudio.cpp)0
-rw-r--r--thirdparty/rtaudio/RtAudio.h (renamed from drivers/rtaudio/RtAudio.h)0
7 files changed, 33 insertions, 4 deletions
diff --git a/drivers/SCsub b/drivers/SCsub
index 3862a095ba..8538f2745d 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 6699efef75..836c84c43c 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 1bea828680..fbe7ac68d4 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 ccb3d005c1..82055f6d17 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 <RtAudio.h>
class AudioDriverRtAudio : public AudioDriverSW {
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 39809e079c..f3a18df668 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
index 04159776f7..04159776f7 100644
--- a/drivers/rtaudio/RtAudio.cpp
+++ b/thirdparty/rtaudio/RtAudio.cpp
diff --git a/drivers/rtaudio/RtAudio.h b/thirdparty/rtaudio/RtAudio.h
index 4392e95f32..4392e95f32 100644
--- a/drivers/rtaudio/RtAudio.h
+++ b/thirdparty/rtaudio/RtAudio.h