diff --git a/SConstruct b/SConstruct
index 1a43d5045f27d9be520b1a68436b294b99a05bc8..a3046071f718c05a52357ef6ee1970252a6fdf2d 100644
--- a/SConstruct
+++ b/SConstruct
@@ -91,8 +91,17 @@ if env["platform"] == "linux":
 						'-fPIC', '-O3', '-ffast-math', '-funroll-loops', 
 						'-fomit-frame-pointer'])
 	env.Append(CXXFLAGS=['-std=c++17'])
+elif env["platform"] == "android":
+	env.Append(CPPDEFINES=['__UNSPECIFIED__', 'HAVE_LIBDL'])
+	env.Append(CFLAGS=['-Wno-int-to-pointer-cast', '-Wno-pointer-to-int-cast',
+						'-Wno-discarded-qualifiers',
+						'-fPIC', '-O3', '-ffast-math', '-funroll-loops', 
+						'-fomit-frame-pointer'])
+	env.Append(CXXFLAGS=['-std=c++17'])
 elif env["platform"] == "windows": 
 	env.Append(CPPDEFINES=['NOMINMAX', '__WINDOWS_DS__', 'PD_INTERNAL'])
+elif env["platform"] == "macos": 
+	env.Append(CPPDEFINES=['NOMINMAX', '__MACOSX_CORE__', 'PD_INTERNAL'])
 
 if env["platform"] == "macos":
 	library = env.SharedLibrary(
diff --git a/src/gdpd.cpp b/src/gdpd.cpp
index 91ee7b071072fa5a6d0d1646dbcd96cfbe4d5ac0..40481dbb3e6a72e75bc434d69ca682fbd43c71d9 100644
--- a/src/gdpd.cpp
+++ b/src/gdpd.cpp
@@ -97,7 +97,6 @@ int GdPd::init_devices(String inputDevice, String outputDevice) {
 	std::string inpStr(inputDevice.utf8().get_data());
 	std::string outStr(outputDevice.utf8().get_data());
 
-
 	for(int d=0; d<m_audio.getDeviceCount(); d++) {
 		std::string n = m_audio.getDeviceInfo(d).name;
 		if(n.compare(inpStr)==0) {
@@ -202,23 +201,25 @@ void GdPd::processAudio(void *outputBuffer, void *inputBuffer,
 	}
 }
 
-void GdPd::openfile(godot::String baseStr, godot::String dirStr) {
+bool GdPd::openfile(godot::String baseStr, godot::String dirStr) {
 	std::string baseS(baseStr.utf8().get_data());
 	std::string dirS(dirStr.utf8().get_data());
 
 	if(m_patchsMap.find(baseS)!=m_patchsMap.end()) {
 		print("Patch "+baseS+" already opened");
-		return;
+		return true;
 	}
 
 	pd::Patch p1 = m_pd.openPatch(baseS.c_str(), dirS.c_str());
 	if(!p1.isValid()) {
 		print("Could not open patch "+baseS);
+        return false;
 	}
 	else {
 		print("Opened patch "+baseS);
 		m_patchsMap[baseS] = p1;
 	}
+    return true;
 }
 
 void GdPd::closefile(godot::String baseStr) {
diff --git a/src/gdpd.h b/src/gdpd.h
index bde2e850b59729c697b4802be5c01337788538a7..d3c491d811dc7b93b5e0d814635336c273e2c93b 100644
--- a/src/gdpd.h
+++ b/src/gdpd.h
@@ -76,7 +76,7 @@ public:
 	int init(int nbInputs, int nbOutputs, int sampleRate, int bufferSize);
 	int start();
 	void stop();
-	void openfile(String basename, String dirname);
+	bool openfile(String basename, String dirname);
 	void closefile(String basename);
 	bool has_message();
 	Array get_next();
diff --git a/src/rtaudio/RtAudio.os b/src/rtaudio/RtAudio.os
index a5bc4699ab088cd25dc56c9930a9e76e7e118ffb..4dd83fb517790ff7e696d80faeef48fc2feb7ed5 100644
Binary files a/src/rtaudio/RtAudio.os and b/src/rtaudio/RtAudio.os differ