diff --git a/examples/AUv3Synth/Builds/MacOSX/AUv3Synth.xcodeproj/project.pbxproj b/examples/AUv3Synth/Builds/MacOSX/AUv3Synth.xcodeproj/project.pbxproj index 24b6da7777..6a03e2db15 100644 --- a/examples/AUv3Synth/Builds/MacOSX/AUv3Synth.xcodeproj/project.pbxproj +++ b/examples/AUv3Synth/Builds/MacOSX/AUv3Synth.xcodeproj/project.pbxproj @@ -189,8 +189,10 @@ A727F6B063FCDB816462D213, ED86208188082DE5EA9381E4, E793574695108F202603BAA5, ); name = Source; sourceTree = ""; }; - 7007C784A0219490DFD18C27 = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; - 0ADE306E346FE4F925722F86 = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; + 7007C784A0219490DFD18C27 = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.11; }; name = Debug; }; + 0ADE306E346FE4F925722F86 = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.11; }; name = Release; }; 653C6C73C56BA201AB6F094C = {isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; diff --git a/examples/AUv3Synth/Builds/iOS/AUv3Synth.xcodeproj/project.pbxproj b/examples/AUv3Synth/Builds/iOS/AUv3Synth.xcodeproj/project.pbxproj index c667ffa2c0..3e81216d85 100644 --- a/examples/AUv3Synth/Builds/iOS/AUv3Synth.xcodeproj/project.pbxproj +++ b/examples/AUv3Synth/Builds/iOS/AUv3Synth.xcodeproj/project.pbxproj @@ -168,8 +168,65 @@ A727F6B063FCDB816462D213, ED86208188082DE5EA9381E4, E793574695108F202603BAA5, ); name = Source; sourceTree = ""; }; - 7007C784A0219490DFD18C27 = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; - 0ADE306E346FE4F925722F86 = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; + 7007C784A0219490DFD18C27 = {isa = XCBuildConfiguration; buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; + CLANG_LINK_OBJC_RUNTIME = NO; + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_DEBUG=1", + "DEBUG=1", + "JUCER_XCODE_IPHONE_5BC26AE3=1", + "JUCE_APP_VERSION=1.0.0", + "JUCE_APP_VERSION_HEX=0x10000", + "JucePlugin_Build_VST=0", + "JucePlugin_Build_VST3=0", + "JucePlugin_Build_AU=0", + "JucePlugin_Build_AUv3=0", + "JucePlugin_Build_RTAS=0", + "JucePlugin_Build_AAX=0", + "JucePlugin_Build_Standalone=0", ); + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); + OTHER_LDFLAGS = "-lAUv3Synth"; + PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; + USE_HEADERMAP = NO; }; name = Debug; }; + 0ADE306E346FE4F925722F86 = {isa = XCBuildConfiguration; buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; + CLANG_LINK_OBJC_RUNTIME = NO; + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; + DEAD_CODE_STRIPPING = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_NDEBUG=1", + "NDEBUG=1", + "JUCER_XCODE_IPHONE_5BC26AE3=1", + "JUCE_APP_VERSION=1.0.0", + "JUCE_APP_VERSION_HEX=0x10000", + "JucePlugin_Build_VST=0", + "JucePlugin_Build_VST3=0", + "JucePlugin_Build_AU=0", + "JucePlugin_Build_AUv3=0", + "JucePlugin_Build_RTAS=0", + "JucePlugin_Build_AAX=0", + "JucePlugin_Build_Standalone=0", ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); + OTHER_LDFLAGS = "-lAUv3Synth"; + PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; + USE_HEADERMAP = NO; }; name = Release; }; DC95EAEBECC74A55CADCD887 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; diff --git a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj index c536f31f5b..521b1026ee 100644 --- a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj +++ b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj @@ -2374,7 +2374,6 @@ - diff --git a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj.filters b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj.filters index f4503ff05b..5f0167f7ee 100644 --- a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj.filters +++ b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj.filters @@ -3989,9 +3989,6 @@ Juce Modules\juce_blocks_basics\protocol - - Juce Modules\juce_blocks_basics - Juce Modules\juce_blocks_basics diff --git a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj index b47a1d92d0..eda083f3ad 100644 --- a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj +++ b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj @@ -2373,7 +2373,6 @@ - diff --git a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj.filters b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj.filters index 02a97a0a71..db192fdf90 100644 --- a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj.filters +++ b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj.filters @@ -3989,9 +3989,6 @@ Juce Modules\juce_blocks_basics\protocol - - Juce Modules\juce_blocks_basics - Juce Modules\juce_blocks_basics diff --git a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj index 73101dd50a..6afa480b3c 100644 --- a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj +++ b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj @@ -2373,7 +2373,6 @@ - diff --git a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj.filters b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj.filters index 5a983ad590..1b1845909b 100644 --- a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj.filters +++ b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj.filters @@ -3986,9 +3986,6 @@ Juce Modules\juce_blocks_basics\protocol - - Juce Modules\juce_blocks_basics - Juce Modules\juce_blocks_basics diff --git a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj index c18e490c5a..447c821c09 100644 --- a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj +++ b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj @@ -2372,7 +2372,6 @@ - diff --git a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj.filters b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj.filters index c4886f1fb1..c0a5fb4d10 100644 --- a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj.filters +++ b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj.filters @@ -3986,9 +3986,6 @@ Juce Modules\juce_blocks_basics\protocol - - Juce Modules\juce_blocks_basics - Juce Modules\juce_blocks_basics diff --git a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj index e64481549a..cc9a3e2479 100644 --- a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj +++ b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj @@ -2375,7 +2375,6 @@ - diff --git a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj.filters b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj.filters index 8224e8a791..e7cebe40b8 100644 --- a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj.filters +++ b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj.filters @@ -3995,9 +3995,6 @@ Juce Modules\juce_blocks_basics\protocol - - Juce Modules\juce_blocks_basics - Juce Modules\juce_blocks_basics diff --git a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj index f8eac38956..a52cbdc08d 100644 --- a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj +++ b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj @@ -2374,7 +2374,6 @@ - diff --git a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj.filters b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj.filters index 8be635431e..471b93978f 100644 --- a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj.filters +++ b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj.filters @@ -3995,9 +3995,6 @@ Juce Modules\juce_blocks_basics\protocol - - Juce Modules\juce_blocks_basics - Juce Modules\juce_blocks_basics diff --git a/examples/DSP module plugin demo/Builds/MacOSX/DSPModulePluginDemo.xcodeproj/project.pbxproj b/examples/DSP module plugin demo/Builds/MacOSX/DSPModulePluginDemo.xcodeproj/project.pbxproj index 6d574f9047..1c08edf6aa 100644 --- a/examples/DSP module plugin demo/Builds/MacOSX/DSPModulePluginDemo.xcodeproj/project.pbxproj +++ b/examples/DSP module plugin demo/Builds/MacOSX/DSPModulePluginDemo.xcodeproj/project.pbxproj @@ -196,8 +196,10 @@ 2C63AEF93C2B69C8D277B2E9, 9D498CA55622293EBF2B5541, ECAB40FE9EE9DADDD1A046A7, ); name = Source; sourceTree = ""; }; - F9CE5A87AC1D6AC6825FFFC3 = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; - A013BD29D257623287C95474 = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; + F9CE5A87AC1D6AC6825FFFC3 = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.9; }; name = Debug; }; + A013BD29D257623287C95474 = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.9; }; name = Release; }; CFDBE7ED06E755632B329B37 = {isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++14"; CLANG_LINK_OBJC_RUNTIME = NO; diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_SharedCode.vcxproj b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_SharedCode.vcxproj index a9e5a3ef76..c7b52988c6 100644 --- a/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_SharedCode.vcxproj +++ b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_SharedCode.vcxproj @@ -996,6 +996,9 @@ true + + true + true @@ -2253,6 +2256,7 @@ + diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_SharedCode.vcxproj.filters b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_SharedCode.vcxproj.filters index 49fc61c02e..7462893d24 100644 --- a/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_SharedCode.vcxproj.filters +++ b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_SharedCode.vcxproj.filters @@ -1306,6 +1306,9 @@ Juce Modules\juce_dsp\processors + + Juce Modules\juce_dsp\processors + Juce Modules\juce_dsp @@ -3456,6 +3459,9 @@ Juce Modules\juce_dsp\processors + + Juce Modules\juce_dsp\processors + Juce Modules\juce_dsp\processors diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_SharedCode.vcxproj b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_SharedCode.vcxproj index e42b0d6e06..9b00b7ae84 100644 --- a/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_SharedCode.vcxproj +++ b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_SharedCode.vcxproj @@ -997,6 +997,9 @@ true + + true + true @@ -2254,6 +2257,7 @@ + diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_SharedCode.vcxproj.filters b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_SharedCode.vcxproj.filters index 99010eed29..fcb1682bf7 100644 --- a/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_SharedCode.vcxproj.filters +++ b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_SharedCode.vcxproj.filters @@ -1306,6 +1306,9 @@ Juce Modules\juce_dsp\processors + + Juce Modules\juce_dsp\processors + Juce Modules\juce_dsp @@ -3456,6 +3459,9 @@ Juce Modules\juce_dsp\processors + + Juce Modules\juce_dsp\processors + Juce Modules\juce_dsp\processors diff --git a/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo_App.vcxproj b/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo_App.vcxproj index 1eecc5dff2..267f5ca2c2 100644 --- a/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo_App.vcxproj +++ b/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo_App.vcxproj @@ -933,6 +933,9 @@ true + + true + true @@ -2113,6 +2116,7 @@ + diff --git a/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo_App.vcxproj.filters b/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo_App.vcxproj.filters index 6919a9421b..6ba3222e8d 100644 --- a/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo_App.vcxproj.filters +++ b/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo_App.vcxproj.filters @@ -1225,6 +1225,9 @@ Juce Modules\juce_dsp\processors + + Juce Modules\juce_dsp\processors + Juce Modules\juce_dsp @@ -3201,6 +3204,9 @@ Juce Modules\juce_dsp\processors + + Juce Modules\juce_dsp\processors + Juce Modules\juce_dsp\processors diff --git a/examples/Demo/Builds/Android/app/src/main/java/com/yourcompany/jucedemo/JuceDemo.java b/examples/Demo/Builds/Android/app/src/main/java/com/yourcompany/jucedemo/JuceDemo.java index 4d4dccb4d1..4b248803c6 100644 --- a/examples/Demo/Builds/Android/app/src/main/java/com/yourcompany/jucedemo/JuceDemo.java +++ b/examples/Demo/Builds/Android/app/src/main/java/com/yourcompany/jucedemo/JuceDemo.java @@ -1032,36 +1032,30 @@ public class JuceDemo extends Activity public final boolean connect() { - try + synchronized (createStreamLock) { + if (hasBeenCancelled.get()) + return false; + try { - synchronized (createStreamLock) + try { - if (hasBeenCancelled.get()) - return false; - inputStream = getCancellableStream (true); } - } - catch (ExecutionException e) - { - if (connection.getResponseCode() < 400) + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally { statusCode[0] = connection.getResponseCode(); - connection.disconnect(); - return false; } - } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - synchronized (createStreamLock) - { - if (hasBeenCancelled.get()) - return false; try { @@ -1072,49 +1066,89 @@ public class JuceDemo extends Activity } catch (ExecutionException e) {} + + for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) + if (entry.getKey() != null && entry.getValue() != null) + responseHeaders.append (entry.getKey() + ": " + + android.text.TextUtils.join (",", entry.getValue()) + "\n"); + + return true; + } + catch (IOException e) + { + return false; } - - for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) - if (entry.getKey() != null && entry.getValue() != null) - responseHeaders.append (entry.getKey() + ": " - + android.text.TextUtils.join (",", entry.getValue()) + "\n"); - - return true; } - catch (IOException e) + } + + static class DisconnectionRunnable implements Runnable + { + public DisconnectionRunnable (HttpURLConnection theConnection, + InputStream theInputStream, + ReentrantLock theCreateStreamLock, + Object theCreateFutureLock, + Future theStreamFuture) { - return false; + connectionToDisconnect = theConnection; + inputStream = theInputStream; + createStreamLock = theCreateStreamLock; + createFutureLock = theCreateFutureLock; + streamFuture = theStreamFuture; } + + public void run() + { + try + { + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (connectionToDisconnect != null) + connectionToDisconnect.disconnect(); + + if (inputStream != null) + inputStream.close(); + } + catch (IOException e) + {} + finally + { + createStreamLock.unlock(); + } + } + + private HttpURLConnection connectionToDisconnect; + private InputStream inputStream; + private ReentrantLock createStreamLock; + private Object createFutureLock; + Future streamFuture; } public final void release() { - hasBeenCancelled.set (true); + DisconnectionRunnable disconnectionRunnable = new DisconnectionRunnable (connection, + inputStream, + createStreamLock, + createFutureLock, + streamFuture); - try + synchronized (createStreamLock) { - if (! createStreamLock.tryLock()) - { - synchronized (createFutureLock) - { - if (streamFuture != null) - streamFuture.cancel (true); - } + hasBeenCancelled.set (true); - createStreamLock.lock(); - } - - if (inputStream != null) - inputStream.close(); - } - catch (IOException e) - {} - finally - { - createStreamLock.unlock(); + connection = null; } - connection.disconnect(); + Thread disconnectionThread = new Thread(disconnectionRunnable); + disconnectionThread.start(); } public final int read (byte[] buffer, int numBytes) diff --git a/examples/InAppPurchase/Builds/Android/app/src/main/java/com/roli/juceinapppurchasesample/InAppPurchase.java b/examples/InAppPurchase/Builds/Android/app/src/main/java/com/roli/juceinapppurchasesample/InAppPurchase.java index 5812b5994b..3843d8fa1c 100644 --- a/examples/InAppPurchase/Builds/Android/app/src/main/java/com/roli/juceinapppurchasesample/InAppPurchase.java +++ b/examples/InAppPurchase/Builds/Android/app/src/main/java/com/roli/juceinapppurchasesample/InAppPurchase.java @@ -1032,36 +1032,30 @@ public class InAppPurchase extends Activity public final boolean connect() { - try + synchronized (createStreamLock) { + if (hasBeenCancelled.get()) + return false; + try { - synchronized (createStreamLock) + try { - if (hasBeenCancelled.get()) - return false; - inputStream = getCancellableStream (true); } - } - catch (ExecutionException e) - { - if (connection.getResponseCode() < 400) + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally { statusCode[0] = connection.getResponseCode(); - connection.disconnect(); - return false; } - } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - synchronized (createStreamLock) - { - if (hasBeenCancelled.get()) - return false; try { @@ -1072,49 +1066,89 @@ public class InAppPurchase extends Activity } catch (ExecutionException e) {} + + for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) + if (entry.getKey() != null && entry.getValue() != null) + responseHeaders.append (entry.getKey() + ": " + + android.text.TextUtils.join (",", entry.getValue()) + "\n"); + + return true; + } + catch (IOException e) + { + return false; } - - for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) - if (entry.getKey() != null && entry.getValue() != null) - responseHeaders.append (entry.getKey() + ": " - + android.text.TextUtils.join (",", entry.getValue()) + "\n"); - - return true; } - catch (IOException e) + } + + static class DisconnectionRunnable implements Runnable + { + public DisconnectionRunnable (HttpURLConnection theConnection, + InputStream theInputStream, + ReentrantLock theCreateStreamLock, + Object theCreateFutureLock, + Future theStreamFuture) { - return false; + connectionToDisconnect = theConnection; + inputStream = theInputStream; + createStreamLock = theCreateStreamLock; + createFutureLock = theCreateFutureLock; + streamFuture = theStreamFuture; } + + public void run() + { + try + { + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (connectionToDisconnect != null) + connectionToDisconnect.disconnect(); + + if (inputStream != null) + inputStream.close(); + } + catch (IOException e) + {} + finally + { + createStreamLock.unlock(); + } + } + + private HttpURLConnection connectionToDisconnect; + private InputStream inputStream; + private ReentrantLock createStreamLock; + private Object createFutureLock; + Future streamFuture; } public final void release() { - hasBeenCancelled.set (true); + DisconnectionRunnable disconnectionRunnable = new DisconnectionRunnable (connection, + inputStream, + createStreamLock, + createFutureLock, + streamFuture); - try + synchronized (createStreamLock) { - if (! createStreamLock.tryLock()) - { - synchronized (createFutureLock) - { - if (streamFuture != null) - streamFuture.cancel (true); - } + hasBeenCancelled.set (true); - createStreamLock.lock(); - } - - if (inputStream != null) - inputStream.close(); - } - catch (IOException e) - {} - finally - { - createStreamLock.unlock(); + connection = null; } - connection.disconnect(); + Thread disconnectionThread = new Thread(disconnectionRunnable); + disconnectionThread.start(); } public final int read (byte[] buffer, int numBytes) diff --git a/examples/MidiTest/Builds/Android/app/src/main/java/com/yourcompany/miditest/MidiTest.java b/examples/MidiTest/Builds/Android/app/src/main/java/com/yourcompany/miditest/MidiTest.java index 63019be709..9afbb4fa1d 100644 --- a/examples/MidiTest/Builds/Android/app/src/main/java/com/yourcompany/miditest/MidiTest.java +++ b/examples/MidiTest/Builds/Android/app/src/main/java/com/yourcompany/miditest/MidiTest.java @@ -1961,36 +1961,30 @@ public class MidiTest extends Activity public final boolean connect() { - try + synchronized (createStreamLock) { + if (hasBeenCancelled.get()) + return false; + try { - synchronized (createStreamLock) + try { - if (hasBeenCancelled.get()) - return false; - inputStream = getCancellableStream (true); } - } - catch (ExecutionException e) - { - if (connection.getResponseCode() < 400) + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally { statusCode[0] = connection.getResponseCode(); - connection.disconnect(); - return false; } - } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - synchronized (createStreamLock) - { - if (hasBeenCancelled.get()) - return false; try { @@ -2001,49 +1995,89 @@ public class MidiTest extends Activity } catch (ExecutionException e) {} + + for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) + if (entry.getKey() != null && entry.getValue() != null) + responseHeaders.append (entry.getKey() + ": " + + android.text.TextUtils.join (",", entry.getValue()) + "\n"); + + return true; + } + catch (IOException e) + { + return false; } - - for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) - if (entry.getKey() != null && entry.getValue() != null) - responseHeaders.append (entry.getKey() + ": " - + android.text.TextUtils.join (",", entry.getValue()) + "\n"); - - return true; } - catch (IOException e) + } + + static class DisconnectionRunnable implements Runnable + { + public DisconnectionRunnable (HttpURLConnection theConnection, + InputStream theInputStream, + ReentrantLock theCreateStreamLock, + Object theCreateFutureLock, + Future theStreamFuture) { - return false; + connectionToDisconnect = theConnection; + inputStream = theInputStream; + createStreamLock = theCreateStreamLock; + createFutureLock = theCreateFutureLock; + streamFuture = theStreamFuture; } + + public void run() + { + try + { + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (connectionToDisconnect != null) + connectionToDisconnect.disconnect(); + + if (inputStream != null) + inputStream.close(); + } + catch (IOException e) + {} + finally + { + createStreamLock.unlock(); + } + } + + private HttpURLConnection connectionToDisconnect; + private InputStream inputStream; + private ReentrantLock createStreamLock; + private Object createFutureLock; + Future streamFuture; } public final void release() { - hasBeenCancelled.set (true); + DisconnectionRunnable disconnectionRunnable = new DisconnectionRunnable (connection, + inputStream, + createStreamLock, + createFutureLock, + streamFuture); - try + synchronized (createStreamLock) { - if (! createStreamLock.tryLock()) - { - synchronized (createFutureLock) - { - if (streamFuture != null) - streamFuture.cancel (true); - } + hasBeenCancelled.set (true); - createStreamLock.lock(); - } - - if (inputStream != null) - inputStream.close(); - } - catch (IOException e) - {} - finally - { - createStreamLock.unlock(); + connection = null; } - connection.disconnect(); + Thread disconnectionThread = new Thread(disconnectionRunnable); + disconnectionThread.start(); } public final int read (byte[] buffer, int numBytes) diff --git a/examples/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo.java b/examples/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo.java index 064670f16e..c8085c28d3 100644 --- a/examples/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo.java +++ b/examples/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo.java @@ -1032,36 +1032,30 @@ public class JUCENetworkGraphicsDemo extends Activity public final boolean connect() { - try + synchronized (createStreamLock) { + if (hasBeenCancelled.get()) + return false; + try { - synchronized (createStreamLock) + try { - if (hasBeenCancelled.get()) - return false; - inputStream = getCancellableStream (true); } - } - catch (ExecutionException e) - { - if (connection.getResponseCode() < 400) + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally { statusCode[0] = connection.getResponseCode(); - connection.disconnect(); - return false; } - } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - synchronized (createStreamLock) - { - if (hasBeenCancelled.get()) - return false; try { @@ -1072,49 +1066,89 @@ public class JUCENetworkGraphicsDemo extends Activity } catch (ExecutionException e) {} + + for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) + if (entry.getKey() != null && entry.getValue() != null) + responseHeaders.append (entry.getKey() + ": " + + android.text.TextUtils.join (",", entry.getValue()) + "\n"); + + return true; + } + catch (IOException e) + { + return false; } - - for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) - if (entry.getKey() != null && entry.getValue() != null) - responseHeaders.append (entry.getKey() + ": " - + android.text.TextUtils.join (",", entry.getValue()) + "\n"); - - return true; } - catch (IOException e) + } + + static class DisconnectionRunnable implements Runnable + { + public DisconnectionRunnable (HttpURLConnection theConnection, + InputStream theInputStream, + ReentrantLock theCreateStreamLock, + Object theCreateFutureLock, + Future theStreamFuture) { - return false; + connectionToDisconnect = theConnection; + inputStream = theInputStream; + createStreamLock = theCreateStreamLock; + createFutureLock = theCreateFutureLock; + streamFuture = theStreamFuture; } + + public void run() + { + try + { + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (connectionToDisconnect != null) + connectionToDisconnect.disconnect(); + + if (inputStream != null) + inputStream.close(); + } + catch (IOException e) + {} + finally + { + createStreamLock.unlock(); + } + } + + private HttpURLConnection connectionToDisconnect; + private InputStream inputStream; + private ReentrantLock createStreamLock; + private Object createFutureLock; + Future streamFuture; } public final void release() { - hasBeenCancelled.set (true); + DisconnectionRunnable disconnectionRunnable = new DisconnectionRunnable (connection, + inputStream, + createStreamLock, + createFutureLock, + streamFuture); - try + synchronized (createStreamLock) { - if (! createStreamLock.tryLock()) - { - synchronized (createFutureLock) - { - if (streamFuture != null) - streamFuture.cancel (true); - } + hasBeenCancelled.set (true); - createStreamLock.lock(); - } - - if (inputStream != null) - inputStream.close(); - } - catch (IOException e) - {} - finally - { - createStreamLock.unlock(); + connection = null; } - connection.disconnect(); + Thread disconnectionThread = new Thread(disconnectionRunnable); + disconnectionThread.start(); } public final int read (byte[] buffer, int numBytes) diff --git a/examples/OSCReceiver/Builds/Android/app/src/main/java/com/yourcompany/oscreceiver/OSCReceiver.java b/examples/OSCReceiver/Builds/Android/app/src/main/java/com/yourcompany/oscreceiver/OSCReceiver.java index fcf96e3486..a49408d60b 100644 --- a/examples/OSCReceiver/Builds/Android/app/src/main/java/com/yourcompany/oscreceiver/OSCReceiver.java +++ b/examples/OSCReceiver/Builds/Android/app/src/main/java/com/yourcompany/oscreceiver/OSCReceiver.java @@ -1032,36 +1032,30 @@ public class OSCReceiver extends Activity public final boolean connect() { - try + synchronized (createStreamLock) { + if (hasBeenCancelled.get()) + return false; + try { - synchronized (createStreamLock) + try { - if (hasBeenCancelled.get()) - return false; - inputStream = getCancellableStream (true); } - } - catch (ExecutionException e) - { - if (connection.getResponseCode() < 400) + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally { statusCode[0] = connection.getResponseCode(); - connection.disconnect(); - return false; } - } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - synchronized (createStreamLock) - { - if (hasBeenCancelled.get()) - return false; try { @@ -1072,49 +1066,89 @@ public class OSCReceiver extends Activity } catch (ExecutionException e) {} + + for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) + if (entry.getKey() != null && entry.getValue() != null) + responseHeaders.append (entry.getKey() + ": " + + android.text.TextUtils.join (",", entry.getValue()) + "\n"); + + return true; + } + catch (IOException e) + { + return false; } - - for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) - if (entry.getKey() != null && entry.getValue() != null) - responseHeaders.append (entry.getKey() + ": " - + android.text.TextUtils.join (",", entry.getValue()) + "\n"); - - return true; } - catch (IOException e) + } + + static class DisconnectionRunnable implements Runnable + { + public DisconnectionRunnable (HttpURLConnection theConnection, + InputStream theInputStream, + ReentrantLock theCreateStreamLock, + Object theCreateFutureLock, + Future theStreamFuture) { - return false; + connectionToDisconnect = theConnection; + inputStream = theInputStream; + createStreamLock = theCreateStreamLock; + createFutureLock = theCreateFutureLock; + streamFuture = theStreamFuture; } + + public void run() + { + try + { + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (connectionToDisconnect != null) + connectionToDisconnect.disconnect(); + + if (inputStream != null) + inputStream.close(); + } + catch (IOException e) + {} + finally + { + createStreamLock.unlock(); + } + } + + private HttpURLConnection connectionToDisconnect; + private InputStream inputStream; + private ReentrantLock createStreamLock; + private Object createFutureLock; + Future streamFuture; } public final void release() { - hasBeenCancelled.set (true); + DisconnectionRunnable disconnectionRunnable = new DisconnectionRunnable (connection, + inputStream, + createStreamLock, + createFutureLock, + streamFuture); - try + synchronized (createStreamLock) { - if (! createStreamLock.tryLock()) - { - synchronized (createFutureLock) - { - if (streamFuture != null) - streamFuture.cancel (true); - } + hasBeenCancelled.set (true); - createStreamLock.lock(); - } - - if (inputStream != null) - inputStream.close(); - } - catch (IOException e) - {} - finally - { - createStreamLock.unlock(); + connection = null; } - connection.disconnect(); + Thread disconnectionThread = new Thread(disconnectionRunnable); + disconnectionThread.start(); } public final int read (byte[] buffer, int numBytes) diff --git a/examples/OSCSender/Builds/Android/app/src/main/java/com/yourcompany/oscsender/OSCSender.java b/examples/OSCSender/Builds/Android/app/src/main/java/com/yourcompany/oscsender/OSCSender.java index f450e24b06..fa138371bf 100644 --- a/examples/OSCSender/Builds/Android/app/src/main/java/com/yourcompany/oscsender/OSCSender.java +++ b/examples/OSCSender/Builds/Android/app/src/main/java/com/yourcompany/oscsender/OSCSender.java @@ -1032,36 +1032,30 @@ public class OSCSender extends Activity public final boolean connect() { - try + synchronized (createStreamLock) { + if (hasBeenCancelled.get()) + return false; + try { - synchronized (createStreamLock) + try { - if (hasBeenCancelled.get()) - return false; - inputStream = getCancellableStream (true); } - } - catch (ExecutionException e) - { - if (connection.getResponseCode() < 400) + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally { statusCode[0] = connection.getResponseCode(); - connection.disconnect(); - return false; } - } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - synchronized (createStreamLock) - { - if (hasBeenCancelled.get()) - return false; try { @@ -1072,49 +1066,89 @@ public class OSCSender extends Activity } catch (ExecutionException e) {} + + for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) + if (entry.getKey() != null && entry.getValue() != null) + responseHeaders.append (entry.getKey() + ": " + + android.text.TextUtils.join (",", entry.getValue()) + "\n"); + + return true; + } + catch (IOException e) + { + return false; } - - for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) - if (entry.getKey() != null && entry.getValue() != null) - responseHeaders.append (entry.getKey() + ": " - + android.text.TextUtils.join (",", entry.getValue()) + "\n"); - - return true; } - catch (IOException e) + } + + static class DisconnectionRunnable implements Runnable + { + public DisconnectionRunnable (HttpURLConnection theConnection, + InputStream theInputStream, + ReentrantLock theCreateStreamLock, + Object theCreateFutureLock, + Future theStreamFuture) { - return false; + connectionToDisconnect = theConnection; + inputStream = theInputStream; + createStreamLock = theCreateStreamLock; + createFutureLock = theCreateFutureLock; + streamFuture = theStreamFuture; } + + public void run() + { + try + { + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (connectionToDisconnect != null) + connectionToDisconnect.disconnect(); + + if (inputStream != null) + inputStream.close(); + } + catch (IOException e) + {} + finally + { + createStreamLock.unlock(); + } + } + + private HttpURLConnection connectionToDisconnect; + private InputStream inputStream; + private ReentrantLock createStreamLock; + private Object createFutureLock; + Future streamFuture; } public final void release() { - hasBeenCancelled.set (true); + DisconnectionRunnable disconnectionRunnable = new DisconnectionRunnable (connection, + inputStream, + createStreamLock, + createFutureLock, + streamFuture); - try + synchronized (createStreamLock) { - if (! createStreamLock.tryLock()) - { - synchronized (createFutureLock) - { - if (streamFuture != null) - streamFuture.cancel (true); - } + hasBeenCancelled.set (true); - createStreamLock.lock(); - } - - if (inputStream != null) - inputStream.close(); - } - catch (IOException e) - {} - finally - { - createStreamLock.unlock(); + connection = null; } - connection.disconnect(); + Thread disconnectionThread = new Thread(disconnectionRunnable); + disconnectionThread.start(); } public final int read (byte[] buffer, int numBytes) diff --git a/examples/PlugInSamples/Arpeggiator/Builds/MacOSX/Arpeggiator.xcodeproj/project.pbxproj b/examples/PlugInSamples/Arpeggiator/Builds/MacOSX/Arpeggiator.xcodeproj/project.pbxproj index bb76653458..47f841c73f 100644 --- a/examples/PlugInSamples/Arpeggiator/Builds/MacOSX/Arpeggiator.xcodeproj/project.pbxproj +++ b/examples/PlugInSamples/Arpeggiator/Builds/MacOSX/Arpeggiator.xcodeproj/project.pbxproj @@ -176,8 +176,10 @@ 467A24411BA7A185B2C53178, 61D8F5CF64FE3EC528B85D1B, 34E9DBEC61D3C0809DAF1AB4, ); name = Source; sourceTree = ""; }; - 6A83695CF366C87636A392BE = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; - 024F8B1B5C243015CA8FEF35 = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; + 6A83695CF366C87636A392BE = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.10; }; name = Debug; }; + 024F8B1B5C243015CA8FEF35 = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.10; }; name = Release; }; D83A1735FBD5B491316453B8 = {isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; diff --git a/examples/PlugInSamples/GainPlugIn/Builds/MacOSX/GainPlugIn.xcodeproj/project.pbxproj b/examples/PlugInSamples/GainPlugIn/Builds/MacOSX/GainPlugIn.xcodeproj/project.pbxproj index 2a76e40d44..b0ce1b20f6 100644 --- a/examples/PlugInSamples/GainPlugIn/Builds/MacOSX/GainPlugIn.xcodeproj/project.pbxproj +++ b/examples/PlugInSamples/GainPlugIn/Builds/MacOSX/GainPlugIn.xcodeproj/project.pbxproj @@ -184,8 +184,10 @@ 1402E3C0F79281C4BD943CA0, 00DE399BF0EF1D2BB5C99DF6, 48602625ABE5D301DEFFE36D, ); name = Source; sourceTree = ""; }; - 28E3B1FE50FFC5B2A58897A0 = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; - 987E131B9EAD1C8CE9786F9C = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; + 28E3B1FE50FFC5B2A58897A0 = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.10; }; name = Debug; }; + 987E131B9EAD1C8CE9786F9C = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.10; }; name = Release; }; 2258034E5AABF301ACB109C1 = {isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; diff --git a/examples/PlugInSamples/InterAppAudioEffect/Builds/iOS/InterAppAudioEffect.xcodeproj/project.pbxproj b/examples/PlugInSamples/InterAppAudioEffect/Builds/iOS/InterAppAudioEffect.xcodeproj/project.pbxproj index e60ed6f752..f73f6e8b5b 100644 --- a/examples/PlugInSamples/InterAppAudioEffect/Builds/iOS/InterAppAudioEffect.xcodeproj/project.pbxproj +++ b/examples/PlugInSamples/InterAppAudioEffect/Builds/iOS/InterAppAudioEffect.xcodeproj/project.pbxproj @@ -149,8 +149,65 @@ E1CFC4C60E9EC5DBE60DB32F, BF7815807DD5B5FAF4BC3669, 196E6AA022E8A0902AB15281, ); name = Source; sourceTree = ""; }; - 22DBBF091193373BEA063A5B = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; - 54D411166886E8F3BBC0E25F = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; + 22DBBF091193373BEA063A5B = {isa = XCBuildConfiguration; buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; + CLANG_LINK_OBJC_RUNTIME = NO; + COMBINE_HIDPI_IMAGES = YES; + CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_DEBUG=1", + "DEBUG=1", + "JUCER_XCODE_IPHONE_5BC26AE3=1", + "JUCE_APP_VERSION=1.0.0", + "JUCE_APP_VERSION_HEX=0x10000", + "JucePlugin_Build_VST=0", + "JucePlugin_Build_VST3=0", + "JucePlugin_Build_AU=0", + "JucePlugin_Build_AUv3=0", + "JucePlugin_Build_RTAS=0", + "JucePlugin_Build_AAX=0", + "JucePlugin_Build_Standalone=0", ); + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "../../../../../modules/juce_audio_plugin_client", "$(inherited)"); + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion"; + OTHER_LDFLAGS = "-lInterAppAudioEffect"; + PRODUCT_BUNDLE_IDENTIFIER = com.roli.InterAppAudioEffect; + USE_HEADERMAP = NO; }; name = Debug; }; + 54D411166886E8F3BBC0E25F = {isa = XCBuildConfiguration; buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; + CLANG_LINK_OBJC_RUNTIME = NO; + COMBINE_HIDPI_IMAGES = YES; + CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; + DEAD_CODE_STRIPPING = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_NDEBUG=1", + "NDEBUG=1", + "JUCER_XCODE_IPHONE_5BC26AE3=1", + "JUCE_APP_VERSION=1.0.0", + "JUCE_APP_VERSION_HEX=0x10000", + "JucePlugin_Build_VST=0", + "JucePlugin_Build_VST3=0", + "JucePlugin_Build_AU=0", + "JucePlugin_Build_AUv3=0", + "JucePlugin_Build_RTAS=0", + "JucePlugin_Build_AAX=0", + "JucePlugin_Build_Standalone=0", ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "../../../../../modules/juce_audio_plugin_client", "$(inherited)"); + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion"; + OTHER_LDFLAGS = "-lInterAppAudioEffect"; + PRODUCT_BUNDLE_IDENTIFIER = com.roli.InterAppAudioEffect; + USE_HEADERMAP = NO; }; name = Release; }; 8DA1E39A676F877EB549B8CA = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; diff --git a/examples/PlugInSamples/MultiOutSynth/Builds/MacOSX/MultiOutSynth.xcodeproj/project.pbxproj b/examples/PlugInSamples/MultiOutSynth/Builds/MacOSX/MultiOutSynth.xcodeproj/project.pbxproj index 218df3a56b..606d141055 100644 --- a/examples/PlugInSamples/MultiOutSynth/Builds/MacOSX/MultiOutSynth.xcodeproj/project.pbxproj +++ b/examples/PlugInSamples/MultiOutSynth/Builds/MacOSX/MultiOutSynth.xcodeproj/project.pbxproj @@ -201,8 +201,10 @@ 3374B9341BF8422BE6EC8CF5, 649BBC267932DD53D319C8C1, AE89DBCAA3968A3BB77128E3, ); name = Source; sourceTree = ""; }; - 326E2BA4D324D09F4A7F0A63 = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; - B4227B6386A801962DC6DE9F = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; + 326E2BA4D324D09F4A7F0A63 = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.11; }; name = Debug; }; + B4227B6386A801962DC6DE9F = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.11; }; name = Release; }; 5F2A5A5FDFB771E794E04854 = {isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; diff --git a/examples/PlugInSamples/NoiseGate/Builds/MacOSX/NoiseGate.xcodeproj/project.pbxproj b/examples/PlugInSamples/NoiseGate/Builds/MacOSX/NoiseGate.xcodeproj/project.pbxproj index 48a7110d2c..0b1339f6ae 100644 --- a/examples/PlugInSamples/NoiseGate/Builds/MacOSX/NoiseGate.xcodeproj/project.pbxproj +++ b/examples/PlugInSamples/NoiseGate/Builds/MacOSX/NoiseGate.xcodeproj/project.pbxproj @@ -192,8 +192,10 @@ 9B6AD2ED2150F45A460973C6, 2D45B9382F864E0FC39A7D86, C54CA0425B4BECD39E226F8F, ); name = Source; sourceTree = ""; }; - D43C967D02EDDCC29FB7059C = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; - EEA93C1E6EEC110939D1685F = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; + D43C967D02EDDCC29FB7059C = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.10; }; name = Debug; }; + EEA93C1E6EEC110939D1685F = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.10; }; name = Release; }; BA984224A933EC837F514164 = {isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; diff --git a/examples/PlugInSamples/Surround/Builds/LinuxMakefile/Makefile b/examples/PlugInSamples/Surround/Builds/LinuxMakefile/Makefile index 53a6892ae3..95e9d115ec 100644 --- a/examples/PlugInSamples/Surround/Builds/LinuxMakefile/Makefile +++ b/examples/PlugInSamples/Surround/Builds/LinuxMakefile/Makefile @@ -36,7 +36,7 @@ ifeq ($(CONFIG),Debug) JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_VST := -DJucePlugin_Build_VST=1 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0 - JUCE_CFLAGS_VST := -fPIC + JUCE_CFLAGS_VST := -fPIC -fvisibility=hidden JUCE_LDFLAGS_VST := -shared -Wl,--no-undefined JUCE_TARGET_VST := Surround.so @@ -63,7 +63,7 @@ ifeq ($(CONFIG),Release) JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_VST := -DJucePlugin_Build_VST=1 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0 - JUCE_CFLAGS_VST := -fPIC + JUCE_CFLAGS_VST := -fPIC -fvisibility=hidden JUCE_LDFLAGS_VST := -shared -Wl,--no-undefined JUCE_TARGET_VST := Surround.so diff --git a/examples/PlugInSamples/Surround/Builds/MacOSX/Surround.xcodeproj/project.pbxproj b/examples/PlugInSamples/Surround/Builds/MacOSX/Surround.xcodeproj/project.pbxproj index 8d190bebb2..8069e54983 100644 --- a/examples/PlugInSamples/Surround/Builds/MacOSX/Surround.xcodeproj/project.pbxproj +++ b/examples/PlugInSamples/Surround/Builds/MacOSX/Surround.xcodeproj/project.pbxproj @@ -194,8 +194,10 @@ 8EF2160AA74AD33ED1D63DE9, 18B9690A5C364D20F5C100E3, 0F85B6E4F90C8E9CC5EB8C01, ); name = Source; sourceTree = ""; }; - C73902ED4D2E8620A64FB955 = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; - 10FD9778667189623A2CDD86 = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; + C73902ED4D2E8620A64FB955 = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.11; }; name = Debug; }; + 10FD9778667189623A2CDD86 = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.11; }; name = Release; }; EB917BF8D9134F341F138D54 = {isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_CXX_LIBRARY = "libc++"; diff --git a/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj b/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj index 8cbdec5913..3a8bf92187 100644 --- a/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj +++ b/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj @@ -924,6 +924,9 @@ true + + true + true @@ -2101,6 +2104,7 @@ + diff --git a/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj.filters b/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj.filters index 99b8d8d602..02d6faaeb1 100644 --- a/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj.filters +++ b/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj.filters @@ -1189,6 +1189,9 @@ Juce Modules\juce_dsp\processors + + Juce Modules\juce_dsp\processors + Juce Modules\juce_dsp @@ -3156,6 +3159,9 @@ Juce Modules\juce_dsp\processors + + Juce Modules\juce_dsp\processors + Juce Modules\juce_dsp\processors diff --git a/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj b/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj index 1779878c91..ba3d54de37 100644 --- a/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj +++ b/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj @@ -923,6 +923,9 @@ true + + true + true @@ -2100,6 +2103,7 @@ + diff --git a/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj.filters b/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj.filters index cb1d374cb1..2672a1001f 100644 --- a/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj.filters +++ b/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj.filters @@ -1189,6 +1189,9 @@ Juce Modules\juce_dsp\processors + + Juce Modules\juce_dsp\processors + Juce Modules\juce_dsp @@ -3156,6 +3159,9 @@ Juce Modules\juce_dsp\processors + + Juce Modules\juce_dsp\processors + Juce Modules\juce_dsp\processors diff --git a/examples/audio plugin demo/Builds/Android/app/src/main/java/com/juce/jucedemoplugin/JuceDemoPlugin.java b/examples/audio plugin demo/Builds/Android/app/src/main/java/com/juce/jucedemoplugin/JuceDemoPlugin.java index 3a4e314092..c76005c03c 100644 --- a/examples/audio plugin demo/Builds/Android/app/src/main/java/com/juce/jucedemoplugin/JuceDemoPlugin.java +++ b/examples/audio plugin demo/Builds/Android/app/src/main/java/com/juce/jucedemoplugin/JuceDemoPlugin.java @@ -1961,36 +1961,30 @@ public class JuceDemoPlugin extends Activity public final boolean connect() { - try + synchronized (createStreamLock) { + if (hasBeenCancelled.get()) + return false; + try { - synchronized (createStreamLock) + try { - if (hasBeenCancelled.get()) - return false; - inputStream = getCancellableStream (true); } - } - catch (ExecutionException e) - { - if (connection.getResponseCode() < 400) + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally { statusCode[0] = connection.getResponseCode(); - connection.disconnect(); - return false; } - } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - synchronized (createStreamLock) - { - if (hasBeenCancelled.get()) - return false; try { @@ -2001,49 +1995,89 @@ public class JuceDemoPlugin extends Activity } catch (ExecutionException e) {} + + for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) + if (entry.getKey() != null && entry.getValue() != null) + responseHeaders.append (entry.getKey() + ": " + + android.text.TextUtils.join (",", entry.getValue()) + "\n"); + + return true; + } + catch (IOException e) + { + return false; } - - for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) - if (entry.getKey() != null && entry.getValue() != null) - responseHeaders.append (entry.getKey() + ": " - + android.text.TextUtils.join (",", entry.getValue()) + "\n"); - - return true; } - catch (IOException e) + } + + static class DisconnectionRunnable implements Runnable + { + public DisconnectionRunnable (HttpURLConnection theConnection, + InputStream theInputStream, + ReentrantLock theCreateStreamLock, + Object theCreateFutureLock, + Future theStreamFuture) { - return false; + connectionToDisconnect = theConnection; + inputStream = theInputStream; + createStreamLock = theCreateStreamLock; + createFutureLock = theCreateFutureLock; + streamFuture = theStreamFuture; } + + public void run() + { + try + { + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (connectionToDisconnect != null) + connectionToDisconnect.disconnect(); + + if (inputStream != null) + inputStream.close(); + } + catch (IOException e) + {} + finally + { + createStreamLock.unlock(); + } + } + + private HttpURLConnection connectionToDisconnect; + private InputStream inputStream; + private ReentrantLock createStreamLock; + private Object createFutureLock; + Future streamFuture; } public final void release() { - hasBeenCancelled.set (true); + DisconnectionRunnable disconnectionRunnable = new DisconnectionRunnable (connection, + inputStream, + createStreamLock, + createFutureLock, + streamFuture); - try + synchronized (createStreamLock) { - if (! createStreamLock.tryLock()) - { - synchronized (createFutureLock) - { - if (streamFuture != null) - streamFuture.cancel (true); - } + hasBeenCancelled.set (true); - createStreamLock.lock(); - } - - if (inputStream != null) - inputStream.close(); - } - catch (IOException e) - {} - finally - { - createStreamLock.unlock(); + connection = null; } - connection.disconnect(); + Thread disconnectionThread = new Thread(disconnectionRunnable); + disconnectionThread.start(); } public final int read (byte[] buffer, int numBytes) diff --git a/examples/audio plugin demo/Builds/LinuxMakefile/Makefile b/examples/audio plugin demo/Builds/LinuxMakefile/Makefile index e1d27502d3..8cc994b61b 100644 --- a/examples/audio plugin demo/Builds/LinuxMakefile/Makefile +++ b/examples/audio plugin demo/Builds/LinuxMakefile/Makefile @@ -36,7 +36,7 @@ ifeq ($(CONFIG),Debug) JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_VST := -DJucePlugin_Build_VST=1 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0 - JUCE_CFLAGS_VST := -fPIC + JUCE_CFLAGS_VST := -fPIC -fvisibility=hidden JUCE_LDFLAGS_VST := -shared -Wl,--no-undefined JUCE_TARGET_VST := JuceDemoPlugin.so @@ -66,7 +66,7 @@ ifeq ($(CONFIG),Release) JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_VST := -DJucePlugin_Build_VST=1 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0 - JUCE_CFLAGS_VST := -fPIC + JUCE_CFLAGS_VST := -fPIC -fvisibility=hidden JUCE_LDFLAGS_VST := -shared -Wl,--no-undefined JUCE_TARGET_VST := JuceDemoPlugin.so diff --git a/examples/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj b/examples/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj index efd9fa86ed..689b7b956c 100644 --- a/examples/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj +++ b/examples/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj @@ -183,8 +183,10 @@ 239B4D5DE50B3B7A16114C15, 7EA0AEAFB626CDF5E0038ED5, 227AE5B2ACBB7881D9552404, ); name = Source; sourceTree = ""; }; - 155E2212057EC38829899A3C = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; - 103368FE85719AF0B91BA072 = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; + 155E2212057EC38829899A3C = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.11; }; name = Debug; }; + 103368FE85719AF0B91BA072 = {isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.11; }; name = Release; }; A4B12DFADE1730C6014F332B = {isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; CLANG_CXX_LANGUAGE_STANDARD = "c++11"; diff --git a/examples/audio plugin demo/Builds/iOS/JuceDemoPlugin.xcodeproj/project.pbxproj b/examples/audio plugin demo/Builds/iOS/JuceDemoPlugin.xcodeproj/project.pbxproj index 5dbfd681a3..78c735ac47 100644 --- a/examples/audio plugin demo/Builds/iOS/JuceDemoPlugin.xcodeproj/project.pbxproj +++ b/examples/audio plugin demo/Builds/iOS/JuceDemoPlugin.xcodeproj/project.pbxproj @@ -156,8 +156,63 @@ 239B4D5DE50B3B7A16114C15, 7EA0AEAFB626CDF5E0038ED5, 227AE5B2ACBB7881D9552404, ); name = Source; sourceTree = ""; }; - 155E2212057EC38829899A3C = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; - 103368FE85719AF0B91BA072 = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; + 155E2212057EC38829899A3C = {isa = XCBuildConfiguration; buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; + CLANG_LINK_OBJC_RUNTIME = NO; + COMBINE_HIDPI_IMAGES = YES; + CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_DEBUG=1", + "DEBUG=1", + "JUCER_XCODE_IPHONE_5BC26AE3=1", + "JUCE_APP_VERSION=1.0.0", + "JUCE_APP_VERSION_HEX=0x10000", + "JucePlugin_Build_VST=0", + "JucePlugin_Build_VST3=0", + "JucePlugin_Build_AU=0", + "JucePlugin_Build_AUv3=0", + "JucePlugin_Build_RTAS=0", + "JucePlugin_Build_AAX=0", + "JucePlugin_Build_Standalone=0", ); + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); + OTHER_LDFLAGS = "-lJuceDemoPlugin"; + PRODUCT_BUNDLE_IDENTIFIER = com.juce.JuceDemoPlugin; + USE_HEADERMAP = NO; }; name = Debug; }; + 103368FE85719AF0B91BA072 = {isa = XCBuildConfiguration; buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; + CLANG_LINK_OBJC_RUNTIME = NO; + COMBINE_HIDPI_IMAGES = YES; + CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; + DEAD_CODE_STRIPPING = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_NDEBUG=1", + "NDEBUG=1", + "JUCER_XCODE_IPHONE_5BC26AE3=1", + "JUCE_APP_VERSION=1.0.0", + "JUCE_APP_VERSION_HEX=0x10000", + "JucePlugin_Build_VST=0", + "JucePlugin_Build_VST3=0", + "JucePlugin_Build_AU=0", + "JucePlugin_Build_AUv3=0", + "JucePlugin_Build_RTAS=0", + "JucePlugin_Build_AAX=0", + "JucePlugin_Build_Standalone=0", ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); + OTHER_LDFLAGS = "-lJuceDemoPlugin"; + PRODUCT_BUNDLE_IDENTIFIER = com.juce.JuceDemoPlugin; + USE_HEADERMAP = NO; }; name = Release; }; 9847BE636E2825D8B76947EE = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; diff --git a/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/juce/audioperformancetest/AudioPerformanceTest.java b/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/juce/audioperformancetest/AudioPerformanceTest.java index 70fd178b61..5feced2ee7 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/juce/audioperformancetest/AudioPerformanceTest.java +++ b/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/juce/audioperformancetest/AudioPerformanceTest.java @@ -1961,36 +1961,30 @@ public class AudioPerformanceTest extends Activity public final boolean connect() { - try + synchronized (createStreamLock) { + if (hasBeenCancelled.get()) + return false; + try { - synchronized (createStreamLock) + try { - if (hasBeenCancelled.get()) - return false; - inputStream = getCancellableStream (true); } - } - catch (ExecutionException e) - { - if (connection.getResponseCode() < 400) + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally { statusCode[0] = connection.getResponseCode(); - connection.disconnect(); - return false; } - } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - synchronized (createStreamLock) - { - if (hasBeenCancelled.get()) - return false; try { @@ -2001,49 +1995,89 @@ public class AudioPerformanceTest extends Activity } catch (ExecutionException e) {} + + for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) + if (entry.getKey() != null && entry.getValue() != null) + responseHeaders.append (entry.getKey() + ": " + + android.text.TextUtils.join (",", entry.getValue()) + "\n"); + + return true; + } + catch (IOException e) + { + return false; } - - for (java.util.Map.Entry> entry : connection.getHeaderFields().entrySet()) - if (entry.getKey() != null && entry.getValue() != null) - responseHeaders.append (entry.getKey() + ": " - + android.text.TextUtils.join (",", entry.getValue()) + "\n"); - - return true; } - catch (IOException e) + } + + static class DisconnectionRunnable implements Runnable + { + public DisconnectionRunnable (HttpURLConnection theConnection, + InputStream theInputStream, + ReentrantLock theCreateStreamLock, + Object theCreateFutureLock, + Future theStreamFuture) { - return false; + connectionToDisconnect = theConnection; + inputStream = theInputStream; + createStreamLock = theCreateStreamLock; + createFutureLock = theCreateFutureLock; + streamFuture = theStreamFuture; } + + public void run() + { + try + { + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (connectionToDisconnect != null) + connectionToDisconnect.disconnect(); + + if (inputStream != null) + inputStream.close(); + } + catch (IOException e) + {} + finally + { + createStreamLock.unlock(); + } + } + + private HttpURLConnection connectionToDisconnect; + private InputStream inputStream; + private ReentrantLock createStreamLock; + private Object createFutureLock; + Future streamFuture; } public final void release() { - hasBeenCancelled.set (true); + DisconnectionRunnable disconnectionRunnable = new DisconnectionRunnable (connection, + inputStream, + createStreamLock, + createFutureLock, + streamFuture); - try + synchronized (createStreamLock) { - if (! createStreamLock.tryLock()) - { - synchronized (createFutureLock) - { - if (streamFuture != null) - streamFuture.cancel (true); - } + hasBeenCancelled.set (true); - createStreamLock.lock(); - } - - if (inputStream != null) - inputStream.close(); - } - catch (IOException e) - {} - finally - { - createStreamLock.unlock(); + connection = null; } - connection.disconnect(); + Thread disconnectionThread = new Thread(disconnectionRunnable); + disconnectionThread.start(); } public final int read (byte[] buffer, int numBytes) diff --git a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj index 4997073a37..3ceb44471c 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj +++ b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj @@ -962,6 +962,9 @@ true + + true + true @@ -2261,6 +2264,7 @@ + @@ -2562,7 +2566,6 @@ - diff --git a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters index f502228605..ff8c74f21f 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters +++ b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters @@ -1303,6 +1303,9 @@ Juce Modules\juce_dsp\processors + + Juce Modules\juce_dsp\processors + Juce Modules\juce_dsp @@ -3471,6 +3474,9 @@ Juce Modules\juce_dsp\processors + + Juce Modules\juce_dsp\processors + Juce Modules\juce_dsp\processors @@ -4370,9 +4376,6 @@ Juce Modules\juce_blocks_basics\protocol - - Juce Modules\juce_blocks_basics - Juce Modules\juce_blocks_basics