Browse Source

rtaudio: Split thirdparty files

Rémi Verschelde 9 years ago
parent
commit
8981ff8a84

+ 2 - 1
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"):

+ 16 - 2
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')

+ 2 - 0
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 {

+ 2 - 1
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 {
 

+ 11 - 0
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

+ 0 - 0
drivers/rtaudio/RtAudio.cpp → thirdparty/rtaudio/RtAudio.cpp


+ 0 - 0
drivers/rtaudio/RtAudio.h → thirdparty/rtaudio/RtAudio.h