diff --git a/.gitignore b/.gitignore index 6343886cb4..9a27f2f324 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ profile **/VisualStudio2015/x64 **/VisualStudio2017/Win32 **/VisualStudio2017/x64 +**/Builds/x64 **/.vs **/CodeBlocks/bin **/CodeBlocks/obj diff --git a/BREAKING-CHANGES.txt b/BREAKING-CHANGES.txt index c62a0e838b..fd5bbb11cc 100644 --- a/BREAKING-CHANGES.txt +++ b/BREAKING-CHANGES.txt @@ -1,17 +1,99 @@ JUCE breaking changes ===================== +Version 5.1.0 +============= + +Change +------ +The option to set the C++ language standard is now located in the project settings instead of the build configuration settings. + +Possible Issues +--------------- +Projects that had a specific verison of the C++ language standard set for exporter build configurations will instead use the default (C++11) when re-saving with the new Projucer. + +Workaround +---------- +Change the "C++ Language Standard" setting in the main project settings to the required version - the Projucer will add this value to the exported project as a compiler flag when saving exporters. + +Rationale +--------- +Having a different C++ language standard option for each build configuration was unnecessary and was not fully implemented for all exporters. Changing it to a per-project settings means that the preference will propagate to all exporters and only needs to be set in one place. + + +Change +------ +PopupMenus now scale according to the AffineTransform and scaling factor of their target components. + +Possible Issues +--------------- +Developers who have manually scaled their PopupMenus to fit the scaling factor of the parent UI will now have the scaling applied two times in a row. + +Workaround +---------- +1. Do not apply your own manual scaling to make your popups match the UI scaling + +or + +2. Override the Look&Feel method PopupMenu::LookAndFeelMethods::shouldPopupMenuScaleWithTargetComponent and return false. + See https://github.com/WeAreROLI/JUCE/blob/c288c94c2914af20f36c03ca9c5401fcb555e4e9/modules/juce_gui_basics/menus/juce_PopupMenu.h#725 + +Rationale +--------- +Previously, PopupMenus would not scale if the GUI of the target component (or any of it’s parents) were scaled. The only way to scale PopupMenus was via the global scaling factor. This had several drawbacks as the global scaling factor would scale everything. This was especially problematic in plug-in editors. + + +Change +------ +Removed the setSecurityFlags() method from the Windows implementation of WebInputStream as it disabled HTTPS security features. + +Possible Issues +--------------- +Any code previously relying on connections to insecure webpages succeeding will no longer work. + +Workaround +---------- +Check network connectivity on Windows and re-write any code that relied on insecure connections. + +Rationale +--------- +The previous behaviour resulted in network connections on Windows having all the HTTPS security features disabled, exposing users to network attacks. HTTPS connections on Windows are now secure and will fail when connecting to an insecure web address. + + +Change +------ +Pointer arithmetic on a pointer will have the same result regardless if it is wrapped in JUCE's Atomic class or not. + +Possible Issues +--------------- +Any code using pointer arithmetic on Atomic will now have a different result leading to undefined behaviour or crashes. + +Workaround +---------- +Re-write your code in a way that it does not depend on your pointer being wrapped in JUCE's Atomic or not. See rationale. + +Rationale +--------- +Before this change, pointer arithmetic with JUCE's Atomic type would yield confusing results. For example, the following code would assert before this change: + +int* a; Atomic b; + +jassert (++a == ++b); + +Pointer a in the above code would be advanced by sizeof(int) whereas the JUCE's Atomic always advances it's underlying pointer by a single byte. The same is true for operator+=/operator-= and operator--. The difference in behaviour is confusing and unintuitive. Furthermore, this aligns JUCE's Atomic type with std::atomic. + + Version 4.3.1 ============= Change ------ -JUCE has changed the way native VST3/AudioUnit parameter ids are calculated +JUCE has changed the way native VST3/AudioUnit parameter ids are calculated. Possible Issues --------------- -DAW projects with automation data written by an AudioUnit or VST3 plug-in built with pre JUCE 4.3.1 versions will load incorrectly when opened by an AudioUnit or VST3 built with JUCE versions 4.3.1 and later. Plug-ins using JUCE_FORCE_USE_LEGACY_IDS are not affected +DAW projects with automation data written by an AudioUnit or VST3 plug-in built with pre JUCE 4.3.1 versions will load incorrectly when opened by an AudioUnit or VST3 built with JUCE versions 4.3.1 and later. Plug-ins using JUCE_FORCE_USE_LEGACY_IDS are not affected. Workaround ---------- @@ -28,7 +110,7 @@ Version 4.3.0 Change ------ -A revised multi-bus API was released which supersedes the previously flawed multi-bus API - JUCE versions 4.0.0 - 4.2.4 (inclusive) +A revised multi-bus API was released which supersedes the previously flawed multi-bus API - JUCE versions 4.0.0 - 4.2.4 (inclusive). Possible Issues --------------- @@ -36,14 +118,13 @@ If you have developed a plug-in with JUCE versions 4.0.0 - 4.2.4 (inclusive), th Woraround --------- -None +None. Rationale -------- A flawed multi-bus API was introduced with JUCE versions 4.0.0 up until version 4.2.4 (inclusive) which was not API compatible with pre JUCE 4 plug-ins. JUCE 4.3.0 releases a revised multi-bus API which restores pre JUCE 4 API compatibility. However, the new multi-bus API is not compatible with the flawed multi-bus API (JUCE version 4.0.0 - 4.2.4). - Change ------ JUCE now generates the AAX plug-in bus layout configuration id independent from the position as it appears in the Projucer’s legacy “Channel layout configuration” field. @@ -62,12 +143,12 @@ The new multi-bus API offers more features, flexibility and accuracy in specifyi - Version 4.2.1 ============= + Change ------ -JUCE now uses the paramID property used in AudioProcessorParameterWithID to uniquely identify parameters to the host +JUCE now uses the paramID property used in AudioProcessorParameterWithID to uniquely identify parameters to the host. Possible Issues --------------- diff --git a/ChangeList.txt b/ChangeList.txt index 86fe6f48db..2ab0327cd9 100644 --- a/ChangeList.txt +++ b/ChangeList.txt @@ -4,6 +4,18 @@ This file just lists the more notable headline features. For more detailed info about minor changes and bugfixes, please see the git log! +Version 5.1.0 + - Release of the JUCE DSP module + - Multichannel audio readers and writers + - Plugin editor Hi-DPI scaling support + - Major improvements to Projucer module search paths + - Added Projucer support for iOS app groups + - Added support for AVFoundation and deprecated the use of Quicktime + - Added a new real-time audio thread priority for Android + - Various Projucer UI fixes + - Various documentation fixes + - Various minor improvements and bug fixes + Version 5.0.2 - Improved project save speed in the Projucer - Added option to save individual exporters in the Projucer diff --git a/doxygen/Doxyfile b/doxygen/Doxyfile index 6fbfec64a3..c253eb0dbe 100644 --- a/doxygen/Doxyfile +++ b/doxygen/Doxyfile @@ -2058,7 +2058,6 @@ PREDEFINED = WIN32=1 \ JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS=1 \ JUCE_COMPILER_SUPPORTS_VARIADIC_TEMPLATES=1 \ JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL=1 \ - JUCE_COMPILER_SUPPORTS_LAMBDAS=1 \ JUCE_MODAL_LOOPS_PERMITTED=1 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this diff --git a/examples/AUv3Synth/AUv3Synth.jucer b/examples/AUv3Synth/AUv3Synth.jucer index 9747871ba9..4682b230dc 100644 --- a/examples/AUv3Synth/AUv3Synth.jucer +++ b/examples/AUv3Synth/AUv3Synth.jucer @@ -8,9 +8,9 @@ pluginCode="AUv3" pluginChannelConfigs="" pluginIsSynth="1" pluginWantsMidiIn="1" pluginProducesMidiOut="0" pluginIsMidiEffectPlugin="0" pluginEditorRequiresKeys="0" pluginAUExportPrefix="AUv3SynthAU" pluginRTASCategory="" aaxIdentifier="com.roli.development.AUv3Synth" - pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="5.0.2" + pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="5.1.0" buildStandalone="1" enableIAA="0" displaySplashScreen="0" reportAppUsage="0" - splashScreenColour="Dark" companyName="ROLI Ltd."> + splashScreenColour="Dark" companyName="ROLI Ltd." cppLanguageStandard="11"> diff --git a/examples/AUv3Synth/Builds/MacOSX/AUv3Synth.xcodeproj/project.pbxproj b/examples/AUv3Synth/Builds/MacOSX/AUv3Synth.xcodeproj/project.pbxproj index fc4a5ede8f..24b6da7777 100644 --- a/examples/AUv3Synth/Builds/MacOSX/AUv3Synth.xcodeproj/project.pbxproj +++ b/examples/AUv3Synth/Builds/MacOSX/AUv3Synth.xcodeproj/project.pbxproj @@ -192,7 +192,7 @@ 7007C784A0219490DFD18C27 = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; 0ADE306E346FE4F925722F86 = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; 653C6C73C56BA201AB6F094C = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -218,6 +218,7 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-VST.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.11; @@ -228,7 +229,7 @@ USE_HEADERMAP = NO; WRAPPER_EXTENSION = vst; }; name = Debug; }; 19D80348287645B624E0C6B8 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -255,6 +256,7 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-VST.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.11; @@ -265,7 +267,7 @@ USE_HEADERMAP = NO; WRAPPER_EXTENSION = vst; }; name = Release; }; D36AB79B01E390C59B2BBE9E = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -291,6 +293,7 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-VST3.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST3/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.11; @@ -301,7 +304,7 @@ USE_HEADERMAP = NO; WRAPPER_EXTENSION = vst3; }; name = Debug; }; 11C129F26625007CE9DFD618 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -328,6 +331,7 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-VST3.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST3/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.11; @@ -339,7 +343,7 @@ WRAPPER_EXTENSION = vst3; }; name = Release; }; DC95EAEBECC74A55CADCD887 = {isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; CODE_SIGN_ENTITLEMENTS = "AUv3Synth.entitlements"; COMBINE_HIDPI_IMAGES = YES; @@ -363,6 +367,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_AppExtension.plist; + INFOPLIST_PREPROCESS = NO; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-lAUv3Synth"; @@ -371,7 +376,7 @@ USE_HEADERMAP = NO; }; name = Debug; }; 5FAC649347835B831BAE3C41 = {isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; CODE_SIGN_ENTITLEMENTS = "AUv3Synth.entitlements"; COMBINE_HIDPI_IMAGES = YES; @@ -396,6 +401,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_AppExtension.plist; + INFOPLIST_PREPROCESS = NO; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-lAUv3Synth"; @@ -403,7 +409,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Release; }; B3D851DD41548F02C540B34A = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -426,6 +432,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-Standalone_Plugin.plist; + INFOPLIST_PREPROCESS = NO; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-lAUv3Synth"; @@ -433,7 +440,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 635F6CAD05365F797820B5D7 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -457,6 +464,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-Standalone_Plugin.plist; + INFOPLIST_PREPROCESS = NO; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-lAUv3Synth"; @@ -464,7 +472,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Release; }; DBCA8A687AB8CE4F0FDE4C3D = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -494,7 +502,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 5DA389BE0C844A1A9E20FD7C = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -526,16 +534,37 @@ USE_HEADERMAP = NO; }; name = Release; }; D32671708EF2662A51A6335A = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "AUv3Synth"; @@ -543,15 +572,36 @@ ZERO_LINK = NO; }; name = Debug; }; 7C9E7C9B2C1D5310B9194C27 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "AUv3Synth"; WARNING_CFLAGS = -Wreorder; @@ -624,9 +674,6 @@ 3A7896DB2C11717D9046CE5B = {isa = XCConfigurationList; buildConfigurations = ( DC95EAEBECC74A55CADCD887, 5FAC649347835B831BAE3C41, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; - 0306890051760AEBAFEA2099 = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - F56A47BDEEC76681EE80A15E, - 78704983DFEA5408FC5767D8, ); runOnlyForDeploymentPostprocessing = 0; }; E60CDCD59C66D98FB19938F1 = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( EC1B7357C105DC8BC06A0CD4, ); runOnlyForDeploymentPostprocessing = 0; }; 671E50F4F02FC98293270CFC = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -644,7 +691,6 @@ F452B8399A32BE4F1074F596, 69856794EB88963828DDECC6, ); runOnlyForDeploymentPostprocessing = 0; }; 7A046597FDDDB82B78C64AAC = {isa = PBXNativeTarget; buildConfigurationList = 3A7896DB2C11717D9046CE5B; buildPhases = ( - 0306890051760AEBAFEA2099, E60CDCD59C66D98FB19938F1, 671E50F4F02FC98293270CFC, ); buildRules = ( ); dependencies = ( 017B214D817BF0DF53051BB2, ); name = "AUv3Synth - AUv3 AppExtension"; productName = AUv3Synth; productReference = 746B19364297E7D489749B70; productType = "com.apple.product-type.app-extension"; }; @@ -697,7 +743,7 @@ 9ABBEEC4C47DAD09F4B221C1, ); runOnlyForDeploymentPostprocessing = 0; }; CD6892FED0DB19C0DDD9AD37 = {isa = PBXNativeTarget; buildConfigurationList = AF907C78A0D17B741F5F8944; buildPhases = ( 1F4A8812AAE49E02F3215F48, ); buildRules = ( ); dependencies = ( ); name = "AUv3Synth - Shared Code"; productName = AUv3Synth; productReference = 9536B5A780A03F6BACB24144; productType = "com.apple.product-type.library.static"; }; - D0E003364F0BE3205BD9243E = {isa = PBXProject; buildConfigurationList = 444EA74CE26BF416566E542C; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { EF49DCC88B5FC3C6E67ED2A4 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };73F4C13CDCAC7EE5914F2E61 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };386D3CCDC878EC299C56FB39 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };7A046597FDDDB82B78C64AAC = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 1; }; }; };D493488C4B5B9D9B5990FEE2 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };CD6892FED0DB19C0DDD9AD37 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 4BFA153CE4E8A774C67EC642; projectDirPath = ""; projectRoot = ""; targets = (EF49DCC88B5FC3C6E67ED2A4, 73F4C13CDCAC7EE5914F2E61, 386D3CCDC878EC299C56FB39, 7A046597FDDDB82B78C64AAC, D493488C4B5B9D9B5990FEE2, CD6892FED0DB19C0DDD9AD37); }; + D0E003364F0BE3205BD9243E = {isa = PBXProject; buildConfigurationList = 444EA74CE26BF416566E542C; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { EF49DCC88B5FC3C6E67ED2A4 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };73F4C13CDCAC7EE5914F2E61 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };386D3CCDC878EC299C56FB39 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };7A046597FDDDB82B78C64AAC = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 1; }; }; };D493488C4B5B9D9B5990FEE2 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };CD6892FED0DB19C0DDD9AD37 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 4BFA153CE4E8A774C67EC642; projectDirPath = ""; projectRoot = ""; targets = (EF49DCC88B5FC3C6E67ED2A4, 73F4C13CDCAC7EE5914F2E61, 386D3CCDC878EC299C56FB39, 7A046597FDDDB82B78C64AAC, D493488C4B5B9D9B5990FEE2, CD6892FED0DB19C0DDD9AD37); }; }; rootObject = D0E003364F0BE3205BD9243E; } diff --git a/examples/AUv3Synth/Builds/iOS/AUv3Synth.xcodeproj/project.pbxproj b/examples/AUv3Synth/Builds/iOS/AUv3Synth.xcodeproj/project.pbxproj index 56f5715408..c667ffa2c0 100644 --- a/examples/AUv3Synth/Builds/iOS/AUv3Synth.xcodeproj/project.pbxproj +++ b/examples/AUv3Synth/Builds/iOS/AUv3Synth.xcodeproj/project.pbxproj @@ -173,7 +173,7 @@ DC95EAEBECC74A55CADCD887 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; @@ -197,13 +197,14 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_AppExtension.plist; + INFOPLIST_PREPROCESS = NO; OTHER_LDFLAGS = "-lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth.AUv3SynthAUv3; USE_HEADERMAP = NO; }; name = Debug; }; 5FAC649347835B831BAE3C41 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; @@ -228,13 +229,14 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_AppExtension.plist; + INFOPLIST_PREPROCESS = NO; OTHER_LDFLAGS = "-lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth.AUv3SynthAUv3; USE_HEADERMAP = NO; }; name = Release; }; B3D851DD41548F02C540B34A = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; @@ -258,13 +260,14 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-Standalone_Plugin.plist; + INFOPLIST_PREPROCESS = NO; OTHER_LDFLAGS = "-lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; USE_HEADERMAP = NO; }; name = Debug; }; 635F6CAD05365F797820B5D7 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; @@ -289,13 +292,14 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-Standalone_Plugin.plist; + INFOPLIST_PREPROCESS = NO; OTHER_LDFLAGS = "-lAUv3Synth"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.development.AUv3Synth; USE_HEADERMAP = NO; }; name = Release; }; DBCA8A687AB8CE4F0FDE4C3D = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; @@ -325,7 +329,7 @@ 5DA389BE0C844A1A9E20FD7C = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; @@ -356,16 +360,37 @@ D32671708EF2662A51A6335A = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -377,15 +402,36 @@ 7C9E7C9B2C1D5310B9194C27 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "AUv3Synth"; @@ -409,9 +455,6 @@ 3A7896DB2C11717D9046CE5B = {isa = XCConfigurationList; buildConfigurations = ( DC95EAEBECC74A55CADCD887, 5FAC649347835B831BAE3C41, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; - 0306890051760AEBAFEA2099 = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6F585AC4628EC14C9F757022, - 78704983DFEA5408FC5767D8, ); runOnlyForDeploymentPostprocessing = 0; }; E60CDCD59C66D98FB19938F1 = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( EC1B7357C105DC8BC06A0CD4, ); runOnlyForDeploymentPostprocessing = 0; }; 671E50F4F02FC98293270CFC = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -428,7 +471,6 @@ F452B8399A32BE4F1074F596, E4236DCEE707C3855C2E3B22, ); runOnlyForDeploymentPostprocessing = 0; }; 7A046597FDDDB82B78C64AAC = {isa = PBXNativeTarget; buildConfigurationList = 3A7896DB2C11717D9046CE5B; buildPhases = ( - 0306890051760AEBAFEA2099, E60CDCD59C66D98FB19938F1, 671E50F4F02FC98293270CFC, ); buildRules = ( ); dependencies = ( 017B214D817BF0DF53051BB2, ); name = "AUv3Synth - AUv3 AppExtension"; productName = AUv3Synth; productReference = 746B19364297E7D489749B70; productType = "com.apple.product-type.app-extension"; }; @@ -483,7 +525,7 @@ 9ABBEEC4C47DAD09F4B221C1, ); runOnlyForDeploymentPostprocessing = 0; }; CD6892FED0DB19C0DDD9AD37 = {isa = PBXNativeTarget; buildConfigurationList = AF907C78A0D17B741F5F8944; buildPhases = ( 1F4A8812AAE49E02F3215F48, ); buildRules = ( ); dependencies = ( ); name = "AUv3Synth - Shared Code"; productName = AUv3Synth; productReference = 9536B5A780A03F6BACB24144; productType = "com.apple.product-type.library.static"; }; - D0E003364F0BE3205BD9243E = {isa = PBXProject; buildConfigurationList = 444EA74CE26BF416566E542C; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { EF49DCC88B5FC3C6E67ED2A4 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };7A046597FDDDB82B78C64AAC = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 1; }; }; };D493488C4B5B9D9B5990FEE2 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };CD6892FED0DB19C0DDD9AD37 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 4BFA153CE4E8A774C67EC642; projectDirPath = ""; projectRoot = ""; targets = (EF49DCC88B5FC3C6E67ED2A4, 7A046597FDDDB82B78C64AAC, D493488C4B5B9D9B5990FEE2, CD6892FED0DB19C0DDD9AD37); }; + D0E003364F0BE3205BD9243E = {isa = PBXProject; buildConfigurationList = 444EA74CE26BF416566E542C; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { EF49DCC88B5FC3C6E67ED2A4 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };7A046597FDDDB82B78C64AAC = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 1; }; }; };D493488C4B5B9D9B5990FEE2 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };CD6892FED0DB19C0DDD9AD37 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 4BFA153CE4E8A774C67EC642; projectDirPath = ""; projectRoot = ""; targets = (EF49DCC88B5FC3C6E67ED2A4, 7A046597FDDDB82B78C64AAC, D493488C4B5B9D9B5990FEE2, CD6892FED0DB19C0DDD9AD37); }; }; rootObject = D0E003364F0BE3205BD9243E; } diff --git a/examples/AUv3Synth/JuceLibraryCode/AppConfig.h b/examples/AUv3Synth/JuceLibraryCode/AppConfig.h index 9db11b56f1..2e47abbced 100644 --- a/examples/AUv3Synth/JuceLibraryCode/AppConfig.h +++ b/examples/AUv3Synth/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -55,6 +61,185 @@ #define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 #define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_plugin_client flags: + +#ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS + //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS 1 +#endif + +#ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS + //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -64,186 +249,6 @@ #endif #endif -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_plugin_client flags: - -#ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS - //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS -#endif - -#ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS - //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_audio_utils flags: - -#ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER -#endif - -#ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif - //============================================================================== // Audio plugin settings.. @@ -265,8 +270,8 @@ #ifndef JucePlugin_Build_AAX #define JucePlugin_Build_AAX 0 #endif -#ifndef JucePlugin_Build_STANDALONE - #define JucePlugin_Build_STANDALONE 1 +#ifndef JucePlugin_Build_Standalone + #define JucePlugin_Build_Standalone 1 #endif #ifndef JucePlugin_Enable_IAA #define JucePlugin_Enable_IAA 0 diff --git a/examples/AUv3Synth/Source/AUv3SynthProcessor.cpp b/examples/AUv3Synth/Source/AUv3SynthProcessor.cpp index 3b3d72f909..348bf98d8c 100644 --- a/examples/AUv3Synth/Source/AUv3SynthProcessor.cpp +++ b/examples/AUv3Synth/Source/AUv3SynthProcessor.cpp @@ -49,7 +49,7 @@ public: //============================================================================== bool isBusesLayoutSupported (const BusesLayout& layouts) const override { - return (layouts.getMainInputChannels() == 2); + return (layouts.getMainOutputChannels() == 2); } void prepareToPlay (double sampleRate, int estimatedMaxSizeOfBuffer) override diff --git a/examples/AnimationAppExample/AnimationAppExample.jucer b/examples/AnimationAppExample/AnimationAppExample.jucer index 34aed5015c..443cc8b745 100644 --- a/examples/AnimationAppExample/AnimationAppExample.jucer +++ b/examples/AnimationAppExample/AnimationAppExample.jucer @@ -2,8 +2,8 @@ + jucerVersion="5.1.0" displaySplashScreen="0" reportAppUsage="0" + splashScreenColour="Dark" companyName="ROLI Ltd." cppLanguageStandard="11"> {D44A6FC4-2DA0-C221-F876-2A2012D2840C} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ AnimationAppExample true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -521,6 +525,9 @@ true + + true + true @@ -1673,13 +1680,7 @@ true - - true - - - true - - + true @@ -1707,7 +1708,6 @@ - @@ -1727,10 +1727,12 @@ + + @@ -1836,7 +1838,6 @@ - @@ -2102,6 +2103,7 @@ + @@ -2286,8 +2288,12 @@ - - + + + + + + diff --git a/examples/AnimationAppExample/Builds/VisualStudio2017/AnimationAppExample_App.vcxproj.filters b/examples/AnimationAppExample/Builds/VisualStudio2017/AnimationAppExample_App.vcxproj.filters index 13b5544336..81fd0c25de 100644 --- a/examples/AnimationAppExample/Builds/VisualStudio2017/AnimationAppExample_App.vcxproj.filters +++ b/examples/AnimationAppExample/Builds/VisualStudio2017/AnimationAppExample_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -373,9 +376,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -436,6 +436,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -658,9 +661,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -757,6 +757,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -1993,20 +1996,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2076,9 +2067,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2136,6 +2124,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2148,6 +2139,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2463,9 +2457,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3261,6 +3252,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -3813,10 +3807,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/AnimationAppExample/Builds/iOS/AnimationAppExample.xcodeproj/project.pbxproj b/examples/AnimationAppExample/Builds/iOS/AnimationAppExample.xcodeproj/project.pbxproj index 0cb631135c..5c742efc52 100644 --- a/examples/AnimationAppExample/Builds/iOS/AnimationAppExample.xcodeproj/project.pbxproj +++ b/examples/AnimationAppExample/Builds/iOS/AnimationAppExample.xcodeproj/project.pbxproj @@ -10,9 +10,11 @@ E3498B080326636A372B74AE = {isa = PBXBuildFile; fileRef = 859E13C66F2193112084D1B9; }; 828D4B32ECB7ECE234A5A1A9 = {isa = PBXBuildFile; fileRef = 66DE43B56D8670C78DD3998D; }; ACC6D859315761144D4178A0 = {isa = PBXBuildFile; fileRef = 717FA33AC0AA2629302F0314; }; + D56389F7C2F211D97510A51F = {isa = PBXBuildFile; fileRef = F41993809470A0FF0DC7076E; }; 3B937846DB65393DE597ABDE = {isa = PBXBuildFile; fileRef = C9F7ABDA09635BC3FAB0B008; }; 96B761E33D6CA3700F0A9A51 = {isa = PBXBuildFile; fileRef = 287976618152E4BA76D627FA; }; 3BDC668C74D7BE65921F24F3 = {isa = PBXBuildFile; fileRef = 894CC76489B4BE25D85811AB; }; + E9042B79DDA8424594F1AB16 = {isa = PBXBuildFile; fileRef = FE7F391D915BD5CE849883A8; }; 139AEB224F22582CF606327F = {isa = PBXBuildFile; fileRef = 732EEC584A4CE3ED07C5BEFB; }; 0DE5F0C9D8D826AF3EEBAC04 = {isa = PBXBuildFile; fileRef = 888284627B1FEA22193130AB; }; F3F1AF2E0D45882BFE3EDE07 = {isa = PBXBuildFile; fileRef = AF947B0E188B6EA57EB0109B; }; @@ -79,7 +81,9 @@ D7AE43E118954402DE85705F = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_graphics"; path = "../../../../modules/juce_graphics"; sourceTree = "SOURCE_ROOT"; }; E86F8ACE887901A756775C0C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_data_structures"; path = "../../../../modules/juce_data_structures"; sourceTree = "SOURCE_ROOT"; }; EE948FB708041B74B8597E68 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_processors"; path = "../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; }; + F41993809470A0FF0DC7076E = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; }; F7B6DBDC7439C90B4E01752E = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Source/Main.cpp; sourceTree = "SOURCE_ROOT"; }; + FE7F391D915BD5CE849883A8 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; 9F41B5C4D3F9CE9C17373AB3 = {isa = PBXGroup; children = ( B766DBADE0BD743FAC004870, F7B6DBDC7439C90B4E01752E, ); name = Source; sourceTree = ""; }; @@ -122,9 +126,11 @@ 859E13C66F2193112084D1B9, 66DE43B56D8670C78DD3998D, 717FA33AC0AA2629302F0314, + F41993809470A0FF0DC7076E, C9F7ABDA09635BC3FAB0B008, 287976618152E4BA76D627FA, 894CC76489B4BE25D85811AB, + FE7F391D915BD5CE849883A8, 732EEC584A4CE3ED07C5BEFB, 888284627B1FEA22193130AB, AF947B0E188B6EA57EB0109B, @@ -143,7 +149,7 @@ E6AD24AAB15D880592BFDD57 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -164,15 +170,16 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.AnimationAppExample; USE_HEADERMAP = NO; }; name = Debug; }; 58ED5763719C81C95B744A5B = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -194,24 +201,46 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.AnimationAppExample; USE_HEADERMAP = NO; }; name = Release; }; 8FB477F7B77D68FD93DC1D16 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -223,15 +252,36 @@ 7977431F7194644B49C15E21 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "AnimationAppExample"; @@ -268,9 +318,11 @@ E3498B080326636A372B74AE, 828D4B32ECB7ECE234A5A1A9, ACC6D859315761144D4178A0, + D56389F7C2F211D97510A51F, 3B937846DB65393DE597ABDE, 96B761E33D6CA3700F0A9A51, 3BDC668C74D7BE65921F24F3, + E9042B79DDA8424594F1AB16, 139AEB224F22582CF606327F, 0DE5F0C9D8D826AF3EEBAC04, F3F1AF2E0D45882BFE3EDE07, @@ -281,7 +333,7 @@ 6DD59723DA58F112C3C6F427, 2CCE82C7290D2D226DD34C0B, 4516F5A575174EF76FEAD8B3, ); buildRules = ( ); dependencies = ( ); name = "AnimationAppExample - App"; productName = AnimationAppExample; productReference = CBF69B3CBCD089CD7DC8343C; productType = "com.apple.product-type.application"; }; - AEF97977FF56185DB5E0C493 = {isa = PBXProject; buildConfigurationList = 576D6DACFB71E339D0AD373A; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 80F5D4DB72CAE33FF7BE0E28 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = E2839CF91E2C633A933666F4; projectDirPath = ""; projectRoot = ""; targets = (80F5D4DB72CAE33FF7BE0E28); }; + AEF97977FF56185DB5E0C493 = {isa = PBXProject; buildConfigurationList = 576D6DACFB71E339D0AD373A; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 80F5D4DB72CAE33FF7BE0E28 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = E2839CF91E2C633A933666F4; projectDirPath = ""; projectRoot = ""; targets = (80F5D4DB72CAE33FF7BE0E28); }; }; rootObject = AEF97977FF56185DB5E0C493; } diff --git a/examples/AnimationAppExample/JuceLibraryCode/AppConfig.h b/examples/AnimationAppExample/JuceLibraryCode/AppConfig.h index 89980ac4f4..cbc91df3ac 100644 --- a/examples/AnimationAppExample/JuceLibraryCode/AppConfig.h +++ b/examples/AnimationAppExample/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -56,6 +62,170 @@ #define JUCE_MODULE_AVAILABLE_juce_opengl 1 #define JUCE_MODULE_AVAILABLE_juce_video 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif + +//============================================================================== +// juce_video flags: + +#ifndef JUCE_USE_CAMERA + //#define JUCE_USE_CAMERA 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -64,180 +234,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif - -//============================================================================== -// juce_video flags: - -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - //#define JUCE_QUICKTIME -#endif - -#ifndef JUCE_USE_CAMERA - //#define JUCE_USE_CAMERA -#endif diff --git a/examples/AudioAppExample/AudioAppExample.jucer b/examples/AudioAppExample/AudioAppExample.jucer index 9ac0cb02af..919793ef92 100644 --- a/examples/AudioAppExample/AudioAppExample.jucer +++ b/examples/AudioAppExample/AudioAppExample.jucer @@ -2,8 +2,8 @@ + jucerVersion="5.1.0" displaySplashScreen="0" reportAppUsage="0" + splashScreenColour="Dark" companyName="ROLI Ltd." cppLanguageStandard="11"> {5EC68AA6-F066-CCC4-21D6-89C2125F627F} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ AudioAppExample true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -569,6 +573,9 @@ true + + true + true @@ -1721,13 +1728,7 @@ true - - true - - - true - - + true @@ -1756,7 +1757,6 @@ - @@ -1776,10 +1776,12 @@ + + @@ -1885,7 +1887,6 @@ - @@ -2164,6 +2165,7 @@ + @@ -2348,8 +2350,12 @@ - - + + + + + + diff --git a/examples/AudioAppExample/Builds/VisualStudio2017/AudioAppExample_App.vcxproj.filters b/examples/AudioAppExample/Builds/VisualStudio2017/AudioAppExample_App.vcxproj.filters index 35e468d2d2..262e827b8a 100644 --- a/examples/AudioAppExample/Builds/VisualStudio2017/AudioAppExample_App.vcxproj.filters +++ b/examples/AudioAppExample/Builds/VisualStudio2017/AudioAppExample_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -388,9 +391,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -451,6 +451,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -673,9 +676,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -835,6 +835,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2071,20 +2074,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2157,9 +2148,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2217,6 +2205,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2229,6 +2220,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2544,9 +2538,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3381,6 +3372,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -3933,10 +3927,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/AudioAppExample/Builds/iOS/AudioAppExample.xcodeproj/project.pbxproj b/examples/AudioAppExample/Builds/iOS/AudioAppExample.xcodeproj/project.pbxproj index 1b93fb7db4..efd71790f7 100644 --- a/examples/AudioAppExample/Builds/iOS/AudioAppExample.xcodeproj/project.pbxproj +++ b/examples/AudioAppExample/Builds/iOS/AudioAppExample.xcodeproj/project.pbxproj @@ -10,10 +10,12 @@ 3286435E3CC944A630866B89 = {isa = PBXBuildFile; fileRef = 92CABA9C9B5148FCA22A0503; }; 7AC823C6BFA28E49D004E0E0 = {isa = PBXBuildFile; fileRef = BD70FA4626657FF1DEBB10DA; }; 558C49788C323F72C879C219 = {isa = PBXBuildFile; fileRef = 440774261ADCDDE62F8611DE; }; + 6295E63A310FB635AC0C1BE1 = {isa = PBXBuildFile; fileRef = FE0301E74455B9D70088792D; }; 2414893F5F6D7096A1350F6B = {isa = PBXBuildFile; fileRef = 0C37646FCADAFC29F28333C0; }; 66F2013AC2FE548DC181F672 = {isa = PBXBuildFile; fileRef = 3D75092F510176CC7F979ED9; }; F02410B634B6C9C29060A812 = {isa = PBXBuildFile; fileRef = 4286F1F40FC3E04B4AE701C2; }; 12569A7627556D3953A50DD4 = {isa = PBXBuildFile; fileRef = 2DA513AD8AE6F92685ABA7BB; }; + CF339C0C77E85567F2E14DEF = {isa = PBXBuildFile; fileRef = E9E3BEA778FE14AE7BA9032F; }; 26E4E22AC7196AC405E218B9 = {isa = PBXBuildFile; fileRef = 7C86E886C3FCB671004E1CA2; }; DE32F1DDED355F817FCA16C4 = {isa = PBXBuildFile; fileRef = F5B5D441C4AB1D01509ACC8D; }; 62AE0FBB5B9184FF94092D43 = {isa = PBXBuildFile; fileRef = D7867DB9C17425E3F05EB860; }; @@ -82,9 +84,11 @@ D96EF22A7C2912FDB2F9BBFD = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_opengl"; path = "../../../../modules/juce_opengl"; sourceTree = "SOURCE_ROOT"; }; E0DDAD7A205F6DD0B0501DE3 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_graphics"; path = "../../../../modules/juce_graphics"; sourceTree = "SOURCE_ROOT"; }; E87E13099757D39753D4F951 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_core"; path = "../../../../modules/juce_core"; sourceTree = "SOURCE_ROOT"; }; + E9E3BEA778FE14AE7BA9032F = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; ED96DF5BB1BAA94746049FE4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_basics.mm"; path = "../../JuceLibraryCode/include_juce_gui_basics.mm"; sourceTree = "SOURCE_ROOT"; }; F5B5D441C4AB1D01509ACC8D = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; FB092AF48A13F4F473734F66 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_video.mm"; path = "../../JuceLibraryCode/include_juce_video.mm"; sourceTree = "SOURCE_ROOT"; }; + FE0301E74455B9D70088792D = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; }; C366FD2226833583ECDE68D2 = {isa = PBXGroup; children = ( 2545022A0EE088A0C46EBD13, D78365C74082A1253E12AF17, ); name = Source; sourceTree = ""; }; @@ -129,10 +133,12 @@ 92CABA9C9B5148FCA22A0503, BD70FA4626657FF1DEBB10DA, 440774261ADCDDE62F8611DE, + FE0301E74455B9D70088792D, 0C37646FCADAFC29F28333C0, 3D75092F510176CC7F979ED9, 4286F1F40FC3E04B4AE701C2, 2DA513AD8AE6F92685ABA7BB, + E9E3BEA778FE14AE7BA9032F, 7C86E886C3FCB671004E1CA2, F5B5D441C4AB1D01509ACC8D, D7867DB9C17425E3F05EB860, @@ -151,7 +157,7 @@ B0ADA4CCDD12487AAA4D29E3 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -172,15 +178,16 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.AudioAppExample; USE_HEADERMAP = NO; }; name = Debug; }; F8E0347F1E2A6CDA40CBAFC1 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -202,24 +209,46 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.AudioAppExample; USE_HEADERMAP = NO; }; name = Release; }; 2DDD1A3A56EAB02179D1CFB6 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -231,15 +260,36 @@ BE32D9CFAA27D791B2181C7F = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "AudioAppExample"; @@ -277,10 +327,12 @@ 3286435E3CC944A630866B89, 7AC823C6BFA28E49D004E0E0, 558C49788C323F72C879C219, + 6295E63A310FB635AC0C1BE1, 2414893F5F6D7096A1350F6B, 66F2013AC2FE548DC181F672, F02410B634B6C9C29060A812, 12569A7627556D3953A50DD4, + CF339C0C77E85567F2E14DEF, 26E4E22AC7196AC405E218B9, DE32F1DDED355F817FCA16C4, 62AE0FBB5B9184FF94092D43, @@ -291,7 +343,7 @@ 3602833D915A2AC7C25F537F, BC3ECD5BCB6580E951083B7E, C9974DDFB456D5307D4C29F3, ); buildRules = ( ); dependencies = ( ); name = "AudioAppExample - App"; productName = AudioAppExample; productReference = 9C71E9533EDADF610F789D88; productType = "com.apple.product-type.application"; }; - 0E00FEF4A999DE35888889AE = {isa = PBXProject; buildConfigurationList = 074FE87A26471418B3AC0921; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { D010D5837C01EB7574A48649 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 41A4B977F5588A439A066455; projectDirPath = ""; projectRoot = ""; targets = (D010D5837C01EB7574A48649); }; + 0E00FEF4A999DE35888889AE = {isa = PBXProject; buildConfigurationList = 074FE87A26471418B3AC0921; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { D010D5837C01EB7574A48649 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 41A4B977F5588A439A066455; projectDirPath = ""; projectRoot = ""; targets = (D010D5837C01EB7574A48649); }; }; rootObject = 0E00FEF4A999DE35888889AE; } diff --git a/examples/AudioAppExample/JuceLibraryCode/AppConfig.h b/examples/AudioAppExample/JuceLibraryCode/AppConfig.h index 55eef3d08f..835b6ff6b2 100644 --- a/examples/AudioAppExample/JuceLibraryCode/AppConfig.h +++ b/examples/AudioAppExample/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -57,6 +63,181 @@ #define JUCE_MODULE_AVAILABLE_juce_opengl 1 #define JUCE_MODULE_AVAILABLE_juce_video 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif + +//============================================================================== +// juce_video flags: + +#ifndef JUCE_USE_CAMERA + //#define JUCE_USE_CAMERA 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -65,191 +246,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_audio_utils flags: - -#ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER -#endif - -#ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif - -//============================================================================== -// juce_video flags: - -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - //#define JUCE_QUICKTIME -#endif - -#ifndef JUCE_USE_CAMERA - //#define JUCE_USE_CAMERA -#endif diff --git a/examples/BLOCKS/BlocksDrawing/BlocksDrawing.jucer b/examples/BLOCKS/BlocksDrawing/BlocksDrawing.jucer index e1cb9e0c4b..73e3d8105e 100644 --- a/examples/BLOCKS/BlocksDrawing/BlocksDrawing.jucer +++ b/examples/BLOCKS/BlocksDrawing/BlocksDrawing.jucer @@ -2,14 +2,16 @@ + jucerVersion="5.1.0" displaySplashScreen="0" reportAppUsage="0" + splashScreenColour="Dark" cppLanguageStandard="11"> - + + diff --git a/examples/BLOCKS/BlocksDrawing/Builds/LinuxMakefile/Makefile b/examples/BLOCKS/BlocksDrawing/Builds/LinuxMakefile/Makefile index 607278f769..ee94b6cf2b 100644 --- a/examples/BLOCKS/BlocksDrawing/Builds/LinuxMakefile/Makefile +++ b/examples/BLOCKS/BlocksDrawing/Builds/LinuxMakefile/Makefile @@ -67,6 +67,7 @@ endif OBJECTS_APP := \ $(JUCE_OBJDIR)/Main_90ebc5c2.o \ + $(JUCE_OBJDIR)/MainComponent_a6ffb4a5.o \ $(JUCE_OBJDIR)/include_juce_audio_basics_8a4e984a.o \ $(JUCE_OBJDIR)/include_juce_audio_devices_63111d02.o \ $(JUCE_OBJDIR)/include_juce_audio_formats_15f82001.o \ @@ -83,6 +84,8 @@ OBJECTS_APP := \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) @echo Linking "BlocksDrawing - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) @@ -95,6 +98,11 @@ $(JUCE_OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp @echo "Compiling Main.cpp" $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" +$(JUCE_OBJDIR)/MainComponent_a6ffb4a5.o: ../../Source/MainComponent.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling MainComponent.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + $(JUCE_OBJDIR)/include_juce_audio_basics_8a4e984a.o: ../../JuceLibraryCode/include_juce_audio_basics.cpp -$(V_AT)mkdir -p $(JUCE_OBJDIR) @echo "Compiling include_juce_audio_basics.cpp" diff --git a/examples/BLOCKS/BlocksDrawing/Builds/MacOSX/BlocksDrawing.xcodeproj/project.pbxproj b/examples/BLOCKS/BlocksDrawing/Builds/MacOSX/BlocksDrawing.xcodeproj/project.pbxproj index b10498f328..fb40d761f0 100644 --- a/examples/BLOCKS/BlocksDrawing/Builds/MacOSX/BlocksDrawing.xcodeproj/project.pbxproj +++ b/examples/BLOCKS/BlocksDrawing/Builds/MacOSX/BlocksDrawing.xcodeproj/project.pbxproj @@ -20,6 +20,7 @@ C5B65EEA10D40B2770FE8937 = {isa = PBXBuildFile; fileRef = ABA9D69C67D0234528DEB39B; }; 19DBB78B919C4774330FCED5 = {isa = PBXBuildFile; fileRef = BA174BBB2231F7A8D1621BE9; }; F1C1D8F4BDE85067F5E61D08 = {isa = PBXBuildFile; fileRef = 49F51637C89080A76F65E9F7; }; + D354A0AD7CBDBDD1D8132ECC = {isa = PBXBuildFile; fileRef = 3A534A7474110674C69C1FC9; }; F3102423A2C8D91FE1D9B41E = {isa = PBXBuildFile; fileRef = B0CCD8CF994F3F797BB6D208; }; 853E27BAF3F496A77507B0F3 = {isa = PBXBuildFile; fileRef = C80A487F061CBA873D8E3F10; }; 8BB421F938D69A28CEC1DE59 = {isa = PBXBuildFile; fileRef = EDC56FC7BB77C81B88EABC68; }; @@ -41,6 +42,7 @@ 2AF21CDE4EFD3BBA599DE77E = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_extra.mm"; path = "../../JuceLibraryCode/include_juce_gui_extra.mm"; sourceTree = "SOURCE_ROOT"; }; 2C5EEC55C1DCC5A3372873C8 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; 38BEC0B6AFAFA022B355CC1B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainComponent.h; path = ../../Source/MainComponent.h; sourceTree = "SOURCE_ROOT"; }; + 3A534A7474110674C69C1FC9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = MainComponent.cpp; path = ../../Source/MainComponent.cpp; sourceTree = "SOURCE_ROOT"; }; 49F51637C89080A76F65E9F7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Source/Main.cpp; sourceTree = "SOURCE_ROOT"; }; 4ABD70F1E7F6F48AF857A965 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; }; 574E29C4D824BEE95F94E7D6 = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-App.plist"; path = "Info-App.plist"; sourceTree = "SOURCE_ROOT"; }; @@ -80,8 +82,9 @@ F5D89B3EFBF1FF94452EA34D = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_processors"; path = "../../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; }; AA00B6CDF58EE5901BBEF67C = {isa = PBXGroup; children = ( C4BD68C22BCD71B945684B0A, - 38BEC0B6AFAFA022B355CC1B, - 49F51637C89080A76F65E9F7, ); name = Source; sourceTree = ""; }; + 49F51637C89080A76F65E9F7, + 3A534A7474110674C69C1FC9, + 38BEC0B6AFAFA022B355CC1B, ); name = Source; sourceTree = ""; }; 9886851267A0D1BF2E10BA86 = {isa = PBXGroup; children = ( AA00B6CDF58EE5901BBEF67C, ); name = BlocksDrawing; sourceTree = ""; }; ACF438DCCC7951F80306FB81 = {isa = PBXGroup; children = ( @@ -139,7 +142,7 @@ EB0D13905DE35B7EECA09529, 31F4C36D3B12DC4E69F5D5A7, ); name = Source; sourceTree = ""; }; DF3B86DBD39059B08B65FFDE = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -160,8 +163,9 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -169,7 +173,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; D1EA6139431E47DBB7B1986D = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -191,8 +195,9 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -201,16 +206,37 @@ USE_HEADERMAP = NO; }; name = Release; }; 43CD600C065BABAB527F39FC = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "BlocksDrawing"; @@ -218,15 +244,36 @@ ZERO_LINK = NO; }; name = Debug; }; EC99C60653432B6B3FB22D6B = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "BlocksDrawing"; WARNING_CFLAGS = -Wreorder; @@ -242,6 +289,7 @@ 19DBB78B919C4774330FCED5, ); runOnlyForDeploymentPostprocessing = 0; }; 6F1EAB6EC19EDAB88EF14DE0 = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( F1C1D8F4BDE85067F5E61D08, + D354A0AD7CBDBDD1D8132ECC, F3102423A2C8D91FE1D9B41E, 853E27BAF3F496A77507B0F3, 8BB421F938D69A28CEC1DE59, @@ -271,7 +319,7 @@ B64F4B6419098A6C579D0EDB, 6F1EAB6EC19EDAB88EF14DE0, 704E8CB52C968D24DAE2ABD5, ); buildRules = ( ); dependencies = ( ); name = "BlocksDrawing - App"; productName = BlocksDrawing; productReference = 7A425A86C84D843976582BAF; productType = "com.apple.product-type.application"; }; - 46C68557D30B3B44D3FE037B = {isa = PBXProject; buildConfigurationList = DD23365E44ACBF007DC85D46; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { F0C1DAFB0E78213F565F044F = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 0E79852FE469702C8F99D6F3; projectDirPath = ""; projectRoot = ""; targets = (F0C1DAFB0E78213F565F044F); }; + 46C68557D30B3B44D3FE037B = {isa = PBXProject; buildConfigurationList = DD23365E44ACBF007DC85D46; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { F0C1DAFB0E78213F565F044F = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 0E79852FE469702C8F99D6F3; projectDirPath = ""; projectRoot = ""; targets = (F0C1DAFB0E78213F565F044F); }; }; rootObject = 46C68557D30B3B44D3FE037B; } diff --git a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing.sln b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing.sln index 0f9cdaa414..fa61057bce 100644 --- a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing.sln +++ b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing.sln @@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CFD78289-DF68-E998-FA52-BA8B893952D3}.Debug|Win32.Build.0 = Debug|Win32 {CFD78289-DF68-E998-FA52-BA8B893952D3}.Debug|Win32.ActiveCfg = Debug|Win32 - {CFD78289-DF68-E998-FA52-BA8B893952D3}.Release|Win32.Build.0 = Release|Win32 + {CFD78289-DF68-E998-FA52-BA8B893952D3}.Debug|Win32.Build.0 = Debug|Win32 {CFD78289-DF68-E998-FA52-BA8B893952D3}.Release|Win32.ActiveCfg = Release|Win32 + {CFD78289-DF68-E998-FA52-BA8B893952D3}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj index 66419a8a77..482b4d9209 100644 --- a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj +++ b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj @@ -16,6 +16,7 @@ {CFD78289-DF68-E998-FA52-BA8B893952D3} v140 + 8.1 Application false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ BlocksDrawing true v140 + 8.1 @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -140,6 +147,7 @@ + true @@ -152,9 +160,6 @@ true - - true - true @@ -215,6 +220,9 @@ true + + true + true @@ -431,9 +439,6 @@ true - - true - true @@ -587,6 +592,9 @@ true + + true + true @@ -1739,7 +1747,6 @@ - @@ -1759,10 +1766,12 @@ + + @@ -1868,7 +1877,6 @@ - @@ -1924,6 +1932,7 @@ + @@ -2162,6 +2171,7 @@ + diff --git a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj.filters b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj.filters index ee5ef28833..5ccccc1420 100644 --- a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj.filters +++ b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2015/BlocksDrawing_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -370,6 +373,9 @@ BlocksDrawing\Source + + BlocksDrawing\Source + Juce Modules\juce_audio_basics\buffers @@ -382,9 +388,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -445,6 +448,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -667,9 +673,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -847,6 +850,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2124,9 +2130,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2184,6 +2187,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2196,6 +2202,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2511,9 +2520,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -2679,6 +2685,9 @@ Juce Modules\juce_blocks_basics\blocks + + Juce Modules\juce_blocks_basics\blocks + Juce Modules\juce_blocks_basics\blocks @@ -3393,6 +3402,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing.sln b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing.sln index 4b71f6c548..a55c87125f 100644 --- a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing.sln +++ b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CFD78289-DF68-E998-FA52-BA8B893952D3}.Debug|x64.Build.0 = Debug|x64 {CFD78289-DF68-E998-FA52-BA8B893952D3}.Debug|x64.ActiveCfg = Debug|x64 - {CFD78289-DF68-E998-FA52-BA8B893952D3}.Release|x64.Build.0 = Release|x64 + {CFD78289-DF68-E998-FA52-BA8B893952D3}.Debug|x64.Build.0 = Debug|x64 {CFD78289-DF68-E998-FA52-BA8B893952D3}.Release|x64.ActiveCfg = Release|x64 + {CFD78289-DF68-E998-FA52-BA8B893952D3}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj index 6a4f8e6a2c..0a8ffedbc8 100644 --- a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj +++ b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj @@ -16,6 +16,7 @@ {CFD78289-DF68-E998-FA52-BA8B893952D3} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ BlocksDrawing true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -139,6 +146,7 @@ + true @@ -151,9 +159,6 @@ true - - true - true @@ -214,6 +219,9 @@ true + + true + true @@ -430,9 +438,6 @@ true - - true - true @@ -586,6 +591,9 @@ true + + true + true @@ -1738,7 +1746,6 @@ - @@ -1758,10 +1765,12 @@ + + @@ -1867,7 +1876,6 @@ - @@ -1923,6 +1931,7 @@ + @@ -2161,6 +2170,7 @@ + diff --git a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj.filters b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj.filters index 88b9425990..fde1b0d84c 100644 --- a/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj.filters +++ b/examples/BLOCKS/BlocksDrawing/Builds/VisualStudio2017/BlocksDrawing_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -370,6 +373,9 @@ BlocksDrawing\Source + + BlocksDrawing\Source + Juce Modules\juce_audio_basics\buffers @@ -382,9 +388,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -445,6 +448,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -667,9 +673,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -847,6 +850,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2124,9 +2130,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2184,6 +2187,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2196,6 +2202,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2511,9 +2520,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -2679,6 +2685,9 @@ Juce Modules\juce_blocks_basics\blocks + + Juce Modules\juce_blocks_basics\blocks + Juce Modules\juce_blocks_basics\blocks @@ -3393,6 +3402,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/BLOCKS/BlocksDrawing/Builds/iOS/BlocksDrawing.xcodeproj/project.pbxproj b/examples/BLOCKS/BlocksDrawing/Builds/iOS/BlocksDrawing.xcodeproj/project.pbxproj index 152b1a4a7c..61fdf22a19 100644 --- a/examples/BLOCKS/BlocksDrawing/Builds/iOS/BlocksDrawing.xcodeproj/project.pbxproj +++ b/examples/BLOCKS/BlocksDrawing/Builds/iOS/BlocksDrawing.xcodeproj/project.pbxproj @@ -22,6 +22,7 @@ 7292839DA84380BAA0F12E31 = {isa = PBXBuildFile; fileRef = 4DCF6F0AB88DA09CE8F97DD4; }; 2A5E87443C41335CD944ACB8 = {isa = PBXBuildFile; fileRef = 4FE119D4AAC2809C3D698315; }; F1C1D8F4BDE85067F5E61D08 = {isa = PBXBuildFile; fileRef = 49F51637C89080A76F65E9F7; }; + D354A0AD7CBDBDD1D8132ECC = {isa = PBXBuildFile; fileRef = 3A534A7474110674C69C1FC9; }; F3102423A2C8D91FE1D9B41E = {isa = PBXBuildFile; fileRef = B0CCD8CF994F3F797BB6D208; }; 853E27BAF3F496A77507B0F3 = {isa = PBXBuildFile; fileRef = C80A487F061CBA873D8E3F10; }; 8BB421F938D69A28CEC1DE59 = {isa = PBXBuildFile; fileRef = EDC56FC7BB77C81B88EABC68; }; @@ -43,6 +44,7 @@ 2AF21CDE4EFD3BBA599DE77E = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_extra.mm"; path = "../../JuceLibraryCode/include_juce_gui_extra.mm"; sourceTree = "SOURCE_ROOT"; }; 2C5EEC55C1DCC5A3372873C8 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; 38BEC0B6AFAFA022B355CC1B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainComponent.h; path = ../../Source/MainComponent.h; sourceTree = "SOURCE_ROOT"; }; + 3A534A7474110674C69C1FC9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = MainComponent.cpp; path = ../../Source/MainComponent.cpp; sourceTree = "SOURCE_ROOT"; }; 485A0E39984AC8CD2F98B50C = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = System/Library/Frameworks/CoreImage.framework; sourceTree = SDKROOT; }; 49F51637C89080A76F65E9F7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Source/Main.cpp; sourceTree = "SOURCE_ROOT"; }; 4ABD70F1E7F6F48AF857A965 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; }; @@ -84,8 +86,9 @@ F5D89B3EFBF1FF94452EA34D = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_processors"; path = "../../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; }; AA00B6CDF58EE5901BBEF67C = {isa = PBXGroup; children = ( C4BD68C22BCD71B945684B0A, - 38BEC0B6AFAFA022B355CC1B, - 49F51637C89080A76F65E9F7, ); name = Source; sourceTree = ""; }; + 49F51637C89080A76F65E9F7, + 3A534A7474110674C69C1FC9, + 38BEC0B6AFAFA022B355CC1B, ); name = Source; sourceTree = ""; }; 9886851267A0D1BF2E10BA86 = {isa = PBXGroup; children = ( AA00B6CDF58EE5901BBEF67C, ); name = BlocksDrawing; sourceTree = ""; }; ACF438DCCC7951F80306FB81 = {isa = PBXGroup; children = ( @@ -147,7 +150,7 @@ DF3B86DBD39059B08B65FFDE = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -168,15 +171,16 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.BlocksDrawing; USE_HEADERMAP = NO; }; name = Debug; }; D1EA6139431E47DBB7B1986D = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -198,24 +202,46 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.BlocksDrawing; USE_HEADERMAP = NO; }; name = Release; }; 43CD600C065BABAB527F39FC = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -227,15 +253,36 @@ EC99C60653432B6B3FB22D6B = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "BlocksDrawing"; @@ -254,6 +301,7 @@ 2A5E87443C41335CD944ACB8, ); runOnlyForDeploymentPostprocessing = 0; }; 6F1EAB6EC19EDAB88EF14DE0 = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( F1C1D8F4BDE85067F5E61D08, + D354A0AD7CBDBDD1D8132ECC, F3102423A2C8D91FE1D9B41E, 853E27BAF3F496A77507B0F3, 8BB421F938D69A28CEC1DE59, @@ -285,7 +333,7 @@ B64F4B6419098A6C579D0EDB, 6F1EAB6EC19EDAB88EF14DE0, 704E8CB52C968D24DAE2ABD5, ); buildRules = ( ); dependencies = ( ); name = "BlocksDrawing - App"; productName = BlocksDrawing; productReference = 7A425A86C84D843976582BAF; productType = "com.apple.product-type.application"; }; - 46C68557D30B3B44D3FE037B = {isa = PBXProject; buildConfigurationList = DD23365E44ACBF007DC85D46; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { F0C1DAFB0E78213F565F044F = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 0E79852FE469702C8F99D6F3; projectDirPath = ""; projectRoot = ""; targets = (F0C1DAFB0E78213F565F044F); }; + 46C68557D30B3B44D3FE037B = {isa = PBXProject; buildConfigurationList = DD23365E44ACBF007DC85D46; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { F0C1DAFB0E78213F565F044F = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 0E79852FE469702C8F99D6F3; projectDirPath = ""; projectRoot = ""; targets = (F0C1DAFB0E78213F565F044F); }; }; rootObject = 46C68557D30B3B44D3FE037B; } diff --git a/examples/BLOCKS/BlocksDrawing/JuceLibraryCode/AppConfig.h b/examples/BLOCKS/BlocksDrawing/JuceLibraryCode/AppConfig.h index 64b41c5282..2fac4519ce 100644 --- a/examples/BLOCKS/BlocksDrawing/JuceLibraryCode/AppConfig.h +++ b/examples/BLOCKS/BlocksDrawing/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -56,6 +62,174 @@ #define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 #define JUCE_MODULE_AVAILABLE_juce_opengl 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -64,172 +238,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_audio_utils flags: - -#ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER -#endif - -#ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif diff --git a/examples/BLOCKS/BlocksDrawing/Source/LightpadComponent.h b/examples/BLOCKS/BlocksDrawing/Source/LightpadComponent.h index 148b6901b8..557fc17c1d 100644 --- a/examples/BLOCKS/BlocksDrawing/Source/LightpadComponent.h +++ b/examples/BLOCKS/BlocksDrawing/Source/LightpadComponent.h @@ -58,8 +58,8 @@ class LightpadComponent : public Component public: LightpadComponent () { - for (int x = 0; x < 15; ++x) - for (int y = 0; y < 15; ++y) + for (auto x = 0; x < 15; ++x) + for (auto y = 0; y < 15; ++y) addAndMakeVisible (leds.add (new LEDComponent())); } @@ -81,13 +81,13 @@ public: void resized() override { - Rectangle r = getLocalBounds().reduced (10); + auto r = getLocalBounds().reduced (10); - int circleWidth = r.getWidth() / 15; - int circleHeight = r.getHeight() / 15; + auto circleWidth = r.getWidth() / 15; + auto circleHeight = r.getHeight() / 15; - for (int x = 0; x < 15; ++x) - for (int y = 0; y < 15; ++y) + for (auto x = 0; x < 15; ++x) + for (auto y = 0; y < 15; ++y) leds.getUnchecked ((x * 15) + y)->setBounds (r.getX() + (x * circleWidth), r.getY() + (y * circleHeight), circleWidth, circleHeight); @@ -95,9 +95,9 @@ public: void mouseDown (const MouseEvent& e) override { - for (int x = 0; x < 15; ++x) + for (auto x = 0; x < 15; ++x) { - for (int y = 0; y < 15; ++y) + for (auto y = 0; y < 15; ++y) { if (leds.getUnchecked ((x * 15) + y)->getBounds().contains (e.position.toInt())) { @@ -109,13 +109,13 @@ public: void mouseDrag (const MouseEvent& e) override { - for (int x = 0; x < 15; ++x) + for (auto x = 0; x < 15; ++x) { - for (int y = 0; y < 15; ++y) + for (auto y = 0; y < 15; ++y) { if (leds.getUnchecked ((x * 15) + y)->getBounds().contains (e.position.toInt())) { - const Time t = e.eventTime; + const auto t = e.eventTime; if (lastLED == Point (x, y) && t.toMilliseconds() - lastMouseEventTime.toMilliseconds() < 50) return; diff --git a/examples/BLOCKS/BlocksDrawing/Source/MainComponent.cpp b/examples/BLOCKS/BlocksDrawing/Source/MainComponent.cpp new file mode 100644 index 0000000000..614dae888d --- /dev/null +++ b/examples/BLOCKS/BlocksDrawing/Source/MainComponent.cpp @@ -0,0 +1,381 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#include "MainComponent.h" + +MainComponent::MainComponent() +{ + activeLeds.clear(); + + // Register MainContentComponent as a listener to the PhysicalTopologySource object + topologySource.addListener (this); + + infoLabel.setText ("Connect a Lightpad Block to draw.", dontSendNotification); + infoLabel.setJustificationType (Justification::centred); + addAndMakeVisible (infoLabel); + + addAndMakeVisible (lightpadComponent); + lightpadComponent.setVisible (false); + lightpadComponent.addListener (this); + + clearButton.setButtonText ("Clear"); + clearButton.addListener (this); + clearButton.setAlwaysOnTop (true); + addAndMakeVisible (clearButton); + + brightnessSlider.setRange (0.0, 1.0); + brightnessSlider.setValue (1.0); + brightnessSlider.setAlwaysOnTop (true); + brightnessSlider.setTextBoxStyle (Slider::TextEntryBoxPosition::NoTextBox, false, 0, 0); + brightnessSlider.addListener (this); + addAndMakeVisible (brightnessSlider); + + brightnessLED.setAlwaysOnTop (true); + brightnessLED.setColour (layout.currentColour.withBrightness (static_cast (brightnessSlider.getValue()))); + addAndMakeVisible (brightnessLED); + + #if JUCE_IOS + connectButton.setButtonText ("Connect"); + connectButton.addListener (this); + connectButton.setAlwaysOnTop (true); + addAndMakeVisible (connectButton); + #endif + + setSize (600, 600); +} + +MainComponent::~MainComponent() +{ + if (activeBlock != nullptr) + detachActiveBlock(); + + lightpadComponent.removeListener (this); +} + +void MainComponent::resized() +{ + infoLabel.centreWithSize (getWidth(), 100); + + auto bounds = getLocalBounds().reduced (20); + + // top buttons + auto topButtonArea = bounds.removeFromTop (getHeight() / 20); + + topButtonArea.removeFromLeft (20); + clearButton.setBounds (topButtonArea.removeFromLeft (80)); + + #if JUCE_IOS + topButtonArea.removeFromRight (20); + connectButton.setBounds (topButtonArea.removeFromRight (80)); + #endif + + bounds.removeFromTop (20); + + auto orientation = Desktop::getInstance().getCurrentOrientation(); + + if (orientation == Desktop::DisplayOrientation::upright + || orientation == Desktop::DisplayOrientation::upsideDown) + { + auto brightnessControlBounds = bounds.removeFromBottom (getHeight() / 10); + + brightnessSlider.setSliderStyle (Slider::SliderStyle::LinearHorizontal); + brightnessLED.setBounds (brightnessControlBounds.removeFromLeft (getHeight() / 10)); + brightnessSlider.setBounds (brightnessControlBounds); + } + else + { + auto brightnessControlBounds = bounds.removeFromRight (getWidth() / 10); + + brightnessSlider.setSliderStyle (Slider::SliderStyle::LinearVertical); + brightnessLED.setBounds (brightnessControlBounds.removeFromTop (getWidth() / 10)); + brightnessSlider.setBounds (brightnessControlBounds); + } + + // lightpad component + auto sideLength = jmin (bounds.getWidth() - 40, bounds.getHeight() - 40); + lightpadComponent.centreWithSize (sideLength, sideLength); +} + +void MainComponent::topologyChanged() +{ + lightpadComponent.setVisible (false); + infoLabel.setVisible (true); + + // Reset the activeBlock object + if (activeBlock != nullptr) + detachActiveBlock(); + + // Get the array of currently connected Block objects from the PhysicalTopologySource + auto blocks = topologySource.getCurrentTopology().blocks; + + // Iterate over the array of Block objects + for (auto b : blocks) + { + // Find the first Lightpad + if (b->getType() == Block::Type::lightPadBlock) + { + activeBlock = b; + + // Register MainContentComponent as a listener to the touch surface + if (auto surface = activeBlock->getTouchSurface()) + surface->addListener (this); + + // Register MainContentComponent as a listener to any buttons + for (auto button : activeBlock->getButtons()) + button->addListener (this); + + // Get the LEDGrid object from the Lightpad and set its program to the program for the current mode + if (auto grid = activeBlock->getLEDGrid()) + { + // Work out scale factors to translate X and Y touches to LED indexes + scaleX = (float) (grid->getNumColumns() - 1) / activeBlock->getWidth(); + scaleY = (float) (grid->getNumRows() - 1) / activeBlock->getHeight(); + + setLEDProgram (*activeBlock); + } + + // Make the on screen Lighpad component visible + lightpadComponent.setVisible (true); + infoLabel.setVisible (false); + + break; + } + } +} + +//============================================================================== +void MainComponent::touchChanged (TouchSurface&, const TouchSurface::Touch& touch) +{ + // Translate X and Y touch events to LED indexes + auto xLed = roundToInt (touch.x * scaleX); + auto yLed = roundToInt (touch.y * scaleY); + + if (currentMode == colourPalette) + { + if (layout.setActiveColourForTouch (xLed, yLed)) + { + if (auto* colourPaletteProgram = getPaletteProgram()) + { + colourPaletteProgram->setGridFills (layout.numColumns, layout.numRows, layout.gridFillArray); + brightnessLED.setColour (layout.currentColour + .withBrightness (layout.currentColour == Colours::black ? 0.0f + : static_cast (brightnessSlider.getValue()))); + } + } + } + else if (currentMode == canvas) + { + drawLED ((uint32) xLed, (uint32) yLed, touch.z, layout.currentColour); + } +} + +void MainComponent::buttonReleased (ControlButton&, Block::Timestamp) +{ + if (currentMode == canvas) + { + // Wait 500ms to see if there is a second press + if (! isTimerRunning()) + startTimer (500); + else + doublePress = true; + } + else if (currentMode == colourPalette) + { + // Switch to canvas mode and set the LEDGrid program + currentMode = canvas; + setLEDProgram (*activeBlock); + } +} + +void MainComponent::buttonClicked (Button* b) +{ + #if JUCE_IOS + if (b == &connectButton) + { + BluetoothMidiDevicePairingDialogue::open(); + return; + } + #else + ignoreUnused (b); + #endif + + clearLEDs(); +} + +void MainComponent::sliderValueChanged (Slider* s) +{ + if (s == &brightnessSlider) + brightnessLED.setColour (layout.currentColour + .withBrightness (layout.currentColour == Colours::black ? 0.0f + : static_cast (brightnessSlider.getValue()))); +} + +void MainComponent::timerCallback() +{ + if (doublePress) + { + clearLEDs(); + + // Reset the doublePress flag + doublePress = false; + } + else + { + // Switch to colour palette mode and set the LEDGrid program + currentMode = colourPalette; + setLEDProgram (*activeBlock); + } + + stopTimer(); +} + +void MainComponent::ledClicked (int x, int y, float z) +{ + drawLED ((uint32) x, (uint32) y, + z == 0.0f ? static_cast (brightnessSlider.getValue()) + : z * static_cast (brightnessSlider.getValue()), layout.currentColour); +} + +void MainComponent::detachActiveBlock() +{ + if (auto surface = activeBlock->getTouchSurface()) + surface->removeListener (this); + + for (auto button : activeBlock->getButtons()) + button->removeListener (this); + + activeBlock = nullptr; +} + +void MainComponent::setLEDProgram (Block& block) +{ + if (currentMode == canvas) + { + block.setProgram (new BitmapLEDProgram (block)); + + // Redraw any previously drawn LEDs + redrawLEDs(); + } + else if (currentMode == colourPalette) + { + block.setProgram (new DrumPadGridProgram (block)); + + // Setup the grid layout + if (auto* program = getPaletteProgram()) + program->setGridFills (layout.numColumns, layout.numRows, layout.gridFillArray); + } +} + +void MainComponent::clearLEDs() +{ + if (auto* canvasProgram = getCanvasProgram()) + { + // Clear the LED grid + for (uint32 x = 0; x < 15; ++x) + { + for (uint32 y = 0; y < 15; ++ y) + { + canvasProgram->setLED (x, y, Colours::black); + lightpadComponent.setLEDColour (x, y, Colours::black); + } + } + + // Clear the ActiveLED array + activeLeds.clear(); + } +} + +void MainComponent::drawLED (uint32 x0, uint32 y0, float z, Colour drawColour) +{ + if (auto* canvasProgram = getCanvasProgram()) + { + // Check if the activeLeds array already contains an ActiveLED object for this LED + auto index = getLEDAt (x0, y0); + + // If the colour is black then just set the LED to black and return + if (drawColour == Colours::black) + { + if (index >= 0) + { + canvasProgram->setLED (x0, y0, Colours::black); + lightpadComponent.setLEDColour (x0, y0, Colours::black); + activeLeds.remove (index); + } + + return; + } + + // If there is no ActiveLED obejct for this LED then create one, + // add it to the array, set the LED on the Block and return + if (index < 0) + { + ActiveLED led; + led.x = x0; + led.y = y0; + led.colour = drawColour; + led.brightness = z; + + activeLeds.add (led); + canvasProgram->setLED (led.x, led.y, led.colour.withBrightness (led.brightness)); + + lightpadComponent.setLEDColour (led.x, led.y, led.colour.withBrightness (led.brightness)); + + return; + } + + // Get the ActiveLED object for this LED + auto currentLed = activeLeds.getReference (index); + + // If the LED colour is the same as the draw colour, add the brightnesses together. + // If it is different, blend the colours + if (currentLed.colour == drawColour) + currentLed.brightness = jmin (currentLed.brightness + z, 1.0f); + else + currentLed.colour = currentLed.colour.interpolatedWith (drawColour, z); + + + // Set the LED on the Block and change the ActiveLED object in the activeLeds array + if (canvasProgram != nullptr) + canvasProgram->setLED (currentLed.x, currentLed.y, currentLed.colour.withBrightness (currentLed.brightness)); + + lightpadComponent.setLEDColour (currentLed.x, currentLed.y, currentLed.colour.withBrightness (currentLed.brightness)); + + activeLeds.set (index, currentLed); + } +} + +void MainComponent::redrawLEDs() +{ + if (auto* canvasProgram = getCanvasProgram()) + { + // Iterate over the activeLeds array and set the LEDs on the Block + for (auto led : activeLeds) + { + canvasProgram->setLED (led.x, led.y, led.colour.withBrightness (led.brightness)); + lightpadComponent.setLEDColour (led.x, led.y, led.colour.withBrightness (led.brightness)); + } + } +} diff --git a/examples/BLOCKS/BlocksDrawing/Source/MainComponent.h b/examples/BLOCKS/BlocksDrawing/Source/MainComponent.h index 486988e1c8..3ce58afcac 100644 --- a/examples/BLOCKS/BlocksDrawing/Source/MainComponent.h +++ b/examples/BLOCKS/BlocksDrawing/Source/MainComponent.h @@ -49,11 +49,11 @@ struct ColourGrid { gridFillArray.clear(); - int counter = 0; + auto counter = 0; - for (int i = 0; i < numColumns; ++i) + for (auto i = 0; i < numColumns; ++i) { - for (int j = 0; j < numRows; ++j) + for (auto j = 0; j < numRows; ++j) { DrumPadGridProgram::GridFill fill; Colour colourToUse = colourArray.getUnchecked (counter); @@ -78,12 +78,12 @@ struct ColourGrid */ bool setActiveColourForTouch (int x, int y) { - bool colourHasChanged = false; + auto colourHasChanged = false; - int xindex = x / 5; - int yindex = y / 5; + auto xindex = x / 5; + auto yindex = y / 5; - Colour newColour = colourArray.getUnchecked ((yindex * 3) + xindex); + auto newColour = colourArray.getUnchecked ((yindex * 3) + xindex); if (currentColour != newColour) { currentColour = newColour; @@ -123,380 +123,64 @@ class MainComponent : public Component, private Timer { public: - MainComponent() - { - activeLeds.clear(); + MainComponent(); + ~MainComponent(); - // Register MainContentComponent as a listener to the PhysicalTopologySource object - topologySource.addListener (this); - - infoLabel.setText ("Connect a Lightpad Block to draw.", dontSendNotification); - infoLabel.setJustificationType (Justification::centred); - addAndMakeVisible (infoLabel); - - addAndMakeVisible (lightpadComponent); - lightpadComponent.setVisible (false); - lightpadComponent.addListener (this); - - clearButton.setButtonText ("Clear"); - clearButton.addListener (this); - clearButton.setAlwaysOnTop (true); - addAndMakeVisible (clearButton); - - brightnessSlider.setRange (0.0, 1.0); - brightnessSlider.setValue (1.0); - brightnessSlider.setAlwaysOnTop (true); - brightnessSlider.setTextBoxStyle (Slider::TextEntryBoxPosition::NoTextBox, false, 0, 0); - brightnessSlider.addListener (this); - addAndMakeVisible (brightnessSlider); - - brightnessLED.setAlwaysOnTop (true); - brightnessLED.setColour (layout.currentColour.withBrightness (static_cast (brightnessSlider.getValue()))); - addAndMakeVisible (brightnessLED); - - #if JUCE_IOS - connectButton.setButtonText ("Connect"); - connectButton.addListener (this); - connectButton.setAlwaysOnTop (true); - addAndMakeVisible (connectButton); - #endif - - setSize (600, 600); - } - - ~MainComponent() - { - if (activeBlock != nullptr) - detachActiveBlock(); - - lightpadComponent.removeListener (this); - } - - void paint (Graphics& g) override - { - } - - void resized() override - { - infoLabel.centreWithSize (getWidth(), 100); - - Rectangle bounds = getLocalBounds().reduced (20); - - // top buttons - Rectangle topButtonArea = bounds.removeFromTop (getHeight() / 20); - - topButtonArea.removeFromLeft (20); - clearButton.setBounds (topButtonArea.removeFromLeft (80)); - - #if JUCE_IOS - topButtonArea.removeFromRight (20); - connectButton.setBounds (topButtonArea.removeFromRight (80)); - #endif - - bounds.removeFromTop (20); - - // brightness controls - Rectangle brightnessControlBounds; - - Desktop::DisplayOrientation orientation = Desktop::getInstance().getCurrentOrientation(); - - if (orientation == Desktop::DisplayOrientation::upright || orientation == Desktop::DisplayOrientation::upsideDown) - { - brightnessControlBounds = bounds.removeFromBottom (getHeight() / 10); - - brightnessSlider.setSliderStyle (Slider::SliderStyle::LinearHorizontal); - brightnessLED.setBounds (brightnessControlBounds.removeFromLeft (getHeight() / 10)); - brightnessSlider.setBounds (brightnessControlBounds); - } - else - { - brightnessControlBounds = bounds.removeFromRight (getWidth() / 10); - - brightnessSlider.setSliderStyle (Slider::SliderStyle::LinearVertical); - brightnessLED.setBounds (brightnessControlBounds.removeFromTop (getWidth() / 10)); - brightnessSlider.setBounds (brightnessControlBounds); - } - - // lightpad component - int sideLength = jmin (bounds.getWidth() - 40, bounds.getHeight() - 40); - lightpadComponent.centreWithSize (sideLength, sideLength); - } + void resized() override; /** Overridden from TopologySource::Listener. Called when the topology changes */ - void topologyChanged() override - { - lightpadComponent.setVisible (false); - infoLabel.setVisible (true); - - // Reset the activeBlock object - if (activeBlock != nullptr) - detachActiveBlock(); - - // Get the array of currently connected Block objects from the PhysicalTopologySource - Block::Array blocks = topologySource.getCurrentTopology().blocks; - - // Iterate over the array of Block objects - for (auto b : blocks) - { - // Find the first Lightpad - if (b->getType() == Block::Type::lightPadBlock) - { - activeBlock = b; - - // Register MainContentComponent as a listener to the touch surface - if (auto surface = activeBlock->getTouchSurface()) - surface->addListener (this); - - // Register MainContentComponent as a listener to any buttons - for (auto button : activeBlock->getButtons()) - button->addListener (this); - - // Get the LEDGrid object from the Lightpad and set its program to the program for the current mode - if (auto grid = activeBlock->getLEDGrid()) - { - // Work out scale factors to translate X and Y touches to LED indexes - scaleX = (float) (grid->getNumColumns()) / activeBlock->getWidth(); - scaleY = (float) (grid->getNumRows()) / activeBlock->getHeight(); - - setLEDProgram (*activeBlock); - } - - // Make the on screen Lighpad component visible - lightpadComponent.setVisible (true); - infoLabel.setVisible (false); - - break; - } - } - } + void topologyChanged() override; private: /** Overridden from TouchSurface::Listener. Called when a Touch is received on the Lightpad */ - void touchChanged (TouchSurface&, const TouchSurface::Touch& touch) override - { - // Translate X and Y touch events to LED indexes - int xLed = roundToInt (touch.x * scaleX); - int yLed = roundToInt (touch.y * scaleY); - - if (currentMode == colourPalette) - { - if (layout.setActiveColourForTouch (xLed, yLed)) - { - colourPaletteProgram->setGridFills (layout.numColumns, layout.numRows, layout.gridFillArray); - brightnessLED.setColour (layout.currentColour.withBrightness (layout.currentColour == Colours::black ? 0.0f - : static_cast (brightnessSlider.getValue()))); - } - } - else if (currentMode == canvas) - { - drawLED ((uint32) xLed, (uint32) yLed, touch.z, layout.currentColour); - } - } + void touchChanged (TouchSurface&, const TouchSurface::Touch&) override; /** Overridden from ControlButton::Listener. Called when a button on the Lightpad is pressed */ void buttonPressed (ControlButton&, Block::Timestamp) override { } /** Overridden from ControlButton::Listener. Called when a button on the Lightpad is released */ - void buttonReleased (ControlButton&, Block::Timestamp) override - { - if (currentMode == canvas) - { - // Wait 500ms to see if there is a second press - if (! isTimerRunning()) - startTimer (500); - else - doublePress = true; - } - else if (currentMode == colourPalette) - { - // Switch to canvas mode and set the LEDGrid program - currentMode = canvas; - setLEDProgram (*activeBlock); - } - } + void buttonReleased (ControlButton&, Block::Timestamp) override; - void buttonClicked (Button* b) override - { - #if JUCE_IOS - if (b == &connectButton) - { - BluetoothMidiDevicePairingDialogue::open(); - return; - } - #else - ignoreUnused (b); - #endif + void ledClicked (int x, int y, float z) override; - clearLEDs(); - } + void buttonClicked (Button*) override; - void sliderValueChanged (Slider* s) override - { - if (s == &brightnessSlider) - brightnessLED.setColour (layout.currentColour.withBrightness (layout.currentColour == Colours::black ? 0.0f - : static_cast (brightnessSlider.getValue()))); - } + void sliderValueChanged (Slider*) override; - void timerCallback() override - { - if (doublePress) - { - clearLEDs(); - - // Reset the doublePress flag - doublePress = false; - } - else - { - // Switch to colour palette mode and set the LEDGrid program - currentMode = colourPalette; - setLEDProgram (*activeBlock); - } - - stopTimer(); - } - - void ledClicked (int x, int y, float z) override - { - drawLED ((uint32) x, (uint32) y, z == 0.0f ? static_cast (brightnessSlider.getValue()) - : z * static_cast (brightnessSlider.getValue()), layout.currentColour); - } + void timerCallback() override; /** Removes TouchSurface and ControlButton listeners and sets activeBlock to nullptr */ - void detachActiveBlock() - { - if (auto surface = activeBlock->getTouchSurface()) - surface->removeListener (this); - - for (auto button : activeBlock->getButtons()) - button->removeListener (this); - - activeBlock = nullptr; - } + void detachActiveBlock(); /** Sets the LEDGrid Program for the selected mode */ - void setLEDProgram (Block& block) - { - canvasProgram = nullptr; - colourPaletteProgram = nullptr; + void setLEDProgram (Block&); - if (currentMode == canvas) - { - // Create a new BitmapLEDProgram for the LEDGrid - canvasProgram = new BitmapLEDProgram (block); - - // Set the LEDGrid program - block.setProgram (canvasProgram); - - // Redraw any previously drawn LEDs - redrawLEDs(); - } - else if (currentMode == colourPalette) - { - // Create a new DrumPadGridProgram for the LEDGrid - colourPaletteProgram = new DrumPadGridProgram (block); - - // Set the LEDGrid program - block.setProgram (colourPaletteProgram); - - // Setup the grid layout - colourPaletteProgram->setGridFills (layout.numColumns, - layout.numRows, - layout.gridFillArray); - } - } - - void clearLEDs() - { - // Clear the LED grid - for (uint32 x = 0; x < 15; ++x) - { - for (uint32 y = 0; y < 15; ++ y) - { - if (canvasProgram != nullptr) - canvasProgram->setLED (x, y, Colours::black); - - lightpadComponent.setLEDColour (x, y, Colours::black); - } - } - - // Clear the ActiveLED array - activeLeds.clear(); - } + void clearLEDs(); /** Sets an LED on the Lightpad for a given touch co-ordinate and pressure */ - void drawLED (uint32 x0, uint32 y0, float z, Colour drawColour) - { - // Check if the activeLeds array already contains an ActiveLED object for this LED - auto index = getLEDAt (x0, y0); - - // If the colour is black then just set the LED to black and return - if (drawColour == Colours::black) - { - if (index >= 0) - { - if (canvasProgram != nullptr) - canvasProgram->setLED (x0, y0, Colours::black); - - lightpadComponent.setLEDColour (x0, y0, Colours::black); - - activeLeds.remove (index); - } - - return; - } - - // If there is no ActiveLED obejct for this LED then create one, - // add it to the array, set the LED on the Block and return - if (index < 0) - { - ActiveLED led; - led.x = x0; - led.y = y0; - led.colour = drawColour; - led.brightness = z; - - activeLeds.add (led); - - if (canvasProgram != nullptr) - canvasProgram->setLED (led.x, led.y, led.colour.withBrightness (led.brightness)); - - lightpadComponent.setLEDColour (led.x, led.y, led.colour.withBrightness (led.brightness)); - - return; - } - - // Get the ActiveLED object for this LED - ActiveLED currentLed = activeLeds.getReference (index); - - // If the LED colour is the same as the draw colour, add the brightnesses together. - // If it is different, blend the colours - if (currentLed.colour == drawColour) - currentLed.brightness = jmin (currentLed.brightness + z, 1.0f); - else - currentLed.colour = currentLed.colour.interpolatedWith (drawColour, z); - - - // Set the LED on the Block and change the ActiveLED object in the activeLeds array - if (canvasProgram != nullptr) - canvasProgram->setLED (currentLed.x, currentLed.y, currentLed.colour.withBrightness (currentLed.brightness)); - - lightpadComponent.setLEDColour (currentLed.x, currentLed.y, currentLed.colour.withBrightness (currentLed.brightness)); - - activeLeds.set (index, currentLed); - } + void drawLED (uint32 x0, uint32 y0, float z, Colour drawColour); /** Redraws the LEDs on the Lightpad from the activeLeds array */ - void redrawLEDs() + void redrawLEDs(); + + //============================================================================== + BitmapLEDProgram* getCanvasProgram() { - // Iterate over the activeLeds array and set the LEDs on the Block - for (auto led : activeLeds) - { - canvasProgram->setLED (led.x, led.y, led.colour.withBrightness (led.brightness)); - lightpadComponent.setLEDColour (led.x, led.y, led.colour.withBrightness (led.brightness)); - } + if (activeBlock != nullptr) + return dynamic_cast (activeBlock->getProgram()); + + return nullptr; } + DrumPadGridProgram* getPaletteProgram() + { + if (activeBlock != nullptr) + return dynamic_cast (activeBlock->getProgram()); + + return nullptr; + } + + //============================================================================== /** A struct that represents an active LED on the Lightpad. Has a position, colour and brightness. @@ -533,9 +217,6 @@ private: DisplayMode currentMode = colourPalette; //============================================================================== - BitmapLEDProgram* canvasProgram = nullptr; - DrumPadGridProgram* colourPaletteProgram = nullptr; - ColourGrid layout { 3, 3 }; PhysicalTopologySource topologySource; Block::Ptr activeBlock; @@ -545,7 +226,6 @@ private: bool doublePress = false; - //============================================================================== Label infoLabel; LightpadComponent lightpadComponent; TextButton clearButton; diff --git a/examples/BLOCKS/BlocksMonitor/BlocksMonitor.jucer b/examples/BLOCKS/BlocksMonitor/BlocksMonitor.jucer index 399bf8ca07..b13fed404a 100644 --- a/examples/BLOCKS/BlocksMonitor/BlocksMonitor.jucer +++ b/examples/BLOCKS/BlocksMonitor/BlocksMonitor.jucer @@ -2,8 +2,8 @@ + jucerVersion="5.1.0" displaySplashScreen="0" reportAppUsage="0" + splashScreenColour="Dark" cppLanguageStandard="11"> diff --git a/examples/BLOCKS/BlocksMonitor/Builds/LinuxMakefile/Makefile b/examples/BLOCKS/BlocksMonitor/Builds/LinuxMakefile/Makefile index 2a5a783c18..d7c4ed6262 100644 --- a/examples/BLOCKS/BlocksMonitor/Builds/LinuxMakefile/Makefile +++ b/examples/BLOCKS/BlocksMonitor/Builds/LinuxMakefile/Makefile @@ -83,6 +83,8 @@ OBJECTS_APP := \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) @echo Linking "BlocksMonitor - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) diff --git a/examples/BLOCKS/BlocksMonitor/Builds/MacOSX/BlocksMonitor.xcodeproj/project.pbxproj b/examples/BLOCKS/BlocksMonitor/Builds/MacOSX/BlocksMonitor.xcodeproj/project.pbxproj index f319fe0845..ac86026aa2 100644 --- a/examples/BLOCKS/BlocksMonitor/Builds/MacOSX/BlocksMonitor.xcodeproj/project.pbxproj +++ b/examples/BLOCKS/BlocksMonitor/Builds/MacOSX/BlocksMonitor.xcodeproj/project.pbxproj @@ -139,7 +139,7 @@ D42221B44DA511070878FD61, 601DB48110F08969733B9EF6, ); name = Source; sourceTree = ""; }; 393AB3EA96DA8E7AEC86AD00 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -160,8 +160,9 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -169,7 +170,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 0B575022E52611F3CF802F93 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -191,8 +192,9 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -201,16 +203,37 @@ USE_HEADERMAP = NO; }; name = Release; }; A88A0CA8AD66B56AA8A51727 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "BlocksMonitor"; @@ -218,15 +241,36 @@ ZERO_LINK = NO; }; name = Debug; }; 2BBD53B147BD1DADF7CD0BFA = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "BlocksMonitor"; WARNING_CFLAGS = -Wreorder; @@ -271,7 +315,7 @@ D08BB290D5F778E1450AD3F3, 9C2AF708958E95C688544D95, 2410311707C8C7B9E6CFE23D, ); buildRules = ( ); dependencies = ( ); name = "BlocksMonitor - App"; productName = BlocksMonitor; productReference = 00558AF4AA37DD00B15B21A8; productType = "com.apple.product-type.application"; }; - B42B7651E1352BD7921E5754 = {isa = PBXProject; buildConfigurationList = 61CDB68D74329CF066EA57D6; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 9C6BA11D1261B15A2F52EB60 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 5D6DAC6A0A862ED325F1DB34; projectDirPath = ""; projectRoot = ""; targets = (9C6BA11D1261B15A2F52EB60); }; + B42B7651E1352BD7921E5754 = {isa = PBXProject; buildConfigurationList = 61CDB68D74329CF066EA57D6; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 9C6BA11D1261B15A2F52EB60 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 5D6DAC6A0A862ED325F1DB34; projectDirPath = ""; projectRoot = ""; targets = (9C6BA11D1261B15A2F52EB60); }; }; rootObject = B42B7651E1352BD7921E5754; } diff --git a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor.sln b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor.sln index fcaac75c15..e89b3ea869 100644 --- a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor.sln +++ b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor.sln @@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {03DA01BF-8B38-2BC2-67A7-AE95C2E39250}.Debug|Win32.Build.0 = Debug|Win32 {03DA01BF-8B38-2BC2-67A7-AE95C2E39250}.Debug|Win32.ActiveCfg = Debug|Win32 - {03DA01BF-8B38-2BC2-67A7-AE95C2E39250}.Release|Win32.Build.0 = Release|Win32 + {03DA01BF-8B38-2BC2-67A7-AE95C2E39250}.Debug|Win32.Build.0 = Debug|Win32 {03DA01BF-8B38-2BC2-67A7-AE95C2E39250}.Release|Win32.ActiveCfg = Release|Win32 + {03DA01BF-8B38-2BC2-67A7-AE95C2E39250}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj index 8231a0f341..7cd5210bb7 100644 --- a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj +++ b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj @@ -16,6 +16,7 @@ {03DA01BF-8B38-2BC2-67A7-AE95C2E39250} v140 + 8.1 Application false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ BlocksMonitor true v140 + 8.1 @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -587,6 +591,9 @@ true + + true + true @@ -1739,7 +1746,6 @@ - @@ -1759,10 +1765,12 @@ + + @@ -1868,7 +1876,6 @@ - @@ -1924,6 +1931,7 @@ + @@ -2162,6 +2170,7 @@ + diff --git a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj.filters b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj.filters index 35a54c1185..f0abec2123 100644 --- a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj.filters +++ b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2015/BlocksMonitor_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -382,9 +385,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -445,6 +445,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -667,9 +670,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -847,6 +847,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2124,9 +2127,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2184,6 +2184,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2196,6 +2199,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2511,9 +2517,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -2679,6 +2682,9 @@ Juce Modules\juce_blocks_basics\blocks + + Juce Modules\juce_blocks_basics\blocks + Juce Modules\juce_blocks_basics\blocks @@ -3393,6 +3399,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor.sln b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor.sln index 5b3012da19..541d13c35d 100644 --- a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor.sln +++ b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {03DA01BF-8B38-2BC2-67A7-AE95C2E39250}.Debug|x64.Build.0 = Debug|x64 {03DA01BF-8B38-2BC2-67A7-AE95C2E39250}.Debug|x64.ActiveCfg = Debug|x64 - {03DA01BF-8B38-2BC2-67A7-AE95C2E39250}.Release|x64.Build.0 = Release|x64 + {03DA01BF-8B38-2BC2-67A7-AE95C2E39250}.Debug|x64.Build.0 = Debug|x64 {03DA01BF-8B38-2BC2-67A7-AE95C2E39250}.Release|x64.ActiveCfg = Release|x64 + {03DA01BF-8B38-2BC2-67A7-AE95C2E39250}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj index 20cc550fb1..d955fe2316 100644 --- a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj +++ b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj @@ -16,6 +16,7 @@ {03DA01BF-8B38-2BC2-67A7-AE95C2E39250} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ BlocksMonitor true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -151,9 +158,6 @@ true - - true - true @@ -214,6 +218,9 @@ true + + true + true @@ -430,9 +437,6 @@ true - - true - true @@ -586,6 +590,9 @@ true + + true + true @@ -1738,7 +1745,6 @@ - @@ -1758,10 +1764,12 @@ + + @@ -1867,7 +1875,6 @@ - @@ -1923,6 +1930,7 @@ + @@ -2161,6 +2169,7 @@ + diff --git a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj.filters b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj.filters index ce5e8fd097..6653c16b9f 100644 --- a/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj.filters +++ b/examples/BLOCKS/BlocksMonitor/Builds/VisualStudio2017/BlocksMonitor_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -382,9 +385,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -445,6 +445,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -667,9 +670,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -847,6 +847,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2124,9 +2127,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2184,6 +2184,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2196,6 +2199,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2511,9 +2517,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -2679,6 +2682,9 @@ Juce Modules\juce_blocks_basics\blocks + + Juce Modules\juce_blocks_basics\blocks + Juce Modules\juce_blocks_basics\blocks @@ -3393,6 +3399,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/BLOCKS/BlocksMonitor/Builds/iOS/BlocksMonitor.xcodeproj/project.pbxproj b/examples/BLOCKS/BlocksMonitor/Builds/iOS/BlocksMonitor.xcodeproj/project.pbxproj index 1a594289a9..b91bf9bc09 100644 --- a/examples/BLOCKS/BlocksMonitor/Builds/iOS/BlocksMonitor.xcodeproj/project.pbxproj +++ b/examples/BLOCKS/BlocksMonitor/Builds/iOS/BlocksMonitor.xcodeproj/project.pbxproj @@ -147,7 +147,7 @@ 393AB3EA96DA8E7AEC86AD00 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -168,15 +168,16 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.BlocksInfo; USE_HEADERMAP = NO; }; name = Debug; }; 0B575022E52611F3CF802F93 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -198,24 +199,46 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.BlocksInfo; USE_HEADERMAP = NO; }; name = Release; }; A88A0CA8AD66B56AA8A51727 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -227,15 +250,36 @@ 2BBD53B147BD1DADF7CD0BFA = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "BlocksMonitor"; @@ -285,7 +329,7 @@ D08BB290D5F778E1450AD3F3, 9C2AF708958E95C688544D95, 2410311707C8C7B9E6CFE23D, ); buildRules = ( ); dependencies = ( ); name = "BlocksMonitor - App"; productName = BlocksMonitor; productReference = 00558AF4AA37DD00B15B21A8; productType = "com.apple.product-type.application"; }; - B42B7651E1352BD7921E5754 = {isa = PBXProject; buildConfigurationList = 61CDB68D74329CF066EA57D6; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 9C6BA11D1261B15A2F52EB60 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 5D6DAC6A0A862ED325F1DB34; projectDirPath = ""; projectRoot = ""; targets = (9C6BA11D1261B15A2F52EB60); }; + B42B7651E1352BD7921E5754 = {isa = PBXProject; buildConfigurationList = 61CDB68D74329CF066EA57D6; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 9C6BA11D1261B15A2F52EB60 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 5D6DAC6A0A862ED325F1DB34; projectDirPath = ""; projectRoot = ""; targets = (9C6BA11D1261B15A2F52EB60); }; }; rootObject = B42B7651E1352BD7921E5754; } diff --git a/examples/BLOCKS/BlocksMonitor/JuceLibraryCode/AppConfig.h b/examples/BLOCKS/BlocksMonitor/JuceLibraryCode/AppConfig.h index 64b41c5282..2fac4519ce 100644 --- a/examples/BLOCKS/BlocksMonitor/JuceLibraryCode/AppConfig.h +++ b/examples/BLOCKS/BlocksMonitor/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -56,6 +62,174 @@ #define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 #define JUCE_MODULE_AVAILABLE_juce_opengl 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -64,172 +238,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_audio_utils flags: - -#ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER -#endif - -#ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif diff --git a/examples/BLOCKS/BlocksSynth/BlocksSynth.jucer b/examples/BLOCKS/BlocksSynth/BlocksSynth.jucer index 64d32dfe8f..3e1ef8853c 100644 --- a/examples/BLOCKS/BlocksSynth/BlocksSynth.jucer +++ b/examples/BLOCKS/BlocksSynth/BlocksSynth.jucer @@ -2,8 +2,8 @@ + jucerVersion="5.1.0" displaySplashScreen="0" reportAppUsage="0" + splashScreenColour="Dark" cppLanguageStandard="11"> diff --git a/examples/BLOCKS/BlocksSynth/Builds/LinuxMakefile/Makefile b/examples/BLOCKS/BlocksSynth/Builds/LinuxMakefile/Makefile index 28676b8fe1..0e6efbcde1 100644 --- a/examples/BLOCKS/BlocksSynth/Builds/LinuxMakefile/Makefile +++ b/examples/BLOCKS/BlocksSynth/Builds/LinuxMakefile/Makefile @@ -83,6 +83,8 @@ OBJECTS_APP := \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) @echo Linking "BlocksSynth - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) diff --git a/examples/BLOCKS/BlocksSynth/Builds/MacOSX/BlocksSynth.xcodeproj/project.pbxproj b/examples/BLOCKS/BlocksSynth/Builds/MacOSX/BlocksSynth.xcodeproj/project.pbxproj index ba141695d8..c6dd1f37c1 100644 --- a/examples/BLOCKS/BlocksSynth/Builds/MacOSX/BlocksSynth.xcodeproj/project.pbxproj +++ b/examples/BLOCKS/BlocksSynth/Builds/MacOSX/BlocksSynth.xcodeproj/project.pbxproj @@ -145,7 +145,7 @@ 0916F802A223C831DF7E3018, BEBE62C64C08316AE975AC01, ); name = Source; sourceTree = ""; }; BD1F40E3A4433BD30678025E = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -166,8 +166,9 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -175,7 +176,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 1EABC8E25D5063C5DE0DA4E2 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -197,8 +198,9 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -207,16 +209,37 @@ USE_HEADERMAP = NO; }; name = Release; }; 9FADB9B516D955EEE4CDF9B9 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "BlocksSynth"; @@ -224,15 +247,36 @@ ZERO_LINK = NO; }; name = Debug; }; 57DFE1C6F280A60ED6AF5D46 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "BlocksSynth"; WARNING_CFLAGS = -Wreorder; @@ -277,7 +321,7 @@ B62995CCD71EBA82C2BC1692, C8A1585A07BDCD77C240ECAA, 1EFBDD8D783B94E754626B32, ); buildRules = ( ); dependencies = ( ); name = "BlocksSynth - App"; productName = BlocksSynth; productReference = D778C2ED7EA9D5EDCFBA1507; productType = "com.apple.product-type.application"; }; - C28D173095C609C48901860E = {isa = PBXProject; buildConfigurationList = F2BDE5D743A9870C169E5CC8; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 0B9ADB15A71FB90DD6919895 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 0F4E2B72B683E9B48DF13DDB; projectDirPath = ""; projectRoot = ""; targets = (0B9ADB15A71FB90DD6919895); }; + C28D173095C609C48901860E = {isa = PBXProject; buildConfigurationList = F2BDE5D743A9870C169E5CC8; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 0B9ADB15A71FB90DD6919895 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 0F4E2B72B683E9B48DF13DDB; projectDirPath = ""; projectRoot = ""; targets = (0B9ADB15A71FB90DD6919895); }; }; rootObject = C28D173095C609C48901860E; } diff --git a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth.sln b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth.sln index a14aae89b0..8ba79256ab 100644 --- a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth.sln +++ b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth.sln @@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CB640A07-7531-1DE6-BD35-4AC4E7641B33}.Debug|Win32.Build.0 = Debug|Win32 {CB640A07-7531-1DE6-BD35-4AC4E7641B33}.Debug|Win32.ActiveCfg = Debug|Win32 - {CB640A07-7531-1DE6-BD35-4AC4E7641B33}.Release|Win32.Build.0 = Release|Win32 + {CB640A07-7531-1DE6-BD35-4AC4E7641B33}.Debug|Win32.Build.0 = Debug|Win32 {CB640A07-7531-1DE6-BD35-4AC4E7641B33}.Release|Win32.ActiveCfg = Release|Win32 + {CB640A07-7531-1DE6-BD35-4AC4E7641B33}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj index 91d6e9ceea..4b2d363f26 100644 --- a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj +++ b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj @@ -16,6 +16,7 @@ {CB640A07-7531-1DE6-BD35-4AC4E7641B33} v140 + 8.1 Application false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ BlocksSynth true v140 + 8.1 @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -587,6 +591,9 @@ true + + true + true @@ -1741,7 +1748,6 @@ - @@ -1761,10 +1767,12 @@ + + @@ -1870,7 +1878,6 @@ - @@ -1926,6 +1933,7 @@ + @@ -2164,6 +2172,7 @@ + diff --git a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj.filters b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj.filters index 8bddce3809..07d408b21c 100644 --- a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj.filters +++ b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2015/BlocksSynth_App.vcxproj.filters @@ -26,6 +26,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -385,9 +388,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -448,6 +448,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -670,9 +673,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -850,6 +850,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2133,9 +2136,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2193,6 +2193,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2205,6 +2208,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2520,9 +2526,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -2688,6 +2691,9 @@ Juce Modules\juce_blocks_basics\blocks + + Juce Modules\juce_blocks_basics\blocks + Juce Modules\juce_blocks_basics\blocks @@ -3402,6 +3408,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth.sln b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth.sln index 7c25f4d738..875b8f9e10 100644 --- a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth.sln +++ b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CB640A07-7531-1DE6-BD35-4AC4E7641B33}.Debug|x64.Build.0 = Debug|x64 {CB640A07-7531-1DE6-BD35-4AC4E7641B33}.Debug|x64.ActiveCfg = Debug|x64 - {CB640A07-7531-1DE6-BD35-4AC4E7641B33}.Release|x64.Build.0 = Release|x64 + {CB640A07-7531-1DE6-BD35-4AC4E7641B33}.Debug|x64.Build.0 = Debug|x64 {CB640A07-7531-1DE6-BD35-4AC4E7641B33}.Release|x64.ActiveCfg = Release|x64 + {CB640A07-7531-1DE6-BD35-4AC4E7641B33}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj index b262d84e05..567d9eacac 100644 --- a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj +++ b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj @@ -16,6 +16,7 @@ {CB640A07-7531-1DE6-BD35-4AC4E7641B33} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ BlocksSynth true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -151,9 +158,6 @@ true - - true - true @@ -214,6 +218,9 @@ true + + true + true @@ -430,9 +437,6 @@ true - - true - true @@ -586,6 +590,9 @@ true + + true + true @@ -1740,7 +1747,6 @@ - @@ -1760,10 +1766,12 @@ + + @@ -1869,7 +1877,6 @@ - @@ -1925,6 +1932,7 @@ + @@ -2163,6 +2171,7 @@ + diff --git a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj.filters b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj.filters index 7e6816b724..609970ea51 100644 --- a/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj.filters +++ b/examples/BLOCKS/BlocksSynth/Builds/VisualStudio2017/BlocksSynth_App.vcxproj.filters @@ -26,6 +26,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -385,9 +388,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -448,6 +448,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -670,9 +673,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -850,6 +850,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2133,9 +2136,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2193,6 +2193,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2205,6 +2208,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2520,9 +2526,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -2688,6 +2691,9 @@ Juce Modules\juce_blocks_basics\blocks + + Juce Modules\juce_blocks_basics\blocks + Juce Modules\juce_blocks_basics\blocks @@ -3402,6 +3408,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/BLOCKS/BlocksSynth/Builds/iOS/BlocksSynth.xcodeproj/project.pbxproj b/examples/BLOCKS/BlocksSynth/Builds/iOS/BlocksSynth.xcodeproj/project.pbxproj index cda59fe74d..068a09389b 100644 --- a/examples/BLOCKS/BlocksSynth/Builds/iOS/BlocksSynth.xcodeproj/project.pbxproj +++ b/examples/BLOCKS/BlocksSynth/Builds/iOS/BlocksSynth.xcodeproj/project.pbxproj @@ -153,7 +153,7 @@ BD1F40E3A4433BD30678025E = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -174,15 +174,16 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.BlocksSynth; USE_HEADERMAP = NO; }; name = Debug; }; 1EABC8E25D5063C5DE0DA4E2 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -204,24 +205,46 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.BlocksSynth; USE_HEADERMAP = NO; }; name = Release; }; 9FADB9B516D955EEE4CDF9B9 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -233,15 +256,36 @@ 57DFE1C6F280A60ED6AF5D46 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "BlocksSynth"; @@ -291,7 +335,7 @@ B62995CCD71EBA82C2BC1692, C8A1585A07BDCD77C240ECAA, 1EFBDD8D783B94E754626B32, ); buildRules = ( ); dependencies = ( ); name = "BlocksSynth - App"; productName = BlocksSynth; productReference = D778C2ED7EA9D5EDCFBA1507; productType = "com.apple.product-type.application"; }; - C28D173095C609C48901860E = {isa = PBXProject; buildConfigurationList = F2BDE5D743A9870C169E5CC8; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 0B9ADB15A71FB90DD6919895 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 0F4E2B72B683E9B48DF13DDB; projectDirPath = ""; projectRoot = ""; targets = (0B9ADB15A71FB90DD6919895); }; + C28D173095C609C48901860E = {isa = PBXProject; buildConfigurationList = F2BDE5D743A9870C169E5CC8; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 0B9ADB15A71FB90DD6919895 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 0F4E2B72B683E9B48DF13DDB; projectDirPath = ""; projectRoot = ""; targets = (0B9ADB15A71FB90DD6919895); }; }; rootObject = C28D173095C609C48901860E; } diff --git a/examples/BLOCKS/BlocksSynth/JuceLibraryCode/AppConfig.h b/examples/BLOCKS/BlocksSynth/JuceLibraryCode/AppConfig.h index 64b41c5282..2fac4519ce 100644 --- a/examples/BLOCKS/BlocksSynth/JuceLibraryCode/AppConfig.h +++ b/examples/BLOCKS/BlocksSynth/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -56,6 +62,174 @@ #define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 #define JUCE_MODULE_AVAILABLE_juce_opengl 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -64,172 +238,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_audio_utils flags: - -#ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER -#endif - -#ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif diff --git a/examples/BLOCKS/BlocksSynth/Source/Audio.h b/examples/BLOCKS/BlocksSynth/Source/Audio.h index 01560cf7cc..3067069154 100644 --- a/examples/BLOCKS/BlocksSynth/Source/Audio.h +++ b/examples/BLOCKS/BlocksSynth/Source/Audio.h @@ -92,7 +92,7 @@ public: /** Called to turn all synthesiser notes off */ void allNotesOff() { - for (int i = 1; i < 5; ++i) + for (auto i = 1; i < 5; ++i) synthesiser.allNotesOff (i, false); } diff --git a/examples/BLOCKS/BlocksSynth/Source/MainComponent.h b/examples/BLOCKS/BlocksSynth/Source/MainComponent.h index 120ccf08e0..256f9100fc 100644 --- a/examples/BLOCKS/BlocksSynth/Source/MainComponent.h +++ b/examples/BLOCKS/BlocksSynth/Source/MainComponent.h @@ -50,13 +50,13 @@ struct SynthGrid { gridFillArray.clear(); - for (int i = 0; i < numRows; ++i) + for (auto i = 0; i < numRows; ++i) { - for (int j = 0; j < numColumns; ++j) + for (auto j = 0; j < numColumns; ++j) { DrumPadGridProgram::GridFill fill; - int padNum = (i * 5) + j; + auto padNum = (i * 5) + j; fill.colour = notes.contains (padNum) ? baseGridColour : tonics.contains (padNum) ? Colours::white @@ -69,8 +69,8 @@ struct SynthGrid int getNoteNumberForPad (int x, int y) const { - int xIndex = x / 3; - int yIndex = y / 3; + auto xIndex = x / 3; + auto yIndex = y / 3; return 60 + ((4 - yIndex) * 5) + xIndex; } @@ -185,55 +185,61 @@ private: { if (currentMode == waveformSelectionMode && touch.isTouchStart && allowTouch) { - // Change the displayed waveshape to the next one - ++waveshapeMode; + if (auto* waveshapeProgram = getWaveshapeProgram()) + { + // Change the displayed waveshape to the next one + ++waveshapeMode; - if (waveshapeMode > 3) - waveshapeMode = 0; + if (waveshapeMode > 3) + waveshapeMode = 0; - waveshapeProgram->setWaveshapeType (static_cast (waveshapeMode)); + waveshapeProgram->setWaveshapeType (static_cast (waveshapeMode)); - allowTouch = false; - startTimer (250); + allowTouch = false; + startTimer (250); + } } else if (currentMode == playMode) { - // Translate X and Y touch events to LED indexes - int xLed = roundToInt (touch.startX * scaleX); - int yLed = roundToInt (touch.startY * scaleY); - - // Limit the number of touches per second - constexpr int maxNumTouchMessagesPerSecond = 100; - auto now = Time::getCurrentTime(); - clearOldTouchTimes (now); - - int midiChannel = waveshapeMode + 1; - - // Send the touch event to the DrumPadGridProgram and Audio class - if (touch.isTouchStart) + if (auto* gridProgram = getGridProgram()) { - gridProgram->startTouch (touch.startX, touch.startY); - audio.noteOn (midiChannel, layout.getNoteNumberForPad (xLed, yLed), touch.z); - } - else if (touch.isTouchEnd) - { - gridProgram->endTouch (touch.startX, touch.startY); - audio.noteOff (midiChannel, layout.getNoteNumberForPad (xLed, yLed), 1.0); - } - else - { - if (touchMessageTimesInLastSecond.size() > maxNumTouchMessagesPerSecond / 3) - return; + // Translate X and Y touch events to LED indexes + auto xLed = roundToInt (touch.startX * scaleX); + auto yLed = roundToInt (touch.startY * scaleY); - gridProgram->sendTouch (touch.x, touch.y, touch.z, - layout.touchColour); + // Limit the number of touches per second + constexpr auto maxNumTouchMessagesPerSecond = 100; + auto now = Time::getCurrentTime(); + clearOldTouchTimes (now); - // Send pitch change and pressure values to the Audio class - audio.pitchChange (midiChannel, (touch.x - touch.startX) / activeBlock->getWidth()); - audio.pressureChange (midiChannel, touch.z); + auto midiChannel = waveshapeMode + 1; + + // Send the touch event to the DrumPadGridProgram and Audio class + if (touch.isTouchStart) + { + gridProgram->startTouch (touch.startX, touch.startY); + audio.noteOn (midiChannel, layout.getNoteNumberForPad (xLed, yLed), touch.z); + } + else if (touch.isTouchEnd) + { + gridProgram->endTouch (touch.startX, touch.startY); + audio.noteOff (midiChannel, layout.getNoteNumberForPad (xLed, yLed), 1.0); + } + else + { + if (touchMessageTimesInLastSecond.size() > maxNumTouchMessagesPerSecond / 3) + return; + + gridProgram->sendTouch (touch.x, touch.y, touch.z, + layout.touchColour); + + // Send pitch change and pressure values to the Audio class + audio.pitchChange (midiChannel, (touch.x - touch.startX) / activeBlock->getWidth()); + audio.pressureChange (midiChannel, touch.z); + } + + touchMessageTimesInLastSecond.add (now); } - - touchMessageTimesInLastSecond.add (now); } } @@ -267,7 +273,7 @@ private: /** Clears the old touch times */ void clearOldTouchTimes (const Time now) { - for (int i = touchMessageTimesInLastSecond.size(); --i >= 0;) + for (auto i = touchMessageTimesInLastSecond.size(); --i >= 0;) if (touchMessageTimesInLastSecond.getReference(i) < now - juce::RelativeTime::seconds (0.33)) touchMessageTimesInLastSecond.remove (i); } @@ -289,23 +295,20 @@ private: { if (currentMode == waveformSelectionMode) { - // Create a new WaveshapeProgram for the LEDGrid - waveshapeProgram = new WaveshapeProgram (block); - // Set the LEDGrid program - block.setProgram (waveshapeProgram); + block.setProgram (new WaveshapeProgram (block)); // Initialise the program - waveshapeProgram->setWaveshapeType (static_cast (waveshapeMode)); - waveshapeProgram->generateWaveshapes(); + if (auto* waveshapeProgram = getWaveshapeProgram()) + { + waveshapeProgram->setWaveshapeType (static_cast (waveshapeMode)); + waveshapeProgram->generateWaveshapes(); + } } else if (currentMode == playMode) { - // Create a new DrumPadGridProgram for the LEDGrid - gridProgram = new DrumPadGridProgram (block); - // Set the LEDGrid program - auto error = block.setProgram (gridProgram); + auto error = block.setProgram (new DrumPadGridProgram (block)); if (error.failed()) { @@ -314,15 +317,32 @@ private: } // Setup the grid layout - gridProgram->setGridFills (layout.numColumns, - layout.numRows, - layout.gridFillArray); + if (auto* gridProgram = getGridProgram()) + gridProgram->setGridFills (layout.numColumns, layout.numRows, layout.gridFillArray); } } /** Stops touch events from triggering multiple waveshape mode changes */ void timerCallback() override { allowTouch = true; } + //============================================================================== + DrumPadGridProgram* getGridProgram() + { + if (activeBlock != nullptr) + return dynamic_cast (activeBlock->getProgram()); + + return nullptr; + } + + WaveshapeProgram* getWaveshapeProgram() + { + if (activeBlock != nullptr) + return dynamic_cast (activeBlock->getProgram()); + + return nullptr; + } + + //============================================================================== enum BlocksSynthMode { waveformSelectionMode = 0, @@ -334,9 +354,6 @@ private: //============================================================================== Audio audio; - DrumPadGridProgram* gridProgram = nullptr; - WaveshapeProgram* waveshapeProgram = nullptr; - SynthGrid layout { 5, 5 }; PhysicalTopologySource topologySource; Block::Ptr activeBlock; diff --git a/examples/BLOCKS/BlocksSynth/Source/Oscillators.h b/examples/BLOCKS/BlocksSynth/Source/Oscillators.h index 981ee83bee..1589f721f7 100644 --- a/examples/BLOCKS/BlocksSynth/Source/Oscillators.h +++ b/examples/BLOCKS/BlocksSynth/Source/Oscillators.h @@ -61,7 +61,7 @@ public: void pitchWheelMoved (int newValue) override { // Change the phase increment based on pitch bend amount - double frequencyOffset = ((newValue > 0 ? maxFreq : minFreq) * (newValue / 127.0)); + auto frequencyOffset = ((newValue > 0 ? maxFreq : minFreq) * (newValue / 127.0)); phaseIncrement.setValue (((2.0 * double_Pi) * (frequency + frequencyOffset)) / sampleRate); } @@ -79,9 +79,9 @@ public: { while (--numSamples >= 0) { - double output = getSample() * amplitude.getNextValue(); + auto output = getSample() * amplitude.getNextValue(); - for (int i = outputBuffer.getNumChannels(); --i >= 0;) + for (auto i = outputBuffer.getNumChannels(); --i >= 0;) outputBuffer.addSample (i, startSample, static_cast (output)); ++startSample; @@ -91,7 +91,7 @@ public: /** Returns the next sample */ double getSample() { - double output = renderWaveShape (phasePos); + auto output = renderWaveShape (phasePos); phasePos += phaseIncrement.getNextValue(); diff --git a/examples/BLOCKS/BlocksSynth/Source/WaveshapeProgram.h b/examples/BLOCKS/BlocksSynth/Source/WaveshapeProgram.h index 9eb748ac75..7c0f6b2cf2 100644 --- a/examples/BLOCKS/BlocksSynth/Source/WaveshapeProgram.h +++ b/examples/BLOCKS/BlocksSynth/Source/WaveshapeProgram.h @@ -50,13 +50,13 @@ public: uint8 triangleWaveY[45]; // Set current phase position to 0 and work out the required phase increment for one cycle - double currentPhase = 0.0; - double phaseInc = (1.0 / 30.0) * (2.0 * double_Pi); + auto currentPhase = 0.0; + auto phaseInc = (1.0 / 30.0) * (2.0 * double_Pi); - for (int x = 0; x < 30; ++x) + for (auto x = 0; x < 30; ++x) { // Scale and offset the sin output to the Lightpad display - double sineOutput = sin (currentPhase); + auto sineOutput = sin (currentPhase); sineWaveY[x] = static_cast (roundToInt ((sineOutput * 6.5) + 7.0)); // Square wave output, set flags for when vertical line should be drawn @@ -115,38 +115,22 @@ public: int yOffset; - int min (int a, int b) - { - if (a > b) - return b; - - return a; - } - - int max (int a, int b) - { - if (a > b) - return a; - - return b; - } - void drawLEDCircle (int x0, int y0) { - setLED (x0, y0, 0xffff0000); + blendPixel (0xffff0000, x0, y0); int minLedIndex = 0; int maxLedIndex = 14; - setLED (min (x0 + 1, maxLedIndex), y0, 0xff660000); - setLED (max (x0 - 1, minLedIndex), y0, 0xff660000); - setLED (x0, min (y0 + 1, maxLedIndex), 0xff660000); - setLED (x0, max (y0 - 1, minLedIndex), 0xff660000); + blendPixel (0xff660000, min (x0 + 1, maxLedIndex), y0); + blendPixel (0xff660000, max (x0 - 1, minLedIndex), y0); + blendPixel (0xff660000, x0, min (y0 + 1, maxLedIndex)); + blendPixel (0xff660000, x0, max (y0 - 1, minLedIndex)); - setLED (min (x0 + 1, maxLedIndex), min (y0 + 1, maxLedIndex), 0xff1a0000); - setLED (min (x0 + 1, maxLedIndex), max (y0 - 1, minLedIndex), 0xff1a0000); - setLED (max (x0 - 1, minLedIndex), min (y0 + 1, maxLedIndex), 0xff1a0000); - setLED (max (x0 - 1, minLedIndex), max (y0 - 1, minLedIndex), 0xff1a0000); + blendPixel (0xff1a0000, min (x0 + 1, maxLedIndex), min (y0 + 1, maxLedIndex)); + blendPixel (0xff1a0000, min (x0 + 1, maxLedIndex), max (y0 - 1, minLedIndex)); + blendPixel (0xff1a0000, max (x0 - 1, minLedIndex), min (y0 + 1, maxLedIndex)); + blendPixel (0xff1a0000, max (x0 - 1, minLedIndex), max (y0 - 1, minLedIndex)); } void repaint() diff --git a/examples/BouncingBallWavetableDemo/BouncingBallWavetableDemo.jucer b/examples/BouncingBallWavetableDemo/BouncingBallWavetableDemo.jucer index e112bb142a..1fc2b2639b 100644 --- a/examples/BouncingBallWavetableDemo/BouncingBallWavetableDemo.jucer +++ b/examples/BouncingBallWavetableDemo/BouncingBallWavetableDemo.jucer @@ -2,8 +2,9 @@ + includeBinaryInAppConfig="1" jucerVersion="5.1.0" displaySplashScreen="0" + reportAppUsage="0" splashScreenColour="Dark" companyName="ROLI Ltd." + cppLanguageStandard="11"> {92F70965-E03C-282C-1EE5-5DD138408925} v120 + 8.1 Application false v120 + 8.1 @@ -30,6 +32,7 @@ false true v120 + 8.1 @@ -40,6 +43,7 @@ v120 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ WavetableBouncingEditor true v120 + 8.1 @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -153,9 +160,6 @@ true - - true - true @@ -216,6 +220,9 @@ true + + true + true @@ -432,9 +439,6 @@ true - - true - true @@ -570,6 +574,9 @@ true + + true + true @@ -1692,13 +1699,7 @@ true - - true - - - true - - + true @@ -1726,7 +1727,6 @@ - @@ -1746,10 +1746,12 @@ + + @@ -1855,7 +1857,6 @@ - @@ -2134,6 +2135,7 @@ + @@ -2296,8 +2298,12 @@ - - + + + + + + diff --git a/examples/BouncingBallWavetableDemo/Builds/VisualStudio2013/BouncingBallWavetableDemo_App.vcxproj.filters b/examples/BouncingBallWavetableDemo/Builds/VisualStudio2013/BouncingBallWavetableDemo_App.vcxproj.filters index 490819a796..42ed29c6de 100644 --- a/examples/BouncingBallWavetableDemo/Builds/VisualStudio2013/BouncingBallWavetableDemo_App.vcxproj.filters +++ b/examples/BouncingBallWavetableDemo/Builds/VisualStudio2013/BouncingBallWavetableDemo_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -373,9 +376,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -436,6 +436,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -658,9 +661,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -820,6 +820,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2023,20 +2026,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2106,9 +2097,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2166,6 +2154,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2178,6 +2169,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2493,9 +2487,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3330,6 +3321,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -3816,10 +3810,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/BouncingBallWavetableDemo/Builds/VisualStudio2017/BouncingBallWavetableDemo.sln b/examples/BouncingBallWavetableDemo/Builds/VisualStudio2017/BouncingBallWavetableDemo.sln index a0ce9ceb50..015205bf53 100644 --- a/examples/BouncingBallWavetableDemo/Builds/VisualStudio2017/BouncingBallWavetableDemo.sln +++ b/examples/BouncingBallWavetableDemo/Builds/VisualStudio2017/BouncingBallWavetableDemo.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {92F70965-E03C-282C-1EE5-5DD138408925}.Debug|x64.Build.0 = Debug|x64 {92F70965-E03C-282C-1EE5-5DD138408925}.Debug|x64.ActiveCfg = Debug|x64 - {92F70965-E03C-282C-1EE5-5DD138408925}.Release|x64.Build.0 = Release|x64 + {92F70965-E03C-282C-1EE5-5DD138408925}.Debug|x64.Build.0 = Debug|x64 {92F70965-E03C-282C-1EE5-5DD138408925}.Release|x64.ActiveCfg = Release|x64 + {92F70965-E03C-282C-1EE5-5DD138408925}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/BouncingBallWavetableDemo/Builds/VisualStudio2017/BouncingBallWavetableDemo_App.vcxproj b/examples/BouncingBallWavetableDemo/Builds/VisualStudio2017/BouncingBallWavetableDemo_App.vcxproj index 0f8b1713d6..378372bda7 100644 --- a/examples/BouncingBallWavetableDemo/Builds/VisualStudio2017/BouncingBallWavetableDemo_App.vcxproj +++ b/examples/BouncingBallWavetableDemo/Builds/VisualStudio2017/BouncingBallWavetableDemo_App.vcxproj @@ -16,6 +16,7 @@ {92F70965-E03C-282C-1EE5-5DD138408925} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ BouncingBallWavetableDemo true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -569,6 +573,9 @@ true + + true + true @@ -1691,13 +1698,7 @@ true - - true - - - true - - + true @@ -1725,7 +1726,6 @@ - @@ -1745,10 +1745,12 @@ + + @@ -1854,7 +1856,6 @@ - @@ -2133,6 +2134,7 @@ + @@ -2295,8 +2297,12 @@ - - + + + + + + diff --git a/examples/BouncingBallWavetableDemo/Builds/VisualStudio2017/BouncingBallWavetableDemo_App.vcxproj.filters b/examples/BouncingBallWavetableDemo/Builds/VisualStudio2017/BouncingBallWavetableDemo_App.vcxproj.filters index ebf862662a..0c24c112f2 100644 --- a/examples/BouncingBallWavetableDemo/Builds/VisualStudio2017/BouncingBallWavetableDemo_App.vcxproj.filters +++ b/examples/BouncingBallWavetableDemo/Builds/VisualStudio2017/BouncingBallWavetableDemo_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -373,9 +376,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -436,6 +436,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -658,9 +661,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -820,6 +820,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2023,20 +2026,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2106,9 +2097,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2166,6 +2154,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2178,6 +2169,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2493,9 +2487,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3330,6 +3321,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -3816,10 +3810,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/BouncingBallWavetableDemo/JuceLibraryCode/AppConfig.h b/examples/BouncingBallWavetableDemo/JuceLibraryCode/AppConfig.h index 42cdccbcd6..a90a2dc3e9 100644 --- a/examples/BouncingBallWavetableDemo/JuceLibraryCode/AppConfig.h +++ b/examples/BouncingBallWavetableDemo/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -56,6 +62,181 @@ #define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 #define JUCE_MODULE_AVAILABLE_juce_video 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif + +//============================================================================== +// juce_video flags: + +#ifndef JUCE_USE_CAMERA + //#define JUCE_USE_CAMERA 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -64,191 +245,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_audio_utils flags: - -#ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER -#endif - -#ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif - -//============================================================================== -// juce_video flags: - -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - //#define JUCE_QUICKTIME -#endif - -#ifndef JUCE_USE_CAMERA - //#define JUCE_USE_CAMERA -#endif diff --git a/examples/ComponentTutorialExample/Builds/MacOSX/ComponentTutorialExample.xcodeproj/project.pbxproj b/examples/ComponentTutorialExample/Builds/MacOSX/ComponentTutorialExample.xcodeproj/project.pbxproj index c7975e0853..3167df208f 100644 --- a/examples/ComponentTutorialExample/Builds/MacOSX/ComponentTutorialExample.xcodeproj/project.pbxproj +++ b/examples/ComponentTutorialExample/Builds/MacOSX/ComponentTutorialExample.xcodeproj/project.pbxproj @@ -91,7 +91,7 @@ 640853E87E00574F350F71AE, 72B1FF7E8BB5B7DE3D5AA374, ); name = Source; sourceTree = ""; }; 9AB0087A8FE1D583D801BBC6 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -112,8 +112,9 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -121,7 +122,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 71AD821C6BAFC802F59B5091 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -143,8 +144,9 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -153,16 +155,37 @@ USE_HEADERMAP = NO; }; name = Release; }; 5D049546B6C238AD8CC74EDE = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "ComponentTutorialExample"; @@ -170,15 +193,36 @@ ZERO_LINK = NO; }; name = Debug; }; 2F64FFDD41FE35121A3E4A2D = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "ComponentTutorialExample"; WARNING_CFLAGS = -Wreorder; @@ -211,7 +255,7 @@ 7065518BA4A719BD600955DB, A0BD0396A9AB3F7FCF37AD62, 8F57F6817BE0F4126A95541F, ); buildRules = ( ); dependencies = ( ); name = "ComponentTutorialExample - App"; productName = ComponentTutorialExample; productReference = 48DBB774ADD58780B75FD130; productType = "com.apple.product-type.application"; }; - 3B89677F666BF40854CDE8D3 = {isa = PBXProject; buildConfigurationList = D2C0D08571281A97A8437C77; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { FDDAB81F5F4DA48E7807E65A = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D0953BB62CDDA1D6C60E6893; projectDirPath = ""; projectRoot = ""; targets = (FDDAB81F5F4DA48E7807E65A); }; + 3B89677F666BF40854CDE8D3 = {isa = PBXProject; buildConfigurationList = D2C0D08571281A97A8437C77; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { FDDAB81F5F4DA48E7807E65A = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D0953BB62CDDA1D6C60E6893; projectDirPath = ""; projectRoot = ""; targets = (FDDAB81F5F4DA48E7807E65A); }; }; rootObject = 3B89677F666BF40854CDE8D3; } diff --git a/examples/ComponentTutorialExample/Builds/VisualStudio2015/ComponentTutorialExample.sln b/examples/ComponentTutorialExample/Builds/VisualStudio2015/ComponentTutorialExample.sln index 58be4564a1..6caedff59d 100644 --- a/examples/ComponentTutorialExample/Builds/VisualStudio2015/ComponentTutorialExample.sln +++ b/examples/ComponentTutorialExample/Builds/VisualStudio2015/ComponentTutorialExample.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2ACA5085-A5CC-255B-B79D-D8256B0C459C}.Debug|x64.Build.0 = Debug|x64 {2ACA5085-A5CC-255B-B79D-D8256B0C459C}.Debug|x64.ActiveCfg = Debug|x64 - {2ACA5085-A5CC-255B-B79D-D8256B0C459C}.Release|x64.Build.0 = Release|x64 + {2ACA5085-A5CC-255B-B79D-D8256B0C459C}.Debug|x64.Build.0 = Debug|x64 {2ACA5085-A5CC-255B-B79D-D8256B0C459C}.Release|x64.ActiveCfg = Release|x64 + {2ACA5085-A5CC-255B-B79D-D8256B0C459C}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/ComponentTutorialExample/Builds/VisualStudio2015/ComponentTutorialExample_App.vcxproj b/examples/ComponentTutorialExample/Builds/VisualStudio2015/ComponentTutorialExample_App.vcxproj index a1962bf66a..e9db2c364f 100644 --- a/examples/ComponentTutorialExample/Builds/VisualStudio2015/ComponentTutorialExample_App.vcxproj +++ b/examples/ComponentTutorialExample/Builds/VisualStudio2015/ComponentTutorialExample_App.vcxproj @@ -16,6 +16,7 @@ {2ACA5085-A5CC-255B-B79D-D8256B0C459C} v140 + 8.1 false v140 v140 + 8.1 @@ -32,6 +34,7 @@ true v140 v140 + 8.1 @@ -42,6 +45,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ ComponentTutorialExample true v140 + 8.1 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -146,6 +153,9 @@ true + + true + true @@ -1472,6 +1482,7 @@ + diff --git a/examples/ComponentTutorialExample/Builds/VisualStudio2015/ComponentTutorialExample_App.vcxproj.filters b/examples/ComponentTutorialExample/Builds/VisualStudio2015/ComponentTutorialExample_App.vcxproj.filters index 6952c33ff4..469f1e839f 100644 --- a/examples/ComponentTutorialExample/Builds/VisualStudio2015/ComponentTutorialExample_App.vcxproj.filters +++ b/examples/ComponentTutorialExample/Builds/VisualStudio2015/ComponentTutorialExample_App.vcxproj.filters @@ -223,6 +223,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2079,6 +2082,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/ComponentTutorialExample/Builds/VisualStudio2017/ComponentTutorialExample.sln b/examples/ComponentTutorialExample/Builds/VisualStudio2017/ComponentTutorialExample.sln index a5da988476..8e40097825 100644 --- a/examples/ComponentTutorialExample/Builds/VisualStudio2017/ComponentTutorialExample.sln +++ b/examples/ComponentTutorialExample/Builds/VisualStudio2017/ComponentTutorialExample.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2ACA5085-A5CC-255B-B79D-D8256B0C459C}.Debug|x64.Build.0 = Debug|x64 {2ACA5085-A5CC-255B-B79D-D8256B0C459C}.Debug|x64.ActiveCfg = Debug|x64 - {2ACA5085-A5CC-255B-B79D-D8256B0C459C}.Release|x64.Build.0 = Release|x64 + {2ACA5085-A5CC-255B-B79D-D8256B0C459C}.Debug|x64.Build.0 = Debug|x64 {2ACA5085-A5CC-255B-B79D-D8256B0C459C}.Release|x64.ActiveCfg = Release|x64 + {2ACA5085-A5CC-255B-B79D-D8256B0C459C}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/ComponentTutorialExample/Builds/VisualStudio2017/ComponentTutorialExample_App.vcxproj b/examples/ComponentTutorialExample/Builds/VisualStudio2017/ComponentTutorialExample_App.vcxproj index 1426799ca7..38942d0d0b 100644 --- a/examples/ComponentTutorialExample/Builds/VisualStudio2017/ComponentTutorialExample_App.vcxproj +++ b/examples/ComponentTutorialExample/Builds/VisualStudio2017/ComponentTutorialExample_App.vcxproj @@ -16,6 +16,7 @@ {2ACA5085-A5CC-255B-B79D-D8256B0C459C} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ ComponentTutorialExample true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -146,6 +153,9 @@ true + + true + true @@ -1472,6 +1482,7 @@ + diff --git a/examples/ComponentTutorialExample/Builds/VisualStudio2017/ComponentTutorialExample_App.vcxproj.filters b/examples/ComponentTutorialExample/Builds/VisualStudio2017/ComponentTutorialExample_App.vcxproj.filters index 3b207a6f22..e3e66d5e9d 100644 --- a/examples/ComponentTutorialExample/Builds/VisualStudio2017/ComponentTutorialExample_App.vcxproj.filters +++ b/examples/ComponentTutorialExample/Builds/VisualStudio2017/ComponentTutorialExample_App.vcxproj.filters @@ -223,6 +223,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2079,6 +2082,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/ComponentTutorialExample/ComponentTutorialExample.jucer b/examples/ComponentTutorialExample/ComponentTutorialExample.jucer index cb042f09e3..059b9fdea0 100644 --- a/examples/ComponentTutorialExample/ComponentTutorialExample.jucer +++ b/examples/ComponentTutorialExample/ComponentTutorialExample.jucer @@ -2,8 +2,9 @@ + includeBinaryInAppConfig="1" jucerVersion="5.1.0" displaySplashScreen="0" + reportAppUsage="0" splashScreenColour="Dark" companyName="ROLI Ltd." + cppLanguageStandard="11"> + + + + com.apple.security.app-sandbox + + + 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 new file mode 100644 index 0000000000..6d574f9047 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/MacOSX/DSPModulePluginDemo.xcodeproj/project.pbxproj @@ -0,0 +1,679 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + + EDB68B89E16529101194A0A4 = {isa = PBXBuildFile; fileRef = 6CC9EC13527CA14B03FA973B; }; + 444898578DA3760506D55E5B = {isa = PBXBuildFile; fileRef = 43DFAB124163C15213BBED07; }; + 4C054C8C6DB0751716AF8F80 = {isa = PBXBuildFile; fileRef = 6ECB35361F65C478D40C1780; }; + DEBD1408904E7C52BE199084 = {isa = PBXBuildFile; fileRef = 5851FAC11BC7A9A306A2115C; }; + 6596E23ECE311FC63B07DFAA = {isa = PBXBuildFile; fileRef = E58D5EEF08C7014703A0025B; }; + 2ABC00C7F532C21E5FDA2EBD = {isa = PBXBuildFile; fileRef = 3E607F405463C9E5656553EA; }; + 87BD3AB6AFB4819D64F011A2 = {isa = PBXBuildFile; fileRef = CED87A27DFF9575256FA7F5D; }; + 0E359D9EFCDFA63B843DE0C2 = {isa = PBXBuildFile; fileRef = 961C9B885DA3E0AC3464BCBD; }; + 1FBDD61ADD3B67D7E94D2C95 = {isa = PBXBuildFile; fileRef = A0F1864B0D219515BB5BA270; }; + A239D02E1CABB075C80D23B9 = {isa = PBXBuildFile; fileRef = 7C5CDE08C8EF4BE709270ED5; }; + 257DD5660A6B8CCB9784617E = {isa = PBXBuildFile; fileRef = E0AE5F7D22223F02540452FE; }; + C7F16E40B8E83F4038BD10D6 = {isa = PBXBuildFile; fileRef = D46485171028FF024E570B2A; }; + D0BB7840C18F67F9C7E21811 = {isa = PBXBuildFile; fileRef = 13F6C42DE0053694E4C16231; }; + 748601DED26630B85FA93327 = {isa = PBXBuildFile; fileRef = CED27593A089D97172AF186E; }; + 1DA63B876AEC03C50379E3BC = {isa = PBXBuildFile; fileRef = 1058D4DF18DD28E4D34AFF49; }; + E9C2696E4C9907723B17EB25 = {isa = PBXBuildFile; fileRef = 1BB4D4A89E99028C66D175F2; }; + 9E69DAE32EA636F9BAA58181 = {isa = PBXBuildFile; fileRef = 348B8DA18713BD21D6ADAE63; }; + 05D62221011CE11F0EC48591 = {isa = PBXBuildFile; fileRef = A9D05DC31D5B6B6255CDF85B; }; + 927A6A221F818117698AD048 = {isa = PBXBuildFile; fileRef = 0F5B65B42AC0D88131ACC435; }; + BED5197DA3176BB20A80D711 = {isa = PBXBuildFile; fileRef = DF4F34D5DEEF6B023422DC18; }; + CB479EF124D7305444491E98 = {isa = PBXBuildFile; fileRef = 32359700BC19E4FCBED60398; }; + 516591F081614C232FE9990E = {isa = PBXBuildFile; fileRef = D6D9D70E4A574D02F901E982; }; + B5A08790A38DC8E0B9DC4132 = {isa = PBXBuildFile; fileRef = 95D8D4D49997206F87816098; }; + DE739D9010D85316C5DABC26 = {isa = PBXBuildFile; fileRef = 3E7A2DBFD549B9D8E8747A7A; }; + CB3AC1303FE7F890C4AED32B = {isa = PBXBuildFile; fileRef = A56A6886B40C25E08CB7EA87; }; + 78F40BA593BCC498B936A808 = {isa = PBXBuildFile; fileRef = 01006E935DD0BAE532C3ECAE; }; + 7F45F27A4282DF9ED190834D = {isa = PBXBuildFile; fileRef = 183A4963B01DB1CB60C02971; }; + 0FF7A9FB4ECA5A6BA40868EA = {isa = PBXBuildFile; fileRef = 0F638FDE546751C4EB3FB2BF; }; + 000A2BFBF2ADC71938465E4A = {isa = PBXBuildFile; fileRef = 99FF6F396344C15B8AB103C0; }; + F83EC007146888DD314A4C71 = {isa = PBXBuildFile; fileRef = AEA7AAC6D764CAF805483271; }; + 2EA689D1CE72AB071F8D5A26 = {isa = PBXBuildFile; fileRef = 55E7F532F9F2660BBF47D150; }; + DCA6DDBF80EA443E44139709 = {isa = PBXBuildFile; fileRef = FBB2326F27D1F4F349C0A04F; }; + FE020287936CFBD09F51C6D7 = {isa = PBXBuildFile; fileRef = 02EC6ECB86A01FABB59B01C9; }; + 933258C44D57B72BE234248B = {isa = PBXBuildFile; fileRef = 105DA46CB4D1468AC889FB49; }; + 920A613B41815B0659D3D851 = {isa = PBXBuildFile; fileRef = 06B761F42468B7D59BCC5307; }; + A38EE77F912D1AA461B859C0 = {isa = PBXBuildFile; fileRef = 38192C77EC1E7712E62C0989; }; + B1F00C0BE7281A68684BB822 = {isa = PBXBuildFile; fileRef = F5C43F6E5C283F90F2A4F340; }; + 4544BD26C1FE23E239034166 = {isa = PBXBuildFile; fileRef = 05DBBF5F3485C2E544373865; }; + 038A9D596278FB9E7E89413B = {isa = PBXBuildFile; fileRef = B6B4A73354585A2325159041; }; + 70A80033020B14A288495FAE = {isa = PBXBuildFile; fileRef = 4EDB66BD6044844FD91AB454; }; + 86F6C3A56C105C073BB092F1 = {isa = PBXBuildFile; fileRef = DC55419EC248433D9DCEF2F6; }; + 01006E935DD0BAE532C3ECAE = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_plugin_client_AU_1.mm"; path = "../../JuceLibraryCode/include_juce_audio_plugin_client_AU_1.mm"; sourceTree = "SOURCE_ROOT"; }; + 02EC6ECB86A01FABB59B01C9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_utils.mm"; path = "../../JuceLibraryCode/include_juce_audio_utils.mm"; sourceTree = "SOURCE_ROOT"; }; + 05DBBF5F3485C2E544373865 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; }; + 06B761F42468B7D59BCC5307 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_data_structures.mm"; path = "../../JuceLibraryCode/include_juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; }; + 0F5B65B42AC0D88131ACC435 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = PluginProcessor.cpp; path = ../../Source/PluginProcessor.cpp; sourceTree = "SOURCE_ROOT"; }; + 0F638FDE546751C4EB3FB2BF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_audio_plugin_client_Standalone.cpp"; path = "../../JuceLibraryCode/include_juce_audio_plugin_client_Standalone.cpp"; sourceTree = "SOURCE_ROOT"; }; + 1058D4DF18DD28E4D34AFF49 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + 105DA46CB4D1468AC889FB49 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_core.mm"; path = "../../JuceLibraryCode/include_juce_core.mm"; sourceTree = "SOURCE_ROOT"; }; + 13F6C42DE0053694E4C16231 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = System/Library/Frameworks/DiscRecording.framework; sourceTree = SDKROOT; }; + 175BA4CF878E442535FB700F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; }; + 183A4963B01DB1CB60C02971 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_plugin_client_AU_2.mm"; path = "../../JuceLibraryCode/include_juce_audio_plugin_client_AU_2.mm"; sourceTree = "SOURCE_ROOT"; }; + 1961FC5FD545D75001FDABD3 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_basics"; path = "../../../../modules/juce_audio_basics"; sourceTree = "SOURCE_ROOT"; }; + 1BB4D4A89E99028C66D175F2 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 22CFFED16B13CD30771E2042 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_devices"; path = "../../../../modules/juce_audio_devices"; sourceTree = "SOURCE_ROOT"; }; + 2DB7D022F0784299386FBF30 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_processors"; path = "../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; }; + 32359700BC19E4FCBED60398 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = BinaryData.cpp; path = ../../JuceLibraryCode/BinaryData.cpp; sourceTree = "SOURCE_ROOT"; }; + 348B8DA18713BD21D6ADAE63 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; + 3538AFF193BB2650DA9E6A3E = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-Standalone_Plugin.plist"; path = "Info-Standalone_Plugin.plist"; sourceTree = "SOURCE_ROOT"; }; + 35DEEA5D22BEC9812D2EDD66 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_dsp"; path = "../../../../modules/juce_dsp"; sourceTree = "SOURCE_ROOT"; }; + 38192C77EC1E7712E62C0989 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_dsp.mm"; path = "../../JuceLibraryCode/include_juce_dsp.mm"; sourceTree = "SOURCE_ROOT"; }; + 3B97D675E3CC2129870F0A81 = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-VST.plist"; path = "Info-VST.plist"; sourceTree = "SOURCE_ROOT"; }; + 3E607F405463C9E5656553EA = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + 3E7A2DBFD549B9D8E8747A7A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_formats.mm"; path = "../../JuceLibraryCode/include_juce_audio_formats.mm"; sourceTree = "SOURCE_ROOT"; }; + 40A7CEE51A879AFBA929BD39 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_utils"; path = "../../../../modules/juce_audio_utils"; sourceTree = "SOURCE_ROOT"; }; + 4EDB66BD6044844FD91AB454 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_extra.mm"; path = "../../JuceLibraryCode/include_juce_gui_extra.mm"; sourceTree = "SOURCE_ROOT"; }; + 55E7F532F9F2660BBF47D150 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_audio_plugin_client_VST2.cpp"; path = "../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp"; sourceTree = "SOURCE_ROOT"; }; + 6CC9EC13527CA14B03FA973B = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "DSP module plugin demo.vst"; sourceTree = "BUILT_PRODUCTS_DIR"; }; + 43DFAB124163C15213BBED07 = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "DSP module plugin demo.component"; sourceTree = "BUILT_PRODUCTS_DIR"; }; + 6ECB35361F65C478D40C1780 = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DSP module plugin demo.app"; sourceTree = "BUILT_PRODUCTS_DIR"; }; + 5851FAC11BC7A9A306A2115C = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libDSP module plugin demo.a"; sourceTree = "BUILT_PRODUCTS_DIR"; }; + 65FB47819815828831ED5492 = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = DSPModulePluginDemo.entitlements; path = DSPModulePluginDemo.entitlements; sourceTree = "SOURCE_ROOT"; }; + 742DAF72957E8B96BE78BD7F = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_basics"; path = "../../../../modules/juce_gui_basics"; sourceTree = "SOURCE_ROOT"; }; + 7945CE0DAA79F5F4D50BF4D2 = {isa = PBXFileReference; lastKnownFileType = file.wav; name = Impulse1.wav; path = ../../Resources/Impulse1.wav; sourceTree = "SOURCE_ROOT"; }; + 7C5CDE08C8EF4BE709270ED5 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; + 813F49904A02FC0625EF4E44 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BinaryData.h; path = ../../JuceLibraryCode/BinaryData.h; sourceTree = "SOURCE_ROOT"; }; + 81F4B89FC6E02F3735D8D9C5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; }; + 84417BEB644A6A51D0076276 = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-AU.plist"; path = "Info-AU.plist"; sourceTree = "SOURCE_ROOT"; }; + 89678491393C6CB9D36167E3 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_core"; path = "../../../../modules/juce_core"; sourceTree = "SOURCE_ROOT"; }; + 8AD3462560ED6DE5361E9542 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_data_structures"; path = "../../../../modules/juce_data_structures"; sourceTree = "SOURCE_ROOT"; }; + 921C5C19C616CFA7AA257E16 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_formats"; path = "../../../../modules/juce_audio_formats"; sourceTree = "SOURCE_ROOT"; }; + 95D8D4D49997206F87816098 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_devices.mm"; path = "../../JuceLibraryCode/include_juce_audio_devices.mm"; sourceTree = "SOURCE_ROOT"; }; + 961C9B885DA3E0AC3464BCBD = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; + 99FF6F396344C15B8AB103C0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_audio_plugin_client_utils.cpp"; path = "../../JuceLibraryCode/include_juce_audio_plugin_client_utils.cpp"; sourceTree = "SOURCE_ROOT"; }; + A0F1864B0D219515BB5BA270 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + A56A6886B40C25E08CB7EA87 = {isa = PBXFileReference; lastKnownFileType = file.r; name = "include_juce_audio_plugin_client_AU.r"; path = "../../JuceLibraryCode/include_juce_audio_plugin_client_AU.r"; sourceTree = "SOURCE_ROOT"; }; + A7EC6E77560A46FE389C2256 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_graphics"; path = "../../../../modules/juce_graphics"; sourceTree = "SOURCE_ROOT"; }; + A9D05DC31D5B6B6255CDF85B = {isa = PBXFileReference; lastKnownFileType = file.nib; name = RecentFilesMenuTemplate.nib; path = RecentFilesMenuTemplate.nib; sourceTree = "SOURCE_ROOT"; }; + AD28A9899D1537C2FFA071C0 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_opengl"; path = "../../../../modules/juce_opengl"; sourceTree = "SOURCE_ROOT"; }; + AEA7AAC6D764CAF805483271 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_plugin_client_VST_utils.mm"; path = "../../JuceLibraryCode/include_juce_audio_plugin_client_VST_utils.mm"; sourceTree = "SOURCE_ROOT"; }; + B6B4A73354585A2325159041 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_basics.mm"; path = "../../JuceLibraryCode/include_juce_gui_basics.mm"; sourceTree = "SOURCE_ROOT"; }; + B93057A70F9B231A4F4CD42C = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PluginEditor.h; path = ../../Source/PluginEditor.h; sourceTree = "SOURCE_ROOT"; }; + BFDD5EE256AD2001BFA5C375 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_extra"; path = "../../../../modules/juce_gui_extra"; sourceTree = "SOURCE_ROOT"; }; + CED27593A089D97172AF186E = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; + CED87A27DFF9575256FA7F5D = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; + D220A9ED0773C36334342CA8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PluginProcessor.h; path = ../../Source/PluginProcessor.h; sourceTree = "SOURCE_ROOT"; }; + D46485171028FF024E570B2A = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; }; + D6D9D70E4A574D02F901E982 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_basics.mm"; path = "../../JuceLibraryCode/include_juce_audio_basics.mm"; sourceTree = "SOURCE_ROOT"; }; + D7A3488AAC47DF0000AA7FC2 = {isa = PBXFileReference; lastKnownFileType = file.wav; name = Impulse2.wav; path = ../../Resources/Impulse2.wav; sourceTree = "SOURCE_ROOT"; }; + DB8B92EA1876CF4B89BA4B96 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_events"; path = "../../../../modules/juce_events"; sourceTree = "SOURCE_ROOT"; }; + DC55419EC248433D9DCEF2F6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_opengl.mm"; path = "../../JuceLibraryCode/include_juce_opengl.mm"; sourceTree = "SOURCE_ROOT"; }; + DF4F34D5DEEF6B023422DC18 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = PluginEditor.cpp; path = ../../Source/PluginEditor.cpp; sourceTree = "SOURCE_ROOT"; }; + E0AE5F7D22223F02540452FE = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudioKit.framework; path = System/Library/Frameworks/CoreAudioKit.framework; sourceTree = SDKROOT; }; + E58D5EEF08C7014703A0025B = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + F5023452DDFA08BAFC7D3865 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_plugin_client"; path = "../../../../modules/juce_audio_plugin_client"; sourceTree = "SOURCE_ROOT"; }; + F5C43F6E5C283F90F2A4F340 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_events.mm"; path = "../../JuceLibraryCode/include_juce_events.mm"; sourceTree = "SOURCE_ROOT"; }; + FBB2326F27D1F4F349C0A04F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_processors.mm"; path = "../../JuceLibraryCode/include_juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; }; + AB4CF2E0A98B1393AF7AEE87 = {isa = PBXGroup; children = ( + 7945CE0DAA79F5F4D50BF4D2, + D7A3488AAC47DF0000AA7FC2, ); name = Resources; sourceTree = ""; }; + 8D6005B67FE4F76C89EF6DC0 = {isa = PBXGroup; children = ( + 0F5B65B42AC0D88131ACC435, + D220A9ED0773C36334342CA8, + DF4F34D5DEEF6B023422DC18, + B93057A70F9B231A4F4CD42C, ); name = Source; sourceTree = ""; }; + C851023CC5ED726A8D2CC932 = {isa = PBXGroup; children = ( + AB4CF2E0A98B1393AF7AEE87, + 8D6005B67FE4F76C89EF6DC0, ); name = DSPModulePluginDemo; sourceTree = ""; }; + E8878A4C834C923D0EA1C066 = {isa = PBXGroup; children = ( + 1961FC5FD545D75001FDABD3, + 22CFFED16B13CD30771E2042, + 921C5C19C616CFA7AA257E16, + F5023452DDFA08BAFC7D3865, + 2DB7D022F0784299386FBF30, + 40A7CEE51A879AFBA929BD39, + 89678491393C6CB9D36167E3, + 8AD3462560ED6DE5361E9542, + 35DEEA5D22BEC9812D2EDD66, + DB8B92EA1876CF4B89BA4B96, + A7EC6E77560A46FE389C2256, + 742DAF72957E8B96BE78BD7F, + BFDD5EE256AD2001BFA5C375, + AD28A9899D1537C2FFA071C0, ); name = "Juce Modules"; sourceTree = ""; }; + CCCFBE2627561A7372430459 = {isa = PBXGroup; children = ( + 81F4B89FC6E02F3735D8D9C5, + 32359700BC19E4FCBED60398, + 813F49904A02FC0625EF4E44, + D6D9D70E4A574D02F901E982, + 95D8D4D49997206F87816098, + 3E7A2DBFD549B9D8E8747A7A, + A56A6886B40C25E08CB7EA87, + 01006E935DD0BAE532C3ECAE, + 183A4963B01DB1CB60C02971, + 0F638FDE546751C4EB3FB2BF, + 99FF6F396344C15B8AB103C0, + AEA7AAC6D764CAF805483271, + 55E7F532F9F2660BBF47D150, + FBB2326F27D1F4F349C0A04F, + 02EC6ECB86A01FABB59B01C9, + 105DA46CB4D1468AC889FB49, + 06B761F42468B7D59BCC5307, + 38192C77EC1E7712E62C0989, + F5C43F6E5C283F90F2A4F340, + 05DBBF5F3485C2E544373865, + B6B4A73354585A2325159041, + 4EDB66BD6044844FD91AB454, + DC55419EC248433D9DCEF2F6, + 175BA4CF878E442535FB700F, ); name = "Juce Library Code"; sourceTree = ""; }; + 2C63AEF93C2B69C8D277B2E9 = {isa = PBXGroup; children = ( + 3B97D675E3CC2129870F0A81, + 84417BEB644A6A51D0076276, + 3538AFF193BB2650DA9E6A3E, + A9D05DC31D5B6B6255CDF85B, ); name = Resources; sourceTree = ""; }; + 9D498CA55622293EBF2B5541 = {isa = PBXGroup; children = ( + E58D5EEF08C7014703A0025B, + 3E607F405463C9E5656553EA, + CED87A27DFF9575256FA7F5D, + 961C9B885DA3E0AC3464BCBD, + A0F1864B0D219515BB5BA270, + 7C5CDE08C8EF4BE709270ED5, + E0AE5F7D22223F02540452FE, + D46485171028FF024E570B2A, + 13F6C42DE0053694E4C16231, + CED27593A089D97172AF186E, + 1058D4DF18DD28E4D34AFF49, + 1BB4D4A89E99028C66D175F2, + 348B8DA18713BD21D6ADAE63, ); name = Frameworks; sourceTree = ""; }; + ECAB40FE9EE9DADDD1A046A7 = {isa = PBXGroup; children = ( + 6CC9EC13527CA14B03FA973B, + 43DFAB124163C15213BBED07, + 6ECB35361F65C478D40C1780, + 5851FAC11BC7A9A306A2115C, ); name = Products; sourceTree = ""; }; + C9207BAC9FE8B3F8C8FFA4AF = {isa = PBXGroup; children = ( + 65FB47819815828831ED5492, + C851023CC5ED726A8D2CC932, + E8878A4C834C923D0EA1C066, + CCCFBE2627561A7372430459, + 2C63AEF93C2B69C8D277B2E9, + 9D498CA55622293EBF2B5541, + ECAB40FE9EE9DADDD1A046A7, ); name = Source; sourceTree = ""; }; + F9CE5A87AC1D6AC6825FFFC3 = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; + A013BD29D257623287C95474 = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; + CFDBE7ED06E755632B329B37 = {isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; + CLANG_LINK_OBJC_RUNTIME = NO; + COMBINE_HIDPI_IMAGES = YES; + CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = /; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_DEBUG=1", + "DEBUG=1", + "JUCER_XCODE_MAC_F6D2F4CF=1", + "JUCE_APP_VERSION=1.0.0", + "JUCE_APP_VERSION_HEX=0x10000", + "JucePlugin_Build_VST=1", + "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; + GENERATE_PKGINFO_FILE = YES; + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); + INFOPLIST_FILE = Info-VST.plist; + INFOPLIST_PREPROCESS = NO; + INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; + LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; + 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 -Wextra-semi"; + OTHER_LDFLAGS = "-bundle -lDSP\\ module\\ plugin\\ demo"; + PRODUCT_BUNDLE_IDENTIFIER = com.ROLI.DSPmoduleplugindemo; + SDKROOT_ppc = macosx10.5; + USE_HEADERMAP = NO; + WRAPPER_EXTENSION = vst; }; name = Debug; }; + F344384C78BEEC5F9C53B197 = {isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; + CLANG_LINK_OBJC_RUNTIME = NO; + COMBINE_HIDPI_IMAGES = YES; + CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DSTROOT = /; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_NDEBUG=1", + "NDEBUG=1", + "JUCER_XCODE_MAC_F6D2F4CF=1", + "JUCE_APP_VERSION=1.0.0", + "JUCE_APP_VERSION_HEX=0x10000", + "JucePlugin_Build_VST=1", + "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; + GENERATE_PKGINFO_FILE = YES; + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); + INFOPLIST_FILE = Info-VST.plist; + INFOPLIST_PREPROCESS = NO; + INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; + LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; + 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 -Wextra-semi"; + OTHER_LDFLAGS = "-bundle -lDSP\\ module\\ plugin\\ demo"; + PRODUCT_BUNDLE_IDENTIFIER = com.ROLI.DSPmoduleplugindemo; + SDKROOT_ppc = macosx10.5; + USE_HEADERMAP = NO; + WRAPPER_EXTENSION = vst; }; name = Release; }; + 8BB96CF4AA358540ABE3E27C = {isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; + CLANG_LINK_OBJC_RUNTIME = NO; + COMBINE_HIDPI_IMAGES = YES; + CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = /; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_DEBUG=1", + "DEBUG=1", + "JUCER_XCODE_MAC_F6D2F4CF=1", + "JUCE_APP_VERSION=1.0.0", + "JUCE_APP_VERSION_HEX=0x10000", + "JucePlugin_Build_VST=0", + "JucePlugin_Build_VST3=0", + "JucePlugin_Build_AU=1", + "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; + GENERATE_PKGINFO_FILE = YES; + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); + INFOPLIST_FILE = Info-AU.plist; + INFOPLIST_PREPROCESS = NO; + INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; + LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; + 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 -Wextra-semi"; + OTHER_LDFLAGS = "-bundle -lDSP\\ module\\ plugin\\ demo"; + OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\""; + PRODUCT_BUNDLE_IDENTIFIER = com.ROLI.DSPmoduleplugindemo; + SDKROOT_ppc = macosx10.5; + USE_HEADERMAP = NO; + WRAPPER_EXTENSION = component; }; name = Debug; }; + 2A0CA9707CB82EB2045B5619 = {isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; + CLANG_LINK_OBJC_RUNTIME = NO; + COMBINE_HIDPI_IMAGES = YES; + CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DSTROOT = /; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_NDEBUG=1", + "NDEBUG=1", + "JUCER_XCODE_MAC_F6D2F4CF=1", + "JUCE_APP_VERSION=1.0.0", + "JUCE_APP_VERSION_HEX=0x10000", + "JucePlugin_Build_VST=0", + "JucePlugin_Build_VST3=0", + "JucePlugin_Build_AU=1", + "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; + GENERATE_PKGINFO_FILE = YES; + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); + INFOPLIST_FILE = Info-AU.plist; + INFOPLIST_PREPROCESS = NO; + INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; + LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; + 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 -Wextra-semi"; + OTHER_LDFLAGS = "-bundle -lDSP\\ module\\ plugin\\ demo"; + OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\""; + PRODUCT_BUNDLE_IDENTIFIER = com.ROLI.DSPmoduleplugindemo; + SDKROOT_ppc = macosx10.5; + USE_HEADERMAP = NO; + WRAPPER_EXTENSION = component; }; name = Release; }; + 66EB795B3CC4F85E60495050 = {isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; + 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_MAC_F6D2F4CF=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=1", ); + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); + INFOPLIST_FILE = Info-Standalone_Plugin.plist; + INFOPLIST_PREPROCESS = NO; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; + 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 -Wextra-semi"; + OTHER_LDFLAGS = "-lDSP\\ module\\ plugin\\ demo"; + PRODUCT_BUNDLE_IDENTIFIER = com.ROLI.DSPmoduleplugindemo; + SDKROOT_ppc = macosx10.5; + USE_HEADERMAP = NO; }; name = Debug; }; + 54BC3EAA59E4955725ED03DA = {isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; + 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_MAC_F6D2F4CF=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=1", ); + 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)"); + INFOPLIST_FILE = Info-Standalone_Plugin.plist; + INFOPLIST_PREPROCESS = NO; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; + 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 -Wextra-semi"; + OTHER_LDFLAGS = "-lDSP\\ module\\ plugin\\ demo"; + PRODUCT_BUNDLE_IDENTIFIER = com.ROLI.DSPmoduleplugindemo; + SDKROOT_ppc = macosx10.5; + USE_HEADERMAP = NO; }; name = Release; }; + 3D3FADFD8BA30E7DBB4BA7B3 = {isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; + 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_MAC_F6D2F4CF=1", + "JUCE_APP_VERSION=1.0.0", + "JUCE_APP_VERSION_HEX=0x10000", + "JucePlugin_Build_VST=1", + "JucePlugin_Build_VST3=0", + "JucePlugin_Build_AU=1", + "JucePlugin_Build_AUv3=0", + "JucePlugin_Build_RTAS=0", + "JucePlugin_Build_AAX=0", + "JucePlugin_Build_Standalone=1", + "JUCE_SHARED_CODE=1", ); + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); + INSTALL_PATH = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; + 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 -Wextra-semi"; + PRODUCT_BUNDLE_IDENTIFIER = com.ROLI.DSPmoduleplugindemo; + SDKROOT_ppc = macosx10.5; + USE_HEADERMAP = NO; }; name = Debug; }; + A7DF7489BC7955A2A6815394 = {isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; + 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_MAC_F6D2F4CF=1", + "JUCE_APP_VERSION=1.0.0", + "JUCE_APP_VERSION_HEX=0x10000", + "JucePlugin_Build_VST=1", + "JucePlugin_Build_VST3=0", + "JucePlugin_Build_AU=1", + "JucePlugin_Build_AUv3=0", + "JucePlugin_Build_RTAS=0", + "JucePlugin_Build_AAX=0", + "JucePlugin_Build_Standalone=1", + "JUCE_SHARED_CODE=1", ); + 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)"); + INSTALL_PATH = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; + 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 -Wextra-semi"; + PRODUCT_BUNDLE_IDENTIFIER = com.ROLI.DSPmoduleplugindemo; + SDKROOT_ppc = macosx10.5; + USE_HEADERMAP = NO; }; name = Release; }; + 9CDD4C77C3A08B4990BC0173 = {isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = c11; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; + GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "DSP module plugin demo"; + WARNING_CFLAGS = -Wreorder; + ZERO_LINK = NO; }; name = Debug; }; + D5B14CD4DF04FB7FA7D62EDA = {isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = c11; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; + GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "DSP module plugin demo"; + WARNING_CFLAGS = -Wreorder; + ZERO_LINK = NO; }; name = Release; }; + FD6EC8A7AAFB4FCD5BEE9529 = {isa = PBXTargetDependency; target = FECB9DBD99B278AD9BFEAA6E; }; + 29E1EA165EBEEA6C506304A1 = {isa = PBXTargetDependency; target = ED8E2267C127411F4D89FF15; }; + 24FFC83F0C1533835CA51C67 = {isa = PBXTargetDependency; target = 00F5BDE9EF0B2F51F43FF2EE; }; + 05CA232616E493E4B3BC344F = {isa = PBXTargetDependency; target = A30546CFCA3EA66EFAAC54C5; }; + 6AFDEF8F97D7784BB718E1E3 = {isa = XCConfigurationList; buildConfigurations = ( + 9CDD4C77C3A08B4990BC0173, + D5B14CD4DF04FB7FA7D62EDA, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; + E813A8E5DE9A11F5A7B17321 = {isa = XCConfigurationList; buildConfigurations = ( + F9CE5A87AC1D6AC6825FFFC3, + A013BD29D257623287C95474, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; + B3AD49039F07F0B263CB1277 = {isa = PBXAggregateTarget; buildConfigurationList = E813A8E5DE9A11F5A7B17321; buildPhases = ( ); buildRules = ( ); dependencies = ( + FD6EC8A7AAFB4FCD5BEE9529, + 29E1EA165EBEEA6C506304A1, + 24FFC83F0C1533835CA51C67, + 05CA232616E493E4B3BC344F, ); name = "DSPModulePluginDemo - All"; productName = DSPModulePluginDemo; }; + 88CCCF7D79E7FF07F4D94E1A = {isa = XCConfigurationList; buildConfigurations = ( + CFDBE7ED06E755632B329B37, + F344384C78BEEC5F9C53B197, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; + C2DCB64E8618559FB4E257E6 = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 05D62221011CE11F0EC48591, ); runOnlyForDeploymentPostprocessing = 0; }; + E36D69035557E1349C76BB98 = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 2EA689D1CE72AB071F8D5A26, ); runOnlyForDeploymentPostprocessing = 0; }; + 28352D0B5FDD56B853CC43BA = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 6596E23ECE311FC63B07DFAA, + 2ABC00C7F532C21E5FDA2EBD, + 0E359D9EFCDFA63B843DE0C2, + 1FBDD61ADD3B67D7E94D2C95, + A239D02E1CABB075C80D23B9, + C7F16E40B8E83F4038BD10D6, + D0BB7840C18F67F9C7E21811, + 748601DED26630B85FA93327, + 1DA63B876AEC03C50379E3BC, + E9C2696E4C9907723B17EB25, + 9E69DAE32EA636F9BAA58181, ); runOnlyForDeploymentPostprocessing = 0; }; + FECB9DBD99B278AD9BFEAA6E = {isa = PBXNativeTarget; buildConfigurationList = 88CCCF7D79E7FF07F4D94E1A; buildPhases = ( + C2DCB64E8618559FB4E257E6, + E36D69035557E1349C76BB98, + 28352D0B5FDD56B853CC43BA, ); buildRules = ( ); dependencies = ( + 05CA232616E493E4B3BC344F, ); name = "DSPModulePluginDemo - VST"; productName = DSPModulePluginDemo; productReference = 6CC9EC13527CA14B03FA973B; productType = "com.apple.product-type.bundle"; }; + BD7ED9E3CC3A6F441DF9B550 = {isa = XCConfigurationList; buildConfigurations = ( + 8BB96CF4AA358540ABE3E27C, + 2A0CA9707CB82EB2045B5619, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; + D444022A24952C640EBA355D = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 05D62221011CE11F0EC48591, ); runOnlyForDeploymentPostprocessing = 0; }; + 907266A7FE3ECFA84F56FAC5 = {isa = PBXRezBuildPhase; buildActionMask = 2147483647; files = ( + CB3AC1303FE7F890C4AED32B, ); runOnlyForDeploymentPostprocessing = 0; }; + B36B45CC66AEA2C4F08A08AB = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 78F40BA593BCC498B936A808, + 7F45F27A4282DF9ED190834D, ); runOnlyForDeploymentPostprocessing = 0; }; + 3CA1063589ED6073430CB0BF = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 6596E23ECE311FC63B07DFAA, + 2ABC00C7F532C21E5FDA2EBD, + 87BD3AB6AFB4819D64F011A2, + 0E359D9EFCDFA63B843DE0C2, + 1FBDD61ADD3B67D7E94D2C95, + A239D02E1CABB075C80D23B9, + 257DD5660A6B8CCB9784617E, + C7F16E40B8E83F4038BD10D6, + D0BB7840C18F67F9C7E21811, + 748601DED26630B85FA93327, + 1DA63B876AEC03C50379E3BC, + E9C2696E4C9907723B17EB25, + 9E69DAE32EA636F9BAA58181, ); runOnlyForDeploymentPostprocessing = 0; }; + ED8E2267C127411F4D89FF15 = {isa = PBXNativeTarget; buildConfigurationList = BD7ED9E3CC3A6F441DF9B550; buildPhases = ( + D444022A24952C640EBA355D, + 907266A7FE3ECFA84F56FAC5, + B36B45CC66AEA2C4F08A08AB, + 3CA1063589ED6073430CB0BF, ); buildRules = ( ); dependencies = ( + 05CA232616E493E4B3BC344F, ); name = "DSPModulePluginDemo - AU"; productName = DSPModulePluginDemo; productReference = 43DFAB124163C15213BBED07; productType = "com.apple.product-type.bundle"; }; + 125795818BDD0CE802472266 = {isa = XCConfigurationList; buildConfigurations = ( + 66EB795B3CC4F85E60495050, + 54BC3EAA59E4955725ED03DA, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; + BC5A9DB5566D9C8A2973A8DD = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 05D62221011CE11F0EC48591, ); runOnlyForDeploymentPostprocessing = 0; }; + 195FF886C0D634AB555A015D = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 0FF7A9FB4ECA5A6BA40868EA, ); runOnlyForDeploymentPostprocessing = 0; }; + B265C137F30A5470CB8C7B2E = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 6596E23ECE311FC63B07DFAA, + 2ABC00C7F532C21E5FDA2EBD, + 0E359D9EFCDFA63B843DE0C2, + 1FBDD61ADD3B67D7E94D2C95, + A239D02E1CABB075C80D23B9, + C7F16E40B8E83F4038BD10D6, + D0BB7840C18F67F9C7E21811, + 748601DED26630B85FA93327, + 1DA63B876AEC03C50379E3BC, + E9C2696E4C9907723B17EB25, + 9E69DAE32EA636F9BAA58181, ); runOnlyForDeploymentPostprocessing = 0; }; + 00F5BDE9EF0B2F51F43FF2EE = {isa = PBXNativeTarget; buildConfigurationList = 125795818BDD0CE802472266; buildPhases = ( + BC5A9DB5566D9C8A2973A8DD, + 195FF886C0D634AB555A015D, + B265C137F30A5470CB8C7B2E, ); buildRules = ( ); dependencies = ( + 05CA232616E493E4B3BC344F, ); name = "DSPModulePluginDemo - Standalone Plugin"; productName = DSPModulePluginDemo; productReference = 6ECB35361F65C478D40C1780; productType = "com.apple.product-type.application"; }; + 79CC111AC4AEED4F1E0183D0 = {isa = XCConfigurationList; buildConfigurations = ( + 3D3FADFD8BA30E7DBB4BA7B3, + A7DF7489BC7955A2A6815394, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; + 1A37B519984DDAC95B63EC0B = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 927A6A221F818117698AD048, + BED5197DA3176BB20A80D711, + CB479EF124D7305444491E98, + 516591F081614C232FE9990E, + B5A08790A38DC8E0B9DC4132, + DE739D9010D85316C5DABC26, + 000A2BFBF2ADC71938465E4A, + F83EC007146888DD314A4C71, + DCA6DDBF80EA443E44139709, + FE020287936CFBD09F51C6D7, + 933258C44D57B72BE234248B, + 920A613B41815B0659D3D851, + A38EE77F912D1AA461B859C0, + B1F00C0BE7281A68684BB822, + 4544BD26C1FE23E239034166, + 038A9D596278FB9E7E89413B, + 70A80033020B14A288495FAE, + 86F6C3A56C105C073BB092F1, ); runOnlyForDeploymentPostprocessing = 0; }; + A30546CFCA3EA66EFAAC54C5 = {isa = PBXNativeTarget; buildConfigurationList = 79CC111AC4AEED4F1E0183D0; buildPhases = ( + 1A37B519984DDAC95B63EC0B, ); buildRules = ( ); dependencies = ( ); name = "DSPModulePluginDemo - Shared Code"; productName = DSPModulePluginDemo; productReference = 5851FAC11BC7A9A306A2115C; productType = "com.apple.product-type.library.static"; }; + 9B15633865DEF3A67BBB1C13 = {isa = PBXProject; buildConfigurationList = 6AFDEF8F97D7784BB718E1E3; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { B3AD49039F07F0B263CB1277 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };FECB9DBD99B278AD9BFEAA6E = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };ED8E2267C127411F4D89FF15 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };00F5BDE9EF0B2F51F43FF2EE = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };A30546CFCA3EA66EFAAC54C5 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = C9207BAC9FE8B3F8C8FFA4AF; projectDirPath = ""; projectRoot = ""; targets = (B3AD49039F07F0B263CB1277, FECB9DBD99B278AD9BFEAA6E, ED8E2267C127411F4D89FF15, 00F5BDE9EF0B2F51F43FF2EE, A30546CFCA3EA66EFAAC54C5); }; + }; + rootObject = 9B15633865DEF3A67BBB1C13; +} diff --git a/examples/DSP module plugin demo/Builds/MacOSX/Info-AU.plist b/examples/DSP module plugin demo/Builds/MacOSX/Info-AU.plist new file mode 100644 index 0000000000..3b3eb42827 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/MacOSX/Info-AU.plist @@ -0,0 +1,48 @@ + + + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleName + DSPModulePluginDemo + CFBundleDisplayName + DSPModulePluginDemo + CFBundlePackageType + BNDL + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0.0 + CFBundleVersion + 1.0.0 + NSHumanReadableCopyright + ROLI Ltd. + NSHighResolutionCapable + + AudioComponents + + + name + ROLI Ltd.: DSP module plugin demo + description + DSP module plugin demo + factoryFunction + DSPmoduleplugindemoAUFactory + manufacturer + ROLI + type + aufx + subtype + Dmpd + version + 65536 + + + + diff --git a/examples/DSP module plugin demo/Builds/MacOSX/Info-Standalone_Plugin.plist b/examples/DSP module plugin demo/Builds/MacOSX/Info-Standalone_Plugin.plist new file mode 100644 index 0000000000..3049460ac4 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/MacOSX/Info-Standalone_Plugin.plist @@ -0,0 +1,29 @@ + + + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleName + DSPModulePluginDemo + CFBundleDisplayName + DSPModulePluginDemo + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0.0 + CFBundleVersion + 1.0.0 + NSHumanReadableCopyright + ROLI Ltd. + NSHighResolutionCapable + + + diff --git a/examples/DSP module plugin demo/Builds/MacOSX/Info-VST.plist b/examples/DSP module plugin demo/Builds/MacOSX/Info-VST.plist new file mode 100644 index 0000000000..09ccc89032 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/MacOSX/Info-VST.plist @@ -0,0 +1,29 @@ + + + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleName + DSPModulePluginDemo + CFBundleDisplayName + DSPModulePluginDemo + CFBundlePackageType + BNDL + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0.0 + CFBundleVersion + 1.0.0 + NSHumanReadableCopyright + ROLI Ltd. + NSHighResolutionCapable + + + diff --git a/examples/DSP module plugin demo/Builds/MacOSX/RecentFilesMenuTemplate.nib b/examples/DSP module plugin demo/Builds/MacOSX/RecentFilesMenuTemplate.nib new file mode 100644 index 0000000000..cec7f7c72b Binary files /dev/null and b/examples/DSP module plugin demo/Builds/MacOSX/RecentFilesMenuTemplate.nib differ diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo.sln b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo.sln new file mode 100644 index 0000000000..0b3afaddd9 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo.sln @@ -0,0 +1,38 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2015 + +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DSPModulePluginDemo - Standalone Plugin", "DSPModulePluginDemo_StandalonePlugin.vcxproj", "{8FA13B75-51B8-768E-89A3-57965E6A1D8B}" + ProjectSection(ProjectDependencies) = postProject + {976B804B-F6AB-F422-868C-DF02AE6BEC39} = {976B804B-F6AB-F422-868C-DF02AE6BEC39} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DSPModulePluginDemo - VST", "DSPModulePluginDemo_VST.vcxproj", "{FD5AC2E3-F359-FA2F-3515-BEFFBE1447A9}" + ProjectSection(ProjectDependencies) = postProject + {976B804B-F6AB-F422-868C-DF02AE6BEC39} = {976B804B-F6AB-F422-868C-DF02AE6BEC39} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DSPModulePluginDemo - Shared Code", "DSPModulePluginDemo_SharedCode.vcxproj", "{976B804B-F6AB-F422-868C-DF02AE6BEC39}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FD5AC2E3-F359-FA2F-3515-BEFFBE1447A9}.Debug|x64.ActiveCfg = Debug|x64 + {FD5AC2E3-F359-FA2F-3515-BEFFBE1447A9}.Debug|x64.Build.0 = Debug|x64 + {FD5AC2E3-F359-FA2F-3515-BEFFBE1447A9}.Release|x64.ActiveCfg = Release|x64 + {FD5AC2E3-F359-FA2F-3515-BEFFBE1447A9}.Release|x64.Build.0 = Release|x64 + {8FA13B75-51B8-768E-89A3-57965E6A1D8B}.Debug|x64.ActiveCfg = Debug|x64 + {8FA13B75-51B8-768E-89A3-57965E6A1D8B}.Debug|x64.Build.0 = Debug|x64 + {8FA13B75-51B8-768E-89A3-57965E6A1D8B}.Release|x64.ActiveCfg = Release|x64 + {8FA13B75-51B8-768E-89A3-57965E6A1D8B}.Release|x64.Build.0 = Release|x64 + {976B804B-F6AB-F422-868C-DF02AE6BEC39}.Debug|x64.ActiveCfg = Debug|x64 + {976B804B-F6AB-F422-868C-DF02AE6BEC39}.Debug|x64.Build.0 = Debug|x64 + {976B804B-F6AB-F422-868C-DF02AE6BEC39}.Release|x64.ActiveCfg = Release|x64 + {976B804B-F6AB-F422-868C-DF02AE6BEC39}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_SharedCode.vcxproj b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_SharedCode.vcxproj new file mode 100644 index 0000000000..99ace4b6af --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_SharedCode.vcxproj @@ -0,0 +1,2538 @@ + + + + + + Debug + x64 + + + Release + x64 + + + + {976B804B-F6AB-F422-868C-DF02AE6BEC39} + v140 + 8.1 + + + + StaticLibrary + false + v140 + v140 + 8.1 + + + StaticLibrary + false + true + v140 + v140 + 8.1 + + + + + + + + v140 + 8.1 + + + <_ProjectFileVersion>10.0.30319.1 + .lib + $(SolutionDir)$(Platform)\$(Configuration)\Shared Code\ + $(Platform)\$(Configuration)\Shared Code\ + DSPModulePluginDemo + true + $(SolutionDir)$(Platform)\$(Configuration)\Shared Code\ + $(Platform)\$(Configuration)\Shared Code\ + DSPModulePluginDemo + true + v140 + 8.1 + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Disabled + ProgramDatabase + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=1;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) + MultiThreadedDebug + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + stdcpp14 + + + _DEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\DSPModulePluginDemo.lib + true + libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) + true + $(IntDir)\DSPModulePluginDemo.pdb + Windows + true + + + true + $(IntDir)\DSPModulePluginDemo.bsc + + + if "$(ProjectName)"=="$(SolutionName)_VST" copy /Y "$(TargetDir)\$(SolutionName).dll" "c:\vstplugins\musical entropy\$(SolutionName).dll" + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Full + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=1;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) + MultiThreaded + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + stdcpp14 + + + NDEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\DSPModulePluginDemo.lib + true + %(IgnoreSpecificDefaultLibraries) + false + $(IntDir)\DSPModulePluginDemo.pdb + Windows + true + true + true + + + true + $(IntDir)\DSPModulePluginDemo.bsc + + + if "$(ProjectName)"=="$(SolutionName)_VST" copy /Y "$(TargetDir)\$(SolutionName).dll" "c:\vstplugins\musical entropy\$(SolutionName).dll" + + + + + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 0000000000..ab5b02dfe1 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_SharedCode.vcxproj.filters @@ -0,0 +1,4289 @@ + + + + + + {515D5264-DD49-FDCF-149B-2C69ABA347A3} + + + {D1188E43-E20D-3B33-F775-5BBB8813CFFF} + + + {0D969C05-F2B2-53FD-D8B5-501C0CBE17BF} + + + {52045BA8-DF89-5074-688D-A0977F25B09C} + + + {A33A1E1D-AC2C-6382-8681-48B0FC374C60} + + + {11A75801-B027-40BD-4993-023023ACCBF7} + + + {3FD908F5-98C8-9A61-FC03-0BAF8913CBB0} + + + {8C868E51-156D-A916-047C-0D9EA1393675} + + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + + + {EF2CAB40-0432-429B-C517-86ADF136BB8A} + + + {8F7EC212-3168-AD81-5064-C45BA838C408} + + + {3247ED97-A75A-F50B-8CCC-46155E895806} + + + {9D270B31-2425-8FDB-84A4-6A2288FF5B2F} + + + {0F766DD4-A277-CB86-5647-42498C8B41E1} + + + {01603E05-423B-5FC3-1BEE-E15ED33B5688} + + + {D64942B4-6984-3623-3347-45D472AE1C61} + + + {CACD7B50-4DB3-76AF-A6E8-90DF94F8F594} + + + {C9640E58-4493-7EEC-6F58-603AD184956E} + + + {D8EE4AD1-61E3-21C2-6640-6684F4CF77DC} + + + {FEF33480-117C-23A6-D12C-7C299F26C9DB} + + + {9DFA63C1-4EE6-1FAB-D563-41FCF84988F2} + + + {AB8611DF-8161-A9DF-DBAD-77A87DE37331} + + + {25C8FB00-334A-6E0F-F203-E988758B708A} + + + {94027CB9-8162-7431-2E01-B710C7CAE620} + + + {450B8177-6F41-B902-761B-BF68D55102DA} + + + {B8087E92-19F7-552F-9E85-16153D7191B0} + + + {B7221885-1731-611D-FDD9-EA968FA8D858} + + + {DC58E9B7-2710-F45C-B718-75EACDF53F47} + + + {9971A63C-5B75-039F-95C2-7474D7DB16B0} + + + {76391436-F92A-7602-4073-E446B5FAA859} + + + {0CD9E281-DDD0-91EC-6F77-EA9D9D5E0E1A} + + + {2FE25F4C-E9DF-04A5-CAED-6E4B7CF28C59} + + + {40C5CA7C-AEBB-05B1-11CE-AE41D87B5CCB} + + + {65CB28F8-0422-A8F3-9A17-959E12A1F8E2} + + + {2FB30532-4EF3-EFA3-E57C-F7DDE9DB1297} + + + {1ED92A41-D496-5397-A4B0-9FA52DBA9215} + + + {25DD3A16-4BC7-35BD-F32E-0310D1887564} + + + {EA1913F9-0E99-FEC5-0192-0C197611B8F8} + + + {AF5F4789-D607-BFD8-D853-09473C27449C} + + + {EE36D8B9-408C-AEC9-66E7-BEA9E407F27F} + + + {20254EFE-6CBD-31A7-2119-92B1E0E0E311} + + + {70796D73-6D30-8A1B-4732-7C021E47C05A} + + + {77E2C34E-A4D6-EDB5-A107-7CB3CEF0E8EF} + + + {EB8DD942-E2CB-869F-D381-E02A65BA790B} + + + {8F91DFC0-7A71-1BA8-D8D9-6B4CF49151A4} + + + {0B0E7392-324B-088C-FBEB-5FE999D61782} + + + {C396369E-8C55-88E9-5D19-5D3772B773D3} + + + {8167E753-09C7-5D1C-EF2B-32D297557443} + + + {B48C883A-8483-AF6D-808C-1D9A749048D8} + + + {AEDCB7F7-7A36-5392-8E9A-715F5BDE35CB} + + + {B63F69FD-8A40-8E1E-E7ED-419B8DC1C12B} + + + {0608ADE9-66EF-1A19-6D57-12D07F76EB53} + + + {C8F726FC-26BF-2E6B-4ED5-55A7FE316D7D} + + + {1B67A7C0-86E0-53F6-6AE3-7AD93B8DC95B} + + + {C294408A-2005-2E9E-7AC0-8D3ABE8AC175} + + + {476C69CE-0B67-6B85-E888-45D91E37A29E} + + + {7C5AD030-F8CC-6E85-0AF6-196B3ED40AC6} + + + {FA891A58-9FDA-9651-43C4-714A19B5D08D} + + + {C79A4D23-7866-8F3E-AC39-BD68C52A9259} + + + {DA0DC4AC-B511-A2D4-199A-C93454D6F114} + + + {91929C6F-7902-B87D-5260-2F6CBF8ACD93} + + + {4634FFAE-9586-A970-364C-4FDDA635F99F} + + + {244D11B0-2D68-3C08-A0B7-0D12469BC3AA} + + + {05F3DB8A-499C-6ACA-282F-5BF8455A0DE1} + + + {C9F6D785-BF78-5AA1-B479-111C65397864} + + + {4927C7A1-9235-4AA1-93CD-B4E67E6F1E5F} + + + {F2B2F310-F30F-7166-42A9-9BF9C230DA78} + + + {585D6A72-C5E7-BCF1-A168-63A40C6B6313} + + + {F03654BC-34D8-F975-BEA3-750CC2783D23} + + + {95CA1506-2B94-0DEE-0C8D-85EDEBBC4E88} + + + {358AEA11-3F96-36AE-7B32-71373B5C5396} + + + {3DF036EA-3B80-553B-2494-3AAC835CAE75} + + + {1988E68A-A964-64CA-0E0C-26FF9BC5176C} + + + {928D8FCC-5E00-174B-6538-93E8D75AB396} + + + {5E662F89-AD8B-D0D6-9BB6-D42DCFC3C38B} + + + {D272EE9B-CA6A-186E-1C62-0DF893C7A34E} + + + {5C139EFD-6DD2-83E0-C013-24CC03428D81} + + + {03DBA258-F2EF-EC1D-5A86-2CEE402FE021} + + + {8EE92EFE-883B-A2FA-161D-94AC912BF1DE} + + + {16B24975-5792-03FC-64A8-D04E59D077E1} + + + {362ADBDB-6FDF-5BD4-9F06-0A0270832F67} + + + {B098BC87-3298-7E6B-12DC-D26C09CDCAED} + + + {6322B88F-984A-C3CD-6263-38D7AA49B6EC} + + + {6172822C-01A5-E824-12DA-FA43FA934D35} + + + {73C1E759-AD90-59A3-942E-2D10FAA29107} + + + {41DC3BE3-D629-8A17-C32B-F5B4008B5FAD} + + + {F2A38F45-6E55-E147-2E52-64A89FDD9D59} + + + {4926B3FF-E797-F586-857A-69D9703FA2D1} + + + {EBC65085-3AD5-280C-1A29-2B1683643AA1} + + + {E37D25CD-4350-4614-055B-7ABC55E67895} + + + {26ECA2AF-7368-C6CC-58EF-017ECD1862D0} + + + {C1A1A236-AB01-173E-96C3-0706BFF93B1E} + + + {F27C42E6-CF39-9B72-8CD7-C29CA4ADD43B} + + + {12D20EC8-139C-C2B1-1A66-AC436C48C0A7} + + + {69E1179D-76EC-26DC-C3E6-6602ED26D783} + + + {413F481F-075C-2958-115C-D8268682FCB7} + + + {FFC6E1CC-C772-75E6-5087-FB5D4E016799} + + + {1182303F-ECA3-166D-AC0C-92C5E762CB93} + + + {EE1AE8C3-0908-8F53-A4E5-D930C7C97C26} + + + {61712B09-5783-ADFA-2001-5A0C3D7764EB} + + + {C3B2EB8A-1A2F-306F-AA78-3E9D1593788B} + + + {46535B56-3737-2BE8-E3A0-571BCBEB2DA4} + + + {2CB59E7C-D0E4-7D27-2ACF-C7ABADEE936D} + + + {5A0AA36E-3957-E413-14C6-31CBE15271DF} + + + {5FDBD6B1-9BBD-392F-4DA5-FEA40A9370C4} + + + {A92719C7-70BE-57C4-CE9E-A9BC9DFEB757} + + + {E980FADB-6E3F-B93C-DE02-CE4271C9BA93} + + + {F408DCA2-D5E2-0A3A-A064-A1D045889BC1} + + + {7BCEAB87-62FD-0327-EB5D-679E54EDB9B1} + + + {C2B9505B-27B4-F650-12BD-F477D4BBCBAA} + + + {796B7886-44A7-34CC-9B95-BF4FB2C7B6F4} + + + {8A80BA78-D3A8-C0F8-7FFD-61AA028CE852} + + + {7A53E6F1-1343-33B8-4CA8-1D7B714A0E76} + + + {D7E3D10F-3ED8-DFC5-6DB3-E4ACBF8678FB} + + + {75F1F352-251A-75E0-D941-8431588F5C1E} + + + {DB6E3D09-66DA-12DA-BAE8-A5BFFA7A14AC} + + + {8E43579F-C185-266D-DD67-F8B95BD80F2F} + + + {C60A6FCA-9462-922E-AD8D-69F10C9049AF} + + + {D56498EE-E354-1F00-5EEE-8CF7944BEAFB} + + + {61B2920C-494D-D8CB-C0C7-5DBF3D76D164} + + + {66C9B809-8739-A217-C78D-A15D6089B8E3} + + + {C413328B-5D81-89EE-F4F3-75752E700DE4} + + + {8EC9572F-3CCA-E930-74B6-CB6139DE0E17} + + + {B3141847-8F13-F67D-45B2-E3ECF6E09088} + + + {151B49D8-6102-F802-1C07-D59931BC0574} + + + {2D8D0E19-E676-83EB-38D9-F73500DD6B79} + + + {9E586194-C056-101C-5311-F2AF5191AC80} + + + {639E16C5-DA8B-ADBA-6E24-7B596378EAB2} + + + {422C46B7-0467-2DB0-BF3C-16DFCAFD69AC} + + + {8B4D1BAA-6DB4-CAEC-A0FA-271F354D5C61} + + + + + DSPModulePluginDemo\Source + + + DSPModulePluginDemo\Source + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\synthesisers + + + Juce Modules\juce_audio_basics + + + Juce Modules\juce_audio_basics + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\sources + + + Juce Modules\juce_audio_devices\sources + + + Juce Modules\juce_audio_devices + + + Juce Modules\juce_audio_devices + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\sampler + + + Juce Modules\juce_audio_formats + + + Juce Modules\juce_audio_formats + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\Standalone + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\VST + + + Juce Modules\juce_audio_plugin_client\VST + + + Juce Modules\juce_audio_plugin_client + + + Juce Modules\juce_audio_plugin_client + + + Juce Modules\juce_audio_processors\format + + + Juce Modules\juce_audio_processors\format + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors + + + Juce Modules\juce_audio_processors + + + Juce Modules\juce_audio_utils\audio_cd + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils + + + Juce Modules\juce_audio_utils + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\javascript + + + Juce Modules\juce_core\javascript + + + Juce Modules\juce_core\logging + + + Juce Modules\juce_core\logging + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\unit_tests + + + Juce Modules\juce_core\xml + + + Juce Modules\juce_core\xml + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core + + + Juce Modules\juce_core + + + Juce Modules\juce_data_structures\app_properties + + + Juce Modules\juce_data_structures\app_properties + + + Juce Modules\juce_data_structures\undomanager + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures + + + Juce Modules\juce_data_structures + + + Juce Modules\juce_dsp\containers + + + Juce Modules\juce_dsp\filter_design + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp + + + Juce Modules\juce_dsp + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\timers + + + Juce Modules\juce_events\timers + + + Juce Modules\juce_events + + + Juce Modules\juce_events + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats + + + Juce Modules\juce_graphics\image_formats + + + Juce Modules\juce_graphics\image_formats + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\placement + + + Juce Modules\juce_graphics + + + Juce Modules\juce_graphics + + + Juce Modules\juce_gui_basics\application + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics + + + Juce Modules\juce_gui_basics + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\documents + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra + + + Juce Modules\juce_gui_extra + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\utils + + + Juce Modules\juce_opengl + + + Juce Modules\juce_opengl + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + + + DSPModulePluginDemo\Source + + + DSPModulePluginDemo\Source + + + Juce Modules\juce_audio_basics\audio_play_head + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\native + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\synthesisers + + + Juce Modules\juce_audio_basics + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\sources + + + Juce Modules\juce_audio_devices\sources + + + Juce Modules\juce_audio_devices + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\floor + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\uncoupled + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\sampler + + + Juce Modules\juce_audio_formats + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\Standalone + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\VST + + + Juce Modules\juce_audio_plugin_client + + + Juce Modules\juce_audio_processors\format + + + Juce Modules\juce_audio_processors\format + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors + + + Juce Modules\juce_audio_utils\audio_cd + + + Juce Modules\juce_audio_utils\audio_cd + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\javascript + + + Juce Modules\juce_core\javascript + + + Juce Modules\juce_core\logging + + + Juce Modules\juce_core\logging + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\unit_tests + + + Juce Modules\juce_core\xml + + + Juce Modules\juce_core\xml + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core + + + Juce Modules\juce_data_structures\app_properties + + + Juce Modules\juce_data_structures\app_properties + + + Juce Modules\juce_data_structures\undomanager + + + Juce Modules\juce_data_structures\undomanager + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures + + + Juce Modules\juce_dsp\containers + + + Juce Modules\juce_dsp\containers + + + Juce Modules\juce_dsp\filter_design + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\timers + + + Juce Modules\juce_events\timers + + + Juce Modules\juce_events + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\placement + + + Juce Modules\juce_graphics\placement + + + Juce Modules\juce_graphics + + + Juce Modules\juce_gui_basics\application + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\documents + + + Juce Modules\juce_gui_extra\embedding + + + Juce Modules\juce_gui_extra\embedding + + + Juce Modules\juce_gui_extra\embedding + + + Juce Modules\juce_gui_extra\embedding + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra + + + Juce Modules\juce_opengl\geometry + + + Juce Modules\juce_opengl\geometry + + + Juce Modules\juce_opengl\geometry + + + Juce Modules\juce_opengl\geometry + + + Juce Modules\juce_opengl\native + + + Juce Modules\juce_opengl\native + + + Juce Modules\juce_opengl\native + + + Juce Modules\juce_opengl\native + + + Juce Modules\juce_opengl\native + + + Juce Modules\juce_opengl\native + + + Juce Modules\juce_opengl\native + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\utils + + + Juce Modules\juce_opengl + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + + + DSPModulePluginDemo\Resources + + + DSPModulePluginDemo\Resources + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + + + Juce Library Code + + + diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_StandalonePlugin.vcxproj b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_StandalonePlugin.vcxproj new file mode 100644 index 0000000000..396553ae16 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_StandalonePlugin.vcxproj @@ -0,0 +1,166 @@ + + + + + + Debug + x64 + + + Release + x64 + + + + {8FA13B75-51B8-768E-89A3-57965E6A1D8B} + v140 + 8.1 + + + + Application + false + v140 + v140 + 8.1 + + + Application + false + true + v140 + v140 + 8.1 + + + + + + + + v140 + 8.1 + + + <_ProjectFileVersion>10.0.30319.1 + .exe + $(SolutionDir)$(Platform)\$(Configuration)\Standalone Plugin\ + $(Platform)\$(Configuration)\Standalone Plugin\ + DSPModulePluginDemo + true + $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code + $(SolutionDir)$(Platform)\$(Configuration)\Standalone Plugin\ + $(Platform)\$(Configuration)\Standalone Plugin\ + DSPModulePluginDemo + true + $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code + v140 + 8.1 + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Disabled + ProgramDatabase + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=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=1;%(PreprocessorDefinitions) + MultiThreadedDebug + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + stdcpp14 + + + _DEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\DSPModulePluginDemo.exe + true + libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) + true + $(IntDir)\DSPModulePluginDemo.pdb + Windows + true + DSPModulePluginDemo.lib;%(AdditionalDependencies) + + + true + $(IntDir)\DSPModulePluginDemo.bsc + + + if "$(ProjectName)"=="$(SolutionName)_VST" copy /Y "$(TargetDir)\$(SolutionName).dll" "c:\vstplugins\musical entropy\$(SolutionName).dll" + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Full + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=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=1;%(PreprocessorDefinitions) + MultiThreaded + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + stdcpp14 + + + NDEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\DSPModulePluginDemo.exe + true + %(IgnoreSpecificDefaultLibraries) + false + $(IntDir)\DSPModulePluginDemo.pdb + Windows + true + true + true + DSPModulePluginDemo.lib;%(AdditionalDependencies) + + + true + $(IntDir)\DSPModulePluginDemo.bsc + + + if "$(ProjectName)"=="$(SolutionName)_VST" copy /Y "$(TargetDir)\$(SolutionName).dll" "c:\vstplugins\musical entropy\$(SolutionName).dll" + + + + + + + + + + + + diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_StandalonePlugin.vcxproj.filters b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_StandalonePlugin.vcxproj.filters new file mode 100644 index 0000000000..e2c56642fd --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_StandalonePlugin.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + + {8B4D1BAA-6DB4-CAEC-A0FA-271F354D5C61} + + + + + Juce Library Code + + + + + + Juce Library Code + + + diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_VST.vcxproj b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_VST.vcxproj new file mode 100644 index 0000000000..82aab65f33 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_VST.vcxproj @@ -0,0 +1,166 @@ + + + + + + Debug + x64 + + + Release + x64 + + + + {FD5AC2E3-F359-FA2F-3515-BEFFBE1447A9} + v140 + 8.1 + + + + DynamicLibrary + false + v140 + v140 + 8.1 + + + DynamicLibrary + false + true + v140 + v140 + 8.1 + + + + + + + + v140 + 8.1 + + + <_ProjectFileVersion>10.0.30319.1 + .dll + $(SolutionDir)$(Platform)\$(Configuration)\VST\ + $(Platform)\$(Configuration)\VST\ + DSPModulePluginDemo + true + $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code + $(SolutionDir)$(Platform)\$(Configuration)\VST\ + $(Platform)\$(Configuration)\VST\ + DSPModulePluginDemo + true + $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code + v140 + 8.1 + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Disabled + ProgramDatabase + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) + MultiThreadedDebug + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + stdcpp14 + + + _DEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\DSPModulePluginDemo.dll + true + libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) + true + $(IntDir)\DSPModulePluginDemo.pdb + Windows + true + DSPModulePluginDemo.lib;%(AdditionalDependencies) + + + true + $(IntDir)\DSPModulePluginDemo.bsc + + + if "$(ProjectName)"=="$(SolutionName)_VST" copy /Y "$(TargetDir)\$(SolutionName).dll" "c:\vstplugins\musical entropy\$(SolutionName).dll" + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Full + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) + MultiThreaded + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + stdcpp14 + + + NDEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\DSPModulePluginDemo.dll + true + %(IgnoreSpecificDefaultLibraries) + false + $(IntDir)\DSPModulePluginDemo.pdb + Windows + true + true + true + DSPModulePluginDemo.lib;%(AdditionalDependencies) + + + true + $(IntDir)\DSPModulePluginDemo.bsc + + + if "$(ProjectName)"=="$(SolutionName)_VST" copy /Y "$(TargetDir)\$(SolutionName).dll" "c:\vstplugins\musical entropy\$(SolutionName).dll" + + + + + + + + + + + + diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_VST.vcxproj.filters b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_VST.vcxproj.filters new file mode 100644 index 0000000000..c2f02da86e --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2015/DSPModulePluginDemo_VST.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + + {8B4D1BAA-6DB4-CAEC-A0FA-271F354D5C61} + + + + + Juce Library Code + + + + + + Juce Library Code + + + diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2015/resources.rc b/examples/DSP module plugin demo/Builds/VisualStudio2015/resources.rc new file mode 100644 index 0000000000..3545567da2 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2015/resources.rc @@ -0,0 +1,30 @@ +#ifdef JUCE_USER_DEFINED_RC_FILE + #include JUCE_USER_DEFINED_RC_FILE +#else + +#undef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#include + +VS_VERSION_INFO VERSIONINFO +FILEVERSION 1,0,0,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "ROLI Ltd.\0" + VALUE "FileDescription", "DSPModulePluginDemo\0" + VALUE "FileVersion", "1.0.0\0" + VALUE "ProductName", "DSPModulePluginDemo\0" + VALUE "ProductVersion", "1.0.0\0" + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo.sln b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo.sln new file mode 100644 index 0000000000..ee7f2a5e32 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo.sln @@ -0,0 +1,38 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2017 + +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DSPModulePluginDemo - Standalone Plugin", "DSPModulePluginDemo_StandalonePlugin.vcxproj", "{8FA13B75-51B8-768E-89A3-57965E6A1D8B}" + ProjectSection(ProjectDependencies) = postProject + {976B804B-F6AB-F422-868C-DF02AE6BEC39} = {976B804B-F6AB-F422-868C-DF02AE6BEC39} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DSPModulePluginDemo - VST", "DSPModulePluginDemo_VST.vcxproj", "{FD5AC2E3-F359-FA2F-3515-BEFFBE1447A9}" + ProjectSection(ProjectDependencies) = postProject + {976B804B-F6AB-F422-868C-DF02AE6BEC39} = {976B804B-F6AB-F422-868C-DF02AE6BEC39} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DSPModulePluginDemo - Shared Code", "DSPModulePluginDemo_SharedCode.vcxproj", "{976B804B-F6AB-F422-868C-DF02AE6BEC39}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FD5AC2E3-F359-FA2F-3515-BEFFBE1447A9}.Debug|x64.ActiveCfg = Debug|x64 + {FD5AC2E3-F359-FA2F-3515-BEFFBE1447A9}.Debug|x64.Build.0 = Debug|x64 + {FD5AC2E3-F359-FA2F-3515-BEFFBE1447A9}.Release|x64.ActiveCfg = Release|x64 + {FD5AC2E3-F359-FA2F-3515-BEFFBE1447A9}.Release|x64.Build.0 = Release|x64 + {8FA13B75-51B8-768E-89A3-57965E6A1D8B}.Debug|x64.ActiveCfg = Debug|x64 + {8FA13B75-51B8-768E-89A3-57965E6A1D8B}.Debug|x64.Build.0 = Debug|x64 + {8FA13B75-51B8-768E-89A3-57965E6A1D8B}.Release|x64.ActiveCfg = Release|x64 + {8FA13B75-51B8-768E-89A3-57965E6A1D8B}.Release|x64.Build.0 = Release|x64 + {976B804B-F6AB-F422-868C-DF02AE6BEC39}.Debug|x64.ActiveCfg = Debug|x64 + {976B804B-F6AB-F422-868C-DF02AE6BEC39}.Debug|x64.Build.0 = Debug|x64 + {976B804B-F6AB-F422-868C-DF02AE6BEC39}.Release|x64.ActiveCfg = Release|x64 + {976B804B-F6AB-F422-868C-DF02AE6BEC39}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_SharedCode.vcxproj b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_SharedCode.vcxproj new file mode 100644 index 0000000000..7ea037e2aa --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_SharedCode.vcxproj @@ -0,0 +1,2533 @@ + + + + + + Debug + x64 + + + Release + x64 + + + + {976B804B-F6AB-F422-868C-DF02AE6BEC39} + v141 + 10.0.15063.0 + + + + StaticLibrary + false + v141 + v141 + 10.0.15063.0 + + + StaticLibrary + false + true + v141 + v141 + 10.0.15063.0 + + + + + + + + v141 + 10.0.15063.0 + + + <_ProjectFileVersion>10.0.30319.1 + .lib + $(SolutionDir)$(Platform)\$(Configuration)\Shared Code\ + $(Platform)\$(Configuration)\Shared Code\ + DSPModulePluginDemo + true + $(SolutionDir)$(Platform)\$(Configuration)\Shared Code\ + $(Platform)\$(Configuration)\Shared Code\ + DSPModulePluginDemo + true + v141 + 10.0.15063.0 + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Disabled + ProgramDatabase + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=1;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) + MultiThreadedDebug + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + stdcpp14 + + + _DEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\DSPModulePluginDemo.lib + true + libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) + true + $(IntDir)\DSPModulePluginDemo.pdb + Windows + true + + + true + $(IntDir)\DSPModulePluginDemo.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Full + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=1;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) + MultiThreaded + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + Fast + stdcpp14 + + + NDEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\DSPModulePluginDemo.lib + true + %(IgnoreSpecificDefaultLibraries) + false + $(IntDir)\DSPModulePluginDemo.pdb + Windows + true + true + true + + + true + $(IntDir)\DSPModulePluginDemo.bsc + + + + + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 0000000000..52c362230c --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_SharedCode.vcxproj.filters @@ -0,0 +1,4289 @@ + + + + + + {515D5264-DD49-FDCF-149B-2C69ABA347A3} + + + {D1188E43-E20D-3B33-F775-5BBB8813CFFF} + + + {0D969C05-F2B2-53FD-D8B5-501C0CBE17BF} + + + {52045BA8-DF89-5074-688D-A0977F25B09C} + + + {A33A1E1D-AC2C-6382-8681-48B0FC374C60} + + + {11A75801-B027-40BD-4993-023023ACCBF7} + + + {3FD908F5-98C8-9A61-FC03-0BAF8913CBB0} + + + {8C868E51-156D-A916-047C-0D9EA1393675} + + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + + + {EF2CAB40-0432-429B-C517-86ADF136BB8A} + + + {8F7EC212-3168-AD81-5064-C45BA838C408} + + + {3247ED97-A75A-F50B-8CCC-46155E895806} + + + {9D270B31-2425-8FDB-84A4-6A2288FF5B2F} + + + {0F766DD4-A277-CB86-5647-42498C8B41E1} + + + {01603E05-423B-5FC3-1BEE-E15ED33B5688} + + + {D64942B4-6984-3623-3347-45D472AE1C61} + + + {CACD7B50-4DB3-76AF-A6E8-90DF94F8F594} + + + {C9640E58-4493-7EEC-6F58-603AD184956E} + + + {D8EE4AD1-61E3-21C2-6640-6684F4CF77DC} + + + {FEF33480-117C-23A6-D12C-7C299F26C9DB} + + + {9DFA63C1-4EE6-1FAB-D563-41FCF84988F2} + + + {AB8611DF-8161-A9DF-DBAD-77A87DE37331} + + + {25C8FB00-334A-6E0F-F203-E988758B708A} + + + {94027CB9-8162-7431-2E01-B710C7CAE620} + + + {450B8177-6F41-B902-761B-BF68D55102DA} + + + {B8087E92-19F7-552F-9E85-16153D7191B0} + + + {B7221885-1731-611D-FDD9-EA968FA8D858} + + + {DC58E9B7-2710-F45C-B718-75EACDF53F47} + + + {9971A63C-5B75-039F-95C2-7474D7DB16B0} + + + {76391436-F92A-7602-4073-E446B5FAA859} + + + {0CD9E281-DDD0-91EC-6F77-EA9D9D5E0E1A} + + + {2FE25F4C-E9DF-04A5-CAED-6E4B7CF28C59} + + + {40C5CA7C-AEBB-05B1-11CE-AE41D87B5CCB} + + + {65CB28F8-0422-A8F3-9A17-959E12A1F8E2} + + + {2FB30532-4EF3-EFA3-E57C-F7DDE9DB1297} + + + {1ED92A41-D496-5397-A4B0-9FA52DBA9215} + + + {25DD3A16-4BC7-35BD-F32E-0310D1887564} + + + {EA1913F9-0E99-FEC5-0192-0C197611B8F8} + + + {AF5F4789-D607-BFD8-D853-09473C27449C} + + + {EE36D8B9-408C-AEC9-66E7-BEA9E407F27F} + + + {20254EFE-6CBD-31A7-2119-92B1E0E0E311} + + + {70796D73-6D30-8A1B-4732-7C021E47C05A} + + + {77E2C34E-A4D6-EDB5-A107-7CB3CEF0E8EF} + + + {EB8DD942-E2CB-869F-D381-E02A65BA790B} + + + {8F91DFC0-7A71-1BA8-D8D9-6B4CF49151A4} + + + {0B0E7392-324B-088C-FBEB-5FE999D61782} + + + {C396369E-8C55-88E9-5D19-5D3772B773D3} + + + {8167E753-09C7-5D1C-EF2B-32D297557443} + + + {B48C883A-8483-AF6D-808C-1D9A749048D8} + + + {AEDCB7F7-7A36-5392-8E9A-715F5BDE35CB} + + + {B63F69FD-8A40-8E1E-E7ED-419B8DC1C12B} + + + {0608ADE9-66EF-1A19-6D57-12D07F76EB53} + + + {C8F726FC-26BF-2E6B-4ED5-55A7FE316D7D} + + + {1B67A7C0-86E0-53F6-6AE3-7AD93B8DC95B} + + + {C294408A-2005-2E9E-7AC0-8D3ABE8AC175} + + + {476C69CE-0B67-6B85-E888-45D91E37A29E} + + + {7C5AD030-F8CC-6E85-0AF6-196B3ED40AC6} + + + {FA891A58-9FDA-9651-43C4-714A19B5D08D} + + + {C79A4D23-7866-8F3E-AC39-BD68C52A9259} + + + {DA0DC4AC-B511-A2D4-199A-C93454D6F114} + + + {91929C6F-7902-B87D-5260-2F6CBF8ACD93} + + + {4634FFAE-9586-A970-364C-4FDDA635F99F} + + + {244D11B0-2D68-3C08-A0B7-0D12469BC3AA} + + + {05F3DB8A-499C-6ACA-282F-5BF8455A0DE1} + + + {C9F6D785-BF78-5AA1-B479-111C65397864} + + + {4927C7A1-9235-4AA1-93CD-B4E67E6F1E5F} + + + {F2B2F310-F30F-7166-42A9-9BF9C230DA78} + + + {585D6A72-C5E7-BCF1-A168-63A40C6B6313} + + + {F03654BC-34D8-F975-BEA3-750CC2783D23} + + + {95CA1506-2B94-0DEE-0C8D-85EDEBBC4E88} + + + {358AEA11-3F96-36AE-7B32-71373B5C5396} + + + {3DF036EA-3B80-553B-2494-3AAC835CAE75} + + + {1988E68A-A964-64CA-0E0C-26FF9BC5176C} + + + {928D8FCC-5E00-174B-6538-93E8D75AB396} + + + {5E662F89-AD8B-D0D6-9BB6-D42DCFC3C38B} + + + {D272EE9B-CA6A-186E-1C62-0DF893C7A34E} + + + {5C139EFD-6DD2-83E0-C013-24CC03428D81} + + + {03DBA258-F2EF-EC1D-5A86-2CEE402FE021} + + + {8EE92EFE-883B-A2FA-161D-94AC912BF1DE} + + + {16B24975-5792-03FC-64A8-D04E59D077E1} + + + {362ADBDB-6FDF-5BD4-9F06-0A0270832F67} + + + {B098BC87-3298-7E6B-12DC-D26C09CDCAED} + + + {6322B88F-984A-C3CD-6263-38D7AA49B6EC} + + + {6172822C-01A5-E824-12DA-FA43FA934D35} + + + {73C1E759-AD90-59A3-942E-2D10FAA29107} + + + {41DC3BE3-D629-8A17-C32B-F5B4008B5FAD} + + + {F2A38F45-6E55-E147-2E52-64A89FDD9D59} + + + {4926B3FF-E797-F586-857A-69D9703FA2D1} + + + {EBC65085-3AD5-280C-1A29-2B1683643AA1} + + + {E37D25CD-4350-4614-055B-7ABC55E67895} + + + {26ECA2AF-7368-C6CC-58EF-017ECD1862D0} + + + {C1A1A236-AB01-173E-96C3-0706BFF93B1E} + + + {F27C42E6-CF39-9B72-8CD7-C29CA4ADD43B} + + + {12D20EC8-139C-C2B1-1A66-AC436C48C0A7} + + + {69E1179D-76EC-26DC-C3E6-6602ED26D783} + + + {413F481F-075C-2958-115C-D8268682FCB7} + + + {FFC6E1CC-C772-75E6-5087-FB5D4E016799} + + + {1182303F-ECA3-166D-AC0C-92C5E762CB93} + + + {EE1AE8C3-0908-8F53-A4E5-D930C7C97C26} + + + {61712B09-5783-ADFA-2001-5A0C3D7764EB} + + + {C3B2EB8A-1A2F-306F-AA78-3E9D1593788B} + + + {46535B56-3737-2BE8-E3A0-571BCBEB2DA4} + + + {2CB59E7C-D0E4-7D27-2ACF-C7ABADEE936D} + + + {5A0AA36E-3957-E413-14C6-31CBE15271DF} + + + {5FDBD6B1-9BBD-392F-4DA5-FEA40A9370C4} + + + {A92719C7-70BE-57C4-CE9E-A9BC9DFEB757} + + + {E980FADB-6E3F-B93C-DE02-CE4271C9BA93} + + + {F408DCA2-D5E2-0A3A-A064-A1D045889BC1} + + + {7BCEAB87-62FD-0327-EB5D-679E54EDB9B1} + + + {C2B9505B-27B4-F650-12BD-F477D4BBCBAA} + + + {796B7886-44A7-34CC-9B95-BF4FB2C7B6F4} + + + {8A80BA78-D3A8-C0F8-7FFD-61AA028CE852} + + + {7A53E6F1-1343-33B8-4CA8-1D7B714A0E76} + + + {D7E3D10F-3ED8-DFC5-6DB3-E4ACBF8678FB} + + + {75F1F352-251A-75E0-D941-8431588F5C1E} + + + {DB6E3D09-66DA-12DA-BAE8-A5BFFA7A14AC} + + + {8E43579F-C185-266D-DD67-F8B95BD80F2F} + + + {C60A6FCA-9462-922E-AD8D-69F10C9049AF} + + + {D56498EE-E354-1F00-5EEE-8CF7944BEAFB} + + + {61B2920C-494D-D8CB-C0C7-5DBF3D76D164} + + + {66C9B809-8739-A217-C78D-A15D6089B8E3} + + + {C413328B-5D81-89EE-F4F3-75752E700DE4} + + + {8EC9572F-3CCA-E930-74B6-CB6139DE0E17} + + + {B3141847-8F13-F67D-45B2-E3ECF6E09088} + + + {151B49D8-6102-F802-1C07-D59931BC0574} + + + {2D8D0E19-E676-83EB-38D9-F73500DD6B79} + + + {9E586194-C056-101C-5311-F2AF5191AC80} + + + {639E16C5-DA8B-ADBA-6E24-7B596378EAB2} + + + {422C46B7-0467-2DB0-BF3C-16DFCAFD69AC} + + + {8B4D1BAA-6DB4-CAEC-A0FA-271F354D5C61} + + + + + DSPModulePluginDemo\Source + + + DSPModulePluginDemo\Source + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\synthesisers + + + Juce Modules\juce_audio_basics + + + Juce Modules\juce_audio_basics + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\sources + + + Juce Modules\juce_audio_devices\sources + + + Juce Modules\juce_audio_devices + + + Juce Modules\juce_audio_devices + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\sampler + + + Juce Modules\juce_audio_formats + + + Juce Modules\juce_audio_formats + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\Standalone + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\VST + + + Juce Modules\juce_audio_plugin_client\VST + + + Juce Modules\juce_audio_plugin_client + + + Juce Modules\juce_audio_plugin_client + + + Juce Modules\juce_audio_processors\format + + + Juce Modules\juce_audio_processors\format + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors + + + Juce Modules\juce_audio_processors + + + Juce Modules\juce_audio_utils\audio_cd + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils + + + Juce Modules\juce_audio_utils + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\javascript + + + Juce Modules\juce_core\javascript + + + Juce Modules\juce_core\logging + + + Juce Modules\juce_core\logging + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\unit_tests + + + Juce Modules\juce_core\xml + + + Juce Modules\juce_core\xml + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core + + + Juce Modules\juce_core + + + Juce Modules\juce_data_structures\app_properties + + + Juce Modules\juce_data_structures\app_properties + + + Juce Modules\juce_data_structures\undomanager + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures + + + Juce Modules\juce_data_structures + + + Juce Modules\juce_dsp\containers + + + Juce Modules\juce_dsp\filter_design + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp + + + Juce Modules\juce_dsp + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\timers + + + Juce Modules\juce_events\timers + + + Juce Modules\juce_events + + + Juce Modules\juce_events + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats + + + Juce Modules\juce_graphics\image_formats + + + Juce Modules\juce_graphics\image_formats + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\placement + + + Juce Modules\juce_graphics + + + Juce Modules\juce_graphics + + + Juce Modules\juce_gui_basics\application + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics + + + Juce Modules\juce_gui_basics + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\documents + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra + + + Juce Modules\juce_gui_extra + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\utils + + + Juce Modules\juce_opengl + + + Juce Modules\juce_opengl + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + + + DSPModulePluginDemo\Source + + + DSPModulePluginDemo\Source + + + Juce Modules\juce_audio_basics\audio_play_head + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\native + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\synthesisers + + + Juce Modules\juce_audio_basics + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\sources + + + Juce Modules\juce_audio_devices\sources + + + Juce Modules\juce_audio_devices + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\floor + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\uncoupled + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\sampler + + + Juce Modules\juce_audio_formats + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\AU\CoreAudioUtilityClasses + + + Juce Modules\juce_audio_plugin_client\Standalone + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\utility + + + Juce Modules\juce_audio_plugin_client\VST + + + Juce Modules\juce_audio_plugin_client + + + Juce Modules\juce_audio_processors\format + + + Juce Modules\juce_audio_processors\format + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors + + + Juce Modules\juce_audio_utils\audio_cd + + + Juce Modules\juce_audio_utils\audio_cd + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\javascript + + + Juce Modules\juce_core\javascript + + + Juce Modules\juce_core\logging + + + Juce Modules\juce_core\logging + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\unit_tests + + + Juce Modules\juce_core\xml + + + Juce Modules\juce_core\xml + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core + + + Juce Modules\juce_data_structures\app_properties + + + Juce Modules\juce_data_structures\app_properties + + + Juce Modules\juce_data_structures\undomanager + + + Juce Modules\juce_data_structures\undomanager + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures + + + Juce Modules\juce_dsp\containers + + + Juce Modules\juce_dsp\containers + + + Juce Modules\juce_dsp\filter_design + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\timers + + + Juce Modules\juce_events\timers + + + Juce Modules\juce_events + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\placement + + + Juce Modules\juce_graphics\placement + + + Juce Modules\juce_graphics + + + Juce Modules\juce_gui_basics\application + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\documents + + + Juce Modules\juce_gui_extra\embedding + + + Juce Modules\juce_gui_extra\embedding + + + Juce Modules\juce_gui_extra\embedding + + + Juce Modules\juce_gui_extra\embedding + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra + + + Juce Modules\juce_opengl\geometry + + + Juce Modules\juce_opengl\geometry + + + Juce Modules\juce_opengl\geometry + + + Juce Modules\juce_opengl\geometry + + + Juce Modules\juce_opengl\native + + + Juce Modules\juce_opengl\native + + + Juce Modules\juce_opengl\native + + + Juce Modules\juce_opengl\native + + + Juce Modules\juce_opengl\native + + + Juce Modules\juce_opengl\native + + + Juce Modules\juce_opengl\native + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\opengl + + + Juce Modules\juce_opengl\utils + + + Juce Modules\juce_opengl + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + + + DSPModulePluginDemo\Resources + + + DSPModulePluginDemo\Resources + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + + + Juce Library Code + + + diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_StandalonePlugin.vcxproj b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_StandalonePlugin.vcxproj new file mode 100644 index 0000000000..20be01016c --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_StandalonePlugin.vcxproj @@ -0,0 +1,161 @@ + + + + + + Debug + x64 + + + Release + x64 + + + + {8FA13B75-51B8-768E-89A3-57965E6A1D8B} + v141 + 10.0.15063.0 + + + + Application + false + v141 + v141 + 10.0.15063.0 + + + Application + false + true + v141 + v141 + 10.0.15063.0 + + + + + + + + v141 + 10.0.15063.0 + + + <_ProjectFileVersion>10.0.30319.1 + .exe + $(SolutionDir)$(Platform)\$(Configuration)\Standalone Plugin\ + $(Platform)\$(Configuration)\Standalone Plugin\ + DSPModulePluginDemo + true + $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code + $(SolutionDir)$(Platform)\$(Configuration)\Standalone Plugin\ + $(Platform)\$(Configuration)\Standalone Plugin\ + DSPModulePluginDemo + true + $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code + v141 + 10.0.15063.0 + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Disabled + ProgramDatabase + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=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=1;%(PreprocessorDefinitions) + MultiThreadedDebug + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + stdcpp14 + + + _DEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\DSPModulePluginDemo.exe + true + libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) + true + $(IntDir)\DSPModulePluginDemo.pdb + Windows + true + DSPModulePluginDemo.lib;%(AdditionalDependencies) + + + true + $(IntDir)\DSPModulePluginDemo.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Full + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=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=1;%(PreprocessorDefinitions) + MultiThreaded + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + Fast + stdcpp14 + + + NDEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\DSPModulePluginDemo.exe + true + %(IgnoreSpecificDefaultLibraries) + false + $(IntDir)\DSPModulePluginDemo.pdb + Windows + true + true + true + DSPModulePluginDemo.lib;%(AdditionalDependencies) + + + true + $(IntDir)\DSPModulePluginDemo.bsc + + + + + + + + + + + + diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_StandalonePlugin.vcxproj.filters b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_StandalonePlugin.vcxproj.filters new file mode 100644 index 0000000000..1169605db3 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_StandalonePlugin.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + + {8B4D1BAA-6DB4-CAEC-A0FA-271F354D5C61} + + + + + Juce Library Code + + + + + + Juce Library Code + + + diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_VST.vcxproj b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_VST.vcxproj new file mode 100644 index 0000000000..414ba95628 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_VST.vcxproj @@ -0,0 +1,161 @@ + + + + + + Debug + x64 + + + Release + x64 + + + + {FD5AC2E3-F359-FA2F-3515-BEFFBE1447A9} + v141 + 10.0.15063.0 + + + + DynamicLibrary + false + v141 + v141 + 10.0.15063.0 + + + DynamicLibrary + false + true + v141 + v141 + 10.0.15063.0 + + + + + + + + v141 + 10.0.15063.0 + + + <_ProjectFileVersion>10.0.30319.1 + .dll + $(SolutionDir)$(Platform)\$(Configuration)\VST\ + $(Platform)\$(Configuration)\VST\ + DSPModulePluginDemo + true + $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code + $(SolutionDir)$(Platform)\$(Configuration)\VST\ + $(Platform)\$(Configuration)\VST\ + DSPModulePluginDemo + true + $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code + v141 + 10.0.15063.0 + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Disabled + ProgramDatabase + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) + MultiThreadedDebug + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + stdcpp14 + + + _DEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\DSPModulePluginDemo.dll + true + libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) + true + $(IntDir)\DSPModulePluginDemo.pdb + Windows + true + DSPModulePluginDemo.lib;%(AdditionalDependencies) + + + true + $(IntDir)\DSPModulePluginDemo.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Full + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) + MultiThreaded + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + Fast + stdcpp14 + + + NDEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\DSPModulePluginDemo.dll + true + %(IgnoreSpecificDefaultLibraries) + false + $(IntDir)\DSPModulePluginDemo.pdb + Windows + true + true + true + DSPModulePluginDemo.lib;%(AdditionalDependencies) + + + true + $(IntDir)\DSPModulePluginDemo.bsc + + + + + + + + + + + + diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_VST.vcxproj.filters b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_VST.vcxproj.filters new file mode 100644 index 0000000000..4439fc8959 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2017/DSPModulePluginDemo_VST.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + + {8B4D1BAA-6DB4-CAEC-A0FA-271F354D5C61} + + + + + Juce Library Code + + + + + + Juce Library Code + + + diff --git a/examples/DSP module plugin demo/Builds/VisualStudio2017/resources.rc b/examples/DSP module plugin demo/Builds/VisualStudio2017/resources.rc new file mode 100644 index 0000000000..3545567da2 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/VisualStudio2017/resources.rc @@ -0,0 +1,30 @@ +#ifdef JUCE_USER_DEFINED_RC_FILE + #include JUCE_USER_DEFINED_RC_FILE +#else + +#undef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#include + +VS_VERSION_INFO VERSIONINFO +FILEVERSION 1,0,0,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "ROLI Ltd.\0" + VALUE "FileDescription", "DSPModulePluginDemo\0" + VALUE "FileVersion", "1.0.0\0" + VALUE "ProductName", "DSPModulePluginDemo\0" + VALUE "ProductVersion", "1.0.0\0" + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif diff --git a/examples/DSP module plugin demo/Builds/x64/Debug/Shared Code/DSPModulePluginDemo_SharedCode.log b/examples/DSP module plugin demo/Builds/x64/Debug/Shared Code/DSPModulePluginDemo_SharedCode.log new file mode 100644 index 0000000000..3c686d9ef2 --- /dev/null +++ b/examples/DSP module plugin demo/Builds/x64/Debug/Shared Code/DSPModulePluginDemo_SharedCode.log @@ -0,0 +1,18 @@ + PluginProcessor.cpp + PluginEditor.cpp + BinaryData.cpp + include_juce_audio_basics.cpp + include_juce_audio_devices.cpp + include_juce_audio_formats.cpp + include_juce_audio_plugin_client_utils.cpp + include_juce_audio_processors.cpp + include_juce_audio_utils.cpp + include_juce_core.cpp + include_juce_data_structures.cpp + include_juce_dsp.cpp + include_juce_events.cpp + include_juce_graphics.cpp + include_juce_gui_basics.cpp + include_juce_gui_extra.cpp + include_juce_opengl.cpp + DSPModulePluginDemo_SharedCode.vcxproj -> Z:\JUCE\examples\DSP module plugin demo\Builds\VisualStudio2017\x64\Debug\Shared Code\DSPModulePluginDemo.lib diff --git a/examples/DSP module plugin demo/DSP module plugin demo.jucer b/examples/DSP module plugin demo/DSP module plugin demo.jucer new file mode 100644 index 0000000000..20c2146eb3 --- /dev/null +++ b/examples/DSP module plugin demo/DSP module plugin demo.jucer @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/DSP module plugin demo/JuceLibraryCode/AppConfig.h b/examples/DSP module plugin demo/JuceLibraryCode/AppConfig.h new file mode 100644 index 0000000000..69c1fbf2cb --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/AppConfig.h @@ -0,0 +1,410 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + + There's a section below where you can add your own custom code safely, and the + Projucer will preserve the contents of that block, but the best way to change + any of these definitions is by using the Projucer's project settings. + + Any commented-out settings will assume their default values. + +*/ + +#pragma once + +//============================================================================== +// [BEGIN_USER_CODE_SECTION] + +// (You can add your own code in this section, and the Projucer will not overwrite it) + +// [END_USER_CODE_SECTION] + +/* + ============================================================================== + + In accordance with the terms of the JUCE 5 End-Use License Agreement, the + JUCE Code in SECTION A cannot be removed, changed or otherwise rendered + ineffective unless you have a JUCE Indie or Pro license, or are using JUCE + under the GPL v3 license. + + End User License Agreement: www.juce.com/juce-5-licence + ============================================================================== +*/ + +// BEGIN SECTION A + +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + + +// END SECTION A + +#define JUCE_USE_DARK_SPLASH_SCREEN 1 + +//============================================================================== +#define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 +#define JUCE_MODULE_AVAILABLE_juce_audio_devices 1 +#define JUCE_MODULE_AVAILABLE_juce_audio_formats 1 +#define JUCE_MODULE_AVAILABLE_juce_audio_plugin_client 1 +#define JUCE_MODULE_AVAILABLE_juce_audio_processors 1 +#define JUCE_MODULE_AVAILABLE_juce_audio_utils 1 +#define JUCE_MODULE_AVAILABLE_juce_core 1 +#define JUCE_MODULE_AVAILABLE_juce_data_structures 1 +#define JUCE_MODULE_AVAILABLE_juce_dsp 1 +#define JUCE_MODULE_AVAILABLE_juce_events 1 +#define JUCE_MODULE_AVAILABLE_juce_graphics 1 +#define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 +#define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 +#define JUCE_MODULE_AVAILABLE_juce_opengl 1 + +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_plugin_client flags: + +#ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS + //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS 1 +#endif + +#ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS + //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_dsp flags: + +#ifndef JUCE_ASSERTION_FIRFILTER + //#define JUCE_ASSERTION_FIRFILTER 1 +#endif + +#ifndef JUCE_DSP_USE_INTEL_MKL + //#define JUCE_DSP_USE_INTEL_MKL 1 +#endif + +#ifndef JUCE_DSP_USE_SHARED_FFTW + //#define JUCE_DSP_USE_SHARED_FFTW 1 +#endif + +#ifndef JUCE_DSP_USE_STATIC_FFTW + //#define JUCE_DSP_USE_STATIC_FFTW 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif +//============================================================================== +#ifndef JUCE_STANDALONE_APPLICATION + #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) + #define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone + #else + #define JUCE_STANDALONE_APPLICATION 0 + #endif +#endif + +//============================================================================== +// Audio plugin settings.. + +#ifndef JucePlugin_Build_VST + #define JucePlugin_Build_VST 1 +#endif +#ifndef JucePlugin_Build_VST3 + #define JucePlugin_Build_VST3 0 +#endif +#ifndef JucePlugin_Build_AU + #define JucePlugin_Build_AU 1 +#endif +#ifndef JucePlugin_Build_AUv3 + #define JucePlugin_Build_AUv3 0 +#endif +#ifndef JucePlugin_Build_RTAS + #define JucePlugin_Build_RTAS 0 +#endif +#ifndef JucePlugin_Build_AAX + #define JucePlugin_Build_AAX 0 +#endif +#ifndef JucePlugin_Build_Standalone + #define JucePlugin_Build_Standalone 1 +#endif +#ifndef JucePlugin_Enable_IAA + #define JucePlugin_Enable_IAA 0 +#endif +#ifndef JucePlugin_Name + #define JucePlugin_Name "DSP module plugin demo" +#endif +#ifndef JucePlugin_Desc + #define JucePlugin_Desc "DSP module plugin demo" +#endif +#ifndef JucePlugin_Manufacturer + #define JucePlugin_Manufacturer "ROLI Ltd." +#endif +#ifndef JucePlugin_ManufacturerWebsite + #define JucePlugin_ManufacturerWebsite "www.juce.com" +#endif +#ifndef JucePlugin_ManufacturerEmail + #define JucePlugin_ManufacturerEmail "info@juce.com" +#endif +#ifndef JucePlugin_ManufacturerCode + #define JucePlugin_ManufacturerCode 0x524f4c49 // 'ROLI' +#endif +#ifndef JucePlugin_PluginCode + #define JucePlugin_PluginCode 0x446d7064 // 'Dmpd' +#endif +#ifndef JucePlugin_IsSynth + #define JucePlugin_IsSynth 0 +#endif +#ifndef JucePlugin_WantsMidiInput + #define JucePlugin_WantsMidiInput 0 +#endif +#ifndef JucePlugin_ProducesMidiOutput + #define JucePlugin_ProducesMidiOutput 0 +#endif +#ifndef JucePlugin_IsMidiEffect + #define JucePlugin_IsMidiEffect 0 +#endif +#ifndef JucePlugin_EditorRequiresKeyboardFocus + #define JucePlugin_EditorRequiresKeyboardFocus 0 +#endif +#ifndef JucePlugin_Version + #define JucePlugin_Version 1.0.0 +#endif +#ifndef JucePlugin_VersionCode + #define JucePlugin_VersionCode 0x10000 +#endif +#ifndef JucePlugin_VersionString + #define JucePlugin_VersionString "1.0.0" +#endif +#ifndef JucePlugin_VSTUniqueID + #define JucePlugin_VSTUniqueID JucePlugin_PluginCode +#endif +#ifndef JucePlugin_VSTCategory + #define JucePlugin_VSTCategory kPlugCategEffect +#endif +#ifndef JucePlugin_AUMainType + #define JucePlugin_AUMainType kAudioUnitType_Effect +#endif +#ifndef JucePlugin_AUSubType + #define JucePlugin_AUSubType JucePlugin_PluginCode +#endif +#ifndef JucePlugin_AUExportPrefix + #define JucePlugin_AUExportPrefix DSPmoduleplugindemoAU +#endif +#ifndef JucePlugin_AUExportPrefixQuoted + #define JucePlugin_AUExportPrefixQuoted "DSPmoduleplugindemoAU" +#endif +#ifndef JucePlugin_AUManufacturerCode + #define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode +#endif +#ifndef JucePlugin_CFBundleIdentifier + #define JucePlugin_CFBundleIdentifier com.ROLI.DSPmoduleplugindemo +#endif +#ifndef JucePlugin_RTASCategory + #define JucePlugin_RTASCategory ePlugInCategory_None +#endif +#ifndef JucePlugin_RTASManufacturerCode + #define JucePlugin_RTASManufacturerCode JucePlugin_ManufacturerCode +#endif +#ifndef JucePlugin_RTASProductId + #define JucePlugin_RTASProductId JucePlugin_PluginCode +#endif +#ifndef JucePlugin_RTASDisableBypass + #define JucePlugin_RTASDisableBypass 0 +#endif +#ifndef JucePlugin_RTASDisableMultiMono + #define JucePlugin_RTASDisableMultiMono 0 +#endif +#ifndef JucePlugin_AAXIdentifier + #define JucePlugin_AAXIdentifier com.yourcompany.DSPmoduleplugindemo +#endif +#ifndef JucePlugin_AAXManufacturerCode + #define JucePlugin_AAXManufacturerCode JucePlugin_ManufacturerCode +#endif +#ifndef JucePlugin_AAXProductId + #define JucePlugin_AAXProductId JucePlugin_PluginCode +#endif +#ifndef JucePlugin_AAXCategory + #define JucePlugin_AAXCategory AAX_ePlugInCategory_Dynamics +#endif +#ifndef JucePlugin_AAXDisableBypass + #define JucePlugin_AAXDisableBypass 0 +#endif +#ifndef JucePlugin_AAXDisableMultiMono + #define JucePlugin_AAXDisableMultiMono 0 +#endif +#ifndef JucePlugin_IAAType + #define JucePlugin_IAAType 0x61757278 // 'aurx' +#endif +#ifndef JucePlugin_IAASubType + #define JucePlugin_IAASubType JucePlugin_PluginCode +#endif +#ifndef JucePlugin_IAAName + #define JucePlugin_IAAName "ROLI Ltd.: DSP module plugin demo" +#endif diff --git a/examples/DSP module plugin demo/JuceLibraryCode/BinaryData.cpp b/examples/DSP module plugin demo/JuceLibraryCode/BinaryData.cpp new file mode 100644 index 0000000000..42a37114d3 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/BinaryData.cpp @@ -0,0 +1,1505 @@ +/* ==================================== JUCER_BINARY_RESOURCE ==================================== + + This is an auto-generated file: Any edits you make may be overwritten! + +*/ + +namespace BinaryData +{ + +//================== Impulse1.wav ================== +static const unsigned char temp_binary_data_0[] = +{ 82,73,70,70,126,96,1,0,87,65,86,69,102,109,116,32,16,0,0,0,1,0,1,0,68,172,0,0,136,88,1,0,2,0,16,0,100,97,116,97,90,96,1,0,127,21,151,64,230,104,184,126,225,120,232,97,57,69,88,45,227,27,38,18,220,11,103,5,176,2,232,5,154,10,167,9,251,255,163,236,190, +216,29,207,223,212,251,228,199,245,24,253,183,247,114,235,241,226,23,226,178,230,237,235,94,238,102,239,122,239,119,237,243,231,233,223,35,216,224,212,156,214,186,218,111,224,177,230,45,236,78,241,140,243,206,241,67,238,53,235,88,235,105,239,7,244,209, +244,87,242,46,238,65,235,54,236,48,240,217,244,177,247,106,247,171,244,109,241,181,238,58,237,21,237,175,237,67,238,132,238,51,239,136,241,189,244,136,246,201,245,193,243,105,242,110,242,174,243,15,245,144,245,117,245,172,245,12,247,51,250,200,253,107, +255,104,254,24,252,134,250,247,250,172,253,146,1,180,4,188,5,159,4,174,2,111,1,219,0,197,0,166,1,126,3,250,5,149,8,91,10,133,10,9,9,149,6,115,4,190,3,109,4,145,5,34,6,252,5,32,6,181,7,244,10,1,15,119,18,81,20,177,20,30,20,160,18,163,16,0,15,224,13,8, +13,76,12,197,11,166,11,185,11,94,11,40,10,52,8,63,6,61,5,136,5,247,6,1,9,206,10,213,11,104,12,42,13,152,14,174,16,197,18,246,19,187,19,34,18,163,15,31,13,91,11,158,10,143,10,118,10,214,9,236,8,47,8,201,7,139,7,4,7,9,6,249,4,57,4,225,3,249,3,134,4,96, +5,59,6,9,7,235,7,209,8,83,9,0,9,204,7,33,6,143,4,151,3,117,3,197,3,206,3,37,3,232,1,124,0,63,255,97,254,223,253,144,253,85,253,12,253,130,252,174,251,198,250,34,250,21,250,205,250,38,252,195,253,81,255,125,0,251,0,204,0,65,0,146,255,197,254,221,253,236, +252,233,251,178,250,88,249,40,248,85,247,234,246,219,246,18,247,118,247,236,247,81,248,132,248,147,248,172,248,215,248,243,248,238,248,212,248,190,248,187,248,200,248,220,248,254,248,52,249,138,249,232,249,22,250,19,250,5,250,240,249,188,249,95,249,216, +248,56,248,168,247,91,247,129,247,25,248,235,248,190,249,132,250,57,251,206,251,83,252,236,252,143,253,255,253,39,254,41,254,29,254,20,254,34,254,50,254,21,254,201,253,110,253,47,253,27,253,5,253,173,252,28,252,161,251,133,251,206,251,98,252,41,253,252, +253,151,254,206,254,155,254,38,254,199,253,181,253,236,253,100,254,8,255,146,255,203,255,173,255,80,255,241,254,218,254,16,255,130,255,60,0,34,1,206,1,253,1,208,1,134,1,60,1,24,1,91,1,241,1,123,2,208,2,16,3,84,3,174,3,36,4,160,4,23,5,109,5,168,5,14,6, +148,6,230,6,9,7,43,7,66,7,48,7,228,6,90,6,160,5,195,4,234,3,93,3,92,3,235,3,180,4,92,5,183,5,180,5,70,5,141,4,204,3,56,3,239,2,1,3,96,3,220,3,60,4,79,4,253,3,106,3,191,2,34,2,189,1,145,1,124,1,118,1,134,1,136,1,88,1,21,1,229,0,203,0,199,0,214,0,235,0, +249,0,236,0,190,0,140,0,126,0,167,0,236,0,44,1,89,1,127,1,171,1,202,1,195,1,152,1,89,1,23,1,236,0,214,0,187,0,138,0,66,0,235,255,153,255,87,255,33,255,238,254,173,254,89,254,5,254,199,253,176,253,207,253,20,254,95,254,149,254,177,254,193,254,196,254, +163,254,101,254,54,254,33,254,25,254,38,254,79,254,107,254,55,254,158,253,252,252,198,252,1,253,97,253,170,253,189,253,160,253,126,253,120,253,153,253,231,253,69,254,134,254,155,254,153,254,148,254,152,254,159,254,150,254,120,254,89,254,80,254,107,254, +154,254,198,254,221,254,195,254,137,254,94,254,70,254,51,254,42,254,49,254,49,254,26,254,8,254,22,254,53,254,62,254,32,254,226,253,170,253,160,253,205,253,44,254,189,254,80,255,185,255,12,0,72,0,88,0,85,0,74,0,45,0,18,0,11,0,26,0,63,0,106,0,122,0,76, +0,212,255,62,255,212,254,211,254,76,255,26,0,240,0,178,1,125,2,47,3,84,3,155,2,14,1,55,255,230,253,102,253,123,253,243,253,131,254,0,255,123,255,188,255,113,255,188,254,253,253,132,253,144,253,37,254,240,254,189,255,134,0,15,1,48,1,16,1,223,0,209,0,10, +1,82,1,130,1,176,1,205,1,180,1,126,1,97,1,107,1,138,1,174,1,198,1,221,1,13,2,57,2,48,2,0,2,236,1,30,2,112,2,181,2,228,2,252,2,235,2,164,2,74,2,9,2,212,1,144,1,72,1,15,1,247,0,243,0,209,0,128,0,57,0,48,0,84,0,118,0,138,0,148,0,154,0,150,0,132,0,124,0, +144,0,181,0,211,0,225,0,239,0,13,1,46,1,57,1,44,1,13,1,235,0,209,0,188,0,147,0,69,0,220,255,109,255,9,255,200,254,186,254,206,254,243,254,43,255,107,255,160,255,184,255,181,255,178,255,186,255,178,255,144,255,109,255,85,255,73,255,76,255,82,255,86,255, +95,255,102,255,101,255,104,255,115,255,119,255,98,255,56,255,17,255,253,254,246,254,246,254,244,254,229,254,208,254,194,254,197,254,216,254,242,254,253,254,247,254,247,254,16,255,77,255,168,255,1,0,67,0,104,0,106,0,81,0,36,0,229,255,155,255,84,255,27, +255,250,254,247,254,254,254,9,255,32,255,70,255,127,255,205,255,38,0,130,0,203,0,227,0,193,0,119,0,36,0,225,255,179,255,145,255,123,255,113,255,101,255,82,255,62,255,34,255,11,255,17,255,47,255,89,255,136,255,185,255,241,255,44,0,86,0,103,0,97,0,77,0, +57,0,49,0,45,0,29,0,252,255,216,255,199,255,209,255,236,255,10,0,37,0,59,0,79,0,99,0,101,0,69,0,11,0,201,255,152,255,136,255,145,255,154,255,161,255,175,255,196,255,226,255,11,0,56,0,89,0,104,0,103,0,99,0,99,0,96,0,83,0,79,0,95,0,124,0,152,0,169,0,182, +0,195,0,196,0,176,0,144,0,108,0,71,0,42,0,25,0,12,0,253,255,239,255,228,255,218,255,215,255,212,255,198,255,189,255,210,255,254,255,32,0,39,0,29,0,7,0,230,255,196,255,168,255,147,255,136,255,141,255,153,255,164,255,172,255,173,255,164,255,138,255,114, +255,114,255,140,255,176,255,216,255,0,0,42,0,85,0,113,0,117,0,109,0,101,0,105,0,131,0,163,0,188,0,200,0,193,0,178,0,179,0,195,0,205,0,193,0,158,0,117,0,82,0,49,0,14,0,234,255,200,255,182,255,192,255,222,255,245,255,243,255,219,255,193,255,186,255,192, +255,196,255,193,255,175,255,137,255,98,255,77,255,62,255,56,255,73,255,106,255,138,255,162,255,176,255,191,255,217,255,249,255,23,0,51,0,80,0,110,0,137,0,153,0,147,0,116,0,78,0,60,0,71,0,96,0,127,0,159,0,180,0,180,0,170,0,159,0,151,0,152,0,161,0,165, +0,151,0,121,0,85,0,51,0,21,0,255,255,242,255,236,255,237,255,246,255,253,255,242,255,212,255,177,255,157,255,157,255,167,255,179,255,183,255,183,255,183,255,182,255,174,255,156,255,141,255,136,255,132,255,117,255,104,255,101,255,106,255,126,255,165,255, +198,255,210,255,206,255,195,255,193,255,213,255,246,255,17,0,33,0,43,0,53,0,63,0,74,0,79,0,67,0,37,0,11,0,7,0,24,0,43,0,52,0,44,0,25,0,10,0,12,0,30,0,51,0,65,0,66,0,54,0,37,0,26,0,18,0,253,255,217,255,178,255,157,255,152,255,151,255,143,255,129,255,114, +255,105,255,104,255,111,255,129,255,151,255,168,255,176,255,171,255,149,255,117,255,93,255,86,255,96,255,113,255,133,255,157,255,194,255,240,255,19,0,36,0,46,0,59,0,73,0,81,0,81,0,72,0,63,0,57,0,53,0,51,0,53,0,52,0,45,0,30,0,10,0,246,255,228,255,210, +255,206,255,227,255,13,0,53,0,80,0,94,0,96,0,86,0,66,0,33,0,249,255,216,255,190,255,174,255,171,255,177,255,191,255,220,255,4,0,46,0,82,0,107,0,116,0,107,0,83,0,55,0,37,0,15,0,238,255,222,255,241,255,23,0,61,0,86,0,94,0,88,0,77,0,72,0,75,0,66,0,36,0, +9,0,10,0,40,0,81,0,115,0,121,0,82,0,24,0,234,255,209,255,200,255,217,255,249,255,0,0,227,255,196,255,191,255,207,255,227,255,244,255,5,0,27,0,47,0,52,0,43,0,26,0,255,255,224,255,209,255,220,255,2,0,50,0,90,0,125,0,164,0,185,0,173,0,148,0,121,0,90,0,58, +0,25,0,1,0,237,255,231,255,228,255,226,255,218,255,204,255,204,255,221,255,241,255,254,255,6,0,255,255,239,255,224,255,227,255,239,255,246,255,243,255,242,255,242,255,238,255,229,255,218,255,201,255,188,255,185,255,183,255,174,255,162,255,157,255,172, +255,206,255,243,255,12,0,27,0,54,0,106,0,161,0,200,0,216,0,214,0,206,0,199,0,177,0,126,0,41,0,192,255,89,255,12,255,225,254,219,254,245,254,37,255,113,255,212,255,51,0,116,0,147,0,159,0,176,0,197,0,218,0,237,0,245,0,226,0,169,0,85,0,245,255,135,255,15, +255,163,254,102,254,118,254,205,254,54,255,142,255,208,255,248,255,15,0,31,0,32,0,21,0,11,0,5,0,5,0,15,0,18,0,249,255,194,255,131,255,85,255,61,255,49,255,49,255,66,255,95,255,130,255,175,255,227,255,14,0,39,0,47,0,48,0,52,0,55,0,45,0,35,0,43,0,60,0, +61,0,31,0,228,255,169,255,137,255,137,255,160,255,189,255,222,255,10,0,65,0,132,0,192,0,215,0,186,0,122,0,57,0,8,0,232,255,211,255,196,255,193,255,205,255,221,255,230,255,224,255,201,255,177,255,169,255,171,255,175,255,181,255,190,255,204,255,231,255, +7,0,23,0,16,0,253,255,238,255,236,255,235,255,223,255,208,255,205,255,218,255,239,255,1,0,5,0,242,255,205,255,169,255,151,255,156,255,172,255,183,255,197,255,216,255,231,255,232,255,215,255,182,255,147,255,131,255,149,255,200,255,11,0,74,0,124,0,157, +0,181,0,197,0,192,0,164,0,129,0,103,0,96,0,103,0,112,0,116,0,118,0,119,0,122,0,129,0,133,0,128,0,114,0,99,0,95,0,105,0,121,0,136,0,146,0,150,0,142,0,120,0,90,0,55,0,16,0,235,255,210,255,201,255,208,255,227,255,251,255,15,0,33,0,53,0,74,0,94,0,109,0,116, +0,113,0,103,0,84,0,62,0,43,0,29,0,14,0,3,0,2,0,11,0,23,0,29,0,32,0,36,0,42,0,39,0,28,0,11,0,253,255,246,255,243,255,243,255,248,255,0,0,0,0,247,255,238,255,232,255,222,255,210,255,202,255,205,255,220,255,245,255,20,0,47,0,57,0,49,0,30,0,5,0,225,255,186, +255,154,255,137,255,132,255,133,255,139,255,139,255,132,255,127,255,133,255,144,255,152,255,154,255,160,255,171,255,185,255,193,255,196,255,202,255,210,255,212,255,211,255,212,255,213,255,212,255,208,255,204,255,206,255,215,255,226,255,237,255,247,255, +251,255,247,255,240,255,235,255,237,255,247,255,6,0,27,0,47,0,53,0,47,0,38,0,28,0,23,0,26,0,35,0,43,0,43,0,35,0,30,0,27,0,10,0,232,255,192,255,156,255,128,255,114,255,108,255,98,255,80,255,61,255,51,255,55,255,71,255,90,255,105,255,112,255,111,255,105, +255,102,255,105,255,112,255,125,255,148,255,181,255,209,255,221,255,217,255,204,255,194,255,196,255,211,255,237,255,13,0,45,0,71,0,94,0,110,0,110,0,100,0,85,0,69,0,57,0,55,0,62,0,72,0,78,0,81,0,86,0,95,0,107,0,119,0,123,0,115,0,98,0,75,0,52,0,38,0,37, +0,46,0,60,0,78,0,99,0,110,0,102,0,77,0,50,0,30,0,18,0,10,0,11,0,21,0,37,0,51,0,59,0,60,0,53,0,46,0,45,0,58,0,83,0,102,0,105,0,98,0,90,0,85,0,83,0,77,0,70,0,64,0,58,0,55,0,57,0,59,0,56,0,47,0,44,0,60,0,93,0,122,0,132,0,116,0,86,0,54,0,26,0,4,0,250,255, +252,255,3,0,13,0,29,0,51,0,66,0,62,0,47,0,29,0,10,0,0,0,1,0,8,0,14,0,18,0,22,0,29,0,32,0,23,0,8,0,255,255,245,255,225,255,201,255,186,255,183,255,190,255,197,255,200,255,208,255,222,255,239,255,255,255,12,0,21,0,21,0,12,0,254,255,242,255,238,255,241, +255,246,255,250,255,249,255,242,255,229,255,213,255,199,255,194,255,199,255,212,255,231,255,250,255,7,0,12,0,11,0,3,0,241,255,223,255,218,255,220,255,213,255,196,255,178,255,167,255,168,255,179,255,194,255,212,255,225,255,223,255,209,255,190,255,167, +255,137,255,105,255,86,255,86,255,100,255,121,255,142,255,157,255,165,255,174,255,189,255,206,255,216,255,219,255,214,255,197,255,174,255,148,255,128,255,125,255,138,255,156,255,175,255,194,255,211,255,221,255,226,255,234,255,240,255,240,255,240,255, +250,255,15,0,41,0,66,0,85,0,95,0,97,0,94,0,87,0,73,0,49,0,20,0,254,255,245,255,245,255,249,255,0,0,9,0,17,0,29,0,46,0,56,0,54,0,49,0,51,0,55,0,51,0,42,0,37,0,31,0,20,0,10,0,6,0,4,0,3,0,6,0,18,0,27,0,25,0,12,0,255,255,248,255,248,255,249,255,253,255,3, +0,3,0,253,255,247,255,243,255,244,255,249,255,249,255,244,255,241,255,248,255,11,0,34,0,55,0,65,0,67,0,70,0,73,0,72,0,71,0,67,0,59,0,51,0,52,0,60,0,68,0,75,0,82,0,85,0,81,0,74,0,73,0,77,0,84,0,90,0,99,0,107,0,108,0,97,0,77,0,55,0,36,0,24,0,25,0,35,0, +50,0,65,0,76,0,80,0,78,0,61,0,31,0,0,0,236,255,231,255,235,255,241,255,246,255,254,255,8,0,15,0,16,0,20,0,29,0,36,0,30,0,12,0,247,255,229,255,219,255,219,255,230,255,249,255,13,0,28,0,37,0,42,0,44,0,43,0,34,0,17,0,251,255,235,255,227,255,221,255,218, +255,213,255,205,255,193,255,183,255,177,255,175,255,172,255,160,255,140,255,123,255,116,255,115,255,116,255,120,255,124,255,128,255,133,255,140,255,144,255,143,255,141,255,139,255,139,255,141,255,146,255,154,255,168,255,186,255,200,255,203,255,198,255, +190,255,181,255,173,255,169,255,165,255,162,255,162,255,165,255,171,255,180,255,189,255,195,255,204,255,220,255,236,255,246,255,251,255,255,255,2,0,7,0,16,0,27,0,31,0,23,0,7,0,243,255,221,255,197,255,180,255,177,255,185,255,201,255,224,255,253,255,25, +0,44,0,53,0,57,0,59,0,63,0,67,0,72,0,77,0,78,0,67,0,49,0,34,0,31,0,37,0,46,0,60,0,78,0,93,0,106,0,119,0,136,0,158,0,179,0,192,0,197,0,195,0,185,0,162,0,132,0,105,0,84,0,73,0,68,0,68,0,65,0,59,0,54,0,50,0,45,0,35,0,29,0,35,0,49,0,62,0,69,0,75,0,81,0,82, +0,76,0,67,0,61,0,59,0,57,0,55,0,45,0,23,0,249,255,225,255,218,255,227,255,242,255,1,0,11,0,15,0,11,0,0,0,241,255,222,255,203,255,194,255,194,255,198,255,203,255,206,255,205,255,204,255,212,255,230,255,249,255,0,0,251,255,239,255,227,255,219,255,216,255, +218,255,223,255,233,255,245,255,252,255,251,255,239,255,218,255,199,255,191,255,199,255,219,255,244,255,8,0,18,0,18,0,13,0,4,0,247,255,232,255,221,255,216,255,215,255,220,255,230,255,238,255,239,255,241,255,245,255,242,255,233,255,222,255,217,255,217, +255,221,255,225,255,225,255,225,255,224,255,223,255,223,255,222,255,215,255,204,255,193,255,184,255,174,255,164,255,154,255,150,255,152,255,159,255,169,255,179,255,185,255,187,255,185,255,188,255,197,255,209,255,219,255,226,255,226,255,221,255,214,255, +208,255,208,255,210,255,207,255,199,255,193,255,192,255,196,255,207,255,219,255,231,255,247,255,13,0,35,0,53,0,61,0,59,0,50,0,39,0,30,0,27,0,31,0,39,0,44,0,43,0,39,0,39,0,42,0,44,0,44,0,47,0,51,0,48,0,34,0,14,0,252,255,239,255,228,255,222,255,226,255, +237,255,248,255,253,255,252,255,249,255,243,255,233,255,222,255,221,255,230,255,241,255,252,255,4,0,7,0,6,0,4,0,2,0,3,0,7,0,13,0,18,0,25,0,33,0,40,0,46,0,50,0,54,0,62,0,75,0,90,0,102,0,107,0,109,0,108,0,104,0,100,0,95,0,90,0,87,0,94,0,108,0,122,0,128, +0,125,0,121,0,121,0,120,0,112,0,98,0,81,0,61,0,42,0,28,0,18,0,13,0,12,0,7,0,1,0,255,255,254,255,249,255,248,255,251,255,4,0,13,0,15,0,12,0,8,0,4,0,255,255,249,255,239,255,224,255,208,255,200,255,203,255,214,255,227,255,239,255,247,255,253,255,2,0,4,0, +5,0,255,255,242,255,224,255,208,255,200,255,196,255,194,255,194,255,196,255,194,255,189,255,187,255,192,255,200,255,211,255,222,255,231,255,232,255,227,255,222,255,222,255,223,255,225,255,229,255,230,255,227,255,221,255,213,255,205,255,199,255,191,255, +179,255,166,255,158,255,160,255,168,255,178,255,191,255,208,255,225,255,240,255,250,255,2,0,9,0,16,0,16,0,9,0,255,255,246,255,236,255,223,255,210,255,199,255,190,255,181,255,178,255,184,255,193,255,199,255,203,255,206,255,212,255,220,255,228,255,234, +255,237,255,235,255,229,255,220,255,208,255,199,255,200,255,208,255,216,255,225,255,235,255,245,255,251,255,255,255,7,0,20,0,36,0,57,0,76,0,88,0,87,0,77,0,62,0,47,0,32,0,15,0,0,0,244,255,234,255,231,255,236,255,247,255,6,0,29,0,54,0,75,0,87,0,88,0,84, +0,75,0,58,0,34,0,9,0,245,255,232,255,227,255,228,255,228,255,225,255,220,255,217,255,220,255,225,255,230,255,235,255,242,255,248,255,254,255,6,0,18,0,33,0,48,0,60,0,69,0,77,0,80,0,81,0,82,0,88,0,98,0,110,0,123,0,131,0,132,0,124,0,109,0,90,0,71,0,57,0, +50,0,47,0,47,0,46,0,42,0,37,0,32,0,29,0,29,0,29,0,30,0,32,0,32,0,31,0,31,0,31,0,33,0,35,0,34,0,32,0,25,0,11,0,249,255,232,255,222,255,218,255,221,255,226,255,236,255,251,255,14,0,34,0,53,0,70,0,77,0,71,0,55,0,37,0,21,0,8,0,255,255,252,255,3,0,16,0,27, +0,31,0,28,0,23,0,23,0,28,0,34,0,33,0,21,0,1,0,236,255,224,255,223,255,222,255,215,255,207,255,207,255,209,255,208,255,204,255,202,255,198,255,189,255,183,255,186,255,189,255,186,255,179,255,176,255,175,255,174,255,179,255,196,255,217,255,229,255,231, +255,227,255,221,255,214,255,211,255,216,255,224,255,227,255,222,255,210,255,194,255,180,255,172,255,170,255,170,255,175,255,186,255,199,255,211,255,218,255,219,255,216,255,211,255,205,255,200,255,196,255,190,255,181,255,171,255,166,255,168,255,174,255, +183,255,191,255,200,255,209,255,215,255,217,255,216,255,214,255,212,255,212,255,213,255,215,255,216,255,212,255,205,255,193,255,180,255,171,255,171,255,176,255,183,255,191,255,208,255,232,255,3,0,22,0,29,0,24,0,11,0,250,255,238,255,234,255,238,255,249, +255,6,0,17,0,27,0,33,0,33,0,30,0,27,0,23,0,20,0,19,0,26,0,36,0,47,0,55,0,61,0,66,0,68,0,65,0,58,0,54,0,52,0,50,0,45,0,42,0,43,0,48,0,57,0,69,0,81,0,91,0,101,0,112,0,120,0,119,0,109,0,94,0,83,0,77,0,72,0,66,0,58,0,51,0,47,0,46,0,49,0,57,0,67,0,80,0,94, +0,106,0,113,0,112,0,101,0,80,0,55,0,29,0,9,0,253,255,251,255,0,0,9,0,20,0,28,0,33,0,36,0,35,0,31,0,24,0,15,0,5,0,0,0,1,0,3,0,0,0,248,255,239,255,232,255,229,255,229,255,234,255,243,255,250,255,253,255,254,255,253,255,248,255,243,255,243,255,247,255,254, +255,4,0,7,0,4,0,253,255,246,255,241,255,238,255,236,255,230,255,223,255,220,255,219,255,220,255,225,255,234,255,245,255,253,255,3,0,5,0,2,0,251,255,242,255,236,255,234,255,236,255,242,255,252,255,6,0,15,0,24,0,34,0,41,0,42,0,40,0,38,0,38,0,35,0,28,0, +19,0,15,0,15,0,18,0,22,0,23,0,18,0,10,0,3,0,252,255,243,255,231,255,221,255,216,255,218,255,224,255,234,255,242,255,245,255,244,255,240,255,236,255,235,255,231,255,223,255,217,255,214,255,217,255,223,255,231,255,237,255,239,255,233,255,222,255,210,255, +198,255,189,255,186,255,190,255,197,255,204,255,211,255,217,255,219,255,218,255,219,255,221,255,222,255,223,255,223,255,217,255,205,255,191,255,185,255,187,255,196,255,208,255,221,255,233,255,240,255,239,255,235,255,233,255,230,255,227,255,222,255,218, +255,217,255,218,255,220,255,222,255,225,255,225,255,224,255,228,255,238,255,249,255,0,0,255,255,249,255,241,255,235,255,235,255,239,255,244,255,248,255,252,255,0,0,1,0,1,0,254,255,249,255,244,255,242,255,240,255,239,255,237,255,238,255,243,255,250,255, +3,0,9,0,12,0,13,0,14,0,13,0,9,0,3,0,253,255,246,255,242,255,244,255,249,255,0,0,8,0,19,0,27,0,32,0,35,0,40,0,46,0,52,0,54,0,52,0,47,0,42,0,41,0,44,0,47,0,50,0,55,0,61,0,65,0,67,0,67,0,61,0,52,0,46,0,45,0,45,0,44,0,40,0,38,0,38,0,41,0,45,0,47,0,43,0,28, +0,8,0,246,255,235,255,229,255,227,255,226,255,225,255,221,255,218,255,220,255,226,255,235,255,247,255,3,0,11,0,14,0,15,0,10,0,0,0,245,255,236,255,229,255,228,255,235,255,247,255,2,0,8,0,6,0,253,255,247,255,251,255,6,0,18,0,27,0,31,0,29,0,24,0,22,0,25, +0,30,0,33,0,37,0,42,0,46,0,46,0,42,0,34,0,27,0,27,0,32,0,36,0,36,0,28,0,17,0,7,0,0,0,252,255,250,255,251,255,0,0,7,0,14,0,16,0,11,0,1,0,247,255,245,255,250,255,255,255,0,0,255,255,255,255,253,255,251,255,253,255,5,0,17,0,27,0,34,0,40,0,44,0,43,0,34,0, +22,0,10,0,2,0,254,255,252,255,248,255,241,255,234,255,228,255,219,255,207,255,201,255,205,255,214,255,223,255,229,255,230,255,229,255,226,255,223,255,221,255,217,255,209,255,198,255,187,255,178,255,172,255,170,255,172,255,178,255,187,255,198,255,210, +255,223,255,235,255,244,255,250,255,251,255,249,255,248,255,250,255,253,255,254,255,253,255,252,255,254,255,2,0,8,0,15,0,22,0,24,0,20,0,10,0,0,0,250,255,248,255,247,255,243,255,237,255,233,255,231,255,231,255,230,255,226,255,223,255,224,255,225,255,226, +255,225,255,225,255,225,255,225,255,227,255,232,255,241,255,252,255,4,0,9,0,11,0,9,0,2,0,251,255,245,255,242,255,242,255,246,255,255,255,9,0,18,0,24,0,30,0,34,0,34,0,29,0,24,0,22,0,21,0,23,0,28,0,34,0,38,0,37,0,34,0,29,0,23,0,19,0,20,0,25,0,29,0,33,0, +37,0,41,0,41,0,39,0,36,0,35,0,34,0,31,0,26,0,20,0,15,0,14,0,15,0,19,0,22,0,23,0,23,0,22,0,22,0,19,0,13,0,4,0,252,255,246,255,245,255,248,255,252,255,3,0,11,0,17,0,19,0,15,0,8,0,0,0,252,255,252,255,254,255,0,0,255,255,253,255,253,255,255,255,3,0,5,0,6, +0,6,0,2,0,252,255,247,255,246,255,249,255,0,0,7,0,10,0,11,0,10,0,11,0,13,0,15,0,16,0,12,0,6,0,254,255,246,255,238,255,230,255,224,255,222,255,224,255,229,255,235,255,242,255,251,255,4,0,12,0,15,0,15,0,14,0,13,0,8,0,1,0,250,255,244,255,237,255,235,255, +238,255,244,255,252,255,6,0,15,0,22,0,25,0,21,0,11,0,255,255,245,255,237,255,233,255,233,255,234,255,234,255,236,255,243,255,250,255,252,255,252,255,250,255,245,255,237,255,230,255,225,255,223,255,223,255,223,255,226,255,229,255,230,255,227,255,222,255, +219,255,218,255,219,255,224,255,231,255,240,255,247,255,249,255,250,255,250,255,250,255,245,255,236,255,225,255,222,255,226,255,232,255,235,255,239,255,243,255,248,255,253,255,255,255,254,255,248,255,239,255,234,255,235,255,241,255,245,255,247,255,248, +255,249,255,249,255,248,255,247,255,245,255,242,255,240,255,238,255,235,255,231,255,225,255,221,255,222,255,225,255,228,255,234,255,241,255,247,255,253,255,4,0,10,0,13,0,15,0,21,0,27,0,33,0,39,0,43,0,44,0,44,0,45,0,48,0,51,0,53,0,54,0,54,0,52,0,50,0, +47,0,44,0,44,0,46,0,45,0,40,0,30,0,18,0,9,0,7,0,8,0,10,0,9,0,2,0,250,255,248,255,251,255,0,0,2,0,2,0,3,0,7,0,10,0,11,0,7,0,255,255,247,255,244,255,245,255,250,255,1,0,12,0,26,0,38,0,46,0,46,0,40,0,31,0,25,0,27,0,35,0,44,0,50,0,54,0,58,0,60,0,59,0,56, +0,48,0,40,0,32,0,29,0,28,0,31,0,33,0,33,0,32,0,29,0,26,0,21,0,14,0,5,0,252,255,244,255,238,255,233,255,230,255,229,255,227,255,224,255,221,255,217,255,214,255,210,255,204,255,198,255,193,255,190,255,191,255,195,255,198,255,199,255,197,255,195,255,194, +255,196,255,200,255,206,255,214,255,219,255,221,255,222,255,224,255,226,255,229,255,231,255,232,255,232,255,234,255,236,255,237,255,237,255,236,255,231,255,227,255,225,255,226,255,231,255,241,255,1,0,20,0,36,0,44,0,45,0,38,0,26,0,11,0,255,255,246,255, +242,255,242,255,241,255,241,255,241,255,242,255,242,255,242,255,242,255,241,255,240,255,237,255,233,255,229,255,225,255,225,255,226,255,227,255,226,255,224,255,223,255,226,255,231,255,233,255,233,255,235,255,239,255,244,255,250,255,0,0,6,0,9,0,8,0,8, +0,11,0,14,0,17,0,19,0,22,0,26,0,31,0,34,0,36,0,37,0,38,0,39,0,40,0,39,0,35,0,30,0,25,0,18,0,7,0,251,255,240,255,236,255,236,255,238,255,240,255,241,255,245,255,252,255,3,0,6,0,7,0,10,0,17,0,28,0,39,0,45,0,45,0,41,0,38,0,36,0,38,0,38,0,37,0,36,0,36,0, +34,0,32,0,30,0,29,0,31,0,36,0,43,0,49,0,51,0,51,0,49,0,44,0,37,0,28,0,20,0,15,0,15,0,20,0,28,0,34,0,36,0,35,0,30,0,23,0,13,0,0,0,243,255,230,255,221,255,215,255,212,255,214,255,221,255,232,255,246,255,4,0,12,0,14,0,10,0,7,0,7,0,10,0,11,0,11,0,12,0,14, +0,16,0,18,0,16,0,12,0,7,0,2,0,253,255,248,255,245,255,242,255,241,255,244,255,249,255,252,255,253,255,254,255,0,0,0,0,251,255,241,255,231,255,224,255,218,255,214,255,211,255,211,255,215,255,219,255,222,255,222,255,219,255,215,255,213,255,214,255,216, +255,218,255,221,255,225,255,230,255,235,255,240,255,241,255,238,255,234,255,231,255,230,255,227,255,223,255,220,255,220,255,222,255,227,255,233,255,239,255,244,255,248,255,249,255,247,255,242,255,234,255,225,255,217,255,212,255,213,255,220,255,230,255, +238,255,243,255,245,255,242,255,238,255,235,255,232,255,228,255,221,255,214,255,211,255,210,255,212,255,215,255,220,255,224,255,229,255,234,255,239,255,241,255,240,255,237,255,235,255,237,255,243,255,253,255,7,0,14,0,22,0,30,0,37,0,39,0,36,0,30,0,26, +0,28,0,34,0,39,0,42,0,41,0,36,0,29,0,22,0,18,0,16,0,17,0,20,0,22,0,21,0,19,0,18,0,20,0,21,0,19,0,13,0,6,0,2,0,1,0,3,0,6,0,6,0,1,0,250,255,246,255,247,255,252,255,4,0,12,0,20,0,27,0,31,0,35,0,39,0,43,0,46,0,47,0,45,0,42,0,41,0,42,0,44,0,44,0,41,0,38,0, +38,0,42,0,51,0,59,0,62,0,57,0,47,0,37,0,29,0,22,0,17,0,14,0,13,0,12,0,10,0,8,0,5,0,1,0,252,255,246,255,242,255,239,255,238,255,238,255,237,255,239,255,243,255,249,255,255,255,3,0,6,0,8,0,8,0,5,0,255,255,247,255,240,255,237,255,239,255,245,255,0,0,12, +0,24,0,33,0,38,0,37,0,31,0,25,0,21,0,18,0,16,0,17,0,20,0,23,0,24,0,23,0,20,0,18,0,15,0,14,0,14,0,15,0,16,0,17,0,16,0,14,0,11,0,7,0,4,0,1,0,253,255,248,255,242,255,236,255,233,255,232,255,232,255,234,255,236,255,238,255,237,255,232,255,223,255,213,255, +206,255,203,255,203,255,205,255,205,255,203,255,200,255,196,255,194,255,197,255,203,255,212,255,222,255,231,255,239,255,243,255,244,255,241,255,237,255,233,255,227,255,220,255,217,255,218,255,223,255,229,255,234,255,240,255,245,255,247,255,246,255,244, +255,240,255,234,255,227,255,222,255,221,255,221,255,221,255,220,255,222,255,225,255,226,255,222,255,214,255,203,255,192,255,183,255,179,255,181,255,188,255,198,255,210,255,222,255,232,255,239,255,241,255,240,255,237,255,235,255,234,255,235,255,236,255, +239,255,244,255,251,255,3,0,12,0,23,0,35,0,47,0,54,0,54,0,50,0,45,0,44,0,48,0,55,0,60,0,61,0,60,0,56,0,50,0,42,0,36,0,32,0,30,0,28,0,29,0,31,0,33,0,34,0,33,0,28,0,23,0,19,0,17,0,16,0,16,0,14,0,9,0,2,0,251,255,248,255,249,255,255,255,8,0,18,0,26,0,30, +0,32,0,33,0,32,0,30,0,24,0,15,0,8,0,4,0,2,0,2,0,5,0,12,0,21,0,28,0,32,0,34,0,34,0,31,0,26,0,19,0,11,0,6,0,4,0,6,0,11,0,17,0,23,0,27,0,29,0,27,0,20,0,9,0,0,0,250,255,249,255,251,255,1,0,10,0,20,0,30,0,37,0,40,0,38,0,31,0,22,0,12,0,2,0,249,255,242,255, +238,255,237,255,241,255,247,255,255,255,6,0,9,0,9,0,4,0,252,255,242,255,232,255,224,255,219,255,217,255,216,255,215,255,216,255,217,255,219,255,221,255,222,255,224,255,226,255,232,255,240,255,249,255,0,0,4,0,7,0,8,0,7,0,5,0,2,0,253,255,246,255,240,255, +236,255,235,255,237,255,240,255,241,255,241,255,239,255,239,255,241,255,245,255,249,255,251,255,253,255,254,255,0,0,4,0,8,0,11,0,7,0,252,255,236,255,221,255,211,255,207,255,207,255,207,255,208,255,210,255,215,255,223,255,232,255,240,255,245,255,246,255, +243,255,239,255,240,255,241,255,241,255,238,255,235,255,233,255,232,255,232,255,235,255,239,255,242,255,244,255,246,255,252,255,4,0,14,0,23,0,30,0,30,0,27,0,26,0,28,0,31,0,33,0,32,0,28,0,19,0,9,0,0,0,251,255,250,255,251,255,252,255,0,0,9,0,22,0,36,0, +46,0,49,0,46,0,42,0,38,0,36,0,33,0,28,0,23,0,20,0,17,0,16,0,16,0,17,0,19,0,22,0,26,0,30,0,30,0,29,0,27,0,25,0,19,0,11,0,2,0,252,255,251,255,251,255,249,255,246,255,243,255,238,255,236,255,241,255,250,255,5,0,13,0,17,0,20,0,21,0,20,0,17,0,12,0,7,0,3,0, +2,0,4,0,5,0,4,0,3,0,2,0,3,0,6,0,9,0,11,0,12,0,11,0,8,0,3,0,254,255,250,255,247,255,247,255,249,255,252,255,253,255,253,255,253,255,253,255,250,255,244,255,237,255,231,255,226,255,221,255,218,255,217,255,218,255,220,255,222,255,223,255,224,255,224,255, +224,255,224,255,223,255,221,255,220,255,223,255,226,255,230,255,233,255,237,255,240,255,245,255,250,255,254,255,0,0,0,0,255,255,252,255,251,255,252,255,254,255,1,0,5,0,8,0,7,0,3,0,0,0,255,255,1,0,3,0,3,0,1,0,254,255,253,255,254,255,255,255,255,255,251, +255,247,255,245,255,246,255,249,255,252,255,251,255,246,255,242,255,239,255,241,255,243,255,246,255,250,255,1,0,8,0,14,0,17,0,17,0,14,0,11,0,8,0,7,0,7,0,8,0,9,0,9,0,9,0,9,0,8,0,6,0,4,0,2,0,0,0,255,255,253,255,252,255,251,255,253,255,1,0,7,0,13,0,17,0, +17,0,15,0,10,0,2,0,249,255,243,255,243,255,248,255,255,255,8,0,14,0,18,0,18,0,15,0,10,0,3,0,252,255,245,255,241,255,239,255,239,255,240,255,243,255,247,255,250,255,0,0,6,0,10,0,10,0,7,0,4,0,3,0,3,0,6,0,11,0,17,0,23,0,25,0,21,0,13,0,6,0,0,0,250,255,244, +255,241,255,243,255,249,255,3,0,12,0,17,0,18,0,15,0,10,0,4,0,254,255,249,255,246,255,247,255,250,255,253,255,254,255,0,0,1,0,1,0,1,0,0,0,255,255,0,0,2,0,4,0,6,0,8,0,9,0,9,0,9,0,11,0,14,0,17,0,21,0,25,0,28,0,28,0,26,0,23,0,19,0,16,0,14,0,15,0,16,0,16, +0,16,0,17,0,19,0,21,0,22,0,22,0,22,0,20,0,14,0,7,0,255,255,249,255,245,255,243,255,242,255,241,255,240,255,239,255,238,255,239,255,239,255,240,255,240,255,241,255,244,255,247,255,250,255,250,255,248,255,243,255,237,255,232,255,230,255,233,255,236,255, +241,255,247,255,252,255,255,255,254,255,249,255,243,255,236,255,231,255,229,255,230,255,233,255,234,255,236,255,240,255,242,255,243,255,243,255,241,255,239,255,238,255,238,255,237,255,235,255,231,255,229,255,229,255,232,255,237,255,240,255,243,255,244, +255,245,255,248,255,251,255,252,255,252,255,250,255,250,255,250,255,252,255,255,255,4,0,8,0,11,0,13,0,13,0,12,0,9,0,5,0,3,0,1,0,255,255,254,255,255,255,1,0,3,0,4,0,3,0,0,0,251,255,245,255,241,255,240,255,240,255,241,255,243,255,246,255,249,255,251,255, +252,255,252,255,249,255,246,255,244,255,242,255,242,255,243,255,246,255,249,255,252,255,254,255,1,0,7,0,13,0,19,0,25,0,30,0,31,0,30,0,27,0,25,0,25,0,28,0,33,0,37,0,39,0,38,0,35,0,33,0,30,0,26,0,25,0,27,0,31,0,35,0,37,0,36,0,32,0,26,0,19,0,12,0,6,0,3, +0,2,0,255,255,250,255,241,255,230,255,220,255,214,255,214,255,218,255,223,255,227,255,231,255,232,255,232,255,234,255,237,255,240,255,243,255,245,255,245,255,242,255,238,255,234,255,233,255,235,255,242,255,252,255,7,0,18,0,25,0,27,0,25,0,21,0,18,0,18, +0,20,0,23,0,25,0,27,0,29,0,28,0,26,0,24,0,25,0,26,0,26,0,24,0,22,0,16,0,10,0,5,0,3,0,4,0,6,0,6,0,5,0,2,0,253,255,247,255,242,255,238,255,236,255,236,255,235,255,233,255,228,255,224,255,222,255,222,255,223,255,226,255,230,255,235,255,240,255,244,255,248, +255,248,255,248,255,246,255,247,255,248,255,250,255,251,255,254,255,1,0,4,0,7,0,9,0,10,0,10,0,10,0,12,0,16,0,22,0,25,0,25,0,21,0,17,0,13,0,11,0,9,0,7,0,6,0,4,0,4,0,4,0,2,0,255,255,251,255,248,255,247,255,249,255,253,255,0,0,4,0,7,0,7,0,6,0,5,0,7,0,8, +0,8,0,9,0,10,0,10,0,9,0,7,0,6,0,7,0,7,0,7,0,7,0,4,0,1,0,253,255,250,255,248,255,248,255,249,255,251,255,255,255,2,0,1,0,253,255,246,255,241,255,237,255,235,255,234,255,233,255,230,255,226,255,223,255,223,255,225,255,225,255,224,255,222,255,221,255,220, +255,219,255,217,255,214,255,213,255,214,255,219,255,227,255,234,255,238,255,239,255,239,255,238,255,237,255,234,255,232,255,234,255,239,255,244,255,249,255,251,255,253,255,255,255,1,0,3,0,5,0,8,0,12,0,15,0,16,0,15,0,14,0,12,0,12,0,14,0,16,0,18,0,18,0, +18,0,16,0,15,0,14,0,12,0,10,0,7,0,5,0,4,0,6,0,10,0,14,0,17,0,20,0,21,0,22,0,20,0,18,0,14,0,9,0,4,0,0,0,0,0,1,0,2,0,3,0,3,0,2,0,0,0,254,255,253,255,253,255,254,255,255,255,0,0,1,0,2,0,2,0,4,0,5,0,7,0,7,0,7,0,8,0,13,0,21,0,28,0,31,0,30,0,27,0,24,0,22,0, +21,0,20,0,20,0,19,0,16,0,14,0,13,0,13,0,13,0,14,0,15,0,18,0,21,0,22,0,22,0,19,0,16,0,15,0,16,0,18,0,21,0,22,0,22,0,19,0,15,0,10,0,6,0,4,0,4,0,6,0,10,0,12,0,13,0,13,0,10,0,7,0,4,0,3,0,5,0,9,0,13,0,16,0,16,0,15,0,12,0,9,0,6,0,1,0,252,255,246,255,242,255, +240,255,242,255,245,255,246,255,245,255,244,255,242,255,241,255,239,255,236,255,232,255,229,255,227,255,228,255,231,255,233,255,234,255,234,255,233,255,230,255,226,255,222,255,220,255,219,255,218,255,217,255,217,255,217,255,218,255,219,255,221,255,223, +255,225,255,227,255,230,255,233,255,234,255,234,255,232,255,231,255,231,255,233,255,236,255,239,255,242,255,243,255,245,255,247,255,251,255,254,255,1,0,3,0,4,0,7,0,9,0,10,0,10,0,9,0,6,0,2,0,254,255,251,255,250,255,250,255,250,255,249,255,248,255,247, +255,248,255,249,255,249,255,248,255,245,255,243,255,244,255,249,255,255,255,3,0,4,0,5,0,5,0,6,0,6,0,4,0,1,0,253,255,251,255,250,255,251,255,253,255,254,255,255,255,255,255,1,0,4,0,6,0,8,0,8,0,7,0,5,0,2,0,1,0,1,0,1,0,3,0,5,0,7,0,8,0,7,0,6,0,5,0,4,0,3, +0,4,0,4,0,4,0,3,0,5,0,7,0,8,0,6,0,2,0,253,255,250,255,249,255,253,255,3,0,7,0,10,0,12,0,14,0,17,0,19,0,19,0,19,0,17,0,15,0,14,0,13,0,13,0,13,0,13,0,13,0,12,0,9,0,6,0,4,0,5,0,6,0,7,0,8,0,11,0,14,0,18,0,22,0,24,0,26,0,26,0,26,0,25,0,25,0,22,0,18,0,13,0, +8,0,6,0,6,0,8,0,10,0,12,0,13,0,14,0,15,0,17,0,18,0,17,0,16,0,15,0,16,0,19,0,21,0,22,0,23,0,22,0,19,0,15,0,11,0,9,0,6,0,4,0,2,0,1,0,0,0,255,255,0,0,1,0,1,0,1,0,255,255,253,255,251,255,248,255,244,255,241,255,240,255,242,255,244,255,247,255,247,255,246, +255,242,255,239,255,237,255,236,255,235,255,234,255,233,255,231,255,229,255,227,255,226,255,227,255,230,255,234,255,241,255,247,255,251,255,252,255,252,255,251,255,250,255,249,255,249,255,250,255,252,255,252,255,250,255,247,255,244,255,242,255,243,255, +245,255,248,255,250,255,252,255,254,255,255,255,255,255,254,255,253,255,252,255,251,255,248,255,243,255,236,255,227,255,221,255,219,255,221,255,226,255,231,255,236,255,238,255,238,255,238,255,238,255,238,255,238,255,239,255,241,255,243,255,245,255,246, +255,247,255,248,255,248,255,247,255,247,255,246,255,244,255,241,255,240,255,239,255,240,255,242,255,244,255,247,255,251,255,254,255,1,0,4,0,6,0,9,0,14,0,20,0,24,0,24,0,20,0,14,0,9,0,6,0,7,0,8,0,10,0,12,0,15,0,18,0,19,0,17,0,13,0,9,0,5,0,3,0,2,0,0,0,254, +255,254,255,255,255,2,0,2,0,0,0,252,255,249,255,247,255,246,255,248,255,250,255,252,255,253,255,254,255,1,0,4,0,6,0,6,0,6,0,5,0,6,0,8,0,12,0,14,0,15,0,15,0,15,0,16,0,17,0,18,0,18,0,17,0,14,0,11,0,8,0,7,0,9,0,11,0,15,0,19,0,21,0,23,0,25,0,26,0,26,0,26, +0,25,0,22,0,18,0,13,0,8,0,5,0,2,0,2,0,3,0,5,0,7,0,9,0,10,0,10,0,8,0,5,0,1,0,254,255,252,255,252,255,252,255,251,255,250,255,249,255,248,255,249,255,249,255,248,255,248,255,247,255,248,255,249,255,250,255,250,255,251,255,252,255,255,255,255,255,254,255, +249,255,244,255,240,255,239,255,238,255,237,255,238,255,239,255,242,255,246,255,250,255,252,255,252,255,251,255,249,255,249,255,249,255,250,255,249,255,248,255,246,255,244,255,242,255,240,255,237,255,236,255,236,255,239,255,242,255,245,255,246,255,246, +255,246,255,244,255,242,255,241,255,239,255,240,255,243,255,245,255,247,255,248,255,250,255,253,255,0,0,2,0,2,0,2,0,2,0,4,0,7,0,10,0,10,0,8,0,6,0,5,0,5,0,6,0,8,0,8,0,7,0,6,0,5,0,5,0,5,0,6,0,9,0,10,0,10,0,8,0,5,0,0,0,251,255,249,255,249,255,251,255,253, +255,255,255,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,11,0,12,0,13,0,13,0,13,0,13,0,12,0,12,0,12,0,12,0,11,0,12,0,13,0,15,0,16,0,18,0,20,0,21,0,21,0,19,0,17,0,12,0,7,0,2,0,254,255,250,255,248,255,248,255,249,255,249,255,249,255,248,255,249,255,249,255,248,255, +247,255,246,255,246,255,247,255,250,255,253,255,0,0,255,255,252,255,248,255,245,255,242,255,240,255,240,255,243,255,246,255,249,255,249,255,249,255,248,255,248,255,248,255,248,255,249,255,251,255,252,255,255,255,1,0,1,0,0,0,254,255,253,255,253,255,253, +255,253,255,252,255,249,255,246,255,245,255,247,255,249,255,250,255,250,255,250,255,250,255,251,255,252,255,254,255,255,255,0,0,0,0,1,0,2,0,4,0,6,0,7,0,7,0,7,0,6,0,3,0,0,0,254,255,252,255,251,255,252,255,253,255,0,0,3,0,8,0,13,0,15,0,15,0,12,0,10,0,9, +0,10,0,12,0,13,0,13,0,12,0,12,0,11,0,11,0,10,0,8,0,5,0,2,0,254,255,251,255,248,255,247,255,248,255,249,255,250,255,250,255,251,255,251,255,252,255,251,255,250,255,248,255,246,255,245,255,244,255,245,255,246,255,246,255,246,255,243,255,240,255,238,255, +238,255,239,255,239,255,238,255,238,255,239,255,242,255,245,255,248,255,250,255,252,255,252,255,251,255,250,255,249,255,248,255,246,255,245,255,246,255,246,255,245,255,243,255,240,255,238,255,236,255,237,255,239,255,241,255,244,255,246,255,249,255,252, +255,255,255,1,0,2,0,1,0,254,255,251,255,247,255,244,255,242,255,242,255,244,255,247,255,253,255,2,0,8,0,14,0,19,0,23,0,24,0,23,0,19,0,15,0,12,0,9,0,6,0,2,0,255,255,253,255,252,255,254,255,2,0,8,0,13,0,16,0,18,0,19,0,20,0,20,0,21,0,20,0,19,0,17,0,14,0, +12,0,9,0,7,0,5,0,4,0,3,0,3,0,5,0,8,0,10,0,12,0,14,0,16,0,18,0,19,0,20,0,22,0,24,0,26,0,26,0,25,0,22,0,19,0,17,0,17,0,17,0,17,0,17,0,18,0,19,0,20,0,20,0,20,0,18,0,16,0,15,0,14,0,13,0,11,0,8,0,5,0,1,0,254,255,252,255,251,255,250,255,249,255,247,255,246, +255,247,255,248,255,249,255,250,255,249,255,248,255,244,255,240,255,236,255,233,255,233,255,234,255,234,255,234,255,234,255,235,255,238,255,241,255,243,255,244,255,242,255,240,255,239,255,240,255,241,255,242,255,243,255,243,255,243,255,244,255,247,255, +250,255,252,255,255,255,1,0,3,0,4,0,3,0,1,0,0,0,255,255,254,255,253,255,252,255,250,255,249,255,248,255,247,255,246,255,245,255,243,255,241,255,240,255,239,255,240,255,240,255,240,255,241,255,241,255,241,255,242,255,244,255,247,255,251,255,255,255,1, +0,1,0,1,0,0,0,0,0,254,255,253,255,250,255,247,255,244,255,242,255,242,255,244,255,247,255,250,255,251,255,252,255,253,255,254,255,255,255,255,255,252,255,249,255,247,255,247,255,247,255,246,255,243,255,241,255,240,255,241,255,242,255,243,255,243,255, +243,255,243,255,244,255,245,255,247,255,251,255,254,255,2,0,4,0,3,0,0,0,252,255,250,255,251,255,254,255,2,0,4,0,6,0,7,0,8,0,8,0,8,0,9,0,11,0,15,0,20,0,25,0,28,0,29,0,26,0,22,0,18,0,15,0,12,0,10,0,9,0,9,0,8,0,9,0,10,0,12,0,15,0,19,0,22,0,24,0,24,0,21, +0,16,0,10,0,5,0,2,0,1,0,2,0,5,0,9,0,12,0,14,0,15,0,16,0,16,0,16,0,16,0,17,0,17,0,15,0,14,0,13,0,13,0,13,0,12,0,10,0,7,0,3,0,0,0,254,255,253,255,251,255,251,255,251,255,252,255,255,255,1,0,2,0,1,0,0,0,255,255,253,255,252,255,250,255,249,255,248,255,248, +255,248,255,249,255,250,255,251,255,253,255,0,0,3,0,6,0,6,0,5,0,4,0,2,0,1,0,0,0,0,0,1,0,0,0,254,255,253,255,253,255,253,255,254,255,255,255,1,0,3,0,4,0,3,0,1,0,255,255,253,255,252,255,252,255,252,255,253,255,254,255,0,0,2,0,1,0,255,255,254,255,254,255, +252,255,250,255,248,255,246,255,243,255,242,255,242,255,244,255,245,255,246,255,247,255,247,255,248,255,249,255,250,255,250,255,249,255,248,255,247,255,245,255,243,255,240,255,237,255,234,255,231,255,229,255,228,255,229,255,232,255,236,255,241,255,245, +255,249,255,251,255,252,255,251,255,248,255,246,255,244,255,243,255,242,255,242,255,243,255,244,255,246,255,248,255,251,255,254,255,0,0,1,0,1,0,1,0,0,0,0,0,1,0,3,0,3,0,2,0,0,0,253,255,252,255,252,255,251,255,251,255,249,255,247,255,247,255,249,255,251, +255,252,255,252,255,251,255,249,255,247,255,246,255,245,255,245,255,245,255,245,255,246,255,247,255,248,255,250,255,252,255,254,255,0,0,2,0,4,0,7,0,8,0,9,0,9,0,9,0,9,0,9,0,11,0,13,0,14,0,15,0,15,0,16,0,16,0,17,0,17,0,17,0,16,0,15,0,14,0,14,0,13,0,12, +0,10,0,7,0,5,0,5,0,5,0,5,0,5,0,4,0,3,0,3,0,4,0,6,0,7,0,9,0,10,0,10,0,10,0,9,0,9,0,9,0,7,0,4,0,1,0,253,255,252,255,252,255,253,255,0,0,2,0,2,0,2,0,3,0,5,0,8,0,11,0,14,0,17,0,18,0,17,0,15,0,13,0,12,0,11,0,10,0,9,0,8,0,8,0,8,0,7,0,6,0,5,0,4,0,4,0,4,0,3, +0,2,0,2,0,4,0,7,0,9,0,12,0,13,0,13,0,12,0,10,0,8,0,6,0,4,0,1,0,255,255,254,255,255,255,1,0,4,0,8,0,11,0,11,0,10,0,8,0,5,0,2,0,255,255,251,255,248,255,245,255,242,255,241,255,240,255,240,255,240,255,238,255,237,255,236,255,236,255,237,255,239,255,241, +255,243,255,245,255,245,255,246,255,247,255,246,255,245,255,243,255,239,255,237,255,234,255,233,255,232,255,233,255,235,255,237,255,241,255,247,255,253,255,2,0,5,0,6,0,4,0,1,0,254,255,252,255,252,255,251,255,251,255,251,255,252,255,253,255,254,255,255, +255,255,255,255,255,0,0,2,0,2,0,0,0,254,255,252,255,250,255,249,255,248,255,249,255,250,255,250,255,249,255,247,255,245,255,243,255,242,255,241,255,242,255,245,255,247,255,249,255,249,255,250,255,250,255,249,255,248,255,247,255,247,255,247,255,247,255, +247,255,247,255,249,255,252,255,255,255,2,0,4,0,3,0,2,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,0,0,255,255,254,255,253,255,252,255,252,255,252,255,254,255,1,0,3,0,4,0,4,0,6,0,8,0,10,0,10,0,9,0,8,0,5,0,3,0,0,0,0,0,1,0,3,0,5,0,6,0,6,0,5,0,4,0,4,0,5,0,6,0,6,0, +7,0,8,0,9,0,9,0,9,0,8,0,6,0,3,0,2,0,2,0,3,0,4,0,6,0,7,0,7,0,8,0,9,0,11,0,12,0,12,0,11,0,9,0,8,0,7,0,6,0,5,0,4,0,3,0,2,0,2,0,3,0,4,0,4,0,5,0,5,0,5,0,5,0,4,0,4,0,4,0,5,0,4,0,4,0,3,0,2,0,1,0,0,0,254,255,251,255,249,255,249,255,251,255,254,255,2,0,4,0,5, +0,5,0,4,0,3,0,2,0,2,0,1,0,1,0,1,0,3,0,5,0,6,0,6,0,5,0,3,0,1,0,255,255,253,255,251,255,249,255,248,255,247,255,247,255,248,255,251,255,253,255,255,255,0,0,0,0,0,0,255,255,0,0,1,0,1,0,255,255,251,255,249,255,249,255,251,255,255,255,2,0,4,0,4,0,3,0,1,0, +255,255,255,255,254,255,254,255,255,255,0,0,2,0,4,0,4,0,1,0,253,255,249,255,245,255,243,255,241,255,241,255,242,255,243,255,244,255,247,255,249,255,251,255,252,255,252,255,251,255,249,255,246,255,243,255,241,255,239,255,239,255,239,255,241,255,243,255, +247,255,251,255,253,255,254,255,253,255,252,255,252,255,252,255,253,255,253,255,252,255,252,255,253,255,254,255,255,255,0,0,255,255,253,255,253,255,255,255,2,0,5,0,7,0,8,0,7,0,6,0,6,0,6,0,7,0,7,0,6,0,5,0,2,0,254,255,250,255,248,255,247,255,247,255,247, +255,249,255,251,255,253,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,254,255,252,255,251,255,250,255,250,255,251,255,253,255,255,255,1,0,3,0,4,0,5,0,6,0,7,0,9,0,11,0,12,0,13,0,13,0,12,0,12,0,11,0,11,0,12,0,12,0,13,0,14, +0,13,0,12,0,10,0,8,0,7,0,6,0,6,0,6,0,7,0,8,0,10,0,12,0,12,0,12,0,10,0,6,0,3,0,1,0,255,255,254,255,252,255,251,255,250,255,250,255,252,255,254,255,255,255,255,255,254,255,253,255,253,255,254,255,1,0,4,0,7,0,8,0,8,0,7,0,6,0,4,0,2,0,255,255,253,255,252, +255,254,255,0,0,2,0,3,0,3,0,3,0,2,0,0,0,254,255,253,255,252,255,251,255,249,255,247,255,245,255,244,255,243,255,244,255,246,255,247,255,247,255,246,255,245,255,245,255,245,255,245,255,244,255,243,255,243,255,243,255,243,255,244,255,244,255,245,255,244, +255,243,255,242,255,241,255,241,255,241,255,241,255,241,255,241,255,242,255,242,255,243,255,244,255,245,255,245,255,245,255,245,255,244,255,244,255,245,255,245,255,245,255,246,255,247,255,249,255,253,255,1,0,4,0,6,0,7,0,8,0,8,0,8,0,9,0,8,0,8,0,9,0,10, +0,10,0,10,0,10,0,10,0,10,0,10,0,9,0,9,0,8,0,9,0,10,0,12,0,13,0,13,0,13,0,11,0,9,0,5,0,2,0,255,255,253,255,252,255,252,255,252,255,251,255,251,255,252,255,255,255,2,0,4,0,4,0,2,0,1,0,0,0,254,255,254,255,253,255,253,255,253,255,254,255,255,255,255,255, +0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,2,0,3,0,2,0,2,0,3,0,5,0,7,0,8,0,8,0,8,0,8,0,7,0,7,0,5,0,4,0,3,0,2,0,2,0,3,0,4,0,4,0,6,0,7,0,8,0,7,0,6,0,4,0,3,0,2,0,2,0,5,0,8,0,11,0,14,0,15,0,15,0,13,0,12,0,10,0,9,0,10,0,10,0,11,0,12,0,12,0,12,0,10,0,7,0,4,0,1,0,0,0, +0,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,254,255,252,255,250,255,249,255,249,255,250,255,252,255,253,255,254,255,254,255,254,255,253,255,252,255,251,255,250,255,249,255,249,255,249,255,248,255,247,255,246,255,246,255,246,255,246,255,246,255,245,255, +245,255,246,255,247,255,249,255,249,255,249,255,247,255,245,255,245,255,245,255,245,255,244,255,242,255,240,255,238,255,236,255,236,255,236,255,237,255,240,255,243,255,246,255,248,255,249,255,248,255,247,255,245,255,244,255,244,255,245,255,247,255,250, +255,252,255,253,255,254,255,254,255,254,255,255,255,0,0,1,0,1,0,1,0,0,0,254,255,253,255,252,255,252,255,253,255,255,255,1,0,3,0,4,0,5,0,4,0,4,0,4,0,4,0,3,0,2,0,255,255,252,255,249,255,247,255,247,255,247,255,249,255,252,255,255,255,3,0,5,0,5,0,4,0,2, +0,0,0,0,0,1,0,1,0,0,0,255,255,253,255,251,255,251,255,252,255,254,255,0,0,2,0,3,0,4,0,5,0,7,0,9,0,9,0,8,0,6,0,5,0,3,0,2,0,2,0,1,0,0,0,255,255,253,255,251,255,251,255,251,255,253,255,255,255,0,0,1,0,2,0,3,0,6,0,7,0,8,0,6,0,4,0,1,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,0,0,1,0,3,0,6,0,8,0,11,0,13,0,14,0,14,0,15,0,15,0,15,0,15,0,13,0,11,0,10,0,9,0,8,0,8,0,6,0,5,0,5,0,5,0,6,0,7,0,8,0,10,0,11,0,11,0,11,0,10,0,8,0,6,0,5,0,4,0,4,0,5,0,6,0,6,0,5,0,4,0,3,0,3,0,2,0,2,0,3,0,4,0,4,0,3,0,2,0,0,0,254,255,253, +255,251,255,250,255,250,255,251,255,252,255,252,255,250,255,249,255,248,255,249,255,250,255,252,255,253,255,254,255,254,255,253,255,251,255,249,255,247,255,247,255,247,255,249,255,250,255,251,255,252,255,252,255,252,255,252,255,252,255,253,255,255,255, +0,0,0,0,0,0,255,255,253,255,252,255,252,255,252,255,253,255,254,255,254,255,253,255,251,255,250,255,248,255,248,255,247,255,248,255,250,255,252,255,253,255,252,255,249,255,247,255,245,255,244,255,243,255,243,255,244,255,244,255,244,255,244,255,243,255, +243,255,242,255,243,255,244,255,245,255,246,255,247,255,248,255,249,255,251,255,252,255,253,255,253,255,253,255,252,255,250,255,248,255,246,255,244,255,244,255,245,255,247,255,249,255,251,255,253,255,254,255,0,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,255,255,253, +255,252,255,252,255,252,255,253,255,254,255,0,0,3,0,6,0,9,0,11,0,12,0,12,0,12,0,12,0,10,0,9,0,7,0,6,0,5,0,4,0,3,0,3,0,3,0,4,0,5,0,6,0,7,0,7,0,8,0,7,0,6,0,6,0,5,0,5,0,5,0,5,0,5,0,3,0,2,0,0,0,255,255,254,255,254,255,255,255,1,0,3,0,4,0,4,0,4,0,4,0,3,0, +2,0,2,0,2,0,3,0,5,0,7,0,7,0,7,0,6,0,5,0,4,0,5,0,5,0,5,0,4,0,3,0,3,0,4,0,5,0,6,0,7,0,7,0,6,0,6,0,5,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,3,0,3,0,2,0,2,0,2,0,3,0,4,0,4,0,5,0,5,0,6,0,5,0,4,0,3,0,2,0,0,0,255,255,254,255,253,255,253,255,254,255,255,255,0, +0,0,0,0,0,255,255,254,255,253,255,252,255,251,255,251,255,251,255,251,255,251,255,251,255,251,255,251,255,251,255,250,255,249,255,249,255,249,255,250,255,252,255,253,255,253,255,254,255,254,255,253,255,252,255,250,255,248,255,247,255,247,255,248,255, +249,255,249,255,249,255,249,255,248,255,248,255,247,255,247,255,247,255,248,255,249,255,250,255,251,255,252,255,252,255,252,255,251,255,251,255,250,255,250,255,249,255,248,255,248,255,248,255,250,255,251,255,252,255,252,255,251,255,250,255,248,255,246, +255,244,255,244,255,244,255,246,255,248,255,251,255,253,255,252,255,251,255,250,255,248,255,246,255,245,255,245,255,247,255,249,255,251,255,254,255,0,0,2,0,3,0,4,0,5,0,5,0,3,0,2,0,1,0,0,0,0,0,1,0,3,0,6,0,7,0,9,0,9,0,9,0,9,0,8,0,8,0,9,0,10,0,11,0,11,0, +10,0,8,0,5,0,2,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,3,0,5,0,7,0,8,0,8,0,6,0,3,0,0,0,254,255,251,255,250,255,250,255,251,255,253,255,255,255,1,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,8,0,7,0,6,0,5,0,3,0,2,0,1,0,0,0,254,255,253,255,253,255,254,255,0, +0,2,0,4,0,5,0,5,0,4,0,4,0,3,0,2,0,0,0,254,255,253,255,252,255,252,255,252,255,251,255,251,255,251,255,251,255,250,255,250,255,249,255,249,255,250,255,252,255,255,255,2,0,4,0,5,0,6,0,6,0,5,0,5,0,3,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,3,0,3,0,4,0,4,0, +3,0,3,0,1,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,0,0,255,255,255,255,255,255,255,255,0,0,1,0,0,0,255,255,255,255,254,255,253,255,252,255,251,255,250,255,249,255,249,255,249,255,250,255,251,255,251,255,251,255,252,255,253,255,253,255,252,255,250,255,249,255, +249,255,250,255,251,255,253,255,254,255,254,255,254,255,252,255,250,255,248,255,246,255,245,255,245,255,245,255,245,255,246,255,248,255,250,255,253,255,254,255,255,255,254,255,254,255,253,255,253,255,253,255,253,255,252,255,253,255,253,255,253,255,253, +255,254,255,254,255,255,255,0,0,2,0,3,0,4,0,4,0,4,0,3,0,2,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,0,3,0,5,0,7,0,8,0,7,0,6,0,3,0,0,0,254,255,252,255,252,255,252,255,254,255,255,255,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255,0,0,1, +0,1,0,1,0,2,0,3,0,3,0,3,0,2,0,0,0,255,255,255,255,254,255,253,255,253,255,252,255,252,255,253,255,255,255,0,0,2,0,3,0,4,0,4,0,4,0,3,0,2,0,1,0,255,255,255,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,1,0,3,0,4,0,5,0,5,0,4,0,3,0,3,0,3,0,4,0, +5,0,6,0,7,0,7,0,7,0,7,0,7,0,6,0,5,0,3,0,3,0,2,0,2,0,2,0,2,0,2,0,4,0,5,0,6,0,6,0,5,0,3,0,1,0,255,255,254,255,252,255,251,255,250,255,250,255,250,255,251,255,253,255,254,255,0,0,2,0,4,0,5,0,5,0,5,0,4,0,4,0,3,0,2,0,1,0,0,0,255,255,255,255,0,0,2,0,4,0,6, +0,6,0,5,0,3,0,1,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,252,255,251,255,249,255,248,255,247,255,248,255,249,255,251,255,252,255,252,255,250,255,247,255,245,255,245,255,245,255,245,255,247,255,249,255,251,255,251,255,251,255,250,255,250, +255,250,255,251,255,251,255,251,255,251,255,252,255,252,255,252,255,252,255,252,255,253,255,253,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,254,255,252,255,251,255,250,255,249,255,248,255,248,255,249,255,251,255,252,255,252, +255,251,255,249,255,248,255,247,255,246,255,245,255,245,255,245,255,247,255,249,255,251,255,253,255,254,255,255,255,1,0,1,0,2,0,2,0,2,0,3,0,3,0,3,0,4,0,5,0,6,0,8,0,10,0,11,0,11,0,10,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,10,0,10,0,11,0,11,0,11,0,11,0,10,0, +7,0,4,0,1,0,255,255,254,255,254,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,2,0,2,0,2,0,1,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,2,0,3,0,4,0,5,0,6,0,6,0,6,0,5,0,4,0,2,0,0,0,255,255,254,255,255,255,0,0,1,0,1, +0,0,0,254,255,253,255,252,255,251,255,251,255,251,255,251,255,251,255,252,255,253,255,253,255,253,255,254,255,0,0,2,0,3,0,2,0,1,0,0,0,255,255,255,255,0,0,2,0,4,0,5,0,5,0,5,0,4,0,2,0,2,0,1,0,2,0,2,0,3,0,3,0,3,0,3,0,2,0,2,0,0,0,255,255,254,255,253,255, +252,255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,252,255,250,255,249,255,248,255,248,255,248,255,249,255,250,255,250,255,250,255,249,255,248,255,247,255,246,255,245,255,245,255,245,255,245,255,246,255,247,255,248,255,249,255,250,255,251, +255,251,255,251,255,252,255,252,255,253,255,254,255,254,255,255,255,255,255,255,255,0,0,1,0,2,0,3,0,2,0,2,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,253,255, +252,255,252,255,253,255,253,255,254,255,254,255,254,255,255,255,1,0,2,0,3,0,3,0,3,0,4,0,4,0,4,0,3,0,2,0,1,0,255,255,253,255,252,255,252,255,252,255,253,255,255,255,1,0,2,0,3,0,2,0,2,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255, +254,255,254,255,255,255,0,0,1,0,1,0,1,0,2,0,2,0,3,0,4,0,4,0,3,0,2,0,1,0,1,0,1,0,3,0,3,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,3,0,3,0,3,0,3,0,4,0,5,0,5,0,6,0,7,0,7,0,7,0,6,0,5,0,3,0,1,0,255,255,255,255,0,0,1,0,2,0,3,0,4,0,4,0,4,0,4,0,3,0,2,0,1,0,0,0,255,255,254, +255,254,255,255,255,0,0,1,0,1,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,253,255,252,255,251,255,251,255,251,255,252,255,254,255,0,0,0,0,0,0,255,255,254,255,254,255,254,255,253,255,253,255,253,255,253,255, +254,255,254,255,255,255,254,255,254,255,254,255,254,255,255,255,0,0,0,0,0,0,255,255,253,255,252,255,250,255,249,255,248,255,248,255,249,255,250,255,252,255,253,255,254,255,255,255,255,255,254,255,253,255,252,255,252,255,251,255,252,255,252,255,253,255, +253,255,253,255,254,255,254,255,253,255,253,255,252,255,251,255,251,255,251,255,252,255,252,255,253,255,254,255,255,255,255,255,255,255,254,255,253,255,252,255,251,255,252,255,253,255,255,255,0,0,1,0,3,0,4,0,4,0,4,0,2,0,0,0,254,255,253,255,253,255,253, +255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,3,0,3,0,3,0,2,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,3,0,4,0,4,0,4,0,3,0,1,0,0,0,255,255,255,255,255,255,0,0,1,0,2,0,2,0,3,0,3,0,3,0,3,0,4,0,5,0,6,0,6,0,6,0,5,0,4,0,3, +0,2,0,2,0,2,0,3,0,3,0,4,0,5,0,5,0,4,0,2,0,1,0,255,255,254,255,254,255,255,255,0,0,1,0,1,0,2,0,3,0,4,0,4,0,4,0,4,0,3,0,2,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,254,255,253,255,252,255,252, +255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,252,255,251,255,249,255,249,255,248,255,248,255,248,255,248,255,249,255,250,255,251,255,252,255,253,255,254,255,253,255,253,255,252,255,252,255,251,255,251,255,252,255,252,255,253,255, +253,255,253,255,254,255,254,255,254,255,254,255,254,255,0,0,1,0,3,0,4,0,5,0,4,0,3,0,1,0,255,255,253,255,251,255,250,255,250,255,250,255,251,255,253,255,255,255,1,0,3,0,4,0,4,0,4,0,3,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,253, +255,252,255,251,255,251,255,251,255,252,255,254,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,0, +0,1,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,253,255,253,255,254,255,255,255,0,0,1,0,2,0,3,0,4,0,4,0,4,0,4,0,3,0,1,0,0,0,255,255,255,255,255,255,0,0,1,0,3,0,4,0,5,0,5,0,5,0,5,0,5,0,5,0,4,0,3,0,2,0,3,0,3,0,3,0,4,0,3,0,2,0,1,0,0,0,254,255,253,255, +251,255,250,255,250,255,251,255,252,255,254,255,255,255,255,255,255,255,255,255,254,255,254,255,253,255,253,255,254,255,254,255,255,255,0,0,0,0,1,0,2,0,2,0,2,0,1,0,1,0,2,0,3,0,4,0,5,0,6,0,6,0,6,0,7,0,7,0,7,0,7,0,7,0,7,0,6,0,5,0,4,0,2,0,1,0,0,0,1,0,2, +0,3,0,4,0,3,0,2,0,1,0,254,255,252,255,250,255,249,255,248,255,249,255,250,255,251,255,252,255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,252,255,251,255,251, +255,252,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,252,255,252,255,252,255,251,255,251,255,250,255,250,255,250,255,250,255,250,255,251,255,251,255,251,255,251,255,250,255,250,255,251,255,251,255,252,255,252,255,252,255,252,255, +252,255,252,255,252,255,252,255,252,255,252,255,253,255,255,255,0,0,1,0,2,0,2,0,2,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,3,0,4,0,5,0,5,0,5,0,4,0,3,0,2,0,1,0,0,0,0,0,0,0,1,0,2,0,3,0,4,0,4,0,4,0,4,0,3,0,1,0,255,255,254,255,254,255,254,255,254,255,254,255,254,255, +254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,255,255,254,255,252,255,251,255,250,255,250,255,250,255,251,255,252,255,253,255,254,255,0,0,1,0,2,0,3,0,3,0,3,0,3,0,3,0,4,0,4,0,4,0,4,0,4,0,5,0,5,0,5,0,4,0,3,0,2,0,2,0,1,0,2,0,2,0,2,0,3,0,4, +0,4,0,5,0,5,0,5,0,4,0,2,0,2,0,2,0,2,0,1,0,0,0,255,255,255,255,0,0,2,0,4,0,5,0,5,0,5,0,4,0,4,0,3,0,2,0,1,0,1,0,0,0,0,0,255,255,255,255,254,255,253,255,251,255,250,255,250,255,249,255,250,255,251,255,251,255,252,255,252,255,252,255,252,255,252,255,253, +255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,251,255,251,255,251,255,252,255,253,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,254,255,253,255,253,255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,252,255,251,255,250, +255,249,255,249,255,249,255,250,255,250,255,249,255,248,255,247,255,247,255,247,255,248,255,249,255,250,255,250,255,250,255,250,255,250,255,251,255,252,255,254,255,255,255,1,0,3,0,3,0,3,0,3,0,4,0,4,0,5,0,6,0,6,0,7,0,7,0,7,0,6,0,6,0,6,0,6,0,6,0,6,0,6, +0,5,0,4,0,4,0,3,0,2,0,2,0,3,0,4,0,4,0,4,0,3,0,2,0,1,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,1,0,3,0,4,0,5,0,5,0,5,0,5,0,6,0,6,0,5,0,5,0,3,0,1,0,255,255,253,255,252,255,252,255,253,255,255,255,0,0,2,0, +2,0,2,0,1,0,255,255,253,255,252,255,251,255,251,255,251,255,252,255,253,255,253,255,254,255,254,255,254,255,254,255,253,255,253,255,251,255,251,255,250,255,250,255,250,255,250,255,250,255,252,255,254,255,0,0,1,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,2, +0,3,0,4,0,4,0,3,0,2,0,2,0,2,0,3,0,4,0,4,0,5,0,5,0,4,0,3,0,3,0,3,0,2,0,2,0,2,0,1,0,0,0,255,255,253,255,252,255,252,255,252,255,253,255,254,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,253,255,252,255,252,255,251,255,252, +255,252,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,255,255,0,0,1,0,2,0,3,0,3,0,3,0,3,0,2,0,0,0,255,255,254,255,254,255,254,255,254,255,254,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255, +255,254,255,253,255,252,255,253,255,253,255,253,255,252,255,251,255,250,255,249,255,249,255,249,255,250,255,252,255,253,255,255,255,1,0,2,0,3,0,3,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +254,255,254,255,254,255,254,255,254,255,255,255,0,0,1,0,2,0,3,0,3,0,2,0,1,0,0,0,255,255,255,255,0,0,1,0,2,0,3,0,4,0,5,0,4,0,3,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255, +253,255,253,255,253,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,253,255,253,255,254,255,255,255,0,0,0,0,0,0,255,255,253,255,252,255,252,255,251,255,251,255,251,255,250,255,250,255,250,255,251,255,252,255,253,255,254,255, +255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,3,0,2,0,2,0,2,0,2,0,3,0,4,0,5,0,6,0,6,0,7,0,7,0,6,0,6,0,5,0,3,0,2,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,254,255, +254,255,253,255,253,255,252,255,252,255,252,255,251,255,251,255,251,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,254,255,253,255,253,255,252,255,251,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,252,255,252,255,253,255,253, +255,254,255,0,0,1,0,2,0,2,0,1,0,255,255,254,255,253,255,252,255,251,255,252,255,253,255,254,255,255,255,0,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,0,0,1,0,1,0,2,0,1,0,1,0,0,0,255,255,254,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,253,255,253,255,253,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,2,0,4,0,4,0,5,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6, +0,5,0,5,0,4,0,3,0,3,0,2,0,2,0,1,0,1,0,1,0,1,0,2,0,3,0,4,0,5,0,6,0,6,0,6,0,6,0,5,0,3,0,1,0,0,0,254,255,253,255,252,255,252,255,252,255,252,255,253,255,254,255,255,255,0,0,0,0,1,0,0,0,255,255,255,255,254,255,254,255,254,255,253,255,253,255,252,255,252, +255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,251,255,251,255,251,255,250,255,250,255,250,255,250,255,249,255,249,255,249,255,250,255, +250,255,251,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,253,255,252,255,252,255,252,255,252,255,253,255,254,255,255,255,255,255,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,3,0,3,0,4,0,4, +0,4,0,4,0,3,0,3,0,3,0,3,0,4,0,4,0,4,0,3,0,3,0,2,0,1,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,0,0,0,0,0,0,1,0,2,0,2,0,3,0,3,0,3,0,4,0,4,0,4,0,5,0,4,0,4,0,3,0,2,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0, +3,0,4,0,4,0,4,0,4,0,3,0,2,0,1,0,0,0,255,255,255,255,254,255,254,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,253,255,253,255,253,255,252,255,252,255,251,255,251,255,251,255,251,255,251,255,251,255,252,255, +253,255,254,255,255,255,0,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,254,255,253,255,253,255,253,255,254,255,254,255,254,255,255,255,255,255,254,255,253,255,252,255,251,255,250,255,249,255,248,255,248, +255,248,255,249,255,251,255,252,255,253,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,253,255,253,255,253,255,253,255, +253,255,253,255,254,255,254,255,255,255,255,255,0,0,0,0,1,0,1,0,2,0,1,0,1,0,0,0,255,255,254,255,254,255,253,255,254,255,254,255,254,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,2,0,2,0,3,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,2,0,3,0,4,0,5,0,5,0,5,0,5, +0,4,0,4,0,3,0,3,0,3,0,3,0,3,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,0,0,255,255,253,255,252,255,252,255,251,255,251,255,251,255,251,255,252,255,252,255,253,255,253,255,254,255,255,255,0,0,0,0,0,0,255,255,255,255,254,255,254, +255,254,255,254,255,254,255,253,255,253,255,253,255,254,255,254,255,255,255,0,0,1,0,2,0,3,0,3,0,3,0,3,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254, +255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,253,255,253,255, +253,255,253,255,254,255,254,255,255,255,255,255,254,255,254,255,254,255,253,255,253,255,252,255,252,255,252,255,252,255,252,255,253,255,253,255,252,255,252,255,251,255,251,255,251,255,252,255,254,255,254,255,254,255,254,255,253,255,253,255,252,255,252, +255,252,255,253,255,254,255,255,255,0,0,0,0,0,0,255,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,1,0,1,0,2,0,2,0,3,0,3,0,4,0,4,0,5,0,5,0,5,0,6,0,6,0,6,0,6,0,5,0,4,0,3,0,3,0,3,0,3,0,3,0,3,0,4,0,4,0,4,0,4,0,3,0,2,0,1,0,0,0,0,0,0,0,0, +0,255,255,254,255,253,255,253,255,253,255,252,255,253,255,253,255,253,255,252,255,252,255,252,255,252,255,253,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,2,0,2,0,3,0,4,0,4,0,4,0,4,0,4,0,4,0, +3,0,3,0,2,0,1,0,1,0,0,0,0,0,255,255,255,255,254,255,253,255,253,255,252,255,252,255,252,255,253,255,253,255,254,255,255,255,255,255,0,0,1,0,1,0,0,0,255,255,254,255,254,255,253,255,252,255,252,255,252,255,252,255,253,255,253,255,254,255,255,255,0,0,1, +0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,0,0,255,255,254,255,253,255,252,255,252,255,252,255,252,255,253,255,254,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,255,255,255,255,254,255,253,255,252,255,252,255,252,255,252,255,253,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,255,255,255,255, +254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,3,0,2,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,253,255,253,255,253,255,252, +255,252,255,252,255,252,255,252,255,251,255,251,255,251,255,252,255,253,255,253,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,255,255,255,255,0,0,2,0,3,0,4,0,5,0,5,0,5,0,4,0,4,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,2,0,2,0,1, +0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,253,255,252,255,251,255,250,255,249,255,249,255,249,255,250,255,251,255,251,255,252,255,252,255,253,255,253,255,254,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,3,0,3,0,3,0,3,0,2,0,1,0,1,0, +2,0,3,0,4,0,5,0,5,0,5,0,4,0,3,0,2,0,1,0,255,255,254,255,253,255,253,255,253,255,253,255,253,255,254,255,255,255,255,255,0,0,255,255,255,255,254,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,253,255,253,255,252,255,251,255,251,255, +251,255,251,255,252,255,253,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,254,255,254,255,254,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,1,0,2,0,3,0,3,0,3,0,3,0,3,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1, +0,2,0,2,0,2,0,1,0,1,0,0,0,255,255,254,255,253,255,252,255,252,255,252,255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,2,0,2,0,3,0,3,0,3,0,2, +0,2,0,2,0,2,0,1,0,1,0,0,0,255,255,253,255,253,255,252,255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,253,255,252,255,252,255,252,255,253,255,254,255,255,255,255,255,255,255,255,255,0,0,0,0, +0,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,253,255,253,255,253,255,253,255,253,255,252,255,252,255,252,255,253,255,253, +255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,254,255,253,255,252,255,252,255,252,255,252,255,253,255,253,255,255,255,0,0,1,0,2,0,3,0,3,0,4,0,3,0,3,0,3,0,3,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,2, +0,2,0,1,0,1,0,255,255,254,255,253,255,252,255,252,255,252,255,252,255,253,255,253,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,2,0, +2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,253,255,253,255,253,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,254, +255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,254, +255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,254,255,253,255,253,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,3,0,3,0,3,0,3,0,3,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,2,0,2,0,3,0,3,0,3,0,3,0,2,0,2,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,3,0,3,0,2,0,2,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,253,255,254,255,254,255,255,255,255,255,0,0,0, +0,0,0,0,0,255,255,254,255,254,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255, +254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,254,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,253,255,253,255,253,255,253,255,253, +255,253,255,253,255,253,255,253,255,252,255,253,255,253,255,254,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,255,255,254,255,254,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,2,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,254,255,254,255,253,255,253,255,252,255,252,255,251,255,251,255,252,255,252,255,252,255,252,255,252,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,254, +255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,254,255,254,255,253,255,253,255,253,255,252,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,1,0,1, +0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,3,0,3,0,3,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255, +254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,0, +0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,253,255,253,255,252,255,252,255,252,255,253,255,253,255,254,255,254,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,2,0, +2,0,3,0,3,0,3,0,2,0,2,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,254, +255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0, +0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255, +254,255,254,255,254,255,254,255,254,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255, +255,0,0,0,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,0,0,255,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254, +255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255, +254,255,254,255,254,255,254,255,254,255,254,255,253,255,253,255,253,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255, +255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,253,255,253,255,253, +255,254,255,254,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254, +255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255, +254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,253,255,253,255,254,255,254,255,254,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255, +255,255,255,255,255,255,254,255,254,255,253,255,253,255,253,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,254,255,253,255,253,255,254,255,254, +255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255, +254,255,254,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255, +254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1, +0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,253,255,253,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255, +254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254, +255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255, +254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0, +0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255, +0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0, +0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255, +0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0, +255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0, +0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0, +0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0, +0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0, +0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255, +0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255, +255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0, +0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255, +255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255, +0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255, +255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255, +255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255, +255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0, +0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255, +255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0, +255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255, +255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255, +255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255, +255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255, +0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0, +0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255, +255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255, +255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0, +255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0, +0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255, +255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0, +0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0, +255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255, +255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0, +0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255, +255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0, +0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255, +255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0, +0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255, +255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255, +255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255, +255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255, +0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0, +0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255, +0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255, +0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255, +255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255, +255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255, +255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255, +0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0, +0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255, +255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255, +255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255, +255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255, +0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255, +255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255, +0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255, +255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255, +255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255, +255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255, +255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0, +0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255, +255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255, +255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0, +0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0, +255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,0, +0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255, +255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,0, +0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255, +255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255, +0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255, +255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0, +0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0, +0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255, +255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0, +0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255, +255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255, +255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0, +0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255, +255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255, +255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255, +255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255, +255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0 }; + +const char* Impulse1_wav = (const char*) temp_binary_data_0; + +//================== Impulse2.wav ================== +static const unsigned char temp_binary_data_1[] = +{ 82,73,70,70,6,148,0,0,87,65,86,69,102,109,116,32,16,0,0,0,1,0,1,0,68,172,0,0,136,88,1,0,2,0,16,0,106,117,110,107,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,97,116,97,166,147,0, +0,0,0,254,255,255,255,247,255,1,0,245,255,2,0,235,255,254,255,240,255,24,0,18,0,38,0,254,255,190,252,204,252,200,252,107,253,11,252,41,251,178,251,25,255,143,255,27,1,248,6,177,7,210,7,89,9,156,11,232,9,38,8,8,8,219,6,233,2,42,255,249,251,9,250,154,249, +177,248,51,248,103,249,73,250,232,251,68,253,33,0,48,3,14,6,114,6,117,6,193,7,185,7,166,4,160,0,68,254,104,251,172,249,41,249,134,248,129,248,243,249,175,251,90,252,168,253,178,255,189,0,236,1,141,1,203,255,110,254,5,254,97,253,239,252,221,251,80,250, +201,250,110,252,244,252,221,253,92,255,178,0,31,2,78,2,85,2,19,2,230,2,164,3,175,2,237,1,254,0,21,0,125,255,63,255,44,0,12,2,196,2,106,3,253,4,147,5,4,5,242,4,231,4,54,4,174,3,90,2,154,0,104,254,249,251,18,251,4,250,63,248,150,247,107,247,211,247,103, +249,3,251,206,252,130,255,164,1,214,3,139,5,214,5,202,5,197,5,46,5,32,4,43,2,3,255,127,251,65,249,166,248,78,248,81,248,6,249,16,250,94,251,59,253,176,255,228,2,196,5,105,8,153,10,170,11,27,12,19,12,222,10,230,8,50,6,70,3,52,1,128,254,5,252,41,251,253, +250,152,250,97,251,202,252,132,253,121,254,124,255,194,0,99,2,196,3,157,4,112,4,108,3,101,2,5,1,204,255,196,254,218,253,126,252,119,251,70,251,47,251,169,251,46,252,208,252,243,253,242,254,167,255,38,0,52,0,189,0,7,1,59,1,17,1,165,0,87,1,91,1,99,1,100, +1,175,0,151,0,184,255,193,254,217,254,168,255,234,0,251,1,134,2,99,3,109,4,48,4,25,3,15,2,174,0,22,255,183,253,98,252,199,251,213,251,105,251,72,251,77,252,5,254,64,255,234,255,27,1,121,1,67,1,239,0,134,0,25,0,123,255,149,254,229,253,119,253,122,252, +73,251,0,251,40,251,209,250,141,251,25,253,62,254,81,255,151,0,206,1,216,2,122,3,28,4,51,4,202,3,239,2,254,1,44,1,42,0,17,255,244,253,109,253,184,253,105,254,43,255,114,0,188,1,201,2,148,3,47,4,164,4,133,4,237,3,62,3,64,2,101,1,242,255,106,254,46,253, +3,252,245,250,203,250,87,251,197,251,171,252,189,253,223,254,20,0,119,1,127,2,33,3,160,3,212,3,66,3,56,2,30,1,41,0,43,255,10,254,27,253,10,253,86,253,198,253,82,254,48,255,14,0,168,0,86,1,118,1,153,1,221,1,237,1,45,2,117,2,125,2,128,2,140,2,117,2,15, +2,220,1,141,1,16,1,154,0,52,0,41,0,73,0,237,255,169,255,248,255,106,0,181,0,7,1,72,1,72,1,97,1,165,1,186,1,241,1,32,2,86,2,62,2,236,1,62,1,206,0,38,0,105,255,115,254,31,253,250,252,47,252,88,251,6,251,139,251,7,252,245,251,110,252,94,253,81,254,74,255, +152,255,214,255,76,0,38,0,248,255,39,0,48,0,68,0,42,0,247,255,170,255,15,255,166,254,147,254,188,254,153,254,107,254,167,254,248,254,100,255,228,255,87,0,174,0,45,1,146,1,200,1,15,2,56,2,73,2,156,1,59,1,87,0,153,255,249,254,191,254,176,254,81,254,241, +253,252,253,100,254,9,255,167,255,56,0,220,0,121,1,52,2,122,2,181,2,195,2,108,2,194,1,17,1,70,0,136,255,202,254,118,254,210,253,70,253,48,253,82,253,152,253,16,254,42,254,184,254,170,255,112,0,23,1,250,1,212,2,98,3,227,3,30,4,255,3,123,3,4,3,44,2,43, +1,67,0,177,255,79,255,46,255,237,254,157,254,1,255,141,255,251,255,67,0,137,0,202,0,194,0,181,0,130,0,45,0,220,255,30,255,22,254,106,253,238,252,170,252,160,252,232,252,10,253,49,253,203,253,158,254,96,255,8,0,166,0,255,0,26,1,35,1,29,1,0,1,184,0,65, +0,166,255,16,255,205,254,159,254,134,254,137,254,12,255,147,255,4,0,145,0,78,1,2,2,74,2,96,2,108,2,97,2,23,2,204,1,190,1,145,1,121,1,155,1,198,1,224,1,214,1,222,1,218,1,208,1,165,1,113,1,27,1,178,0,84,0,249,255,179,255,62,255,195,254,86,254,240,253,166, +253,109,253,102,253,166,253,235,253,58,254,174,254,7,255,111,255,210,255,10,0,250,255,211,255,150,255,40,255,179,254,116,254,63,254,21,254,71,254,122,254,172,254,242,254,85,255,190,255,34,0,121,0,237,0,84,1,149,1,202,1,224,1,219,1,179,1,116,1,38,1,213, +0,121,0,24,0,200,255,163,255,128,255,116,255,145,255,227,255,92,0,168,0,5,1,90,1,178,1,234,1,248,1,252,1,208,1,144,1,7,1,107,0,228,255,114,255,246,254,131,254,45,254,242,253,176,253,169,253,164,253,184,253,1,254,76,254,134,254,210,254,58,255,123,255, +181,255,238,255,50,0,81,0,64,0,8,0,224,255,200,255,187,255,143,255,136,255,147,255,145,255,188,255,233,255,23,0,71,0,136,0,178,0,214,0,21,1,61,1,90,1,94,1,93,1,75,1,52,1,17,1,247,0,198,0,145,0,112,0,74,0,48,0,24,0,9,0,230,255,210,255,209,255,241,255, +244,255,227,255,234,255,238,255,249,255,10,0,7,0,15,0,29,0,18,0,247,255,221,255,196,255,182,255,135,255,82,255,59,255,245,254,160,254,129,254,145,254,153,254,191,254,252,254,66,255,171,255,33,0,136,0,231,0,61,1,110,1,151,1,156,1,106,1,24,1,207,0,137, +0,23,0,182,255,108,255,51,255,2,255,239,254,0,255,32,255,97,255,176,255,37,0,152,0,0,1,91,1,177,1,243,1,3,2,0,2,229,1,180,1,102,1,9,1,168,0,59,0,206,255,129,255,50,255,225,254,160,254,112,254,93,254,110,254,134,254,158,254,186,254,218,254,249,254,44, +255,110,255,172,255,234,255,250,255,240,255,220,255,197,255,167,255,157,255,156,255,124,255,117,255,125,255,116,255,135,255,167,255,184,255,198,255,204,255,234,255,25,0,56,0,80,0,96,0,138,0,165,0,162,0,168,0,172,0,171,0,161,0,146,0,121,0,100,0,87,0,101, +0,127,0,152,0,163,0,181,0,218,0,239,0,236,0,209,0,197,0,173,0,135,0,111,0,100,0,82,0,40,0,248,255,219,255,185,255,139,255,104,255,69,255,53,255,54,255,58,255,75,255,98,255,117,255,148,255,191,255,235,255,1,0,12,0,3,0,243,255,226,255,197,255,180,255,156, +255,135,255,120,255,118,255,124,255,126,255,125,255,108,255,93,255,82,255,71,255,86,255,110,255,133,255,172,255,223,255,10,0,36,0,58,0,90,0,131,0,145,0,145,0,154,0,141,0,129,0,116,0,111,0,102,0,105,0,117,0,112,0,100,0,100,0,114,0,114,0,99,0,74,0,52,0, +43,0,46,0,40,0,23,0,1,0,250,255,243,255,246,255,242,255,235,255,228,255,222,255,218,255,209,255,213,255,229,255,247,255,254,255,1,0,251,255,238,255,221,255,215,255,211,255,194,255,163,255,155,255,164,255,178,255,199,255,233,255,1,0,252,255,245,255,1, +0,4,0,238,255,216,255,215,255,211,255,188,255,174,255,183,255,207,255,220,255,236,255,14,0,56,0,112,0,161,0,192,0,208,0,220,0,227,0,228,0,221,0,206,0,181,0,149,0,106,0,64,0,24,0,238,255,207,255,194,255,193,255,190,255,193,255,208,255,222,255,225,255, +227,255,239,255,241,255,231,255,225,255,220,255,215,255,214,255,220,255,229,255,236,255,245,255,253,255,1,0,254,255,244,255,220,255,192,255,165,255,137,255,120,255,100,255,82,255,81,255,93,255,104,255,116,255,138,255,175,255,203,255,222,255,251,255,37, +0,74,0,92,0,98,0,102,0,92,0,75,0,65,0,48,0,29,0,19,0,16,0,5,0,3,0,6,0,13,0,24,0,19,0,14,0,6,0,249,255,224,255,205,255,202,255,191,255,182,255,185,255,202,255,219,255,238,255,6,0,25,0,51,0,73,0,74,0,73,0,85,0,95,0,90,0,88,0,92,0,93,0,79,0,64,0,46,0,29, +0,17,0,5,0,247,255,235,255,237,255,233,255,223,255,219,255,227,255,230,255,223,255,221,255,226,255,235,255,243,255,244,255,246,255,245,255,241,255,238,255,232,255,222,255,210,255,199,255,192,255,186,255,185,255,189,255,198,255,203,255,216,255,228,255, +243,255,5,0,11,0,10,0,9,0,12,0,9,0,7,0,5,0,4,0,7,0,15,0,26,0,38,0,40,0,49,0,68,0,69,0,64,0,66,0,68,0,65,0,60,0,52,0,44,0,44,0,55,0,58,0,57,0,64,0,67,0,59,0,50,0,51,0,52,0,40,0,28,0,15,0,251,255,242,255,239,255,239,255,231,255,227,255,225,255,216,255, +212,255,220,255,227,255,219,255,215,255,221,255,221,255,217,255,221,255,229,255,238,255,238,255,236,255,241,255,248,255,252,255,250,255,247,255,243,255,238,255,229,255,220,255,213,255,203,255,190,255,168,255,150,255,147,255,152,255,152,255,153,255,158, +255,163,255,174,255,187,255,196,255,208,255,219,255,236,255,250,255,8,0,26,0,42,0,55,0,65,0,71,0,74,0,77,0,83,0,83,0,77,0,64,0,58,0,56,0,54,0,52,0,54,0,57,0,57,0,61,0,65,0,70,0,71,0,67,0,63,0,56,0,44,0,32,0,26,0,18,0,3,0,247,255,240,255,236,255,243,255, +252,255,254,255,4,0,14,0,23,0,27,0,38,0,51,0,56,0,52,0,47,0,45,0,35,0,17,0,0,0,242,255,225,255,205,255,194,255,191,255,200,255,208,255,214,255,226,255,241,255,1,0,15,0,18,0,14,0,6,0,248,255,232,255,218,255,206,255,194,255,185,255,174,255,171,255,170, +255,166,255,166,255,175,255,184,255,192,255,195,255,202,255,210,255,216,255,224,255,229,255,233,255,234,255,235,255,233,255,236,255,238,255,239,255,246,255,253,255,253,255,1,0,16,0,30,0,36,0,31,0,32,0,39,0,45,0,48,0,54,0,67,0,78,0,87,0,96,0,113,0,130, +0,132,0,127,0,120,0,107,0,95,0,81,0,58,0,36,0,18,0,0,0,238,255,224,255,216,255,214,255,213,255,217,255,222,255,225,255,229,255,228,255,226,255,225,255,222,255,218,255,210,255,196,255,184,255,180,255,177,255,172,255,167,255,166,255,167,255,171,255,178, +255,189,255,196,255,197,255,202,255,207,255,215,255,232,255,250,255,7,0,19,0,36,0,55,0,71,0,82,0,92,0,98,0,95,0,92,0,89,0,83,0,71,0,51,0,37,0,30,0,26,0,25,0,27,0,33,0,43,0,56,0,70,0,78,0,87,0,98,0,101,0,94,0,81,0,65,0,41,0,8,0,232,255,204,255,176,255, +151,255,134,255,127,255,128,255,137,255,154,255,164,255,173,255,188,255,206,255,220,255,224,255,225,255,224,255,225,255,226,255,225,255,221,255,222,255,223,255,229,255,239,255,249,255,3,0,15,0,26,0,35,0,44,0,57,0,68,0,72,0,71,0,70,0,69,0,69,0,67,0,64, +0,62,0,59,0,61,0,65,0,69,0,70,0,74,0,78,0,79,0,76,0,70,0,62,0,52,0,40,0,24,0,6,0,243,255,229,255,214,255,197,255,187,255,187,255,187,255,185,255,185,255,190,255,191,255,192,255,195,255,194,255,191,255,185,255,176,255,166,255,153,255,144,255,140,255,132, +255,126,255,126,255,132,255,141,255,150,255,161,255,176,255,191,255,205,255,217,255,230,255,246,255,255,255,5,0,5,0,1,0,0,0,2,0,4,0,2,0,6,0,15,0,23,0,32,0,47,0,65,0,79,0,91,0,101,0,111,0,119,0,120,0,122,0,126,0,126,0,117,0,108,0,102,0,97,0,89,0,77,0, +65,0,55,0,49,0,42,0,35,0,25,0,14,0,7,0,1,0,250,255,246,255,245,255,241,255,237,255,239,255,242,255,242,255,242,255,244,255,247,255,249,255,248,255,246,255,246,255,244,255,242,255,241,255,236,255,229,255,226,255,226,255,224,255,222,255,221,255,218,255, +214,255,214,255,215,255,216,255,219,255,225,255,231,255,236,255,242,255,248,255,1,0,4,0,4,0,3,0,1,0,1,0,255,255,249,255,238,255,230,255,226,255,225,255,226,255,228,255,229,255,233,255,241,255,253,255,14,0,31,0,43,0,52,0,58,0,62,0,66,0,68,0,66,0,59,0, +48,0,35,0,24,0,20,0,18,0,14,0,8,0,7,0,9,0,11,0,13,0,15,0,18,0,16,0,10,0,5,0,3,0,1,0,252,255,246,255,239,255,234,255,230,255,228,255,226,255,225,255,223,255,218,255,211,255,208,255,208,255,206,255,202,255,200,255,196,255,192,255,190,255,191,255,196,255, +200,255,202,255,208,255,215,255,216,255,218,255,221,255,222,255,224,255,223,255,222,255,222,255,224,255,226,255,228,255,231,255,238,255,249,255,4,0,12,0,18,0,26,0,36,0,42,0,45,0,46,0,45,0,44,0,43,0,42,0,41,0,40,0,40,0,38,0,35,0,36,0,42,0,48,0,55,0,54, +0,51,0,49,0,49,0,47,0,43,0,37,0,28,0,18,0,10,0,5,0,254,255,251,255,249,255,246,255,243,255,242,255,246,255,252,255,255,255,1,0,3,0,6,0,8,0,11,0,13,0,13,0,12,0,9,0,5,0,2,0,254,255,249,255,245,255,244,255,244,255,245,255,244,255,242,255,242,255,244,255, +244,255,243,255,244,255,245,255,245,255,244,255,246,255,249,255,249,255,246,255,247,255,250,255,253,255,254,255,252,255,250,255,247,255,244,255,242,255,242,255,241,255,240,255,240,255,239,255,241,255,247,255,253,255,2,0,7,0,12,0,17,0,20,0,24,0,30,0,32, +0,33,0,31,0,31,0,32,0,33,0,31,0,31,0,31,0,27,0,22,0,21,0,22,0,20,0,17,0,16,0,16,0,16,0,13,0,9,0,8,0,6,0,1,0,252,255,249,255,246,255,243,255,240,255,235,255,230,255,225,255,219,255,213,255,210,255,207,255,205,255,205,255,205,255,204,255,205,255,210,255, +215,255,218,255,221,255,223,255,225,255,227,255,230,255,234,255,235,255,234,255,234,255,236,255,238,255,240,255,240,255,239,255,240,255,243,255,246,255,249,255,251,255,253,255,253,255,252,255,254,255,0,0,0,0,254,255,251,255,251,255,251,255,254,255,2, +0,6,0,10,0,12,0,18,0,23,0,26,0,29,0,31,0,30,0,29,0,27,0,27,0,27,0,24,0,21,0,18,0,15,0,15,0,16,0,16,0,16,0,17,0,18,0,19,0,21,0,25,0,27,0,27,0,26,0,26,0,27,0,27,0,26,0,24,0,23,0,21,0,21,0,21,0,20,0,18,0,16,0,15,0,13,0,13,0,12,0,12,0,11,0,11,0,10,0,9,0, +8,0,7,0,4,0,253,255,248,255,245,255,241,255,237,255,234,255,232,255,231,255,232,255,236,255,241,255,246,255,249,255,253,255,255,255,0,0,0,0,0,0,254,255,250,255,244,255,236,255,232,255,229,255,229,255,227,255,225,255,222,255,221,255,226,255,232,255,238, +255,243,255,249,255,253,255,3,0,9,0,14,0,18,0,18,0,14,0,9,0,7,0,9,0,9,0,6,0,5,0,5,0,7,0,9,0,10,0,13,0,13,0,12,0,10,0,10,0,9,0,8,0,8,0,5,0,1,0,254,255,252,255,253,255,254,255,252,255,248,255,246,255,244,255,242,255,240,255,236,255,233,255,229,255,226, +255,225,255,224,255,222,255,221,255,220,255,219,255,220,255,223,255,226,255,229,255,232,255,235,255,238,255,242,255,248,255,252,255,0,0,3,0,4,0,6,0,7,0,7,0,7,0,7,0,7,0,8,0,9,0,11,0,11,0,11,0,12,0,15,0,16,0,15,0,14,0,13,0,11,0,10,0,9,0,9,0,8,0,5,0,3,0, +1,0,2,0,3,0,5,0,6,0,8,0,11,0,13,0,16,0,20,0,22,0,22,0,22,0,21,0,18,0,16,0,13,0,9,0,4,0,0,0,254,255,255,255,255,255,255,255,254,255,255,255,1,0,3,0,6,0,8,0,9,0,11,0,11,0,13,0,15,0,15,0,15,0,14,0,11,0,9,0,6,0,5,0,3,0,0,0,254,255,253,255,254,255,1,0,4,0, +5,0,6,0,8,0,11,0,13,0,15,0,17,0,17,0,15,0,12,0,12,0,12,0,10,0,8,0,4,0,255,255,252,255,250,255,249,255,248,255,245,255,242,255,239,255,236,255,236,255,235,255,232,255,229,255,227,255,225,255,223,255,223,255,224,255,224,255,223,255,223,255,223,255,223, +255,224,255,226,255,226,255,227,255,227,255,227,255,228,255,230,255,233,255,236,255,241,255,244,255,247,255,250,255,253,255,2,0,6,0,6,0,6,0,8,0,12,0,14,0,14,0,14,0,13,0,12,0,12,0,12,0,15,0,18,0,18,0,19,0,21,0,23,0,24,0,26,0,26,0,26,0,24,0,21,0,19,0,18, +0,15,0,11,0,8,0,7,0,5,0,2,0,0,0,255,255,253,255,251,255,249,255,247,255,245,255,242,255,240,255,240,255,242,255,242,255,242,255,242,255,243,255,246,255,250,255,255,255,2,0,4,0,4,0,4,0,6,0,7,0,7,0,5,0,3,0,2,0,2,0,2,0,3,0,3,0,3,0,2,0,2,0,3,0,4,0,5,0,5, +0,4,0,5,0,5,0,6,0,7,0,8,0,9,0,9,0,10,0,10,0,11,0,12,0,12,0,10,0,9,0,9,0,8,0,7,0,5,0,5,0,3,0,1,0,255,255,254,255,254,255,253,255,251,255,250,255,249,255,249,255,248,255,247,255,245,255,245,255,244,255,243,255,243,255,243,255,244,255,245,255,245,255,245, +255,244,255,245,255,247,255,247,255,246,255,246,255,246,255,246,255,247,255,247,255,246,255,247,255,248,255,248,255,247,255,247,255,248,255,249,255,249,255,250,255,251,255,252,255,253,255,253,255,255,255,1,0,3,0,5,0,6,0,5,0,5,0,6,0,8,0,8,0,7,0,6,0,5, +0,4,0,4,0,4,0,4,0,2,0,1,0,2,0,3,0,4,0,4,0,5,0,4,0,4,0,5,0,6,0,5,0,4,0,4,0,3,0,2,0,2,0,2,0,3,0,3,0,2,0,0,0,255,255,254,255,255,255,0,0,0,0,255,255,254,255,254,255,255,255,0,0,3,0,6,0,9,0,10,0,10,0,12,0,16,0,18,0,19,0,18,0,15,0,12,0,10,0,8,0,7,0,5,0,3, +0,1,0,255,255,255,255,1,0,2,0,1,0,0,0,0,0,0,0,1,0,2,0,3,0,3,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,253,255,250,255,247,255,245,255,244,255,242,255,240,255,239,255,239,255,239,255,240,255,242,255,244,255,245,255,245, +255,245,255,246,255,247,255,248,255,249,255,248,255,247,255,247,255,248,255,248,255,249,255,249,255,248,255,247,255,245,255,245,255,245,255,245,255,244,255,243,255,243,255,244,255,246,255,249,255,252,255,253,255,255,255,0,0,3,0,5,0,8,0,10,0,11,0,12,0, +12,0,13,0,13,0,13,0,12,0,11,0,10,0,9,0,7,0,7,0,8,0,9,0,10,0,12,0,13,0,14,0,14,0,15,0,17,0,18,0,18,0,16,0,15,0,14,0,14,0,14,0,13,0,12,0,10,0,8,0,7,0,6,0,6,0,4,0,3,0,2,0,1,0,0,0,0,0,255,255,254,255,251,255,250,255,250,255,250,255,249,255,248,255,247,255, +247,255,247,255,247,255,248,255,249,255,249,255,250,255,251,255,251,255,251,255,252,255,252,255,252,255,251,255,251,255,251,255,251,255,251,255,252,255,252,255,254,255,0,0,2,0,3,0,4,0,5,0,7,0,7,0,7,0,7,0,6,0,4,0,2,0,1,0,0,0,253,255,252,255,251,255,250, +255,250,255,250,255,250,255,250,255,249,255,249,255,249,255,249,255,247,255,246,255,244,255,242,255,240,255,239,255,238,255,238,255,239,255,240,255,240,255,241,255,244,255,246,255,249,255,250,255,250,255,251,255,253,255,255,255,255,255,255,255,255,255, +255,255,0,0,1,0,3,0,3,0,2,0,3,0,4,0,6,0,7,0,7,0,7,0,7,0,6,0,6,0,7,0,8,0,8,0,7,0,6,0,7,0,8,0,10,0,10,0,11,0,11,0,10,0,10,0,10,0,9,0,8,0,7,0,5,0,4,0,4,0,5,0,4,0,3,0,2,0,3,0,4,0,5,0,5,0,4,0,3,0,3,0,4,0,4,0,3,0,0,0,255,255,255,255,0,0,0,0,0,0,254,255,253, +255,253,255,254,255,1,0,2,0,1,0,0,0,0,0,0,0,1,0,3,0,2,0,0,0,254,255,254,255,0,0,3,0,5,0,4,0,4,0,5,0,8,0,10,0,12,0,12,0,11,0,10,0,9,0,9,0,9,0,7,0,5,0,2,0,0,0,0,0,254,255,254,255,252,255,250,255,249,255,249,255,250,255,250,255,248,255,247,255,246,255,247, +255,247,255,247,255,246,255,245,255,244,255,244,255,246,255,246,255,245,255,245,255,244,255,244,255,245,255,246,255,246,255,245,255,244,255,244,255,244,255,244,255,243,255,242,255,242,255,243,255,244,255,245,255,246,255,247,255,248,255,250,255,252,255, +255,255,1,0,3,0,3,0,5,0,7,0,9,0,11,0,12,0,12,0,11,0,11,0,11,0,12,0,12,0,10,0,7,0,6,0,6,0,6,0,7,0,6,0,5,0,4,0,3,0,4,0,6,0,8,0,7,0,5,0,4,0,4,0,4,0,6,0,7,0,5,0,3,0,2,0,2,0,3,0,4,0,5,0,4,0,3,0,3,0,4,0,6,0,7,0,8,0,7,0,7,0,6,0,5,0,5,0,5,0,4,0,3,0,2,0,2,0,1, +0,2,0,4,0,6,0,7,0,8,0,9,0,9,0,8,0,8,0,7,0,6,0,4,0,1,0,254,255,252,255,251,255,251,255,250,255,250,255,249,255,249,255,250,255,252,255,253,255,254,255,255,255,255,255,0,0,255,255,0,0,0,0,254,255,252,255,249,255,247,255,247,255,248,255,248,255,247,255, +247,255,247,255,249,255,251,255,254,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,254,255,253,255,254,255,254,255,255,255,255,255,255,255,255,255,0,0,1,0,2,0,2,0,1,0,0,0,255,255,255,255,254,255,253,255,252,255,251,255,249,255,248,255,249,255, +250,255,251,255,251,255,251,255,251,255,252,255,253,255,254,255,254,255,253,255,252,255,251,255,251,255,251,255,252,255,253,255,252,255,252,255,253,255,255,255,1,0,3,0,5,0,5,0,6,0,7,0,8,0,9,0,9,0,9,0,8,0,7,0,8,0,9,0,11,0,12,0,11,0,11,0,11,0,11,0,12,0, +13,0,11,0,10,0,9,0,8,0,8,0,8,0,7,0,4,0,2,0,1,0,1,0,2,0,2,0,1,0,255,255,253,255,253,255,254,255,0,0,255,255,253,255,251,255,250,255,250,255,251,255,252,255,253,255,252,255,251,255,251,255,252,255,254,255,255,255,254,255,253,255,251,255,251,255,252,255, +254,255,254,255,254,255,253,255,253,255,254,255,0,0,1,0,2,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255,254,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,255,255,254,255,254,255,253,255,252,255,252,255,252,255,252,255, +252,255,252,255,252,255,252,255,253,255,255,255,0,0,1,0,1,0,1,0,2,0,3,0,4,0,4,0,3,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,255,255,0,0,1,0,1,0,1,0,255,255,254,255,254,255,255,255,0,0,0,0,255,255,254,255,254,255,254,255,0,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,0, +0,255,255,254,255,253,255,253,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,253,255,254,255,255,255,0,0,0,0,1,0,2,0,4,0,4,0,5,0,5,0,5,0,6,0,7,0,7,0,8,0,8,0,8,0,7,0,7,0,7,0,7,0,6,0,6,0,5,0,4,0,4,0,4,0,3,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,255, +255,255,255,254,255,254,255,254,255,254,255,254,255,253,255,254,255,255,255,255,255,0,0,255,255,254,255,254,255,255,255,255,255,255,255,254,255,252,255,251,255,251,255,252,255,254,255,255,255,255,255,255,255,255,255,0,0,3,0,4,0,5,0,4,0,3,0,2,0,2,0,1, +0,0,0,255,255,254,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,255,255,1,0,2,0,1,0,1,0,0,0,255,255,255,255,255,255,254,255,252,255,251,255,250,255,250,255,250,255,251,255,251,255,250,255,250,255,249,255,250,255,250,255,250,255,250,255, +249,255,248,255,247,255,248,255,249,255,250,255,250,255,251,255,252,255,253,255,255,255,1,0,2,0,2,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,2,0,2,0,2,0,2,0,3,0,3,0,4,0,4,0,5,0,7,0,7,0,7,0,8,0,9,0,10,0,9,0,9,0,8,0,8,0,7,0,7,0,7,0,6,0,5,0,4,0,4,0,4,0,5,0,4,0,4,0,4, +0,3,0,3,0,4,0,3,0,3,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,1,0,1,0,2,0,2,0,3,0,3,0,4,0,4,0,4,0,3,0,3,0,3,0,2,0,2,0,1,0,0,0,254,255,254,255,253,255,253,255,253,255,253,255,252,255,252,255,251,255,251,255,251,255,251,255,252,255,251,255,251, +255,251,255,251,255,252,255,252,255,252,255,252,255,252,255,253,255,254,255,254,255,254,255,254,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,1,0,0,0,0,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,254,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,253,255,253,255,253,255,253,255,253,255,252,255,251,255,251,255,251,255,252,255,254,255,254,255,254,255,254,255,254,255,0,0,1,0,3,0,4,0,4,0,3,0,3,0,3,0,3,0,4,0,4,0,3,0,1,0,0, +0,0,0,0,0,1,0,2,0,1,0,0,0,255,255,255,255,0,0,2,0,3,0,3,0,2,0,2,0,1,0,2,0,3,0,3,0,3,0,2,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,2,0,3,0,4,0,5,0,5,0,5,0,6,0,7,0,8,0,8,0,7,0,7,0,7,0,7,0,7,0,6,0,6,0,5,0,4,0,4,0,5,0,5,0,4,0,3,0,2,0,2,0,2,0,3,0,2,0,1,0, +0,0,254,255,255,255,254,255,254,255,254,255,253,255,252,255,252,255,252,255,252,255,253,255,252,255,251,255,251,255,251,255,251,255,251,255,251,255,250,255,249,255,249,255,250,255,250,255,250,255,249,255,248,255,249,255,251,255,252,255,251,255,251,255, +250,255,251,255,252,255,253,255,254,255,253,255,253,255,252,255,253,255,254,255,255,255,0,0,255,255,255,255,255,255,1,0,2,0,2,0,1,0,0,0,255,255,255,255,0,0,1,0,0,0,254,255,253,255,253,255,255,255,1,0,1,0,0,0,255,255,255,255,0,0,2,0,2,0,1,0,255,255,253, +255,253,255,253,255,253,255,253,255,252,255,251,255,251,255,253,255,254,255,0,0,0,0,255,255,0,0,0,0,1,0,2,0,2,0,1,0,0,0,255,255,0,0,0,0,1,0,1,0,1,0,1,0,3,0,4,0,5,0,5,0,4,0,4,0,4,0,5,0,4,0,4,0,3,0,2,0,2,0,4,0,5,0,6,0,7,0,7,0,6,0,7,0,9,0,10,0,9,0,7,0,5, +0,4,0,3,0,3,0,2,0,1,0,255,255,254,255,254,255,255,255,0,0,1,0,0,0,0,0,0,0,1,0,1,0,2,0,1,0,0,0,255,255,255,255,0,0,1,0,1,0,0,0,255,255,0,0,1,0,2,0,3,0,2,0,0,0,255,255,255,255,255,255,255,255,254,255,252,255,251,255,250,255,251,255,252,255,252,255,252, +255,252,255,252,255,253,255,253,255,254,255,254,255,254,255,253,255,253,255,252,255,252,255,252,255,251,255,250,255,249,255,249,255,249,255,250,255,250,255,251,255,251,255,251,255,252,255,252,255,253,255,254,255,254,255,255,255,255,255,255,255,255,255, +255,255,0,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,2,0,4,0,4,0,4,0,5,0,4,0,5,0,5,0,5,0,6,0,5,0,5,0,5,0,4,0,4,0,3,0,3,0,4,0,4,0,3,0,2,0,2,0,3,0,3,0,3,0,3,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,255,255,0, +0,1,0,1,0,1,0,255,255,254,255,254,255,0,0,0,0,0,0,0,0,255,255,255,255,1,0,2,0,3,0,2,0,1,0,0,0,0,0,2,0,2,0,1,0,0,0,254,255,254,255,255,255,0,0,0,0,0,0,255,255,255,255,0,0,1,0,2,0,2,0,1,0,0,0,0,0,1,0,1,0,0,0,255,255,254,255,254,255,254,255,255,255,255, +255,255,255,254,255,254,255,255,255,0,0,1,0,1,0,0,0,0,0,0,0,1,0,2,0,2,0,0,0,255,255,254,255,254,255,255,255,0,0,0,0,254,255,253,255,253,255,255,255,1,0,2,0,1,0,0,0,255,255,0,0,1,0,2,0,2,0,2,0,1,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,254,255,254, +255,254,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,254,255,254,255,255,255,1,0,1,0,1,0,255,255,254,255,254,255,255,255,1,0,1,0,1,0,255,255,255,255,255,255,1,0,3,0,4,0,3,0,1,0,0, +0,0,0,2,0,3,0,4,0,3,0,1,0,0,0,0,0,2,0,4,0,4,0,3,0,1,0,1,0,2,0,3,0,4,0,4,0,2,0,1,0,0,0,1,0,1,0,2,0,1,0,255,255,255,255,255,255,0,0,2,0,2,0,2,0,1,0,0,0,1,0,2,0,3,0,2,0,1,0,255,255,254,255,254,255,255,255,255,255,255,255,253,255,251,255,251,255,252,255, +253,255,254,255,254,255,253,255,253,255,252,255,253,255,254,255,255,255,254,255,253,255,252,255,252,255,252,255,253,255,254,255,254,255,253,255,252,255,252,255,254,255,255,255,0,0,0,0,255,255,255,255,0,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,2,0,2,0,3,0,3,0,4,0,4,0,5,0,4,0,4,0,3,0,2,0,2,0,3,0,3,0,2,0,1,0,0,0,0,0,1,0,2,0,3,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,254,255,254,255,254,255,255,255,255,255,254,255,254,255,254,255,254, +255,254,255,255,255,255,255,254,255,253,255,253,255,252,255,252,255,252,255,253,255,252,255,252,255,252,255,252,255,253,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255, +254,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255,254,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255, +0,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,3,0,2,0,1,0,1,0,2,0,3,0,3,0,2,0,1,0,2,0,2,0,3,0,3,0,2,0,2,0,1,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0, +0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,1,0,0,0,255,255,254,255,254,255,255, +255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,2,0,3,0,3,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,3,0,2,0,2, +0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,253,255,253,255,254,255,254,255,254, +255,253,255,253,255,253,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,253,255,253,255,253,255,254,255,255,255,255,255,255,255,254,255,255,255,0,0,0,0,0,0,1,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255, +255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,0,0,254,255,253,255,254,255,254,255,255,255,0,0,255,255,254,255,253,255,254,255,255,255,1,0,1,0,0,0,255,255,255,255,0,0,1,0,2,0,3,0,2,0,1,0,1,0,2,0,4,0,3,0,3,0,2,0,1,0,1,0,2,0,3,0,3,0,2,0,1,0,2, +0,3,0,3,0,4,0,3,0,2,0,2,0,2,0,3,0,3,0,2,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,255,255,254,255,254,255,255,255,255,255,255,255,254,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254, +255,254,255,254,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,254,255,254,255,253,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,2,0,1,0,0,0,255,255,255,255,0,0,1,0,1, +0,0,0,255,255,255,255,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,2,0,3,0,3,0,3,0,2,0,2,0,3,0,3,0,4,0,4,0,3,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,2,0,1,0,0,0,255,255,254,255,254,255,254,255,255,255,255,255,255,255,254,255, +254,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,253,255,253,255,253,255,253,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,253,255,253,255,253,255,253,255,254,255,254,255, +255,255,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,0,0,255,255,254,255,255,255,0,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,0,0,255,255,254,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,0,0,1,0,2,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,255,255,0,0,0,0,1,0,1, +0,0,0,255,255,0,0,1,0,2,0,3,0,2,0,1,0,1,0,1,0,2,0,3,0,3,0,2,0,1,0,0,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255,255,255, +255,255,254,255,254,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,0,0,0,0,255,255,255, +255,255,255,0,0,1,0,1,0,1,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,254,255,253,255,253,255,254,255,255,255,255,255,254,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,2,0,2,0,2,0,1, +0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,2,0,1,0,1,0,2,0,2,0,2,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,254,255,254,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,254,255,253,255,253,255,254,255,255,255,254,255,253,255,252,255,252,255,254,255,255,255,0,0,255,255,255, +255,254,255,254,255,255,255,1,0,1,0,0,0,254,255,253,255,253,255,254,255,255,255,255,255,255,255,254,255,253,255,254,255,255,255,1,0,1,0,1,0,0,0,0,0,1,0,2,0,3,0,2,0,2,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,2,0,2,0,1,0,2,0,2,0,2,0,1,0,1, +0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,3,0,3,0,3,0,2,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,2,0,2,0,1,0,0,0,0,0,0,0, +0,0,0,0,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,0,0,254,255,254,255,254,255,255,255,255,255,0,0,255,255,255,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,3,0,3,0,2,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255,255,255,0,0,2,0,3,0,2,0,1,0,1,0,0,0,1,0,2,0,1,0,0,0,255, +255,254,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,1,0,2,0,3,0,3,0,2,0,1,0,0,0,0,0,1,0,1,0,0,0,255,255,254,255,254,255,255,255,0,0,0,0,0,0,255,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1, +0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0, +0,0,0,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,0,0,1,0,0,0,0,0,255,255,255,255,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,3,0,3,0,2,0,1,0,0,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,2,0,3,0,3,0,2,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,1,0,2,0,2,0,2,0,2, +0,2,0,2,0,2,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,255,255,255,255,0,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,0,0,255,255,254,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,254,255, +254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0, +0,1,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,254,255,254,255,255,255,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255,254,255,254,255,254,255,255,255, +255,255,255,255,254,255,254,255,255,255,0,0,1,0,2,0,1,0,0,0,255,255,0,0,0,0,1,0,0,0,255,255,254,255,254,255,254,255,255,255,0,0,255,255,255,255,255,255,0,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,254,255,254,255,254,255,255,255,255,255, +255,255,255,255,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,255,255,254,255,254,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,1, +0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,254,255,253,255,252,255,253,255,253,255,254,255,254,255,254,255,254,255,255,255,0,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255,0,0,0,0,1,0,1,0,1,0,2,0,3,0,4,0,3,0,2,0,1,0,0,0,255, +255,0,0,0,0,255,255,254,255,254,255,254,255,254,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,255,255,254,255,254,255,253,255,254,255,255,255,255,255,255,255,254,255,254,255,255,255,1,0,2,0,2,0,1,0,1,0,0,0,1,0,2,0,2,0,1,0,0,0,255,255,255,255,0,0,1,0,1, +0,0,0,0,0,255,255,0,0,1,0,2,0,1,0,1,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,254,255,253,255,254,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,254,255,255, +255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,254, +255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0, +0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255, +255,0,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,2,0,2,0,1,0,1,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,254,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0, +0,1,0,2,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,255,255,0, +0,1,0,1,0,1,0,2,0,2,0,3,0,3,0,3,0,3,0,2,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,3,0,2,0,2,0,2,0,3,0,3,0,2,0,1,0,0,0,255,255,0,0,0,0,1,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,2,0,1,0,0,0,255,255,0,0,0,0,1,0,0,0,255,255,254,255,254,255,255,255,1,0,2,0,1,0,1,0,0,0,0,0,1,0,2,0,2,0,1,0,255,255,254,255,254,255,255,255,255,255,0,0,255,255,254,255,253,255,254,255,255,255,0,0,0,0,0,0,255,255,255, +255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,254,255,255,255,0,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,254,255,255,255,255,255,0,0,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,1,0,2,0,2,0,2,0,1, +0,1,0,1,0,1,0,2,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,255, +255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,253,255,254,255,255,255,0,0,255,255,255,255,255,255,0,0,1,0,2,0,2,0,1,0,0,0,255,255,0, +0,0,0,0,0,0,0,255,255,254,255,254,255,255,255,0,0,1,0,1,0,1,0,0,0,1,0,1,0,2,0,2,0,2,0,0,0,255,255,255,255,0,0,1,0,2,0,1,0,0,0,0,0,1,0,2,0,2,0,2,0,1,0,0,0,255,255,254,255,255,255,255,255,254,255,254,255,253,255,253,255,254,255,255,255,0,0,0,0,0,0,0,0, +0,0,1,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,3,0,2,0,1,0,0,0,0,0,0,0, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,254,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255, +255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,2,0,3,0,3,0,2,0,2,0,2,0,2,0,2,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,254, +255,254,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,1,0,1,0,0,0,0,0,1,0,1,0,2,0,1,0,0,0,0,0,0,0,1,0,2,0,2,0,2,0,1, +0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0, +1,0,1,0,0,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, +0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,0,0,0,0,255,255,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0, +0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255, +0,0,0,0,255,255,255,255,0,0,0,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1, +0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,2,0,2,0,1,0,1,0,1,0, +1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,0,0,1,0,1, +0,1,0,0,0,0,0,1,0,2,0,1,0,0,0,255,255,254,255,255,255,0,0,0,0,255,255,255,255,254,255,254,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,0,0,0,0,255,255,0,0,1,0,2,0,2,0,1,0,1,0,1,0,2,0,3,0,3,0, +2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,2,0,2,0,1,0,0,0,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0, +1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,255,255,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,255,255,254,255,254,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0, +0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,0,0,0,0,0,0, +0,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,0,0,0,0,255, +255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0, +0,0,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,1,0,2,0,2,0,2,0,1,0,1,0,1, +0,1,0,0,0,255,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,0,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,0,0,0,0,255,255,254,255,254, +255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,254,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0, +0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0, +0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1, +0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,2,0, +2,0,2,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0, +0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1, +0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0, +0,0,0,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,0,0,0,0,1,0,1,0,1, +0,1,0,1,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0, +1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0, +255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1, +0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,2,0,1,0, +1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255, +254,255,254,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0, +0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0, +2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,0,0,0,0,0,0, +0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, +1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0, +0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0, +0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1, +0,1,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0, +0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0, +1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,1, +0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0, +1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0, +0,0,0,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,1,0,1,0,1,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, +0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0, +1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1, +0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0, +1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,255, +255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0, +0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0 }; + +const char* Impulse2_wav = (const char*) temp_binary_data_1; + + +const char* getNamedResource (const char*, int&) throw(); +const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw() +{ + unsigned int hash = 0; + if (resourceNameUTF8 != 0) + while (*resourceNameUTF8 != 0) + hash = 31 * hash + (unsigned int) *resourceNameUTF8++; + + switch (hash) + { + case 0x8014fa29: numBytes = 90246; return Impulse1_wav; + case 0x802311aa: numBytes = 37902; return Impulse2_wav; + default: break; + } + + numBytes = 0; + return 0; +} + +const char* namedResourceList[] = +{ + "Impulse1_wav", + "Impulse2_wav" +}; + +} diff --git a/examples/DSP module plugin demo/JuceLibraryCode/BinaryData.h b/examples/DSP module plugin demo/JuceLibraryCode/BinaryData.h new file mode 100644 index 0000000000..844e31930e --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/BinaryData.h @@ -0,0 +1,26 @@ +/* ========================================================================================= + + This is an auto-generated file: Any edits you make may be overwritten! + +*/ + +#pragma once + +namespace BinaryData +{ + extern const char* Impulse1_wav; + const int Impulse1_wavSize = 90246; + + extern const char* Impulse2_wav; + const int Impulse2_wavSize = 37902; + + // Points to the start of a list of resource names. + extern const char* namedResourceList[]; + + // Number of elements in the namedResourceList array. + const int namedResourceListSize = 2; + + // If you provide the name of one of the binary resource variables above, this function will + // return the corresponding data and its size (or a null pointer if the name isn't found). + const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) throw(); +} diff --git a/examples/DSP module plugin demo/JuceLibraryCode/JuceHeader.h b/examples/DSP module plugin demo/JuceLibraryCode/JuceHeader.h new file mode 100644 index 0000000000..31618910f4 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/JuceHeader.h @@ -0,0 +1,47 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + + This is the header file that your files should include in order to get all the + JUCE library headers. You should avoid including the JUCE headers directly in + your own source files, because that wouldn't pick up the correct configuration + options for your app. + +*/ + +#pragma once + +#include "AppConfig.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "BinaryData.h" + +#if ! DONT_SET_USING_JUCE_NAMESPACE + // If your code uses a lot of JUCE classes, then this will obviously save you + // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE. + using namespace juce; +#endif + +#if ! JUCE_DONT_DECLARE_PROJECTINFO +namespace ProjectInfo +{ + const char* const projectName = "DSPModulePluginDemo"; + const char* const versionString = "1.0.0"; + const int versionNumber = 0x10000; +} +#endif diff --git a/examples/DSP module plugin demo/JuceLibraryCode/ReadMe.txt b/examples/DSP module plugin demo/JuceLibraryCode/ReadMe.txt new file mode 100644 index 0000000000..091a5aa6eb --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/ReadMe.txt @@ -0,0 +1,12 @@ + + Important Note!! + ================ + +The purpose of this folder is to contain files that are auto-generated by the Projucer, +and ALL files in this folder will be mercilessly DELETED and completely re-written whenever +the Projucer saves your project. + +Therefore, it's a bad idea to make any manual changes to the files in here, or to +put any of your own files in here if you don't want to lose them. (Of course you may choose +to add the folder's contents to your version-control system so that you can re-merge your own +modifications after the Projucer has saved its changes). diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_basics.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_basics.cpp new file mode 100644 index 0000000000..418694873c --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_basics.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_basics.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_basics.mm new file mode 100644 index 0000000000..e0e6c577cc --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_basics.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_devices.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_devices.cpp new file mode 100644 index 0000000000..fb5c2219d7 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_devices.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_devices.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_devices.mm new file mode 100644 index 0000000000..e58b67ea49 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_devices.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_formats.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_formats.cpp new file mode 100644 index 0000000000..a3c61170eb --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_formats.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_formats.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_formats.mm new file mode 100644 index 0000000000..f325b8fb67 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_formats.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AAX.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AAX.cpp new file mode 100644 index 0000000000..c599b8759f --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AAX.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AAX.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AAX.mm new file mode 100644 index 0000000000..d4b8c31117 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AAX.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AU.r b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AU.r new file mode 100644 index 0000000000..bfbc613860 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AU.r @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AU_1.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AU_1.mm new file mode 100644 index 0000000000..a4fdf7f366 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AU_1.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AU_2.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AU_2.mm new file mode 100644 index 0000000000..175b30047f --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AU_2.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AUv3.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AUv3.mm new file mode 100644 index 0000000000..0ac2b2f599 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_AUv3.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS.r b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS.r new file mode 100644 index 0000000000..a51cf374d9 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS.r @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_1.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_1.cpp new file mode 100644 index 0000000000..29d48f3faa --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_1.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_2.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_2.cpp new file mode 100644 index 0000000000..2da08c6dc3 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_2.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_3.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_3.cpp new file mode 100644 index 0000000000..72a8426cbe --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_3.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_4.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_4.cpp new file mode 100644 index 0000000000..6064f99d28 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_4.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_utils.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_utils.cpp new file mode 100644 index 0000000000..5c5509abde --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_utils.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_utils.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_utils.mm new file mode 100644 index 0000000000..56af9aebab --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_utils.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_Standalone.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_Standalone.cpp new file mode 100644 index 0000000000..d3b6529a80 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_Standalone.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp new file mode 100644 index 0000000000..c35394b418 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_VST3.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_VST3.cpp new file mode 100644 index 0000000000..8e2e5cde2e --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_VST3.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_VST_utils.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_VST_utils.mm new file mode 100644 index 0000000000..ee2f414e66 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_VST_utils.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_utils.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_utils.cpp new file mode 100644 index 0000000000..183f61b238 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_plugin_client_utils.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_processors.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_processors.cpp new file mode 100644 index 0000000000..bfe172edd0 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_processors.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_processors.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_processors.mm new file mode 100644 index 0000000000..b80ae9017f --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_processors.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_utils.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_utils.cpp new file mode 100644 index 0000000000..97bd2c568c --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_utils.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_utils.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_utils.mm new file mode 100644 index 0000000000..8eae7c6e2f --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_audio_utils.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_core.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_core.cpp new file mode 100644 index 0000000000..d0ce1636f0 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_core.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_core.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_core.mm new file mode 100644 index 0000000000..72b10bf817 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_core.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_data_structures.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_data_structures.cpp new file mode 100644 index 0000000000..9315aa1686 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_data_structures.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_data_structures.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_data_structures.mm new file mode 100644 index 0000000000..695ec43925 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_data_structures.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_dsp.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_dsp.cpp new file mode 100644 index 0000000000..430d943f26 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_dsp.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_dsp.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_dsp.mm new file mode 100644 index 0000000000..1dea5d08a6 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_dsp.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_events.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_events.cpp new file mode 100644 index 0000000000..1bba110a97 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_events.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_events.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_events.mm new file mode 100644 index 0000000000..4cc34fc401 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_events.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_graphics.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_graphics.cpp new file mode 100644 index 0000000000..319c76de0e --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_graphics.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_graphics.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_graphics.mm new file mode 100644 index 0000000000..b28e6dd056 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_graphics.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_gui_basics.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_gui_basics.cpp new file mode 100644 index 0000000000..216c76bb05 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_gui_basics.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_gui_basics.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_gui_basics.mm new file mode 100644 index 0000000000..6a9726fa5f --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_gui_basics.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_gui_extra.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_gui_extra.cpp new file mode 100644 index 0000000000..7226e19833 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_gui_extra.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_gui_extra.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_gui_extra.mm new file mode 100644 index 0000000000..c9b6c3bfc6 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_gui_extra.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_opengl.cpp b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_opengl.cpp new file mode 100644 index 0000000000..d9895bce92 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_opengl.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/JuceLibraryCode/include_juce_opengl.mm b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_opengl.mm new file mode 100644 index 0000000000..6c2c32d095 --- /dev/null +++ b/examples/DSP module plugin demo/JuceLibraryCode/include_juce_opengl.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSP module plugin demo/Resources/Impulse1.wav b/examples/DSP module plugin demo/Resources/Impulse1.wav new file mode 100644 index 0000000000..98d402cd04 Binary files /dev/null and b/examples/DSP module plugin demo/Resources/Impulse1.wav differ diff --git a/examples/DSP module plugin demo/Resources/Impulse2.wav b/examples/DSP module plugin demo/Resources/Impulse2.wav new file mode 100644 index 0000000000..c548b22cdd Binary files /dev/null and b/examples/DSP module plugin demo/Resources/Impulse2.wav differ diff --git a/examples/DSP module plugin demo/Source/PluginEditor.cpp b/examples/DSP module plugin demo/Source/PluginEditor.cpp new file mode 100644 index 0000000000..982fe6cd93 --- /dev/null +++ b/examples/DSP module plugin demo/Source/PluginEditor.cpp @@ -0,0 +1,200 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#include "PluginProcessor.h" +#include "PluginEditor.h" + + +//============================================================================== +DspModulePluginDemoAudioProcessorEditor::DspModulePluginDemoAudioProcessorEditor (DspModulePluginDemoAudioProcessor& p) + : AudioProcessorEditor (&p), processor (p), + inputVolumeLabel ({ }, processor.inputVolumeParam->name), + outputVolumeLabel ({ }, processor.outputVolumeParam->name), + lowPassFilterFreqLabel ({ }, processor.lowPassFilterFreqParam->name), + highPassFilterFreqLabel ({ }, processor.highPassFilterFreqParam->name), + stereoLabel({}, processor.stereoParam->name), + slopeLabel ({ }, processor.slopeParam->name), + waveshaperLabel({ }, processor.waveshaperParam->name), + cabinetTypeLabel({ }, processor.cabinetTypeParam->name) +{ + //============================================================================== + addAndMakeVisible (inputVolumeSlider = new ParameterSlider (*processor.inputVolumeParam)); + addAndMakeVisible (outputVolumeSlider = new ParameterSlider (*processor.outputVolumeParam)); + addAndMakeVisible (lowPassFilterFreqSlider = new ParameterSlider (*processor.lowPassFilterFreqParam)); + addAndMakeVisible (highPassFilterFreqSlider = new ParameterSlider (*processor.highPassFilterFreqParam)); + + addAndMakeVisible (inputVolumeLabel); + inputVolumeLabel.setJustificationType (Justification::centredLeft); + inputVolumeLabel.attachToComponent (inputVolumeSlider, true); + + addAndMakeVisible (outputVolumeLabel); + outputVolumeLabel.setJustificationType (Justification::centredLeft); + outputVolumeLabel.attachToComponent (outputVolumeSlider, true); + + addAndMakeVisible (lowPassFilterFreqLabel); + lowPassFilterFreqLabel.setJustificationType (Justification::centredLeft); + lowPassFilterFreqLabel.attachToComponent (lowPassFilterFreqSlider, true); + + addAndMakeVisible (highPassFilterFreqLabel); + highPassFilterFreqLabel.setJustificationType (Justification::centredLeft); + highPassFilterFreqLabel.attachToComponent (highPassFilterFreqSlider, true); + + //============================================================================== + addAndMakeVisible (stereoBox); + + auto i = 1; + for (auto choice : processor.stereoParam->choices) + stereoBox.addItem (choice, i++); + + stereoBox.addListener (this); + stereoBox.setSelectedId (processor.stereoParam->getIndex() + 1); + + addAndMakeVisible (stereoLabel); + stereoLabel.setJustificationType (Justification::centredLeft); + stereoLabel.attachToComponent (&stereoBox, true); + + //============================================================================== + addAndMakeVisible(slopeBox); + + i = 1; + for (auto choice : processor.slopeParam->choices) + slopeBox.addItem(choice, i++); + + slopeBox.addListener(this); + slopeBox.setSelectedId(processor.slopeParam->getIndex() + 1); + + addAndMakeVisible(slopeLabel); + slopeLabel.setJustificationType(Justification::centredLeft); + slopeLabel.attachToComponent(&slopeBox, true); + + //============================================================================== + addAndMakeVisible (waveshaperBox); + + i = 1; + for (auto choice : processor.waveshaperParam->choices) + waveshaperBox.addItem (choice, i++); + + waveshaperBox.addListener (this); + waveshaperBox.setSelectedId (processor.waveshaperParam->getIndex() + 1); + + addAndMakeVisible (waveshaperLabel); + waveshaperLabel.setJustificationType (Justification::centredLeft); + waveshaperLabel.attachToComponent (&waveshaperBox, true); + + //============================================================================== + addAndMakeVisible (cabinetTypeBox); + + i = 1; + for (auto choice : processor.cabinetTypeParam->choices) + cabinetTypeBox.addItem (choice, i++); + + cabinetTypeBox.addListener (this); + cabinetTypeBox.setSelectedId (processor.cabinetTypeParam->getIndex() + 1); + + addAndMakeVisible (cabinetTypeLabel); + cabinetTypeLabel.setJustificationType (Justification::centredLeft); + cabinetTypeLabel.attachToComponent (&cabinetTypeBox, true); + + //============================================================================== + addAndMakeVisible (cabinetSimButton); + cabinetSimButton.addListener (this); + cabinetSimButton.setButtonText (processor.cabinetSimParam->name); + + //============================================================================== + setSize (600, 400); +} + +DspModulePluginDemoAudioProcessorEditor::~DspModulePluginDemoAudioProcessorEditor() +{ +} + +//============================================================================== +void DspModulePluginDemoAudioProcessorEditor::paint (Graphics& g) +{ + g.setColour (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); + g.fillAll(); +} + +void DspModulePluginDemoAudioProcessorEditor::resized() +{ + auto bounds = getLocalBounds().reduced (10); + bounds.removeFromTop (10); + bounds.removeFromLeft (125); + + //============================================================================== + inputVolumeSlider->setBounds (bounds.removeFromTop (30)); + bounds.removeFromTop (5); + + outputVolumeSlider->setBounds (bounds.removeFromTop (30)); + bounds.removeFromTop (15); + + highPassFilterFreqSlider->setBounds (bounds.removeFromTop (30)); + bounds.removeFromTop (5); + + lowPassFilterFreqSlider->setBounds (bounds.removeFromTop (30)); + bounds.removeFromTop (15); + + //============================================================================== + stereoBox.setBounds (bounds.removeFromTop(30)); + bounds.removeFromTop (5); + + slopeBox.setBounds (bounds.removeFromTop (30)); + bounds.removeFromTop (5); + + waveshaperBox.setBounds (bounds.removeFromTop (30)); + bounds.removeFromTop (5); + + cabinetTypeBox.setBounds (bounds.removeFromTop (30)); + bounds.removeFromTop (15); + + //============================================================================== + auto buttonSlice = bounds.removeFromTop (30); + cabinetSimButton.setSize (200, bounds.getHeight()); + cabinetSimButton.setCentrePosition (buttonSlice.getCentre()); + bounds.removeFromTop (15); +} +//============================================================================== +void DspModulePluginDemoAudioProcessorEditor::comboBoxChanged (ComboBox* box) +{ + auto index = box->getSelectedItemIndex(); + + if (box == &stereoBox) + { + processor.stereoParam->operator= (index); + } + else if (box == &slopeBox) + { + processor.slopeParam->operator= (index); + } + else if (box == &waveshaperBox) + { + processor.waveshaperParam->operator= (index); + } + else if (box == &cabinetTypeBox) + { + processor.cabinetTypeParam->operator= (index); + } +} diff --git a/examples/DSP module plugin demo/Source/PluginEditor.h b/examples/DSP module plugin demo/Source/PluginEditor.h new file mode 100644 index 0000000000..d2a36b8bbd --- /dev/null +++ b/examples/DSP module plugin demo/Source/PluginEditor.h @@ -0,0 +1,104 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#pragma once + +#include "../JuceLibraryCode/JuceHeader.h" +#include "PluginProcessor.h" + +struct ParameterSlider : public Slider, + public Timer +{ + ParameterSlider (AudioProcessorParameter& p) + : Slider (p.getName (256)), param (p) + { + setRange (0.0, 1.0, 0.0); + startTimerHz (30); + updateSliderPos(); + } + + void valueChanged() override + { + if (isMouseButtonDown()) + param.setValueNotifyingHost ((float) Slider::getValue()); + else + param.setValue ((float) Slider::getValue()); + } + + void timerCallback() override { updateSliderPos(); } + + void startedDragging() override { param.beginChangeGesture(); } + void stoppedDragging() override { param.endChangeGesture(); } + + double getValueFromText (const String& text) override { return param.getValueForText (text); } + String getTextFromValue (double value) override { return param.getText ((float) value, 1024) + " " + param.getLabel(); } + + void updateSliderPos() + { + const float newValue = param.getValue(); + + if (newValue != (float) Slider::getValue() && ! isMouseButtonDown()) + Slider::setValue (newValue); + } + + AudioProcessorParameter& param; +}; + +//============================================================================== +/** + This is the editor component that will be displayed. +*/ +class DspModulePluginDemoAudioProcessorEditor : public AudioProcessorEditor, + private ComboBox::Listener, + private Button::Listener +{ +public: + DspModulePluginDemoAudioProcessorEditor (DspModulePluginDemoAudioProcessor&); + ~DspModulePluginDemoAudioProcessorEditor(); + + //============================================================================== + void paint (Graphics&) override; + void resized() override; + +private: + //============================================================================== + void comboBoxChanged (ComboBox*) override; + void buttonClicked (Button*) override { processor.cabinetSimParam->operator= (cabinetSimButton.getToggleState()); } + + //============================================================================== + DspModulePluginDemoAudioProcessor& processor; + + ScopedPointer inputVolumeSlider, outputVolumeSlider, + lowPassFilterFreqSlider, highPassFilterFreqSlider; + ComboBox stereoBox, slopeBox, waveshaperBox, cabinetTypeBox; + ToggleButton cabinetSimButton; + + Label inputVolumeLabel, outputVolumeLabel, lowPassFilterFreqLabel, + highPassFilterFreqLabel, stereoLabel, slopeLabel, waveshaperLabel, + cabinetTypeLabel; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DspModulePluginDemoAudioProcessorEditor) +}; diff --git a/examples/DSP module plugin demo/Source/PluginProcessor.cpp b/examples/DSP module plugin demo/Source/PluginProcessor.cpp new file mode 100644 index 0000000000..17ea3d6788 --- /dev/null +++ b/examples/DSP module plugin demo/Source/PluginProcessor.cpp @@ -0,0 +1,256 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#include "PluginProcessor.h" +#include "PluginEditor.h" + + +//============================================================================== +DspModulePluginDemoAudioProcessor::DspModulePluginDemoAudioProcessor() + : AudioProcessor (BusesProperties() + .withInput ("Input", AudioChannelSet::stereo(), true) + .withOutput ("Output", AudioChannelSet::stereo(), true)), + lowPassFilter (dsp::IIR::Coefficients::makeFirstOrderLowPass (48000.0, 20000.f)), + highPassFilter (dsp::IIR::Coefficients::makeFirstOrderHighPass (48000.0, 20.0f)), + waveShapers { {std::tanh}, {dsp::FastMathApproximations::tanh} }, + clipping { clip } +{ + addParameter (inputVolumeParam = new AudioParameterFloat ("INPUT", "Input Volume", { 0.f, 60.f, 0.f, 1.0f }, 0.f, "dB")); + addParameter (highPassFilterFreqParam = new AudioParameterFloat ("HPFREQ", "Pre Highpass Freq.", { 20.f, 20000.f, 0.f, 0.5f }, 20.f, "Hz")); + addParameter (lowPassFilterFreqParam = new AudioParameterFloat ("LPFREQ", "Post Lowpass Freq.", { 20.f, 20000.f, 0.f, 0.5f }, 20000.f, "Hz")); + + addParameter (stereoParam = new AudioParameterChoice ("STEREO", "Stereo Processing", { "Always mono", "Yes" }, 1)); + addParameter (slopeParam = new AudioParameterChoice ("SLOPE", "Slope", { "-6 dB / octave", "-12 dB / octave" }, 0)); + addParameter (waveshaperParam = new AudioParameterChoice ("WVSHP", "Waveshaper", { "std::tanh", "Fast tanh approx." }, 0)); + + addParameter (cabinetTypeParam = new AudioParameterChoice ("CABTYPE", "Cabinet Type", { "Guitar amplifier 8'' cabinet ", + "Cassette recorder cabinet" }, 0)); + + addParameter (cabinetSimParam = new AudioParameterBool ("CABSIM", "Cabinet Sim", false)); + + addParameter (outputVolumeParam = new AudioParameterFloat ("OUTPUT", "Output Volume", { -40.f, 40.f, 0.f, 1.0f }, 0.f, "dB")); + + cabinetType.set (0); + + +} + +DspModulePluginDemoAudioProcessor::~DspModulePluginDemoAudioProcessor() +{ +} + +//============================================================================== +bool DspModulePluginDemoAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const +{ + // This is the place where you check if the layout is supported. + // In this template code we only support mono or stereo. + if (layouts.getMainOutputChannelSet() != AudioChannelSet::mono() && layouts.getMainOutputChannelSet() != AudioChannelSet::stereo()) + return false; + + // This checks if the input layout matches the output layout + if (layouts.getMainOutputChannelSet() != layouts.getMainInputChannelSet()) + return false; + + return true; +} + +void DspModulePluginDemoAudioProcessor::prepareToPlay (double sampleRate, int samplesPerBlock) +{ + auto channels = static_cast (jmin (getMainBusNumInputChannels(), getMainBusNumOutputChannels())); + dsp::ProcessSpec spec { sampleRate, static_cast (samplesPerBlock), channels }; + + updateParameters(); + + lowPassFilter.prepare (spec); + highPassFilter.prepare (spec); + + inputVolume.prepare (spec); + outputVolume.prepare (spec); + + convolution.prepare (spec); + cabinetType.set (-1); +} + +void DspModulePluginDemoAudioProcessor::reset() +{ + lowPassFilter.reset(); + highPassFilter.reset(); + convolution.reset(); +} + +void DspModulePluginDemoAudioProcessor::releaseResources() +{ + +} + +void DspModulePluginDemoAudioProcessor::process (dsp::ProcessContextReplacing context) noexcept +{ + // Input volume applied with a LinearSmoothedValue + inputVolume.process (context); + + // Pre-highpass filtering, very useful for distortion audio effects + // Note : try frequencies around 700 Hz + highPassFilter.process (context); + + // Waveshaper processing, for distortion generation, thanks to the input gain + // The fast tanh can be used instead of std::tanh to reduce the CPU load + auto waveshaperIndex = waveshaperParam->getIndex(); + + if (isPositiveAndBelow (waveshaperIndex, (int) numWaveShapers) ) + { + waveShapers[waveshaperIndex].process (context); + + if (waveshaperIndex == 1) + clipping.process(context); + + context.getOutputBlock() *= 0.7f; + } + + // Post-lowpass filtering + lowPassFilter.process (context); + + // Convolution with the impulse response of a guitar cabinet + auto wasBypassed = context.isBypassed; + context.isBypassed = context.isBypassed || cabinetIsBypassed; + convolution.process (context); + context.isBypassed = wasBypassed; + + // Output volume applied with a LinearSmoothedValue + outputVolume.process (context); +} + +void DspModulePluginDemoAudioProcessor::processBlock (AudioSampleBuffer& inoutBuffer, MidiBuffer&) +{ + auto totalNumInputChannels = getTotalNumInputChannels(); + auto totalNumOutputChannels = getTotalNumOutputChannels(); + + auto numSamples = inoutBuffer.getNumSamples(); + + for (auto i = jmin (2, totalNumInputChannels); i < totalNumOutputChannels; ++i) + inoutBuffer.clear (i, 0, numSamples); + + updateParameters(); + + dsp::AudioBlock block (inoutBuffer); + + if (stereoParam->getIndex() == 1) + { + // Stereo processing mode: + if (block.getNumChannels() > 2) + block = block.getSubsetChannelBlock (0, 2); + + process (dsp::ProcessContextReplacing (block)); + } + else + { + // Mono processing mode: + auto firstChan = block.getSingleChannelBlock (0); + + process (dsp::ProcessContextReplacing (firstChan)); + + for (size_t chan = 1; chan < block.getNumChannels(); ++chan) + block.getSingleChannelBlock (chan).copy (firstChan); + } +} + +//============================================================================== +bool DspModulePluginDemoAudioProcessor::hasEditor() const +{ + return true; +} + +AudioProcessorEditor* DspModulePluginDemoAudioProcessor::createEditor() +{ + return new DspModulePluginDemoAudioProcessorEditor (*this); +} + +//============================================================================== +bool DspModulePluginDemoAudioProcessor::acceptsMidi() const +{ + #if JucePlugin_WantsMidiInput + return true; + #else + return false; + #endif +} + +bool DspModulePluginDemoAudioProcessor::producesMidi() const +{ + #if JucePlugin_ProducesMidiOutput + return true; + #else + return false; + #endif +} + +//============================================================================== +void DspModulePluginDemoAudioProcessor::updateParameters() +{ + auto inputdB = Decibels::decibelsToGain (inputVolumeParam->get()); + auto outputdB = Decibels::decibelsToGain (outputVolumeParam->get()); + + if (inputVolume.getGainLinear() != inputdB) inputVolume.setGainLinear (inputdB); + if (outputVolume.getGainLinear() != outputdB) outputVolume.setGainLinear (outputdB); + + dsp::IIR::Coefficients::Ptr newHighPassCoeffs, newLowPassCoeffs; + auto newSlopeType = slopeParam->getIndex(); + + if (newSlopeType == 0) + { + *lowPassFilter.state = *dsp::IIR::Coefficients::makeFirstOrderLowPass (getSampleRate(), lowPassFilterFreqParam->get()); + *highPassFilter.state = *dsp::IIR::Coefficients::makeFirstOrderHighPass (getSampleRate(), highPassFilterFreqParam->get()); + } + else + { + *lowPassFilter.state = *dsp::IIR::Coefficients::makeLowPass (getSampleRate(), lowPassFilterFreqParam->get()); + *highPassFilter.state = *dsp::IIR::Coefficients::makeHighPass (getSampleRate(), highPassFilterFreqParam->get()); + } + + //============================================================================== + auto type = cabinetTypeParam->getIndex(); + auto currentType = cabinetType.get(); + + if (type != currentType) + { + cabinetType.set(type); + + auto maxSize = static_cast (roundDoubleToInt (8192 * getSampleRate() / 44100)); + + if (type == 0) + convolution.loadImpulseResponse (BinaryData::Impulse1_wav, BinaryData::Impulse1_wavSize, false, maxSize); + else + convolution.loadImpulseResponse (BinaryData::Impulse2_wav, BinaryData::Impulse2_wavSize, false, maxSize); + } + + cabinetIsBypassed = ! cabinetSimParam->get(); +} + +//============================================================================== +// This creates new instances of the plugin.. +AudioProcessor* JUCE_CALLTYPE createPluginFilter() +{ + return new DspModulePluginDemoAudioProcessor(); +} diff --git a/examples/DSP module plugin demo/Source/PluginProcessor.h b/examples/DSP module plugin demo/Source/PluginProcessor.h new file mode 100644 index 0000000000..2a8fd42ef0 --- /dev/null +++ b/examples/DSP module plugin demo/Source/PluginProcessor.h @@ -0,0 +1,111 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#pragma once + +#include "../JuceLibraryCode/JuceHeader.h" + + +//============================================================================== +/** + This class handles the audio processing for the DSP module plugin demo. +*/ +class DspModulePluginDemoAudioProcessor : public AudioProcessor +{ +public: + //============================================================================== + DspModulePluginDemoAudioProcessor(); + ~DspModulePluginDemoAudioProcessor(); + + //============================================================================== + #ifndef JucePlugin_PreferredChannelConfigurations + bool isBusesLayoutSupported (const BusesLayout& layouts) const override; + #endif + void prepareToPlay (double sampleRate, int samplesPerBlock) override; + void releaseResources() override; + void processBlock (AudioSampleBuffer&, MidiBuffer&) override; + void reset() override; + + //============================================================================== + bool hasEditor() const override; + AudioProcessorEditor* createEditor() override; + + //============================================================================== + bool acceptsMidi() const override; + bool producesMidi() const override; + + const String getName() const override { return JucePlugin_Name; } + double getTailLengthSeconds() const override { return 0.0; } + + //============================================================================== + int getNumPrograms() override { return 1; } + int getCurrentProgram() override { return 0; } + void setCurrentProgram (int /*index*/) override {} + const String getProgramName (int /*index*/) override { return {}; } + void changeProgramName (int /*index*/, const String& /*newName*/) override {} + + //============================================================================== + void getStateInformation (MemoryBlock& /*destData*/) override {} + void setStateInformation (const void* /*data*/, int /*sizeInBytes*/) override {} + + //============================================================================== + void updateParameters(); + + static inline float clip(float x) { return jmax(-1.f, jmin(1.f, x)); } + + //============================================================================== + AudioParameterFloat* inputVolumeParam; + AudioParameterFloat* outputVolumeParam; + AudioParameterFloat* lowPassFilterFreqParam; + AudioParameterFloat* highPassFilterFreqParam; + + AudioParameterChoice* stereoParam; + AudioParameterChoice* slopeParam; + AudioParameterChoice* waveshaperParam; + AudioParameterChoice* cabinetTypeParam; + + AudioParameterBool* cabinetSimParam; + +private: + //============================================================================== + void process (dsp::ProcessContextReplacing) noexcept; + + //============================================================================== + dsp::ProcessorDuplicator, dsp::IIR::Coefficients> lowPassFilter, highPassFilter; + dsp::Convolution convolution; + + static constexpr size_t numWaveShapers = 2; + dsp::WaveShaper waveShapers[numWaveShapers]; + dsp::WaveShaper clipping; + + dsp::Gain inputVolume, outputVolume; + + Atomic cabinetType; + bool cabinetIsBypassed = false; + + //============================================================================== + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DspModulePluginDemoAudioProcessor) +}; diff --git a/examples/DSPDemo/Builds/LinuxMakefile/Makefile b/examples/DSPDemo/Builds/LinuxMakefile/Makefile new file mode 100644 index 0000000000..8710d489d7 --- /dev/null +++ b/examples/DSPDemo/Builds/LinuxMakefile/Makefile @@ -0,0 +1,237 @@ +# Automatically generated makefile, created by the Projucer +# Don't edit this file! Your changes will be overwritten when you re-save the Projucer project! + +# build with "V=1" for verbose builds +ifeq ($(V), 1) +V_AT = +else +V_AT = @ +endif + +# (this disables dependency generation if multiple architectures are set) +DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD) + +ifndef STRIP + STRIP=strip +endif + +ifndef AR + AR=ar +endif + +ifndef CONFIG + CONFIG=Debug +endif + +ifeq ($(CONFIG),Debug) + JUCE_BINDIR := build + JUCE_LIBDIR := build + JUCE_OBJDIR := build/intermediate/Debug + JUCE_OUTDIR := build + + ifeq ($(TARGET_ARCH),) + TARGET_ARCH := -march=native + endif + + 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_APP := -DJucePlugin_Build_VST=0 -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_TARGET_APP := DSPDemo + + JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) + JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -ldl -lpthread -lrt $(LDFLAGS) + + CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) +endif + +ifeq ($(CONFIG),Release) + JUCE_BINDIR := build + JUCE_LIBDIR := build + JUCE_OBJDIR := build/intermediate/Release + JUCE_OUTDIR := build + + ifeq ($(TARGET_ARCH),) + TARGET_ARCH := -march=native + endif + + 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_APP := -DJucePlugin_Build_VST=0 -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_TARGET_APP := DSPDemo + + JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 $(CFLAGS) + JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -fvisibility=hidden $(shell pkg-config --libs alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -ldl -lpthread -lrt $(LDFLAGS) + + CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) +endif + +OBJECTS_APP := \ + $(JUCE_OBJDIR)/ConvolutionDemo_ecad51bd.o \ + $(JUCE_OBJDIR)/FIRFilterDemo_8015eecc.o \ + $(JUCE_OBJDIR)/GainDemo_4b61ad6a.o \ + $(JUCE_OBJDIR)/IIRFilterDemo_721388cf.o \ + $(JUCE_OBJDIR)/OscillatorDemo_7470174b.o \ + $(JUCE_OBJDIR)/OverdriveDemo_4b48389b.o \ + $(JUCE_OBJDIR)/SIMDRegisterDemo_1f8435fb.o \ + $(JUCE_OBJDIR)/StateVariableFilterDemo_13f3202a.o \ + $(JUCE_OBJDIR)/WaveShaperTanhDemo_177657c.o \ + $(JUCE_OBJDIR)/Main_90ebc5c2.o \ + $(JUCE_OBJDIR)/MainComponent_a6ffb4a5.o \ + $(JUCE_OBJDIR)/BinaryData_ce4232d4.o \ + $(JUCE_OBJDIR)/include_juce_audio_basics_8a4e984a.o \ + $(JUCE_OBJDIR)/include_juce_audio_devices_63111d02.o \ + $(JUCE_OBJDIR)/include_juce_audio_formats_15f82001.o \ + $(JUCE_OBJDIR)/include_juce_audio_processors_10c03666.o \ + $(JUCE_OBJDIR)/include_juce_audio_utils_9f9fb2d6.o \ + $(JUCE_OBJDIR)/include_juce_core_f26d17db.o \ + $(JUCE_OBJDIR)/include_juce_data_structures_7471b1e3.o \ + $(JUCE_OBJDIR)/include_juce_dsp_aeb2060f.o \ + $(JUCE_OBJDIR)/include_juce_events_fd7d695.o \ + $(JUCE_OBJDIR)/include_juce_graphics_f817e147.o \ + $(JUCE_OBJDIR)/include_juce_gui_basics_e3f79785.o \ + $(JUCE_OBJDIR)/include_juce_gui_extra_6dee1c1a.o \ + +.PHONY: clean all + +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) + +$(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) + @echo Linking "DSPDemo - App" + -$(V_AT)mkdir -p $(JUCE_BINDIR) + -$(V_AT)mkdir -p $(JUCE_LIBDIR) + -$(V_AT)mkdir -p $(JUCE_OUTDIR) + $(V_AT)$(CXX) -o $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) $(OBJECTS_APP) $(JUCE_LDFLAGS) $(RESOURCES) $(TARGET_ARCH) + +$(JUCE_OBJDIR)/ConvolutionDemo_ecad51bd.o: ../../Source/Demos/ConvolutionDemo.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling ConvolutionDemo.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/FIRFilterDemo_8015eecc.o: ../../Source/Demos/FIRFilterDemo.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling FIRFilterDemo.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/GainDemo_4b61ad6a.o: ../../Source/Demos/GainDemo.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling GainDemo.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/IIRFilterDemo_721388cf.o: ../../Source/Demos/IIRFilterDemo.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling IIRFilterDemo.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/OscillatorDemo_7470174b.o: ../../Source/Demos/OscillatorDemo.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling OscillatorDemo.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/OverdriveDemo_4b48389b.o: ../../Source/Demos/OverdriveDemo.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling OverdriveDemo.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/SIMDRegisterDemo_1f8435fb.o: ../../Source/Demos/SIMDRegisterDemo.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling SIMDRegisterDemo.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/StateVariableFilterDemo_13f3202a.o: ../../Source/Demos/StateVariableFilterDemo.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling StateVariableFilterDemo.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/WaveShaperTanhDemo_177657c.o: ../../Source/Demos/WaveShaperTanhDemo.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling WaveShaperTanhDemo.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling Main.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/MainComponent_a6ffb4a5.o: ../../Source/MainComponent.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling MainComponent.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/BinaryData_ce4232d4.o: ../../JuceLibraryCode/BinaryData.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling BinaryData.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/include_juce_audio_basics_8a4e984a.o: ../../JuceLibraryCode/include_juce_audio_basics.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_audio_basics.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/include_juce_audio_devices_63111d02.o: ../../JuceLibraryCode/include_juce_audio_devices.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_audio_devices.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/include_juce_audio_formats_15f82001.o: ../../JuceLibraryCode/include_juce_audio_formats.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_audio_formats.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/include_juce_audio_processors_10c03666.o: ../../JuceLibraryCode/include_juce_audio_processors.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_audio_processors.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/include_juce_audio_utils_9f9fb2d6.o: ../../JuceLibraryCode/include_juce_audio_utils.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_audio_utils.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/include_juce_core_f26d17db.o: ../../JuceLibraryCode/include_juce_core.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_core.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/include_juce_data_structures_7471b1e3.o: ../../JuceLibraryCode/include_juce_data_structures.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_data_structures.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/include_juce_dsp_aeb2060f.o: ../../JuceLibraryCode/include_juce_dsp.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_dsp.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/include_juce_events_fd7d695.o: ../../JuceLibraryCode/include_juce_events.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_events.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/include_juce_graphics_f817e147.o: ../../JuceLibraryCode/include_juce_graphics.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_graphics.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/include_juce_gui_basics_e3f79785.o: ../../JuceLibraryCode/include_juce_gui_basics.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_gui_basics.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/include_juce_gui_extra_6dee1c1a.o: ../../JuceLibraryCode/include_juce_gui_extra.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_gui_extra.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + +check-pkg-config: + @command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } + @pkg-config --print-errors alsa freetype2 libcurl x11 xext xinerama + +clean: + @echo Cleaning DSPDemo + $(V_AT)$(CLEANCMD) + +strip: + @echo Stripping DSPDemo + -$(V_AT)$(STRIP) --strip-unneeded $(JUCE_OUTDIR)/$(TARGET) + +-include $(OBJECTS_APP:%.o=%.d) diff --git a/examples/DSPDemo/Builds/MacOSX/DSPDemo.xcodeproj/project.pbxproj b/examples/DSPDemo/Builds/MacOSX/DSPDemo.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..d59f8b300d --- /dev/null +++ b/examples/DSPDemo/Builds/MacOSX/DSPDemo.xcodeproj/project.pbxproj @@ -0,0 +1,371 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + + 36AB07C7F15CC24EC22DDB71 = {isa = PBXBuildFile; fileRef = E65A292C57D74320DBADF3E2; }; + 79F4B2BF7879680EBB5B7DBE = {isa = PBXBuildFile; fileRef = 36DC4FECDB1527A540528928; }; + A68C0210E63579CE6AC237AE = {isa = PBXBuildFile; fileRef = 1BFAE533720CF64A048D7594; }; + D63164D4982A647B45B1B35A = {isa = PBXBuildFile; fileRef = 58DFF90DB01544BBA2258FAB; }; + 18D32BCB58F415AB8B915AA6 = {isa = PBXBuildFile; fileRef = D99979809CF3183E9C3EC100; }; + 1FE90DECD30F20F4BD4194E5 = {isa = PBXBuildFile; fileRef = 90DFC174390DB5F49FFDB1C3; }; + 1751CA561F0C689757B48499 = {isa = PBXBuildFile; fileRef = 5F1E4007B8CA56A36AE2A9A8; }; + 67A0FE9B4C958E755BC59CB6 = {isa = PBXBuildFile; fileRef = 055A49508ABAEEB6B203913C; }; + 2007C473FC7B310FAC9120F4 = {isa = PBXBuildFile; fileRef = 1ED0F76740852AAD1E10E589; }; + DDFB4E2EE2BA04B969F91CD8 = {isa = PBXBuildFile; fileRef = 7499E560C79D2899AD1F7EBE; }; + 74DA94C93F0B9F6F8D839F90 = {isa = PBXBuildFile; fileRef = FBB548A1A4C624BDB2212536; }; + DD7CEC23CAF513B19FE69354 = {isa = PBXBuildFile; fileRef = 127F5D34AF2F6FA4D1B244DC; }; + 0997809708D0721BD5B82709 = {isa = PBXBuildFile; fileRef = 02D5C32B097EB318955BAD14; }; + 9762387BB6E55A9A677399FB = {isa = PBXBuildFile; fileRef = 02008353D342DBCDE2F8609B; }; + C9B89B4E158A2C0878062438 = {isa = PBXBuildFile; fileRef = 433721BDA52563DA31C80646; }; + 55620C4E4133FDC86B8704B1 = {isa = PBXBuildFile; fileRef = 9494DEB767CC845A1AD9510D; }; + 147AAD8BE104CA60D82AB311 = {isa = PBXBuildFile; fileRef = 73C765531A971ECA3611E9B1; }; + 75F224C245C8528EBDD957E3 = {isa = PBXBuildFile; fileRef = C4E50C6E6E839D2650538DA2; }; + 860CA02753C336CA6F388F70 = {isa = PBXBuildFile; fileRef = E38A058E16C077B756252A67; }; + 8FB76DEF9AAE508E909C56A3 = {isa = PBXBuildFile; fileRef = 8550A2CAE40095565F8C0AE7; }; + 58601BAE688B1B82AEEA70E8 = {isa = PBXBuildFile; fileRef = 5B02D5BBF8ED6F741B8A6736; }; + 5645E67DE7D9CAD8BB6E1D27 = {isa = PBXBuildFile; fileRef = 35D05B99E462B2B228EC8302; }; + 3170A9354DC65058A387FB9E = {isa = PBXBuildFile; fileRef = 76FBC8DE4524D88CD71A2461; }; + 22E67EE159B5A17C3433A056 = {isa = PBXBuildFile; fileRef = CC1412BBC06218A16A24D5A4; }; + 0EEC72FF172987931C7728A1 = {isa = PBXBuildFile; fileRef = 1237FB4903D3E53902BC2D21; }; + 2FDD63BBA0DF00FDCED31F8B = {isa = PBXBuildFile; fileRef = 4E84E303FA33538296AF0138; }; + 7F32243EF13DE189D0F72284 = {isa = PBXBuildFile; fileRef = BAAE01307738C55C74FB97E2; }; + ABC5C43FA079E18445EDE7EF = {isa = PBXBuildFile; fileRef = C763871EA0E8B2D27A2280D3; }; + 929CAC97D84394062CB24A6F = {isa = PBXBuildFile; fileRef = 9725B565F1BCF0BCF813CA46; }; + B12110B9A5093DE175B084AC = {isa = PBXBuildFile; fileRef = D897B337AD0AA5743A5AE97F; }; + 44AB7F89A1DFC43E3E52F3BA = {isa = PBXBuildFile; fileRef = CF8F7AC0FFFAB9596D5F8D0B; }; + 4C6ED9D462C6AE62D7368626 = {isa = PBXBuildFile; fileRef = D1A9F502AE4D8860C5CF4A42; }; + BD5C77C4C98509A304E1BC43 = {isa = PBXBuildFile; fileRef = 627259D3BE9B73D8080025B4; }; + A1AFAFF71FE3089042177336 = {isa = PBXBuildFile; fileRef = AFB76927D90CA4C02CA006C2; }; + 08D820C1B47703D5C153D6F2 = {isa = PBXBuildFile; fileRef = 1D39E703487A686D0BA870E8; }; + 04F96ABC48723FFD9346F815 = {isa = PBXBuildFile; fileRef = 0F18417C406C01C6F3750011; }; + 02008353D342DBCDE2F8609B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = FIRFilterDemo.cpp; path = ../../Source/Demos/FIRFilterDemo.cpp; sourceTree = "SOURCE_ROOT"; }; + 02D5C32B097EB318955BAD14 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ConvolutionDemo.cpp; path = ../../Source/Demos/ConvolutionDemo.cpp; sourceTree = "SOURCE_ROOT"; }; + 055A49508ABAEEB6B203913C = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = System/Library/Frameworks/DiscRecording.framework; sourceTree = SDKROOT; }; + 09466AA1FB1B2B54559499DA = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-App.plist"; path = "Info-App.plist"; sourceTree = "SOURCE_ROOT"; }; + 0AAE0DB1E291E8E839660B77 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; }; + 0D3E7AE6261F456BF8ED7336 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainComponent.h; path = ../../Source/MainComponent.h; sourceTree = "SOURCE_ROOT"; }; + 0F18417C406C01C6F3750011 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_extra.mm"; path = "../../JuceLibraryCode/include_juce_gui_extra.mm"; sourceTree = "SOURCE_ROOT"; }; + 1237FB4903D3E53902BC2D21 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_basics.mm"; path = "../../JuceLibraryCode/include_juce_audio_basics.mm"; sourceTree = "SOURCE_ROOT"; }; + 127F5D34AF2F6FA4D1B244DC = {isa = PBXFileReference; lastKnownFileType = file.nib; name = RecentFilesMenuTemplate.nib; path = RecentFilesMenuTemplate.nib; sourceTree = "SOURCE_ROOT"; }; + 173D0DF09B3C17C1F12DC07F = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_core"; path = "../../../../modules/juce_core"; sourceTree = "SOURCE_ROOT"; }; + 1BFAE533720CF64A048D7594 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + 1D39E703487A686D0BA870E8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_basics.mm"; path = "../../JuceLibraryCode/include_juce_gui_basics.mm"; sourceTree = "SOURCE_ROOT"; }; + 1ED0F76740852AAD1E10E589 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; + 2007BEE2849103E59355B196 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_basics"; path = "../../../../modules/juce_audio_basics"; sourceTree = "SOURCE_ROOT"; }; + 203EB56F2769104DA12C0F26 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; }; + 35D05B99E462B2B228EC8302 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Source/Main.cpp; sourceTree = "SOURCE_ROOT"; }; + 36DC4FECDB1527A540528928 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + 3A4131AFD624A518DA9C7720 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_formats"; path = "../../../../modules/juce_audio_formats"; sourceTree = "SOURCE_ROOT"; }; + 433721BDA52563DA31C80646 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = GainDemo.cpp; path = ../../Source/Demos/GainDemo.cpp; sourceTree = "SOURCE_ROOT"; }; + 4B446DCE80088D0F1B98AB2A = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_dsp"; path = "../../../../modules/juce_dsp"; sourceTree = "SOURCE_ROOT"; }; + 4DD7BCF876946C02E151FA8E = {isa = PBXFileReference; lastKnownFileType = file.wav; name = "cassette_recorder.wav"; path = "../../Resources/cassette_recorder.wav"; sourceTree = "SOURCE_ROOT"; }; + 4E84E303FA33538296AF0138 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_devices.mm"; path = "../../JuceLibraryCode/include_juce_audio_devices.mm"; sourceTree = "SOURCE_ROOT"; }; + 58DFF90DB01544BBA2258FAB = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; + 5B02D5BBF8ED6F741B8A6736 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = WaveShaperTanhDemo.cpp; path = ../../Source/Demos/WaveShaperTanhDemo.cpp; sourceTree = "SOURCE_ROOT"; }; + 5F1E4007B8CA56A36AE2A9A8 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; }; + 627259D3BE9B73D8080025B4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_events.mm"; path = "../../JuceLibraryCode/include_juce_events.mm"; sourceTree = "SOURCE_ROOT"; }; + 63F62DCD7D32846A5E6AD643 = {isa = PBXFileReference; lastKnownFileType = file.wav; name = "guitar_amp.wav"; path = "../../Resources/guitar_amp.wav"; sourceTree = "SOURCE_ROOT"; }; + 671451B8F3E7EF14B54E4C85 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_data_structures"; path = "../../../../modules/juce_data_structures"; sourceTree = "SOURCE_ROOT"; }; + 6EE1CBD2012184BE1AC65B20 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BinaryData.h; path = ../../JuceLibraryCode/BinaryData.h; sourceTree = "SOURCE_ROOT"; }; + 73C765531A971ECA3611E9B1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = OscillatorDemo.cpp; path = ../../Source/Demos/OscillatorDemo.cpp; sourceTree = "SOURCE_ROOT"; }; + 7499E560C79D2899AD1F7EBE = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 76FBC8DE4524D88CD71A2461 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = MainComponent.cpp; path = ../../Source/MainComponent.cpp; sourceTree = "SOURCE_ROOT"; }; + 8550A2CAE40095565F8C0AE7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = StateVariableFilterDemo.cpp; path = ../../Source/Demos/StateVariableFilterDemo.cpp; sourceTree = "SOURCE_ROOT"; }; + 89F22EF7FA61689A853B075C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_events"; path = "../../../../modules/juce_events"; sourceTree = "SOURCE_ROOT"; }; + 90DFC174390DB5F49FFDB1C3 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; + 9201659302FE90E5E72B8BE1 = {isa = PBXFileReference; lastKnownFileType = file.xml; name = EditorColourScheme.xml; path = ../../Source/EditorColourScheme.xml; sourceTree = "SOURCE_ROOT"; }; + 9494DEB767CC845A1AD9510D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = IIRFilterDemo.cpp; path = ../../Source/Demos/IIRFilterDemo.cpp; sourceTree = "SOURCE_ROOT"; }; + 9725B565F1BCF0BCF813CA46 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_utils.mm"; path = "../../JuceLibraryCode/include_juce_audio_utils.mm"; sourceTree = "SOURCE_ROOT"; }; + 98A1493C2F510FE4F7BADE6C = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_extra"; path = "../../../../modules/juce_gui_extra"; sourceTree = "SOURCE_ROOT"; }; + ACF39BD78F6577BCE4870008 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Main.h; path = ../../Source/Main.h; sourceTree = "SOURCE_ROOT"; }; + AFB76927D90CA4C02CA006C2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; }; + B54268B27C98348D707C2F96 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_processors"; path = "../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; }; + BAAE01307738C55C74FB97E2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_formats.mm"; path = "../../JuceLibraryCode/include_juce_audio_formats.mm"; sourceTree = "SOURCE_ROOT"; }; + BBA410B4EF48CA0C81333CDA = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_utils"; path = "../../../../modules/juce_audio_utils"; sourceTree = "SOURCE_ROOT"; }; + C4E50C6E6E839D2650538DA2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = OverdriveDemo.cpp; path = ../../Source/Demos/OverdriveDemo.cpp; sourceTree = "SOURCE_ROOT"; }; + C53B7CE0E5FAE95E9C5B6933 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_basics"; path = "../../../../modules/juce_gui_basics"; sourceTree = "SOURCE_ROOT"; }; + C763871EA0E8B2D27A2280D3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_processors.mm"; path = "../../JuceLibraryCode/include_juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; }; + CC1412BBC06218A16A24D5A4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = BinaryData.cpp; path = ../../JuceLibraryCode/BinaryData.cpp; sourceTree = "SOURCE_ROOT"; }; + CF8F7AC0FFFAB9596D5F8D0B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_data_structures.mm"; path = "../../JuceLibraryCode/include_juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; }; + D1A9F502AE4D8860C5CF4A42 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_dsp.mm"; path = "../../JuceLibraryCode/include_juce_dsp.mm"; sourceTree = "SOURCE_ROOT"; }; + D897B337AD0AA5743A5AE97F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_core.mm"; path = "../../JuceLibraryCode/include_juce_core.mm"; sourceTree = "SOURCE_ROOT"; }; + D99979809CF3183E9C3EC100 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + E38A058E16C077B756252A67 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SIMDRegisterDemo.cpp; path = ../../Source/Demos/SIMDRegisterDemo.cpp; sourceTree = "SOURCE_ROOT"; }; + E65A292C57D74320DBADF3E2 = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DSPDemo.app; sourceTree = "BUILT_PRODUCTS_DIR"; }; + EB69A35DA0426F3E08421471 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DSPDemo.h; path = ../../Source/DSPDemo.h; sourceTree = "SOURCE_ROOT"; }; + F31891672A9861AD9B360E55 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_graphics"; path = "../../../../modules/juce_graphics"; sourceTree = "SOURCE_ROOT"; }; + F5F8A835861C4483A15017CD = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_devices"; path = "../../../../modules/juce_audio_devices"; sourceTree = "SOURCE_ROOT"; }; + FBB548A1A4C624BDB2212536 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; + 160A87BE152187F31E517F24 = {isa = PBXGroup; children = ( + 4DD7BCF876946C02E151FA8E, + 9201659302FE90E5E72B8BE1, + 63F62DCD7D32846A5E6AD643, ); name = Resources; sourceTree = ""; }; + DD4C2FA1894FB7738704E0E9 = {isa = PBXGroup; children = ( + 02D5C32B097EB318955BAD14, + 02008353D342DBCDE2F8609B, + 433721BDA52563DA31C80646, + 9494DEB767CC845A1AD9510D, + 73C765531A971ECA3611E9B1, + C4E50C6E6E839D2650538DA2, + E38A058E16C077B756252A67, + 8550A2CAE40095565F8C0AE7, + 5B02D5BBF8ED6F741B8A6736, ); name = Demos; sourceTree = ""; }; + 85DC2349B9F14ADA2668617A = {isa = PBXGroup; children = ( + 160A87BE152187F31E517F24, + DD4C2FA1894FB7738704E0E9, + EB69A35DA0426F3E08421471, + 35D05B99E462B2B228EC8302, + ACF39BD78F6577BCE4870008, + 76FBC8DE4524D88CD71A2461, + 0D3E7AE6261F456BF8ED7336, ); name = Source; sourceTree = ""; }; + 3F652360BD2B2419E340B88D = {isa = PBXGroup; children = ( + 85DC2349B9F14ADA2668617A, ); name = DSPDemo; sourceTree = ""; }; + 06C2216BF0064825FDFDA294 = {isa = PBXGroup; children = ( + 2007BEE2849103E59355B196, + F5F8A835861C4483A15017CD, + 3A4131AFD624A518DA9C7720, + B54268B27C98348D707C2F96, + BBA410B4EF48CA0C81333CDA, + 173D0DF09B3C17C1F12DC07F, + 671451B8F3E7EF14B54E4C85, + 4B446DCE80088D0F1B98AB2A, + 89F22EF7FA61689A853B075C, + F31891672A9861AD9B360E55, + C53B7CE0E5FAE95E9C5B6933, + 98A1493C2F510FE4F7BADE6C, ); name = "Juce Modules"; sourceTree = ""; }; + F5A65560641B925929FDA8EF = {isa = PBXGroup; children = ( + 203EB56F2769104DA12C0F26, + CC1412BBC06218A16A24D5A4, + 6EE1CBD2012184BE1AC65B20, + 1237FB4903D3E53902BC2D21, + 4E84E303FA33538296AF0138, + BAAE01307738C55C74FB97E2, + C763871EA0E8B2D27A2280D3, + 9725B565F1BCF0BCF813CA46, + D897B337AD0AA5743A5AE97F, + CF8F7AC0FFFAB9596D5F8D0B, + D1A9F502AE4D8860C5CF4A42, + 627259D3BE9B73D8080025B4, + AFB76927D90CA4C02CA006C2, + 1D39E703487A686D0BA870E8, + 0F18417C406C01C6F3750011, + 0AAE0DB1E291E8E839660B77, ); name = "Juce Library Code"; sourceTree = ""; }; + 728B8D1AF5E0A4CC87C837AE = {isa = PBXGroup; children = ( + 09466AA1FB1B2B54559499DA, + 127F5D34AF2F6FA4D1B244DC, ); name = Resources; sourceTree = ""; }; + B63B86F9F433095F2AC4ABA6 = {isa = PBXGroup; children = ( + 36DC4FECDB1527A540528928, + 1BFAE533720CF64A048D7594, + 58DFF90DB01544BBA2258FAB, + D99979809CF3183E9C3EC100, + 90DFC174390DB5F49FFDB1C3, + 5F1E4007B8CA56A36AE2A9A8, + 055A49508ABAEEB6B203913C, + 1ED0F76740852AAD1E10E589, + 7499E560C79D2899AD1F7EBE, + FBB548A1A4C624BDB2212536, ); name = Frameworks; sourceTree = ""; }; + B06D91A3358971D3BD4D83DF = {isa = PBXGroup; children = ( + E65A292C57D74320DBADF3E2, ); name = Products; sourceTree = ""; }; + 58576490CB5917F924F77F96 = {isa = PBXGroup; children = ( + 3F652360BD2B2419E340B88D, + 06C2216BF0064825FDFDA294, + F5A65560641B925929FDA8EF, + 728B8D1AF5E0A4CC87C837AE, + B63B86F9F433095F2AC4ABA6, + B06D91A3358971D3BD4D83DF, ); name = Source; sourceTree = ""; }; + 40ABF132098EAC342145CDE8 = {isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; + 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_MAC_F6D2F4CF=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", "$(inherited)"); + INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; + INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; + OTHER_CPLUSPLUSFLAGS = "-pedantic-errors -Wreorder -Wconstant-conversion -Wint-conversion -Woverloaded-virtual -Wuninitialized -Wunused-parameter -Wshorten-64-to-32 -Wstrict-aliasing -Wshadow -Wconversion -Wsign-compare -Wsign-conversion"; + PRODUCT_BUNDLE_IDENTIFIER = com.roli.DSPDemo; + SDKROOT_ppc = macosx10.5; + USE_HEADERMAP = NO; }; name = Debug; }; + 0BA7559B9A8E7D07DD66DBDE = {isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; + 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_MAC_F6D2F4CF=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", "$(inherited)"); + INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; + INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; + OTHER_CPLUSPLUSFLAGS = "-pedantic-errors -Wreorder -Wconstant-conversion -Wint-conversion -Woverloaded-virtual -Wuninitialized -Wunused-parameter -Wshorten-64-to-32 -Wstrict-aliasing -Wshadow -Wconversion -Wsign-compare -Wsign-conversion"; + PRODUCT_BUNDLE_IDENTIFIER = com.roli.DSPDemo; + SDKROOT_ppc = macosx10.5; + USE_HEADERMAP = NO; }; name = Release; }; + 09801068C2D3FD5A61F113BD = {isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = c11; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; + GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "DSPDemo"; + WARNING_CFLAGS = -Wreorder; + ZERO_LINK = NO; }; name = Debug; }; + 4FDDF0840945A67C7655214D = {isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = c11; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; + GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "DSPDemo"; + WARNING_CFLAGS = -Wreorder; + ZERO_LINK = NO; }; name = Release; }; + C3E80ACFE5F9FDDAB1E06E72 = {isa = PBXTargetDependency; target = F242499B02B0F20F4BC2A204; }; + EA0FBD36E6392D1EACC6E6D0 = {isa = XCConfigurationList; buildConfigurations = ( + 09801068C2D3FD5A61F113BD, + 4FDDF0840945A67C7655214D, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; + 39418CAC1E6EC80E233DC4FC = {isa = XCConfigurationList; buildConfigurations = ( + 40ABF132098EAC342145CDE8, + 0BA7559B9A8E7D07DD66DBDE, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; + BED42A90D1C7884760EE4C47 = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + DD7CEC23CAF513B19FE69354, ); runOnlyForDeploymentPostprocessing = 0; }; + 5EBE0F675FD5F7A6E27DDE6F = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 0997809708D0721BD5B82709, + 9762387BB6E55A9A677399FB, + C9B89B4E158A2C0878062438, + 55620C4E4133FDC86B8704B1, + 147AAD8BE104CA60D82AB311, + 75F224C245C8528EBDD957E3, + 860CA02753C336CA6F388F70, + 8FB76DEF9AAE508E909C56A3, + 58601BAE688B1B82AEEA70E8, + 5645E67DE7D9CAD8BB6E1D27, + 3170A9354DC65058A387FB9E, + 22E67EE159B5A17C3433A056, + 0EEC72FF172987931C7728A1, + 2FDD63BBA0DF00FDCED31F8B, + 7F32243EF13DE189D0F72284, + ABC5C43FA079E18445EDE7EF, + 929CAC97D84394062CB24A6F, + B12110B9A5093DE175B084AC, + 44AB7F89A1DFC43E3E52F3BA, + 4C6ED9D462C6AE62D7368626, + BD5C77C4C98509A304E1BC43, + A1AFAFF71FE3089042177336, + 08D820C1B47703D5C153D6F2, + 04F96ABC48723FFD9346F815, ); runOnlyForDeploymentPostprocessing = 0; }; + F866D841CA0AD769D1DD706C = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 79F4B2BF7879680EBB5B7DBE, + A68C0210E63579CE6AC237AE, + D63164D4982A647B45B1B35A, + 18D32BCB58F415AB8B915AA6, + 1FE90DECD30F20F4BD4194E5, + 1751CA561F0C689757B48499, + 67A0FE9B4C958E755BC59CB6, + 2007C473FC7B310FAC9120F4, + DDFB4E2EE2BA04B969F91CD8, + 74DA94C93F0B9F6F8D839F90, ); runOnlyForDeploymentPostprocessing = 0; }; + F242499B02B0F20F4BC2A204 = {isa = PBXNativeTarget; buildConfigurationList = 39418CAC1E6EC80E233DC4FC; buildPhases = ( + BED42A90D1C7884760EE4C47, + 5EBE0F675FD5F7A6E27DDE6F, + F866D841CA0AD769D1DD706C, ); buildRules = ( ); dependencies = ( ); name = "DSPDemo - App"; productName = DSPDemo; productReference = E65A292C57D74320DBADF3E2; productType = "com.apple.product-type.application"; }; + C80D6F4D84A23D8254630291 = {isa = PBXProject; buildConfigurationList = EA0FBD36E6392D1EACC6E6D0; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { F242499B02B0F20F4BC2A204 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 58576490CB5917F924F77F96; projectDirPath = ""; projectRoot = ""; targets = (F242499B02B0F20F4BC2A204); }; + }; + rootObject = C80D6F4D84A23D8254630291; +} diff --git a/examples/DSPDemo/Builds/MacOSX/Info-App.plist b/examples/DSPDemo/Builds/MacOSX/Info-App.plist new file mode 100644 index 0000000000..842b06a635 --- /dev/null +++ b/examples/DSPDemo/Builds/MacOSX/Info-App.plist @@ -0,0 +1,29 @@ + + + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleName + DSPDemo + CFBundleDisplayName + DSPDemo + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0.0 + CFBundleVersion + 1.0.0 + NSHumanReadableCopyright + ROLI Ltd. + NSHighResolutionCapable + + + diff --git a/examples/DSPDemo/Builds/MacOSX/RecentFilesMenuTemplate.nib b/examples/DSPDemo/Builds/MacOSX/RecentFilesMenuTemplate.nib new file mode 100644 index 0000000000..cec7f7c72b Binary files /dev/null and b/examples/DSPDemo/Builds/MacOSX/RecentFilesMenuTemplate.nib differ diff --git a/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo.sln b/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo.sln new file mode 100644 index 0000000000..b5cc4635f0 --- /dev/null +++ b/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo.sln @@ -0,0 +1,20 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2017 + +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DSPDemo - App", "DSPDemo_App.vcxproj", "{81B1BE31-AC38-E79E-A3F8-F3100611ECD3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {81B1BE31-AC38-E79E-A3F8-F3100611ECD3}.Debug|x64.ActiveCfg = Debug|x64 + {81B1BE31-AC38-E79E-A3F8-F3100611ECD3}.Debug|x64.Build.0 = Debug|x64 + {81B1BE31-AC38-E79E-A3F8-F3100611ECD3}.Release|x64.ActiveCfg = Release|x64 + {81B1BE31-AC38-E79E-A3F8-F3100611ECD3}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo_App.vcxproj b/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo_App.vcxproj new file mode 100644 index 0000000000..bde7df241e --- /dev/null +++ b/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo_App.vcxproj @@ -0,0 +1,2371 @@ + + + + + + Debug + x64 + + + Release + x64 + + + + {81B1BE31-AC38-E79E-A3F8-F3100611ECD3} + v141 + 10.0.15063.0 + + + + Application + false + v141 + v141 + 10.0.15063.0 + + + Application + false + true + v141 + v141 + 10.0.15063.0 + + + + + + + + v141 + 10.0.15063.0 + + + <_ProjectFileVersion>10.0.30319.1 + .exe + $(SolutionDir)$(Platform)\$(Configuration)\App\ + $(Platform)\$(Configuration)\App\ + DSPDemo + true + $(SolutionDir)$(Platform)\$(Configuration)\App\ + $(Platform)\$(Configuration)\App\ + DSPDemo + true + v141 + 10.0.15063.0 + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Disabled + ProgramDatabase + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=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;%(PreprocessorDefinitions) + MultiThreadedDebug + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + stdcpp14 + + + _DEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\DSPDemo.exe + true + libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) + true + $(IntDir)\DSPDemo.pdb + Windows + true + + + true + $(IntDir)\DSPDemo.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Full + ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=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;%(PreprocessorDefinitions) + MultiThreaded + true + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + stdcpp14 + + + NDEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\DSPDemo.exe + true + %(IgnoreSpecificDefaultLibraries) + false + $(IntDir)\DSPDemo.pdb + Windows + true + true + true + + + true + $(IntDir)\DSPDemo.bsc + + + + + + + + + + + + + + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo_App.vcxproj.filters b/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo_App.vcxproj.filters new file mode 100644 index 0000000000..463cba9c85 --- /dev/null +++ b/examples/DSPDemo/Builds/VisualStudio2017/DSPDemo_App.vcxproj.filters @@ -0,0 +1,3971 @@ + + + + + + {6E87B141-F5A2-7EC7-13E0-7D063D2C466A} + + + {8F075350-0D61-7DD2-38A4-2FD8F17A4E75} + + + {8326FF16-2AF2-A979-836B-91F96AA889BE} + + + {41377A6E-A475-CF34-9C12-DEAF77A125AF} + + + {52045BA8-DF89-5074-688D-A0977F25B09C} + + + {A33A1E1D-AC2C-6382-8681-48B0FC374C60} + + + {11A75801-B027-40BD-4993-023023ACCBF7} + + + {3FD908F5-98C8-9A61-FC03-0BAF8913CBB0} + + + {8C868E51-156D-A916-047C-0D9EA1393675} + + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + + + {EF2CAB40-0432-429B-C517-86ADF136BB8A} + + + {8F7EC212-3168-AD81-5064-C45BA838C408} + + + {3247ED97-A75A-F50B-8CCC-46155E895806} + + + {9D270B31-2425-8FDB-84A4-6A2288FF5B2F} + + + {0F766DD4-A277-CB86-5647-42498C8B41E1} + + + {01603E05-423B-5FC3-1BEE-E15ED33B5688} + + + {D64942B4-6984-3623-3347-45D472AE1C61} + + + {CACD7B50-4DB3-76AF-A6E8-90DF94F8F594} + + + {C9640E58-4493-7EEC-6F58-603AD184956E} + + + {D8EE4AD1-61E3-21C2-6640-6684F4CF77DC} + + + {FEF33480-117C-23A6-D12C-7C299F26C9DB} + + + {9DFA63C1-4EE6-1FAB-D563-41FCF84988F2} + + + {AB8611DF-8161-A9DF-DBAD-77A87DE37331} + + + {25C8FB00-334A-6E0F-F203-E988758B708A} + + + {94027CB9-8162-7431-2E01-B710C7CAE620} + + + {450B8177-6F41-B902-761B-BF68D55102DA} + + + {B8087E92-19F7-552F-9E85-16153D7191B0} + + + {B7221885-1731-611D-FDD9-EA968FA8D858} + + + {DC58E9B7-2710-F45C-B718-75EACDF53F47} + + + {9971A63C-5B75-039F-95C2-7474D7DB16B0} + + + {76391436-F92A-7602-4073-E446B5FAA859} + + + {0CD9E281-DDD0-91EC-6F77-EA9D9D5E0E1A} + + + {2FE25F4C-E9DF-04A5-CAED-6E4B7CF28C59} + + + {40C5CA7C-AEBB-05B1-11CE-AE41D87B5CCB} + + + {65CB28F8-0422-A8F3-9A17-959E12A1F8E2} + + + {20254EFE-6CBD-31A7-2119-92B1E0E0E311} + + + {70796D73-6D30-8A1B-4732-7C021E47C05A} + + + {77E2C34E-A4D6-EDB5-A107-7CB3CEF0E8EF} + + + {EB8DD942-E2CB-869F-D381-E02A65BA790B} + + + {8F91DFC0-7A71-1BA8-D8D9-6B4CF49151A4} + + + {0B0E7392-324B-088C-FBEB-5FE999D61782} + + + {C396369E-8C55-88E9-5D19-5D3772B773D3} + + + {8167E753-09C7-5D1C-EF2B-32D297557443} + + + {B48C883A-8483-AF6D-808C-1D9A749048D8} + + + {AEDCB7F7-7A36-5392-8E9A-715F5BDE35CB} + + + {B63F69FD-8A40-8E1E-E7ED-419B8DC1C12B} + + + {0608ADE9-66EF-1A19-6D57-12D07F76EB53} + + + {C8F726FC-26BF-2E6B-4ED5-55A7FE316D7D} + + + {1B67A7C0-86E0-53F6-6AE3-7AD93B8DC95B} + + + {C294408A-2005-2E9E-7AC0-8D3ABE8AC175} + + + {476C69CE-0B67-6B85-E888-45D91E37A29E} + + + {7C5AD030-F8CC-6E85-0AF6-196B3ED40AC6} + + + {FA891A58-9FDA-9651-43C4-714A19B5D08D} + + + {C79A4D23-7866-8F3E-AC39-BD68C52A9259} + + + {DA0DC4AC-B511-A2D4-199A-C93454D6F114} + + + {91929C6F-7902-B87D-5260-2F6CBF8ACD93} + + + {4634FFAE-9586-A970-364C-4FDDA635F99F} + + + {244D11B0-2D68-3C08-A0B7-0D12469BC3AA} + + + {05F3DB8A-499C-6ACA-282F-5BF8455A0DE1} + + + {C9F6D785-BF78-5AA1-B479-111C65397864} + + + {4927C7A1-9235-4AA1-93CD-B4E67E6F1E5F} + + + {F2B2F310-F30F-7166-42A9-9BF9C230DA78} + + + {585D6A72-C5E7-BCF1-A168-63A40C6B6313} + + + {F03654BC-34D8-F975-BEA3-750CC2783D23} + + + {95CA1506-2B94-0DEE-0C8D-85EDEBBC4E88} + + + {358AEA11-3F96-36AE-7B32-71373B5C5396} + + + {3DF036EA-3B80-553B-2494-3AAC835CAE75} + + + {1988E68A-A964-64CA-0E0C-26FF9BC5176C} + + + {928D8FCC-5E00-174B-6538-93E8D75AB396} + + + {5E662F89-AD8B-D0D6-9BB6-D42DCFC3C38B} + + + {D272EE9B-CA6A-186E-1C62-0DF893C7A34E} + + + {5C139EFD-6DD2-83E0-C013-24CC03428D81} + + + {03DBA258-F2EF-EC1D-5A86-2CEE402FE021} + + + {8EE92EFE-883B-A2FA-161D-94AC912BF1DE} + + + {16B24975-5792-03FC-64A8-D04E59D077E1} + + + {362ADBDB-6FDF-5BD4-9F06-0A0270832F67} + + + {B098BC87-3298-7E6B-12DC-D26C09CDCAED} + + + {6322B88F-984A-C3CD-6263-38D7AA49B6EC} + + + {6172822C-01A5-E824-12DA-FA43FA934D35} + + + {73C1E759-AD90-59A3-942E-2D10FAA29107} + + + {41DC3BE3-D629-8A17-C32B-F5B4008B5FAD} + + + {F2A38F45-6E55-E147-2E52-64A89FDD9D59} + + + {4926B3FF-E797-F586-857A-69D9703FA2D1} + + + {EBC65085-3AD5-280C-1A29-2B1683643AA1} + + + {E37D25CD-4350-4614-055B-7ABC55E67895} + + + {26ECA2AF-7368-C6CC-58EF-017ECD1862D0} + + + {C1A1A236-AB01-173E-96C3-0706BFF93B1E} + + + {F27C42E6-CF39-9B72-8CD7-C29CA4ADD43B} + + + {12D20EC8-139C-C2B1-1A66-AC436C48C0A7} + + + {69E1179D-76EC-26DC-C3E6-6602ED26D783} + + + {413F481F-075C-2958-115C-D8268682FCB7} + + + {FFC6E1CC-C772-75E6-5087-FB5D4E016799} + + + {1182303F-ECA3-166D-AC0C-92C5E762CB93} + + + {EE1AE8C3-0908-8F53-A4E5-D930C7C97C26} + + + {61712B09-5783-ADFA-2001-5A0C3D7764EB} + + + {C3B2EB8A-1A2F-306F-AA78-3E9D1593788B} + + + {46535B56-3737-2BE8-E3A0-571BCBEB2DA4} + + + {2CB59E7C-D0E4-7D27-2ACF-C7ABADEE936D} + + + {5A0AA36E-3957-E413-14C6-31CBE15271DF} + + + {5FDBD6B1-9BBD-392F-4DA5-FEA40A9370C4} + + + {A92719C7-70BE-57C4-CE9E-A9BC9DFEB757} + + + {E980FADB-6E3F-B93C-DE02-CE4271C9BA93} + + + {F408DCA2-D5E2-0A3A-A064-A1D045889BC1} + + + {7BCEAB87-62FD-0327-EB5D-679E54EDB9B1} + + + {C2B9505B-27B4-F650-12BD-F477D4BBCBAA} + + + {796B7886-44A7-34CC-9B95-BF4FB2C7B6F4} + + + {8A80BA78-D3A8-C0F8-7FFD-61AA028CE852} + + + {7A53E6F1-1343-33B8-4CA8-1D7B714A0E76} + + + {D7E3D10F-3ED8-DFC5-6DB3-E4ACBF8678FB} + + + {75F1F352-251A-75E0-D941-8431588F5C1E} + + + {DB6E3D09-66DA-12DA-BAE8-A5BFFA7A14AC} + + + {8E43579F-C185-266D-DD67-F8B95BD80F2F} + + + {C60A6FCA-9462-922E-AD8D-69F10C9049AF} + + + {D56498EE-E354-1F00-5EEE-8CF7944BEAFB} + + + {61B2920C-494D-D8CB-C0C7-5DBF3D76D164} + + + {66C9B809-8739-A217-C78D-A15D6089B8E3} + + + {C413328B-5D81-89EE-F4F3-75752E700DE4} + + + {8EC9572F-3CCA-E930-74B6-CB6139DE0E17} + + + {422C46B7-0467-2DB0-BF3C-16DFCAFD69AC} + + + {8B4D1BAA-6DB4-CAEC-A0FA-271F354D5C61} + + + + + DSPDemo\Source\Demos + + + DSPDemo\Source\Demos + + + DSPDemo\Source\Demos + + + DSPDemo\Source\Demos + + + DSPDemo\Source\Demos + + + DSPDemo\Source\Demos + + + DSPDemo\Source\Demos + + + DSPDemo\Source\Demos + + + DSPDemo\Source\Demos + + + DSPDemo\Source + + + DSPDemo\Source + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\synthesisers + + + Juce Modules\juce_audio_basics + + + Juce Modules\juce_audio_basics + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\sources + + + Juce Modules\juce_audio_devices\sources + + + Juce Modules\juce_audio_devices + + + Juce Modules\juce_audio_devices + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\sampler + + + Juce Modules\juce_audio_formats + + + Juce Modules\juce_audio_formats + + + Juce Modules\juce_audio_processors\format + + + Juce Modules\juce_audio_processors\format + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors + + + Juce Modules\juce_audio_processors + + + Juce Modules\juce_audio_utils\audio_cd + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils + + + Juce Modules\juce_audio_utils + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\javascript + + + Juce Modules\juce_core\javascript + + + Juce Modules\juce_core\logging + + + Juce Modules\juce_core\logging + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\unit_tests + + + Juce Modules\juce_core\xml + + + Juce Modules\juce_core\xml + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core + + + Juce Modules\juce_core + + + Juce Modules\juce_data_structures\app_properties + + + Juce Modules\juce_data_structures\app_properties + + + Juce Modules\juce_data_structures\undomanager + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures + + + Juce Modules\juce_data_structures + + + Juce Modules\juce_dsp\containers + + + Juce Modules\juce_dsp\filter_design + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp + + + Juce Modules\juce_dsp + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\timers + + + Juce Modules\juce_events\timers + + + Juce Modules\juce_events + + + Juce Modules\juce_events + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats + + + Juce Modules\juce_graphics\image_formats + + + Juce Modules\juce_graphics\image_formats + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\placement + + + Juce Modules\juce_graphics + + + Juce Modules\juce_graphics + + + Juce Modules\juce_gui_basics\application + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics + + + Juce Modules\juce_gui_basics + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\documents + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra + + + Juce Modules\juce_gui_extra + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + + + DSPDemo\Source + + + DSPDemo\Source + + + DSPDemo\Source + + + Juce Modules\juce_audio_basics\audio_play_head + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\buffers + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\effects + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\midi + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\mpe + + + Juce Modules\juce_audio_basics\native + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\sources + + + Juce Modules\juce_audio_basics\synthesisers + + + Juce Modules\juce_audio_basics + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\audio_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\midi_io + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\native + + + Juce Modules\juce_audio_devices\sources + + + Juce Modules\juce_audio_devices\sources + + + Juce Modules\juce_audio_devices + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\private + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected + + + Juce Modules\juce_audio_formats\codecs\flac\libFLAC\include\protected + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\coupled + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\floor + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\books\uncoupled + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib\modes + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.2\lib + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\codecs + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\format + + + Juce Modules\juce_audio_formats\sampler + + + Juce Modules\juce_audio_formats + + + Juce Modules\juce_audio_processors\format + + + Juce Modules\juce_audio_processors\format + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\format_types + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\processors + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\scanning + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors\utilities + + + Juce Modules\juce_audio_processors + + + Juce Modules\juce_audio_utils\audio_cd + + + Juce Modules\juce_audio_utils\audio_cd + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\containers + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\files + + + Juce Modules\juce_core\javascript + + + Juce Modules\juce_core\javascript + + + Juce Modules\juce_core\logging + + + Juce Modules\juce_core\logging + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\maths + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\memory + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\misc + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\native + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\network + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\streams + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\system + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\text + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\threads + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\time + + + Juce Modules\juce_core\unit_tests + + + Juce Modules\juce_core\xml + + + Juce Modules\juce_core\xml + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip\zlib + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core\zip + + + Juce Modules\juce_core + + + Juce Modules\juce_data_structures\app_properties + + + Juce Modules\juce_data_structures\app_properties + + + Juce Modules\juce_data_structures\undomanager + + + Juce Modules\juce_data_structures\undomanager + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures\values + + + Juce Modules\juce_data_structures + + + Juce Modules\juce_dsp\containers + + + Juce Modules\juce_dsp\containers + + + Juce Modules\juce_dsp\filter_design + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\broadcasters + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\interprocess + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\messages + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\native + + + Juce Modules\juce_events\timers + + + Juce Modules\juce_events\timers + + + Juce Modules\juce_events + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\colour + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\contexts + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\effects + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\fonts + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\geometry + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\images + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\native + + + Juce Modules\juce_graphics\placement + + + Juce Modules\juce_graphics\placement + + + Juce Modules\juce_graphics + + + Juce Modules\juce_gui_basics\application + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\buttons + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\commands + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\components + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\drawables + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\filebrowser + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\keyboard + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\layout + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\lookandfeel + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\menus + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\misc + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\mouse + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\native + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\positioning + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\properties + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\widgets + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics\windows + + + Juce Modules\juce_gui_basics + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\code_editor + + + Juce Modules\juce_gui_extra\documents + + + Juce Modules\juce_gui_extra\embedding + + + Juce Modules\juce_gui_extra\embedding + + + Juce Modules\juce_gui_extra\embedding + + + Juce Modules\juce_gui_extra\embedding + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\misc + + + Juce Modules\juce_gui_extra\native + + + Juce Modules\juce_gui_extra + + + Juce Library Code + + + Juce Library Code + + + Juce Library Code + + + + + DSPDemo\Source\Resources + + + DSPDemo\Source\Resources + + + DSPDemo\Source\Resources + + + Juce Modules\juce_audio_formats\codecs\flac + + + Juce Modules\juce_audio_formats\codecs\oggvorbis + + + Juce Modules\juce_graphics\image_formats\jpglib + + + Juce Modules\juce_graphics\image_formats\pnglib + + + + + Juce Library Code + + + diff --git a/examples/DSPDemo/Builds/VisualStudio2017/resources.rc b/examples/DSPDemo/Builds/VisualStudio2017/resources.rc new file mode 100644 index 0000000000..f7a8f1ad71 --- /dev/null +++ b/examples/DSPDemo/Builds/VisualStudio2017/resources.rc @@ -0,0 +1,30 @@ +#ifdef JUCE_USER_DEFINED_RC_FILE + #include JUCE_USER_DEFINED_RC_FILE +#else + +#undef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#include + +VS_VERSION_INFO VERSIONINFO +FILEVERSION 1,0,0,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "ROLI Ltd.\0" + VALUE "FileDescription", "DSPDemo\0" + VALUE "FileVersion", "1.0.0\0" + VALUE "ProductName", "DSPDemo\0" + VALUE "ProductVersion", "1.0.0\0" + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif diff --git a/examples/DSPDemo/DSPDemo.jucer b/examples/DSPDemo/DSPDemo.jucer new file mode 100644 index 0000000000..9c3aba3625 --- /dev/null +++ b/examples/DSPDemo/DSPDemo.jucer @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/DSPDemo/JuceLibraryCode/AppConfig.h b/examples/DSPDemo/JuceLibraryCode/AppConfig.h new file mode 100644 index 0000000000..877ee18bfd --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/AppConfig.h @@ -0,0 +1,258 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + + There's a section below where you can add your own custom code safely, and the + Projucer will preserve the contents of that block, but the best way to change + any of these definitions is by using the Projucer's project settings. + + Any commented-out settings will assume their default values. + +*/ + +#pragma once + +//============================================================================== +// [BEGIN_USER_CODE_SECTION] + +// (You can add your own code in this section, and the Projucer will not overwrite it) + +// [END_USER_CODE_SECTION] + +/* + ============================================================================== + + In accordance with the terms of the JUCE 5 End-Use License Agreement, the + JUCE Code in SECTION A cannot be removed, changed or otherwise rendered + ineffective unless you have a JUCE Indie or Pro license, or are using JUCE + under the GPL v3 license. + + End User License Agreement: www.juce.com/juce-5-licence + ============================================================================== +*/ + +// BEGIN SECTION A + +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 1 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 1 +#endif + + +// END SECTION A + +#define JUCE_USE_DARK_SPLASH_SCREEN 1 + +//============================================================================== +#define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 +#define JUCE_MODULE_AVAILABLE_juce_audio_devices 1 +#define JUCE_MODULE_AVAILABLE_juce_audio_formats 1 +#define JUCE_MODULE_AVAILABLE_juce_audio_processors 1 +#define JUCE_MODULE_AVAILABLE_juce_audio_utils 1 +#define JUCE_MODULE_AVAILABLE_juce_core 1 +#define JUCE_MODULE_AVAILABLE_juce_data_structures 1 +#define JUCE_MODULE_AVAILABLE_juce_dsp 1 +#define JUCE_MODULE_AVAILABLE_juce_events 1 +#define JUCE_MODULE_AVAILABLE_juce_graphics 1 +#define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 +#define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 + +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + #define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_dsp flags: + +#ifndef JUCE_ASSERTION_FIRFILTER + //#define JUCE_ASSERTION_FIRFILTER 1 +#endif + +#ifndef JUCE_DSP_USE_INTEL_MKL + //#define JUCE_DSP_USE_INTEL_MKL 1 +#endif + +#ifndef JUCE_DSP_USE_SHARED_FFTW + //#define JUCE_DSP_USE_SHARED_FFTW 1 +#endif + +#ifndef JUCE_DSP_USE_STATIC_FFTW + //#define JUCE_DSP_USE_STATIC_FFTW 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif +//============================================================================== +#ifndef JUCE_STANDALONE_APPLICATION + #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) + #define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone + #else + #define JUCE_STANDALONE_APPLICATION 1 + #endif +#endif diff --git a/examples/DSPDemo/JuceLibraryCode/BinaryData.cpp b/examples/DSPDemo/JuceLibraryCode/BinaryData.cpp new file mode 100644 index 0000000000..39f6f02ba4 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/BinaryData.cpp @@ -0,0 +1,2358 @@ +/* ==================================== JUCER_BINARY_RESOURCE ==================================== + + This is an auto-generated file: Any edits you make may be overwritten! + +*/ + +namespace BinaryData +{ + +//================== cassette_recorder.wav ================== +static const unsigned char temp_binary_data_0[] = +{ 82,73,70,70,6,148,0,0,87,65,86,69,102,109,116,32,16,0,0,0,1,0,1,0,68,172,0,0,136,88,1,0,2,0,16,0,106,117,110,107,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,97,116,97,166,147,0, +0,0,0,254,255,255,255,247,255,1,0,245,255,2,0,235,255,254,255,240,255,24,0,18,0,38,0,254,255,190,252,204,252,200,252,107,253,11,252,41,251,178,251,25,255,143,255,27,1,248,6,177,7,210,7,89,9,156,11,232,9,38,8,8,8,219,6,233,2,42,255,249,251,9,250,154,249, +177,248,51,248,103,249,73,250,232,251,68,253,33,0,48,3,14,6,114,6,117,6,193,7,185,7,166,4,160,0,68,254,104,251,172,249,41,249,134,248,129,248,243,249,175,251,90,252,168,253,178,255,189,0,236,1,141,1,203,255,110,254,5,254,97,253,239,252,221,251,80,250, +201,250,110,252,244,252,221,253,92,255,178,0,31,2,78,2,85,2,19,2,230,2,164,3,175,2,237,1,254,0,21,0,125,255,63,255,44,0,12,2,196,2,106,3,253,4,147,5,4,5,242,4,231,4,54,4,174,3,90,2,154,0,104,254,249,251,18,251,4,250,63,248,150,247,107,247,211,247,103, +249,3,251,206,252,130,255,164,1,214,3,139,5,214,5,202,5,197,5,46,5,32,4,43,2,3,255,127,251,65,249,166,248,78,248,81,248,6,249,16,250,94,251,59,253,176,255,228,2,196,5,105,8,153,10,170,11,27,12,19,12,222,10,230,8,50,6,70,3,52,1,128,254,5,252,41,251,253, +250,152,250,97,251,202,252,132,253,121,254,124,255,194,0,99,2,196,3,157,4,112,4,108,3,101,2,5,1,204,255,196,254,218,253,126,252,119,251,70,251,47,251,169,251,46,252,208,252,243,253,242,254,167,255,38,0,52,0,189,0,7,1,59,1,17,1,165,0,87,1,91,1,99,1,100, +1,175,0,151,0,184,255,193,254,217,254,168,255,234,0,251,1,134,2,99,3,109,4,48,4,25,3,15,2,174,0,22,255,183,253,98,252,199,251,213,251,105,251,72,251,77,252,5,254,64,255,234,255,27,1,121,1,67,1,239,0,134,0,25,0,123,255,149,254,229,253,119,253,122,252, +73,251,0,251,40,251,209,250,141,251,25,253,62,254,81,255,151,0,206,1,216,2,122,3,28,4,51,4,202,3,239,2,254,1,44,1,42,0,17,255,244,253,109,253,184,253,105,254,43,255,114,0,188,1,201,2,148,3,47,4,164,4,133,4,237,3,62,3,64,2,101,1,242,255,106,254,46,253, +3,252,245,250,203,250,87,251,197,251,171,252,189,253,223,254,20,0,119,1,127,2,33,3,160,3,212,3,66,3,56,2,30,1,41,0,43,255,10,254,27,253,10,253,86,253,198,253,82,254,48,255,14,0,168,0,86,1,118,1,153,1,221,1,237,1,45,2,117,2,125,2,128,2,140,2,117,2,15, +2,220,1,141,1,16,1,154,0,52,0,41,0,73,0,237,255,169,255,248,255,106,0,181,0,7,1,72,1,72,1,97,1,165,1,186,1,241,1,32,2,86,2,62,2,236,1,62,1,206,0,38,0,105,255,115,254,31,253,250,252,47,252,88,251,6,251,139,251,7,252,245,251,110,252,94,253,81,254,74,255, +152,255,214,255,76,0,38,0,248,255,39,0,48,0,68,0,42,0,247,255,170,255,15,255,166,254,147,254,188,254,153,254,107,254,167,254,248,254,100,255,228,255,87,0,174,0,45,1,146,1,200,1,15,2,56,2,73,2,156,1,59,1,87,0,153,255,249,254,191,254,176,254,81,254,241, +253,252,253,100,254,9,255,167,255,56,0,220,0,121,1,52,2,122,2,181,2,195,2,108,2,194,1,17,1,70,0,136,255,202,254,118,254,210,253,70,253,48,253,82,253,152,253,16,254,42,254,184,254,170,255,112,0,23,1,250,1,212,2,98,3,227,3,30,4,255,3,123,3,4,3,44,2,43, +1,67,0,177,255,79,255,46,255,237,254,157,254,1,255,141,255,251,255,67,0,137,0,202,0,194,0,181,0,130,0,45,0,220,255,30,255,22,254,106,253,238,252,170,252,160,252,232,252,10,253,49,253,203,253,158,254,96,255,8,0,166,0,255,0,26,1,35,1,29,1,0,1,184,0,65, +0,166,255,16,255,205,254,159,254,134,254,137,254,12,255,147,255,4,0,145,0,78,1,2,2,74,2,96,2,108,2,97,2,23,2,204,1,190,1,145,1,121,1,155,1,198,1,224,1,214,1,222,1,218,1,208,1,165,1,113,1,27,1,178,0,84,0,249,255,179,255,62,255,195,254,86,254,240,253,166, +253,109,253,102,253,166,253,235,253,58,254,174,254,7,255,111,255,210,255,10,0,250,255,211,255,150,255,40,255,179,254,116,254,63,254,21,254,71,254,122,254,172,254,242,254,85,255,190,255,34,0,121,0,237,0,84,1,149,1,202,1,224,1,219,1,179,1,116,1,38,1,213, +0,121,0,24,0,200,255,163,255,128,255,116,255,145,255,227,255,92,0,168,0,5,1,90,1,178,1,234,1,248,1,252,1,208,1,144,1,7,1,107,0,228,255,114,255,246,254,131,254,45,254,242,253,176,253,169,253,164,253,184,253,1,254,76,254,134,254,210,254,58,255,123,255, +181,255,238,255,50,0,81,0,64,0,8,0,224,255,200,255,187,255,143,255,136,255,147,255,145,255,188,255,233,255,23,0,71,0,136,0,178,0,214,0,21,1,61,1,90,1,94,1,93,1,75,1,52,1,17,1,247,0,198,0,145,0,112,0,74,0,48,0,24,0,9,0,230,255,210,255,209,255,241,255, +244,255,227,255,234,255,238,255,249,255,10,0,7,0,15,0,29,0,18,0,247,255,221,255,196,255,182,255,135,255,82,255,59,255,245,254,160,254,129,254,145,254,153,254,191,254,252,254,66,255,171,255,33,0,136,0,231,0,61,1,110,1,151,1,156,1,106,1,24,1,207,0,137, +0,23,0,182,255,108,255,51,255,2,255,239,254,0,255,32,255,97,255,176,255,37,0,152,0,0,1,91,1,177,1,243,1,3,2,0,2,229,1,180,1,102,1,9,1,168,0,59,0,206,255,129,255,50,255,225,254,160,254,112,254,93,254,110,254,134,254,158,254,186,254,218,254,249,254,44, +255,110,255,172,255,234,255,250,255,240,255,220,255,197,255,167,255,157,255,156,255,124,255,117,255,125,255,116,255,135,255,167,255,184,255,198,255,204,255,234,255,25,0,56,0,80,0,96,0,138,0,165,0,162,0,168,0,172,0,171,0,161,0,146,0,121,0,100,0,87,0,101, +0,127,0,152,0,163,0,181,0,218,0,239,0,236,0,209,0,197,0,173,0,135,0,111,0,100,0,82,0,40,0,248,255,219,255,185,255,139,255,104,255,69,255,53,255,54,255,58,255,75,255,98,255,117,255,148,255,191,255,235,255,1,0,12,0,3,0,243,255,226,255,197,255,180,255,156, +255,135,255,120,255,118,255,124,255,126,255,125,255,108,255,93,255,82,255,71,255,86,255,110,255,133,255,172,255,223,255,10,0,36,0,58,0,90,0,131,0,145,0,145,0,154,0,141,0,129,0,116,0,111,0,102,0,105,0,117,0,112,0,100,0,100,0,114,0,114,0,99,0,74,0,52,0, +43,0,46,0,40,0,23,0,1,0,250,255,243,255,246,255,242,255,235,255,228,255,222,255,218,255,209,255,213,255,229,255,247,255,254,255,1,0,251,255,238,255,221,255,215,255,211,255,194,255,163,255,155,255,164,255,178,255,199,255,233,255,1,0,252,255,245,255,1, +0,4,0,238,255,216,255,215,255,211,255,188,255,174,255,183,255,207,255,220,255,236,255,14,0,56,0,112,0,161,0,192,0,208,0,220,0,227,0,228,0,221,0,206,0,181,0,149,0,106,0,64,0,24,0,238,255,207,255,194,255,193,255,190,255,193,255,208,255,222,255,225,255, +227,255,239,255,241,255,231,255,225,255,220,255,215,255,214,255,220,255,229,255,236,255,245,255,253,255,1,0,254,255,244,255,220,255,192,255,165,255,137,255,120,255,100,255,82,255,81,255,93,255,104,255,116,255,138,255,175,255,203,255,222,255,251,255,37, +0,74,0,92,0,98,0,102,0,92,0,75,0,65,0,48,0,29,0,19,0,16,0,5,0,3,0,6,0,13,0,24,0,19,0,14,0,6,0,249,255,224,255,205,255,202,255,191,255,182,255,185,255,202,255,219,255,238,255,6,0,25,0,51,0,73,0,74,0,73,0,85,0,95,0,90,0,88,0,92,0,93,0,79,0,64,0,46,0,29, +0,17,0,5,0,247,255,235,255,237,255,233,255,223,255,219,255,227,255,230,255,223,255,221,255,226,255,235,255,243,255,244,255,246,255,245,255,241,255,238,255,232,255,222,255,210,255,199,255,192,255,186,255,185,255,189,255,198,255,203,255,216,255,228,255, +243,255,5,0,11,0,10,0,9,0,12,0,9,0,7,0,5,0,4,0,7,0,15,0,26,0,38,0,40,0,49,0,68,0,69,0,64,0,66,0,68,0,65,0,60,0,52,0,44,0,44,0,55,0,58,0,57,0,64,0,67,0,59,0,50,0,51,0,52,0,40,0,28,0,15,0,251,255,242,255,239,255,239,255,231,255,227,255,225,255,216,255, +212,255,220,255,227,255,219,255,215,255,221,255,221,255,217,255,221,255,229,255,238,255,238,255,236,255,241,255,248,255,252,255,250,255,247,255,243,255,238,255,229,255,220,255,213,255,203,255,190,255,168,255,150,255,147,255,152,255,152,255,153,255,158, +255,163,255,174,255,187,255,196,255,208,255,219,255,236,255,250,255,8,0,26,0,42,0,55,0,65,0,71,0,74,0,77,0,83,0,83,0,77,0,64,0,58,0,56,0,54,0,52,0,54,0,57,0,57,0,61,0,65,0,70,0,71,0,67,0,63,0,56,0,44,0,32,0,26,0,18,0,3,0,247,255,240,255,236,255,243,255, +252,255,254,255,4,0,14,0,23,0,27,0,38,0,51,0,56,0,52,0,47,0,45,0,35,0,17,0,0,0,242,255,225,255,205,255,194,255,191,255,200,255,208,255,214,255,226,255,241,255,1,0,15,0,18,0,14,0,6,0,248,255,232,255,218,255,206,255,194,255,185,255,174,255,171,255,170, +255,166,255,166,255,175,255,184,255,192,255,195,255,202,255,210,255,216,255,224,255,229,255,233,255,234,255,235,255,233,255,236,255,238,255,239,255,246,255,253,255,253,255,1,0,16,0,30,0,36,0,31,0,32,0,39,0,45,0,48,0,54,0,67,0,78,0,87,0,96,0,113,0,130, +0,132,0,127,0,120,0,107,0,95,0,81,0,58,0,36,0,18,0,0,0,238,255,224,255,216,255,214,255,213,255,217,255,222,255,225,255,229,255,228,255,226,255,225,255,222,255,218,255,210,255,196,255,184,255,180,255,177,255,172,255,167,255,166,255,167,255,171,255,178, +255,189,255,196,255,197,255,202,255,207,255,215,255,232,255,250,255,7,0,19,0,36,0,55,0,71,0,82,0,92,0,98,0,95,0,92,0,89,0,83,0,71,0,51,0,37,0,30,0,26,0,25,0,27,0,33,0,43,0,56,0,70,0,78,0,87,0,98,0,101,0,94,0,81,0,65,0,41,0,8,0,232,255,204,255,176,255, +151,255,134,255,127,255,128,255,137,255,154,255,164,255,173,255,188,255,206,255,220,255,224,255,225,255,224,255,225,255,226,255,225,255,221,255,222,255,223,255,229,255,239,255,249,255,3,0,15,0,26,0,35,0,44,0,57,0,68,0,72,0,71,0,70,0,69,0,69,0,67,0,64, +0,62,0,59,0,61,0,65,0,69,0,70,0,74,0,78,0,79,0,76,0,70,0,62,0,52,0,40,0,24,0,6,0,243,255,229,255,214,255,197,255,187,255,187,255,187,255,185,255,185,255,190,255,191,255,192,255,195,255,194,255,191,255,185,255,176,255,166,255,153,255,144,255,140,255,132, +255,126,255,126,255,132,255,141,255,150,255,161,255,176,255,191,255,205,255,217,255,230,255,246,255,255,255,5,0,5,0,1,0,0,0,2,0,4,0,2,0,6,0,15,0,23,0,32,0,47,0,65,0,79,0,91,0,101,0,111,0,119,0,120,0,122,0,126,0,126,0,117,0,108,0,102,0,97,0,89,0,77,0, +65,0,55,0,49,0,42,0,35,0,25,0,14,0,7,0,1,0,250,255,246,255,245,255,241,255,237,255,239,255,242,255,242,255,242,255,244,255,247,255,249,255,248,255,246,255,246,255,244,255,242,255,241,255,236,255,229,255,226,255,226,255,224,255,222,255,221,255,218,255, +214,255,214,255,215,255,216,255,219,255,225,255,231,255,236,255,242,255,248,255,1,0,4,0,4,0,3,0,1,0,1,0,255,255,249,255,238,255,230,255,226,255,225,255,226,255,228,255,229,255,233,255,241,255,253,255,14,0,31,0,43,0,52,0,58,0,62,0,66,0,68,0,66,0,59,0, +48,0,35,0,24,0,20,0,18,0,14,0,8,0,7,0,9,0,11,0,13,0,15,0,18,0,16,0,10,0,5,0,3,0,1,0,252,255,246,255,239,255,234,255,230,255,228,255,226,255,225,255,223,255,218,255,211,255,208,255,208,255,206,255,202,255,200,255,196,255,192,255,190,255,191,255,196,255, +200,255,202,255,208,255,215,255,216,255,218,255,221,255,222,255,224,255,223,255,222,255,222,255,224,255,226,255,228,255,231,255,238,255,249,255,4,0,12,0,18,0,26,0,36,0,42,0,45,0,46,0,45,0,44,0,43,0,42,0,41,0,40,0,40,0,38,0,35,0,36,0,42,0,48,0,55,0,54, +0,51,0,49,0,49,0,47,0,43,0,37,0,28,0,18,0,10,0,5,0,254,255,251,255,249,255,246,255,243,255,242,255,246,255,252,255,255,255,1,0,3,0,6,0,8,0,11,0,13,0,13,0,12,0,9,0,5,0,2,0,254,255,249,255,245,255,244,255,244,255,245,255,244,255,242,255,242,255,244,255, +244,255,243,255,244,255,245,255,245,255,244,255,246,255,249,255,249,255,246,255,247,255,250,255,253,255,254,255,252,255,250,255,247,255,244,255,242,255,242,255,241,255,240,255,240,255,239,255,241,255,247,255,253,255,2,0,7,0,12,0,17,0,20,0,24,0,30,0,32, +0,33,0,31,0,31,0,32,0,33,0,31,0,31,0,31,0,27,0,22,0,21,0,22,0,20,0,17,0,16,0,16,0,16,0,13,0,9,0,8,0,6,0,1,0,252,255,249,255,246,255,243,255,240,255,235,255,230,255,225,255,219,255,213,255,210,255,207,255,205,255,205,255,205,255,204,255,205,255,210,255, +215,255,218,255,221,255,223,255,225,255,227,255,230,255,234,255,235,255,234,255,234,255,236,255,238,255,240,255,240,255,239,255,240,255,243,255,246,255,249,255,251,255,253,255,253,255,252,255,254,255,0,0,0,0,254,255,251,255,251,255,251,255,254,255,2, +0,6,0,10,0,12,0,18,0,23,0,26,0,29,0,31,0,30,0,29,0,27,0,27,0,27,0,24,0,21,0,18,0,15,0,15,0,16,0,16,0,16,0,17,0,18,0,19,0,21,0,25,0,27,0,27,0,26,0,26,0,27,0,27,0,26,0,24,0,23,0,21,0,21,0,21,0,20,0,18,0,16,0,15,0,13,0,13,0,12,0,12,0,11,0,11,0,10,0,9,0, +8,0,7,0,4,0,253,255,248,255,245,255,241,255,237,255,234,255,232,255,231,255,232,255,236,255,241,255,246,255,249,255,253,255,255,255,0,0,0,0,0,0,254,255,250,255,244,255,236,255,232,255,229,255,229,255,227,255,225,255,222,255,221,255,226,255,232,255,238, +255,243,255,249,255,253,255,3,0,9,0,14,0,18,0,18,0,14,0,9,0,7,0,9,0,9,0,6,0,5,0,5,0,7,0,9,0,10,0,13,0,13,0,12,0,10,0,10,0,9,0,8,0,8,0,5,0,1,0,254,255,252,255,253,255,254,255,252,255,248,255,246,255,244,255,242,255,240,255,236,255,233,255,229,255,226, +255,225,255,224,255,222,255,221,255,220,255,219,255,220,255,223,255,226,255,229,255,232,255,235,255,238,255,242,255,248,255,252,255,0,0,3,0,4,0,6,0,7,0,7,0,7,0,7,0,7,0,8,0,9,0,11,0,11,0,11,0,12,0,15,0,16,0,15,0,14,0,13,0,11,0,10,0,9,0,9,0,8,0,5,0,3,0, +1,0,2,0,3,0,5,0,6,0,8,0,11,0,13,0,16,0,20,0,22,0,22,0,22,0,21,0,18,0,16,0,13,0,9,0,4,0,0,0,254,255,255,255,255,255,255,255,254,255,255,255,1,0,3,0,6,0,8,0,9,0,11,0,11,0,13,0,15,0,15,0,15,0,14,0,11,0,9,0,6,0,5,0,3,0,0,0,254,255,253,255,254,255,1,0,4,0, +5,0,6,0,8,0,11,0,13,0,15,0,17,0,17,0,15,0,12,0,12,0,12,0,10,0,8,0,4,0,255,255,252,255,250,255,249,255,248,255,245,255,242,255,239,255,236,255,236,255,235,255,232,255,229,255,227,255,225,255,223,255,223,255,224,255,224,255,223,255,223,255,223,255,223, +255,224,255,226,255,226,255,227,255,227,255,227,255,228,255,230,255,233,255,236,255,241,255,244,255,247,255,250,255,253,255,2,0,6,0,6,0,6,0,8,0,12,0,14,0,14,0,14,0,13,0,12,0,12,0,12,0,15,0,18,0,18,0,19,0,21,0,23,0,24,0,26,0,26,0,26,0,24,0,21,0,19,0,18, +0,15,0,11,0,8,0,7,0,5,0,2,0,0,0,255,255,253,255,251,255,249,255,247,255,245,255,242,255,240,255,240,255,242,255,242,255,242,255,242,255,243,255,246,255,250,255,255,255,2,0,4,0,4,0,4,0,6,0,7,0,7,0,5,0,3,0,2,0,2,0,2,0,3,0,3,0,3,0,2,0,2,0,3,0,4,0,5,0,5, +0,4,0,5,0,5,0,6,0,7,0,8,0,9,0,9,0,10,0,10,0,11,0,12,0,12,0,10,0,9,0,9,0,8,0,7,0,5,0,5,0,3,0,1,0,255,255,254,255,254,255,253,255,251,255,250,255,249,255,249,255,248,255,247,255,245,255,245,255,244,255,243,255,243,255,243,255,244,255,245,255,245,255,245, +255,244,255,245,255,247,255,247,255,246,255,246,255,246,255,246,255,247,255,247,255,246,255,247,255,248,255,248,255,247,255,247,255,248,255,249,255,249,255,250,255,251,255,252,255,253,255,253,255,255,255,1,0,3,0,5,0,6,0,5,0,5,0,6,0,8,0,8,0,7,0,6,0,5, +0,4,0,4,0,4,0,4,0,2,0,1,0,2,0,3,0,4,0,4,0,5,0,4,0,4,0,5,0,6,0,5,0,4,0,4,0,3,0,2,0,2,0,2,0,3,0,3,0,2,0,0,0,255,255,254,255,255,255,0,0,0,0,255,255,254,255,254,255,255,255,0,0,3,0,6,0,9,0,10,0,10,0,12,0,16,0,18,0,19,0,18,0,15,0,12,0,10,0,8,0,7,0,5,0,3, +0,1,0,255,255,255,255,1,0,2,0,1,0,0,0,0,0,0,0,1,0,2,0,3,0,3,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,253,255,250,255,247,255,245,255,244,255,242,255,240,255,239,255,239,255,239,255,240,255,242,255,244,255,245,255,245, +255,245,255,246,255,247,255,248,255,249,255,248,255,247,255,247,255,248,255,248,255,249,255,249,255,248,255,247,255,245,255,245,255,245,255,245,255,244,255,243,255,243,255,244,255,246,255,249,255,252,255,253,255,255,255,0,0,3,0,5,0,8,0,10,0,11,0,12,0, +12,0,13,0,13,0,13,0,12,0,11,0,10,0,9,0,7,0,7,0,8,0,9,0,10,0,12,0,13,0,14,0,14,0,15,0,17,0,18,0,18,0,16,0,15,0,14,0,14,0,14,0,13,0,12,0,10,0,8,0,7,0,6,0,6,0,4,0,3,0,2,0,1,0,0,0,0,0,255,255,254,255,251,255,250,255,250,255,250,255,249,255,248,255,247,255, +247,255,247,255,247,255,248,255,249,255,249,255,250,255,251,255,251,255,251,255,252,255,252,255,252,255,251,255,251,255,251,255,251,255,251,255,252,255,252,255,254,255,0,0,2,0,3,0,4,0,5,0,7,0,7,0,7,0,7,0,6,0,4,0,2,0,1,0,0,0,253,255,252,255,251,255,250, +255,250,255,250,255,250,255,250,255,249,255,249,255,249,255,249,255,247,255,246,255,244,255,242,255,240,255,239,255,238,255,238,255,239,255,240,255,240,255,241,255,244,255,246,255,249,255,250,255,250,255,251,255,253,255,255,255,255,255,255,255,255,255, +255,255,0,0,1,0,3,0,3,0,2,0,3,0,4,0,6,0,7,0,7,0,7,0,7,0,6,0,6,0,7,0,8,0,8,0,7,0,6,0,7,0,8,0,10,0,10,0,11,0,11,0,10,0,10,0,10,0,9,0,8,0,7,0,5,0,4,0,4,0,5,0,4,0,3,0,2,0,3,0,4,0,5,0,5,0,4,0,3,0,3,0,4,0,4,0,3,0,0,0,255,255,255,255,0,0,0,0,0,0,254,255,253, +255,253,255,254,255,1,0,2,0,1,0,0,0,0,0,0,0,1,0,3,0,2,0,0,0,254,255,254,255,0,0,3,0,5,0,4,0,4,0,5,0,8,0,10,0,12,0,12,0,11,0,10,0,9,0,9,0,9,0,7,0,5,0,2,0,0,0,0,0,254,255,254,255,252,255,250,255,249,255,249,255,250,255,250,255,248,255,247,255,246,255,247, +255,247,255,247,255,246,255,245,255,244,255,244,255,246,255,246,255,245,255,245,255,244,255,244,255,245,255,246,255,246,255,245,255,244,255,244,255,244,255,244,255,243,255,242,255,242,255,243,255,244,255,245,255,246,255,247,255,248,255,250,255,252,255, +255,255,1,0,3,0,3,0,5,0,7,0,9,0,11,0,12,0,12,0,11,0,11,0,11,0,12,0,12,0,10,0,7,0,6,0,6,0,6,0,7,0,6,0,5,0,4,0,3,0,4,0,6,0,8,0,7,0,5,0,4,0,4,0,4,0,6,0,7,0,5,0,3,0,2,0,2,0,3,0,4,0,5,0,4,0,3,0,3,0,4,0,6,0,7,0,8,0,7,0,7,0,6,0,5,0,5,0,5,0,4,0,3,0,2,0,2,0,1, +0,2,0,4,0,6,0,7,0,8,0,9,0,9,0,8,0,8,0,7,0,6,0,4,0,1,0,254,255,252,255,251,255,251,255,250,255,250,255,249,255,249,255,250,255,252,255,253,255,254,255,255,255,255,255,0,0,255,255,0,0,0,0,254,255,252,255,249,255,247,255,247,255,248,255,248,255,247,255, +247,255,247,255,249,255,251,255,254,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,254,255,253,255,254,255,254,255,255,255,255,255,255,255,255,255,0,0,1,0,2,0,2,0,1,0,0,0,255,255,255,255,254,255,253,255,252,255,251,255,249,255,248,255,249,255, +250,255,251,255,251,255,251,255,251,255,252,255,253,255,254,255,254,255,253,255,252,255,251,255,251,255,251,255,252,255,253,255,252,255,252,255,253,255,255,255,1,0,3,0,5,0,5,0,6,0,7,0,8,0,9,0,9,0,9,0,8,0,7,0,8,0,9,0,11,0,12,0,11,0,11,0,11,0,11,0,12,0, +13,0,11,0,10,0,9,0,8,0,8,0,8,0,7,0,4,0,2,0,1,0,1,0,2,0,2,0,1,0,255,255,253,255,253,255,254,255,0,0,255,255,253,255,251,255,250,255,250,255,251,255,252,255,253,255,252,255,251,255,251,255,252,255,254,255,255,255,254,255,253,255,251,255,251,255,252,255, +254,255,254,255,254,255,253,255,253,255,254,255,0,0,1,0,2,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255,254,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,255,255,254,255,254,255,253,255,252,255,252,255,252,255,252,255, +252,255,252,255,252,255,252,255,253,255,255,255,0,0,1,0,1,0,1,0,2,0,3,0,4,0,4,0,3,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,255,255,0,0,1,0,1,0,1,0,255,255,254,255,254,255,255,255,0,0,0,0,255,255,254,255,254,255,254,255,0,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,0, +0,255,255,254,255,253,255,253,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,253,255,254,255,255,255,0,0,0,0,1,0,2,0,4,0,4,0,5,0,5,0,5,0,6,0,7,0,7,0,8,0,8,0,8,0,7,0,7,0,7,0,7,0,6,0,6,0,5,0,4,0,4,0,4,0,3,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,255, +255,255,255,254,255,254,255,254,255,254,255,254,255,253,255,254,255,255,255,255,255,0,0,255,255,254,255,254,255,255,255,255,255,255,255,254,255,252,255,251,255,251,255,252,255,254,255,255,255,255,255,255,255,255,255,0,0,3,0,4,0,5,0,4,0,3,0,2,0,2,0,1, +0,0,0,255,255,254,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,255,255,1,0,2,0,1,0,1,0,0,0,255,255,255,255,255,255,254,255,252,255,251,255,250,255,250,255,250,255,251,255,251,255,250,255,250,255,249,255,250,255,250,255,250,255,250,255, +249,255,248,255,247,255,248,255,249,255,250,255,250,255,251,255,252,255,253,255,255,255,1,0,2,0,2,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,2,0,2,0,2,0,2,0,3,0,3,0,4,0,4,0,5,0,7,0,7,0,7,0,8,0,9,0,10,0,9,0,9,0,8,0,8,0,7,0,7,0,7,0,6,0,5,0,4,0,4,0,4,0,5,0,4,0,4,0,4, +0,3,0,3,0,4,0,3,0,3,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,1,0,1,0,2,0,2,0,3,0,3,0,4,0,4,0,4,0,3,0,3,0,3,0,2,0,2,0,1,0,0,0,254,255,254,255,253,255,253,255,253,255,253,255,252,255,252,255,251,255,251,255,251,255,251,255,252,255,251,255,251, +255,251,255,251,255,252,255,252,255,252,255,252,255,252,255,253,255,254,255,254,255,254,255,254,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,1,0,0,0,0,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,254,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,253,255,253,255,253,255,253,255,253,255,252,255,251,255,251,255,251,255,252,255,254,255,254,255,254,255,254,255,254,255,0,0,1,0,3,0,4,0,4,0,3,0,3,0,3,0,3,0,4,0,4,0,3,0,1,0,0, +0,0,0,0,0,1,0,2,0,1,0,0,0,255,255,255,255,0,0,2,0,3,0,3,0,2,0,2,0,1,0,2,0,3,0,3,0,3,0,2,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,2,0,3,0,4,0,5,0,5,0,5,0,6,0,7,0,8,0,8,0,7,0,7,0,7,0,7,0,7,0,6,0,6,0,5,0,4,0,4,0,5,0,5,0,4,0,3,0,2,0,2,0,2,0,3,0,2,0,1,0, +0,0,254,255,255,255,254,255,254,255,254,255,253,255,252,255,252,255,252,255,252,255,253,255,252,255,251,255,251,255,251,255,251,255,251,255,251,255,250,255,249,255,249,255,250,255,250,255,250,255,249,255,248,255,249,255,251,255,252,255,251,255,251,255, +250,255,251,255,252,255,253,255,254,255,253,255,253,255,252,255,253,255,254,255,255,255,0,0,255,255,255,255,255,255,1,0,2,0,2,0,1,0,0,0,255,255,255,255,0,0,1,0,0,0,254,255,253,255,253,255,255,255,1,0,1,0,0,0,255,255,255,255,0,0,2,0,2,0,1,0,255,255,253, +255,253,255,253,255,253,255,253,255,252,255,251,255,251,255,253,255,254,255,0,0,0,0,255,255,0,0,0,0,1,0,2,0,2,0,1,0,0,0,255,255,0,0,0,0,1,0,1,0,1,0,1,0,3,0,4,0,5,0,5,0,4,0,4,0,4,0,5,0,4,0,4,0,3,0,2,0,2,0,4,0,5,0,6,0,7,0,7,0,6,0,7,0,9,0,10,0,9,0,7,0,5, +0,4,0,3,0,3,0,2,0,1,0,255,255,254,255,254,255,255,255,0,0,1,0,0,0,0,0,0,0,1,0,1,0,2,0,1,0,0,0,255,255,255,255,0,0,1,0,1,0,0,0,255,255,0,0,1,0,2,0,3,0,2,0,0,0,255,255,255,255,255,255,255,255,254,255,252,255,251,255,250,255,251,255,252,255,252,255,252, +255,252,255,252,255,253,255,253,255,254,255,254,255,254,255,253,255,253,255,252,255,252,255,252,255,251,255,250,255,249,255,249,255,249,255,250,255,250,255,251,255,251,255,251,255,252,255,252,255,253,255,254,255,254,255,255,255,255,255,255,255,255,255, +255,255,0,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,2,0,4,0,4,0,4,0,5,0,4,0,5,0,5,0,5,0,6,0,5,0,5,0,5,0,4,0,4,0,3,0,3,0,4,0,4,0,3,0,2,0,2,0,3,0,3,0,3,0,3,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,255,255,0, +0,1,0,1,0,1,0,255,255,254,255,254,255,0,0,0,0,0,0,0,0,255,255,255,255,1,0,2,0,3,0,2,0,1,0,0,0,0,0,2,0,2,0,1,0,0,0,254,255,254,255,255,255,0,0,0,0,0,0,255,255,255,255,0,0,1,0,2,0,2,0,1,0,0,0,0,0,1,0,1,0,0,0,255,255,254,255,254,255,254,255,255,255,255, +255,255,255,254,255,254,255,255,255,0,0,1,0,1,0,0,0,0,0,0,0,1,0,2,0,2,0,0,0,255,255,254,255,254,255,255,255,0,0,0,0,254,255,253,255,253,255,255,255,1,0,2,0,1,0,0,0,255,255,0,0,1,0,2,0,2,0,2,0,1,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,254,255,254, +255,254,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,254,255,254,255,255,255,1,0,1,0,1,0,255,255,254,255,254,255,255,255,1,0,1,0,1,0,255,255,255,255,255,255,1,0,3,0,4,0,3,0,1,0,0, +0,0,0,2,0,3,0,4,0,3,0,1,0,0,0,0,0,2,0,4,0,4,0,3,0,1,0,1,0,2,0,3,0,4,0,4,0,2,0,1,0,0,0,1,0,1,0,2,0,1,0,255,255,255,255,255,255,0,0,2,0,2,0,2,0,1,0,0,0,1,0,2,0,3,0,2,0,1,0,255,255,254,255,254,255,255,255,255,255,255,255,253,255,251,255,251,255,252,255, +253,255,254,255,254,255,253,255,253,255,252,255,253,255,254,255,255,255,254,255,253,255,252,255,252,255,252,255,253,255,254,255,254,255,253,255,252,255,252,255,254,255,255,255,0,0,0,0,255,255,255,255,0,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,2,0,2,0,3,0,3,0,4,0,4,0,5,0,4,0,4,0,3,0,2,0,2,0,3,0,3,0,2,0,1,0,0,0,0,0,1,0,2,0,3,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,254,255,254,255,254,255,255,255,255,255,254,255,254,255,254,255,254, +255,254,255,255,255,255,255,254,255,253,255,253,255,252,255,252,255,252,255,253,255,252,255,252,255,252,255,252,255,253,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255, +254,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255,254,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255, +0,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,3,0,2,0,1,0,1,0,2,0,3,0,3,0,2,0,1,0,2,0,2,0,3,0,3,0,2,0,2,0,1,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0, +0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,1,0,0,0,255,255,254,255,254,255,255, +255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,2,0,3,0,3,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,3,0,2,0,2, +0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,253,255,253,255,254,255,254,255,254, +255,253,255,253,255,253,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,253,255,253,255,253,255,254,255,255,255,255,255,255,255,254,255,255,255,0,0,0,0,0,0,1,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255, +255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,0,0,254,255,253,255,254,255,254,255,255,255,0,0,255,255,254,255,253,255,254,255,255,255,1,0,1,0,0,0,255,255,255,255,0,0,1,0,2,0,3,0,2,0,1,0,1,0,2,0,4,0,3,0,3,0,2,0,1,0,1,0,2,0,3,0,3,0,2,0,1,0,2, +0,3,0,3,0,4,0,3,0,2,0,2,0,2,0,3,0,3,0,2,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,255,255,254,255,254,255,255,255,255,255,255,255,254,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254, +255,254,255,254,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,254,255,254,255,253,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,2,0,1,0,0,0,255,255,255,255,0,0,1,0,1, +0,0,0,255,255,255,255,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,2,0,3,0,3,0,3,0,2,0,2,0,3,0,3,0,4,0,4,0,3,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,2,0,1,0,0,0,255,255,254,255,254,255,254,255,255,255,255,255,255,255,254,255, +254,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,253,255,253,255,253,255,253,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,253,255,253,255,253,255,253,255,254,255,254,255, +255,255,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,0,0,255,255,254,255,255,255,0,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,0,0,255,255,254,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,0,0,1,0,2,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,255,255,0,0,0,0,1,0,1, +0,0,0,255,255,0,0,1,0,2,0,3,0,2,0,1,0,1,0,1,0,2,0,3,0,3,0,2,0,1,0,0,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255,255,255, +255,255,254,255,254,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,0,0,0,0,255,255,255, +255,255,255,0,0,1,0,1,0,1,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,254,255,253,255,253,255,254,255,255,255,255,255,254,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,2,0,2,0,2,0,1, +0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,2,0,1,0,1,0,2,0,2,0,2,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,254,255,254,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,254,255,253,255,253,255,254,255,255,255,254,255,253,255,252,255,252,255,254,255,255,255,0,0,255,255,255, +255,254,255,254,255,255,255,1,0,1,0,0,0,254,255,253,255,253,255,254,255,255,255,255,255,255,255,254,255,253,255,254,255,255,255,1,0,1,0,1,0,0,0,0,0,1,0,2,0,3,0,2,0,2,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,2,0,2,0,1,0,2,0,2,0,2,0,1,0,1, +0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,3,0,3,0,3,0,2,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,2,0,2,0,1,0,0,0,0,0,0,0, +0,0,0,0,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,0,0,254,255,254,255,254,255,255,255,255,255,0,0,255,255,255,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,3,0,3,0,2,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255,255,255,0,0,2,0,3,0,2,0,1,0,1,0,0,0,1,0,2,0,1,0,0,0,255, +255,254,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,1,0,2,0,3,0,3,0,2,0,1,0,0,0,0,0,1,0,1,0,0,0,255,255,254,255,254,255,255,255,0,0,0,0,0,0,255,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1, +0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0, +0,0,0,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,0,0,1,0,0,0,0,0,255,255,255,255,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,3,0,3,0,2,0,1,0,0,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,2,0,3,0,3,0,2,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,1,0,2,0,2,0,2,0,2, +0,2,0,2,0,2,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,255,255,255,255,0,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,0,0,255,255,254,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,254,255, +254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0, +0,1,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,254,255,254,255,255,255,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255,254,255,254,255,254,255,255,255, +255,255,255,255,254,255,254,255,255,255,0,0,1,0,2,0,1,0,0,0,255,255,0,0,0,0,1,0,0,0,255,255,254,255,254,255,254,255,255,255,0,0,255,255,255,255,255,255,0,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,254,255,254,255,254,255,255,255,255,255, +255,255,255,255,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,255,255,254,255,254,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,1, +0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,254,255,253,255,252,255,253,255,253,255,254,255,254,255,254,255,254,255,255,255,0,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255,0,0,0,0,1,0,1,0,1,0,2,0,3,0,4,0,3,0,2,0,1,0,0,0,255, +255,0,0,0,0,255,255,254,255,254,255,254,255,254,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,255,255,254,255,254,255,253,255,254,255,255,255,255,255,255,255,254,255,254,255,255,255,1,0,2,0,2,0,1,0,1,0,0,0,1,0,2,0,2,0,1,0,0,0,255,255,255,255,0,0,1,0,1, +0,0,0,0,0,255,255,0,0,1,0,2,0,1,0,1,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,254,255,253,255,254,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,254,255,255, +255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,254, +255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0, +0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255, +255,0,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,2,0,2,0,1,0,1,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,254,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0, +0,1,0,2,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,255,255,0, +0,1,0,1,0,1,0,2,0,2,0,3,0,3,0,3,0,3,0,2,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,3,0,2,0,2,0,2,0,3,0,3,0,2,0,1,0,0,0,255,255,0,0,0,0,1,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,2,0,1,0,0,0,255,255,0,0,0,0,1,0,0,0,255,255,254,255,254,255,255,255,1,0,2,0,1,0,1,0,0,0,0,0,1,0,2,0,2,0,1,0,255,255,254,255,254,255,255,255,255,255,0,0,255,255,254,255,253,255,254,255,255,255,0,0,0,0,0,0,255,255,255, +255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,254,255,255,255,0,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,254,255,255,255,255,255,0,0,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,1,0,2,0,2,0,2,0,1, +0,1,0,1,0,1,0,2,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,255, +255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,253,255,254,255,255,255,0,0,255,255,255,255,255,255,0,0,1,0,2,0,2,0,1,0,0,0,255,255,0, +0,0,0,0,0,0,0,255,255,254,255,254,255,255,255,0,0,1,0,1,0,1,0,0,0,1,0,1,0,2,0,2,0,2,0,0,0,255,255,255,255,0,0,1,0,2,0,1,0,0,0,0,0,1,0,2,0,2,0,2,0,1,0,0,0,255,255,254,255,255,255,255,255,254,255,254,255,253,255,253,255,254,255,255,255,0,0,0,0,0,0,0,0, +0,0,1,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,3,0,2,0,1,0,0,0,0,0,0,0, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,254,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255, +255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,2,0,3,0,3,0,2,0,2,0,2,0,2,0,2,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,254, +255,254,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,1,0,1,0,0,0,0,0,1,0,1,0,2,0,1,0,0,0,0,0,0,0,1,0,2,0,2,0,2,0,1, +0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0, +1,0,1,0,0,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, +0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,0,0,0,0,255,255,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0, +0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255, +0,0,0,0,255,255,255,255,0,0,0,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1, +0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,2,0,2,0,1,0,1,0,1,0, +1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,0,0,1,0,1, +0,1,0,0,0,0,0,1,0,2,0,1,0,0,0,255,255,254,255,255,255,0,0,0,0,255,255,255,255,254,255,254,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,0,0,0,0,255,255,0,0,1,0,2,0,2,0,1,0,1,0,1,0,2,0,3,0,3,0, +2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,2,0,2,0,1,0,0,0,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0, +1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,255,255,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,255,255,254,255,254,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0, +0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,1,0,1,0,0,0,255,255,255,255,0,0,0,0,0,0, +0,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,0,0,0,0,255, +255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0, +0,0,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,1,0,2,0,2,0,2,0,1,0,1,0,1, +0,1,0,0,0,255,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,0,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,0,0,0,0,255,255,254,255,254, +255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,254,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0, +0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0, +0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1, +0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,2,0, +2,0,2,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0, +0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1, +0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0, +0,0,0,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,0,0,0,0,1,0,1,0,1, +0,1,0,1,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0, +1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0, +255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1, +0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,2,0,1,0, +1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255, +254,255,254,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0, +0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0, +2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,0,0,0,0,0,0, +0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, +1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0, +0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0, +0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1, +0,1,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0, +0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0, +1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,1, +0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0, +1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0, +0,0,0,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,1,0,1,0,1,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, +0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0, +1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1, +0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0, +1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,255, +255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0, +0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0 }; + +const char* cassette_recorder_wav = (const char*) temp_binary_data_0; + +//================== EditorColourScheme.xml ================== +static const unsigned char temp_binary_data_1[] = +"\r\n" +"\r\n" +"\r\n" +" \r\n" +" \r\n" +" \r\n" +" \r\n" +" \r\n" +" \r\n" +" \r\n" +" \r\n" +" \r\n" +" \r\n" +" \r\n" +"\r\n"; + +const char* EditorColourScheme_xml = (const char*) temp_binary_data_1; + +//================== guitar_amp.wav ================== +static const unsigned char temp_binary_data_2[] = +{ 82,73,70,70,126,96,1,0,87,65,86,69,102,109,116,32,16,0,0,0,1,0,1,0,68,172,0,0,136,88,1,0,2,0,16,0,100,97,116,97,90,96,1,0,127,21,151,64,230,104,184,126,225,120,232,97,57,69,88,45,227,27,38,18,220,11,103,5,176,2,232,5,154,10,167,9,251,255,163,236,190, +216,29,207,223,212,251,228,199,245,24,253,183,247,114,235,241,226,23,226,178,230,237,235,94,238,102,239,122,239,119,237,243,231,233,223,35,216,224,212,156,214,186,218,111,224,177,230,45,236,78,241,140,243,206,241,67,238,53,235,88,235,105,239,7,244,209, +244,87,242,46,238,65,235,54,236,48,240,217,244,177,247,106,247,171,244,109,241,181,238,58,237,21,237,175,237,67,238,132,238,51,239,136,241,189,244,136,246,201,245,193,243,105,242,110,242,174,243,15,245,144,245,117,245,172,245,12,247,51,250,200,253,107, +255,104,254,24,252,134,250,247,250,172,253,146,1,180,4,188,5,159,4,174,2,111,1,219,0,197,0,166,1,126,3,250,5,149,8,91,10,133,10,9,9,149,6,115,4,190,3,109,4,145,5,34,6,252,5,32,6,181,7,244,10,1,15,119,18,81,20,177,20,30,20,160,18,163,16,0,15,224,13,8, +13,76,12,197,11,166,11,185,11,94,11,40,10,52,8,63,6,61,5,136,5,247,6,1,9,206,10,213,11,104,12,42,13,152,14,174,16,197,18,246,19,187,19,34,18,163,15,31,13,91,11,158,10,143,10,118,10,214,9,236,8,47,8,201,7,139,7,4,7,9,6,249,4,57,4,225,3,249,3,134,4,96, +5,59,6,9,7,235,7,209,8,83,9,0,9,204,7,33,6,143,4,151,3,117,3,197,3,206,3,37,3,232,1,124,0,63,255,97,254,223,253,144,253,85,253,12,253,130,252,174,251,198,250,34,250,21,250,205,250,38,252,195,253,81,255,125,0,251,0,204,0,65,0,146,255,197,254,221,253,236, +252,233,251,178,250,88,249,40,248,85,247,234,246,219,246,18,247,118,247,236,247,81,248,132,248,147,248,172,248,215,248,243,248,238,248,212,248,190,248,187,248,200,248,220,248,254,248,52,249,138,249,232,249,22,250,19,250,5,250,240,249,188,249,95,249,216, +248,56,248,168,247,91,247,129,247,25,248,235,248,190,249,132,250,57,251,206,251,83,252,236,252,143,253,255,253,39,254,41,254,29,254,20,254,34,254,50,254,21,254,201,253,110,253,47,253,27,253,5,253,173,252,28,252,161,251,133,251,206,251,98,252,41,253,252, +253,151,254,206,254,155,254,38,254,199,253,181,253,236,253,100,254,8,255,146,255,203,255,173,255,80,255,241,254,218,254,16,255,130,255,60,0,34,1,206,1,253,1,208,1,134,1,60,1,24,1,91,1,241,1,123,2,208,2,16,3,84,3,174,3,36,4,160,4,23,5,109,5,168,5,14,6, +148,6,230,6,9,7,43,7,66,7,48,7,228,6,90,6,160,5,195,4,234,3,93,3,92,3,235,3,180,4,92,5,183,5,180,5,70,5,141,4,204,3,56,3,239,2,1,3,96,3,220,3,60,4,79,4,253,3,106,3,191,2,34,2,189,1,145,1,124,1,118,1,134,1,136,1,88,1,21,1,229,0,203,0,199,0,214,0,235,0, +249,0,236,0,190,0,140,0,126,0,167,0,236,0,44,1,89,1,127,1,171,1,202,1,195,1,152,1,89,1,23,1,236,0,214,0,187,0,138,0,66,0,235,255,153,255,87,255,33,255,238,254,173,254,89,254,5,254,199,253,176,253,207,253,20,254,95,254,149,254,177,254,193,254,196,254, +163,254,101,254,54,254,33,254,25,254,38,254,79,254,107,254,55,254,158,253,252,252,198,252,1,253,97,253,170,253,189,253,160,253,126,253,120,253,153,253,231,253,69,254,134,254,155,254,153,254,148,254,152,254,159,254,150,254,120,254,89,254,80,254,107,254, +154,254,198,254,221,254,195,254,137,254,94,254,70,254,51,254,42,254,49,254,49,254,26,254,8,254,22,254,53,254,62,254,32,254,226,253,170,253,160,253,205,253,44,254,189,254,80,255,185,255,12,0,72,0,88,0,85,0,74,0,45,0,18,0,11,0,26,0,63,0,106,0,122,0,76, +0,212,255,62,255,212,254,211,254,76,255,26,0,240,0,178,1,125,2,47,3,84,3,155,2,14,1,55,255,230,253,102,253,123,253,243,253,131,254,0,255,123,255,188,255,113,255,188,254,253,253,132,253,144,253,37,254,240,254,189,255,134,0,15,1,48,1,16,1,223,0,209,0,10, +1,82,1,130,1,176,1,205,1,180,1,126,1,97,1,107,1,138,1,174,1,198,1,221,1,13,2,57,2,48,2,0,2,236,1,30,2,112,2,181,2,228,2,252,2,235,2,164,2,74,2,9,2,212,1,144,1,72,1,15,1,247,0,243,0,209,0,128,0,57,0,48,0,84,0,118,0,138,0,148,0,154,0,150,0,132,0,124,0, +144,0,181,0,211,0,225,0,239,0,13,1,46,1,57,1,44,1,13,1,235,0,209,0,188,0,147,0,69,0,220,255,109,255,9,255,200,254,186,254,206,254,243,254,43,255,107,255,160,255,184,255,181,255,178,255,186,255,178,255,144,255,109,255,85,255,73,255,76,255,82,255,86,255, +95,255,102,255,101,255,104,255,115,255,119,255,98,255,56,255,17,255,253,254,246,254,246,254,244,254,229,254,208,254,194,254,197,254,216,254,242,254,253,254,247,254,247,254,16,255,77,255,168,255,1,0,67,0,104,0,106,0,81,0,36,0,229,255,155,255,84,255,27, +255,250,254,247,254,254,254,9,255,32,255,70,255,127,255,205,255,38,0,130,0,203,0,227,0,193,0,119,0,36,0,225,255,179,255,145,255,123,255,113,255,101,255,82,255,62,255,34,255,11,255,17,255,47,255,89,255,136,255,185,255,241,255,44,0,86,0,103,0,97,0,77,0, +57,0,49,0,45,0,29,0,252,255,216,255,199,255,209,255,236,255,10,0,37,0,59,0,79,0,99,0,101,0,69,0,11,0,201,255,152,255,136,255,145,255,154,255,161,255,175,255,196,255,226,255,11,0,56,0,89,0,104,0,103,0,99,0,99,0,96,0,83,0,79,0,95,0,124,0,152,0,169,0,182, +0,195,0,196,0,176,0,144,0,108,0,71,0,42,0,25,0,12,0,253,255,239,255,228,255,218,255,215,255,212,255,198,255,189,255,210,255,254,255,32,0,39,0,29,0,7,0,230,255,196,255,168,255,147,255,136,255,141,255,153,255,164,255,172,255,173,255,164,255,138,255,114, +255,114,255,140,255,176,255,216,255,0,0,42,0,85,0,113,0,117,0,109,0,101,0,105,0,131,0,163,0,188,0,200,0,193,0,178,0,179,0,195,0,205,0,193,0,158,0,117,0,82,0,49,0,14,0,234,255,200,255,182,255,192,255,222,255,245,255,243,255,219,255,193,255,186,255,192, +255,196,255,193,255,175,255,137,255,98,255,77,255,62,255,56,255,73,255,106,255,138,255,162,255,176,255,191,255,217,255,249,255,23,0,51,0,80,0,110,0,137,0,153,0,147,0,116,0,78,0,60,0,71,0,96,0,127,0,159,0,180,0,180,0,170,0,159,0,151,0,152,0,161,0,165, +0,151,0,121,0,85,0,51,0,21,0,255,255,242,255,236,255,237,255,246,255,253,255,242,255,212,255,177,255,157,255,157,255,167,255,179,255,183,255,183,255,183,255,182,255,174,255,156,255,141,255,136,255,132,255,117,255,104,255,101,255,106,255,126,255,165,255, +198,255,210,255,206,255,195,255,193,255,213,255,246,255,17,0,33,0,43,0,53,0,63,0,74,0,79,0,67,0,37,0,11,0,7,0,24,0,43,0,52,0,44,0,25,0,10,0,12,0,30,0,51,0,65,0,66,0,54,0,37,0,26,0,18,0,253,255,217,255,178,255,157,255,152,255,151,255,143,255,129,255,114, +255,105,255,104,255,111,255,129,255,151,255,168,255,176,255,171,255,149,255,117,255,93,255,86,255,96,255,113,255,133,255,157,255,194,255,240,255,19,0,36,0,46,0,59,0,73,0,81,0,81,0,72,0,63,0,57,0,53,0,51,0,53,0,52,0,45,0,30,0,10,0,246,255,228,255,210, +255,206,255,227,255,13,0,53,0,80,0,94,0,96,0,86,0,66,0,33,0,249,255,216,255,190,255,174,255,171,255,177,255,191,255,220,255,4,0,46,0,82,0,107,0,116,0,107,0,83,0,55,0,37,0,15,0,238,255,222,255,241,255,23,0,61,0,86,0,94,0,88,0,77,0,72,0,75,0,66,0,36,0, +9,0,10,0,40,0,81,0,115,0,121,0,82,0,24,0,234,255,209,255,200,255,217,255,249,255,0,0,227,255,196,255,191,255,207,255,227,255,244,255,5,0,27,0,47,0,52,0,43,0,26,0,255,255,224,255,209,255,220,255,2,0,50,0,90,0,125,0,164,0,185,0,173,0,148,0,121,0,90,0,58, +0,25,0,1,0,237,255,231,255,228,255,226,255,218,255,204,255,204,255,221,255,241,255,254,255,6,0,255,255,239,255,224,255,227,255,239,255,246,255,243,255,242,255,242,255,238,255,229,255,218,255,201,255,188,255,185,255,183,255,174,255,162,255,157,255,172, +255,206,255,243,255,12,0,27,0,54,0,106,0,161,0,200,0,216,0,214,0,206,0,199,0,177,0,126,0,41,0,192,255,89,255,12,255,225,254,219,254,245,254,37,255,113,255,212,255,51,0,116,0,147,0,159,0,176,0,197,0,218,0,237,0,245,0,226,0,169,0,85,0,245,255,135,255,15, +255,163,254,102,254,118,254,205,254,54,255,142,255,208,255,248,255,15,0,31,0,32,0,21,0,11,0,5,0,5,0,15,0,18,0,249,255,194,255,131,255,85,255,61,255,49,255,49,255,66,255,95,255,130,255,175,255,227,255,14,0,39,0,47,0,48,0,52,0,55,0,45,0,35,0,43,0,60,0, +61,0,31,0,228,255,169,255,137,255,137,255,160,255,189,255,222,255,10,0,65,0,132,0,192,0,215,0,186,0,122,0,57,0,8,0,232,255,211,255,196,255,193,255,205,255,221,255,230,255,224,255,201,255,177,255,169,255,171,255,175,255,181,255,190,255,204,255,231,255, +7,0,23,0,16,0,253,255,238,255,236,255,235,255,223,255,208,255,205,255,218,255,239,255,1,0,5,0,242,255,205,255,169,255,151,255,156,255,172,255,183,255,197,255,216,255,231,255,232,255,215,255,182,255,147,255,131,255,149,255,200,255,11,0,74,0,124,0,157, +0,181,0,197,0,192,0,164,0,129,0,103,0,96,0,103,0,112,0,116,0,118,0,119,0,122,0,129,0,133,0,128,0,114,0,99,0,95,0,105,0,121,0,136,0,146,0,150,0,142,0,120,0,90,0,55,0,16,0,235,255,210,255,201,255,208,255,227,255,251,255,15,0,33,0,53,0,74,0,94,0,109,0,116, +0,113,0,103,0,84,0,62,0,43,0,29,0,14,0,3,0,2,0,11,0,23,0,29,0,32,0,36,0,42,0,39,0,28,0,11,0,253,255,246,255,243,255,243,255,248,255,0,0,0,0,247,255,238,255,232,255,222,255,210,255,202,255,205,255,220,255,245,255,20,0,47,0,57,0,49,0,30,0,5,0,225,255,186, +255,154,255,137,255,132,255,133,255,139,255,139,255,132,255,127,255,133,255,144,255,152,255,154,255,160,255,171,255,185,255,193,255,196,255,202,255,210,255,212,255,211,255,212,255,213,255,212,255,208,255,204,255,206,255,215,255,226,255,237,255,247,255, +251,255,247,255,240,255,235,255,237,255,247,255,6,0,27,0,47,0,53,0,47,0,38,0,28,0,23,0,26,0,35,0,43,0,43,0,35,0,30,0,27,0,10,0,232,255,192,255,156,255,128,255,114,255,108,255,98,255,80,255,61,255,51,255,55,255,71,255,90,255,105,255,112,255,111,255,105, +255,102,255,105,255,112,255,125,255,148,255,181,255,209,255,221,255,217,255,204,255,194,255,196,255,211,255,237,255,13,0,45,0,71,0,94,0,110,0,110,0,100,0,85,0,69,0,57,0,55,0,62,0,72,0,78,0,81,0,86,0,95,0,107,0,119,0,123,0,115,0,98,0,75,0,52,0,38,0,37, +0,46,0,60,0,78,0,99,0,110,0,102,0,77,0,50,0,30,0,18,0,10,0,11,0,21,0,37,0,51,0,59,0,60,0,53,0,46,0,45,0,58,0,83,0,102,0,105,0,98,0,90,0,85,0,83,0,77,0,70,0,64,0,58,0,55,0,57,0,59,0,56,0,47,0,44,0,60,0,93,0,122,0,132,0,116,0,86,0,54,0,26,0,4,0,250,255, +252,255,3,0,13,0,29,0,51,0,66,0,62,0,47,0,29,0,10,0,0,0,1,0,8,0,14,0,18,0,22,0,29,0,32,0,23,0,8,0,255,255,245,255,225,255,201,255,186,255,183,255,190,255,197,255,200,255,208,255,222,255,239,255,255,255,12,0,21,0,21,0,12,0,254,255,242,255,238,255,241, +255,246,255,250,255,249,255,242,255,229,255,213,255,199,255,194,255,199,255,212,255,231,255,250,255,7,0,12,0,11,0,3,0,241,255,223,255,218,255,220,255,213,255,196,255,178,255,167,255,168,255,179,255,194,255,212,255,225,255,223,255,209,255,190,255,167, +255,137,255,105,255,86,255,86,255,100,255,121,255,142,255,157,255,165,255,174,255,189,255,206,255,216,255,219,255,214,255,197,255,174,255,148,255,128,255,125,255,138,255,156,255,175,255,194,255,211,255,221,255,226,255,234,255,240,255,240,255,240,255, +250,255,15,0,41,0,66,0,85,0,95,0,97,0,94,0,87,0,73,0,49,0,20,0,254,255,245,255,245,255,249,255,0,0,9,0,17,0,29,0,46,0,56,0,54,0,49,0,51,0,55,0,51,0,42,0,37,0,31,0,20,0,10,0,6,0,4,0,3,0,6,0,18,0,27,0,25,0,12,0,255,255,248,255,248,255,249,255,253,255,3, +0,3,0,253,255,247,255,243,255,244,255,249,255,249,255,244,255,241,255,248,255,11,0,34,0,55,0,65,0,67,0,70,0,73,0,72,0,71,0,67,0,59,0,51,0,52,0,60,0,68,0,75,0,82,0,85,0,81,0,74,0,73,0,77,0,84,0,90,0,99,0,107,0,108,0,97,0,77,0,55,0,36,0,24,0,25,0,35,0, +50,0,65,0,76,0,80,0,78,0,61,0,31,0,0,0,236,255,231,255,235,255,241,255,246,255,254,255,8,0,15,0,16,0,20,0,29,0,36,0,30,0,12,0,247,255,229,255,219,255,219,255,230,255,249,255,13,0,28,0,37,0,42,0,44,0,43,0,34,0,17,0,251,255,235,255,227,255,221,255,218, +255,213,255,205,255,193,255,183,255,177,255,175,255,172,255,160,255,140,255,123,255,116,255,115,255,116,255,120,255,124,255,128,255,133,255,140,255,144,255,143,255,141,255,139,255,139,255,141,255,146,255,154,255,168,255,186,255,200,255,203,255,198,255, +190,255,181,255,173,255,169,255,165,255,162,255,162,255,165,255,171,255,180,255,189,255,195,255,204,255,220,255,236,255,246,255,251,255,255,255,2,0,7,0,16,0,27,0,31,0,23,0,7,0,243,255,221,255,197,255,180,255,177,255,185,255,201,255,224,255,253,255,25, +0,44,0,53,0,57,0,59,0,63,0,67,0,72,0,77,0,78,0,67,0,49,0,34,0,31,0,37,0,46,0,60,0,78,0,93,0,106,0,119,0,136,0,158,0,179,0,192,0,197,0,195,0,185,0,162,0,132,0,105,0,84,0,73,0,68,0,68,0,65,0,59,0,54,0,50,0,45,0,35,0,29,0,35,0,49,0,62,0,69,0,75,0,81,0,82, +0,76,0,67,0,61,0,59,0,57,0,55,0,45,0,23,0,249,255,225,255,218,255,227,255,242,255,1,0,11,0,15,0,11,0,0,0,241,255,222,255,203,255,194,255,194,255,198,255,203,255,206,255,205,255,204,255,212,255,230,255,249,255,0,0,251,255,239,255,227,255,219,255,216,255, +218,255,223,255,233,255,245,255,252,255,251,255,239,255,218,255,199,255,191,255,199,255,219,255,244,255,8,0,18,0,18,0,13,0,4,0,247,255,232,255,221,255,216,255,215,255,220,255,230,255,238,255,239,255,241,255,245,255,242,255,233,255,222,255,217,255,217, +255,221,255,225,255,225,255,225,255,224,255,223,255,223,255,222,255,215,255,204,255,193,255,184,255,174,255,164,255,154,255,150,255,152,255,159,255,169,255,179,255,185,255,187,255,185,255,188,255,197,255,209,255,219,255,226,255,226,255,221,255,214,255, +208,255,208,255,210,255,207,255,199,255,193,255,192,255,196,255,207,255,219,255,231,255,247,255,13,0,35,0,53,0,61,0,59,0,50,0,39,0,30,0,27,0,31,0,39,0,44,0,43,0,39,0,39,0,42,0,44,0,44,0,47,0,51,0,48,0,34,0,14,0,252,255,239,255,228,255,222,255,226,255, +237,255,248,255,253,255,252,255,249,255,243,255,233,255,222,255,221,255,230,255,241,255,252,255,4,0,7,0,6,0,4,0,2,0,3,0,7,0,13,0,18,0,25,0,33,0,40,0,46,0,50,0,54,0,62,0,75,0,90,0,102,0,107,0,109,0,108,0,104,0,100,0,95,0,90,0,87,0,94,0,108,0,122,0,128, +0,125,0,121,0,121,0,120,0,112,0,98,0,81,0,61,0,42,0,28,0,18,0,13,0,12,0,7,0,1,0,255,255,254,255,249,255,248,255,251,255,4,0,13,0,15,0,12,0,8,0,4,0,255,255,249,255,239,255,224,255,208,255,200,255,203,255,214,255,227,255,239,255,247,255,253,255,2,0,4,0, +5,0,255,255,242,255,224,255,208,255,200,255,196,255,194,255,194,255,196,255,194,255,189,255,187,255,192,255,200,255,211,255,222,255,231,255,232,255,227,255,222,255,222,255,223,255,225,255,229,255,230,255,227,255,221,255,213,255,205,255,199,255,191,255, +179,255,166,255,158,255,160,255,168,255,178,255,191,255,208,255,225,255,240,255,250,255,2,0,9,0,16,0,16,0,9,0,255,255,246,255,236,255,223,255,210,255,199,255,190,255,181,255,178,255,184,255,193,255,199,255,203,255,206,255,212,255,220,255,228,255,234, +255,237,255,235,255,229,255,220,255,208,255,199,255,200,255,208,255,216,255,225,255,235,255,245,255,251,255,255,255,7,0,20,0,36,0,57,0,76,0,88,0,87,0,77,0,62,0,47,0,32,0,15,0,0,0,244,255,234,255,231,255,236,255,247,255,6,0,29,0,54,0,75,0,87,0,88,0,84, +0,75,0,58,0,34,0,9,0,245,255,232,255,227,255,228,255,228,255,225,255,220,255,217,255,220,255,225,255,230,255,235,255,242,255,248,255,254,255,6,0,18,0,33,0,48,0,60,0,69,0,77,0,80,0,81,0,82,0,88,0,98,0,110,0,123,0,131,0,132,0,124,0,109,0,90,0,71,0,57,0, +50,0,47,0,47,0,46,0,42,0,37,0,32,0,29,0,29,0,29,0,30,0,32,0,32,0,31,0,31,0,31,0,33,0,35,0,34,0,32,0,25,0,11,0,249,255,232,255,222,255,218,255,221,255,226,255,236,255,251,255,14,0,34,0,53,0,70,0,77,0,71,0,55,0,37,0,21,0,8,0,255,255,252,255,3,0,16,0,27, +0,31,0,28,0,23,0,23,0,28,0,34,0,33,0,21,0,1,0,236,255,224,255,223,255,222,255,215,255,207,255,207,255,209,255,208,255,204,255,202,255,198,255,189,255,183,255,186,255,189,255,186,255,179,255,176,255,175,255,174,255,179,255,196,255,217,255,229,255,231, +255,227,255,221,255,214,255,211,255,216,255,224,255,227,255,222,255,210,255,194,255,180,255,172,255,170,255,170,255,175,255,186,255,199,255,211,255,218,255,219,255,216,255,211,255,205,255,200,255,196,255,190,255,181,255,171,255,166,255,168,255,174,255, +183,255,191,255,200,255,209,255,215,255,217,255,216,255,214,255,212,255,212,255,213,255,215,255,216,255,212,255,205,255,193,255,180,255,171,255,171,255,176,255,183,255,191,255,208,255,232,255,3,0,22,0,29,0,24,0,11,0,250,255,238,255,234,255,238,255,249, +255,6,0,17,0,27,0,33,0,33,0,30,0,27,0,23,0,20,0,19,0,26,0,36,0,47,0,55,0,61,0,66,0,68,0,65,0,58,0,54,0,52,0,50,0,45,0,42,0,43,0,48,0,57,0,69,0,81,0,91,0,101,0,112,0,120,0,119,0,109,0,94,0,83,0,77,0,72,0,66,0,58,0,51,0,47,0,46,0,49,0,57,0,67,0,80,0,94, +0,106,0,113,0,112,0,101,0,80,0,55,0,29,0,9,0,253,255,251,255,0,0,9,0,20,0,28,0,33,0,36,0,35,0,31,0,24,0,15,0,5,0,0,0,1,0,3,0,0,0,248,255,239,255,232,255,229,255,229,255,234,255,243,255,250,255,253,255,254,255,253,255,248,255,243,255,243,255,247,255,254, +255,4,0,7,0,4,0,253,255,246,255,241,255,238,255,236,255,230,255,223,255,220,255,219,255,220,255,225,255,234,255,245,255,253,255,3,0,5,0,2,0,251,255,242,255,236,255,234,255,236,255,242,255,252,255,6,0,15,0,24,0,34,0,41,0,42,0,40,0,38,0,38,0,35,0,28,0, +19,0,15,0,15,0,18,0,22,0,23,0,18,0,10,0,3,0,252,255,243,255,231,255,221,255,216,255,218,255,224,255,234,255,242,255,245,255,244,255,240,255,236,255,235,255,231,255,223,255,217,255,214,255,217,255,223,255,231,255,237,255,239,255,233,255,222,255,210,255, +198,255,189,255,186,255,190,255,197,255,204,255,211,255,217,255,219,255,218,255,219,255,221,255,222,255,223,255,223,255,217,255,205,255,191,255,185,255,187,255,196,255,208,255,221,255,233,255,240,255,239,255,235,255,233,255,230,255,227,255,222,255,218, +255,217,255,218,255,220,255,222,255,225,255,225,255,224,255,228,255,238,255,249,255,0,0,255,255,249,255,241,255,235,255,235,255,239,255,244,255,248,255,252,255,0,0,1,0,1,0,254,255,249,255,244,255,242,255,240,255,239,255,237,255,238,255,243,255,250,255, +3,0,9,0,12,0,13,0,14,0,13,0,9,0,3,0,253,255,246,255,242,255,244,255,249,255,0,0,8,0,19,0,27,0,32,0,35,0,40,0,46,0,52,0,54,0,52,0,47,0,42,0,41,0,44,0,47,0,50,0,55,0,61,0,65,0,67,0,67,0,61,0,52,0,46,0,45,0,45,0,44,0,40,0,38,0,38,0,41,0,45,0,47,0,43,0,28, +0,8,0,246,255,235,255,229,255,227,255,226,255,225,255,221,255,218,255,220,255,226,255,235,255,247,255,3,0,11,0,14,0,15,0,10,0,0,0,245,255,236,255,229,255,228,255,235,255,247,255,2,0,8,0,6,0,253,255,247,255,251,255,6,0,18,0,27,0,31,0,29,0,24,0,22,0,25, +0,30,0,33,0,37,0,42,0,46,0,46,0,42,0,34,0,27,0,27,0,32,0,36,0,36,0,28,0,17,0,7,0,0,0,252,255,250,255,251,255,0,0,7,0,14,0,16,0,11,0,1,0,247,255,245,255,250,255,255,255,0,0,255,255,255,255,253,255,251,255,253,255,5,0,17,0,27,0,34,0,40,0,44,0,43,0,34,0, +22,0,10,0,2,0,254,255,252,255,248,255,241,255,234,255,228,255,219,255,207,255,201,255,205,255,214,255,223,255,229,255,230,255,229,255,226,255,223,255,221,255,217,255,209,255,198,255,187,255,178,255,172,255,170,255,172,255,178,255,187,255,198,255,210, +255,223,255,235,255,244,255,250,255,251,255,249,255,248,255,250,255,253,255,254,255,253,255,252,255,254,255,2,0,8,0,15,0,22,0,24,0,20,0,10,0,0,0,250,255,248,255,247,255,243,255,237,255,233,255,231,255,231,255,230,255,226,255,223,255,224,255,225,255,226, +255,225,255,225,255,225,255,225,255,227,255,232,255,241,255,252,255,4,0,9,0,11,0,9,0,2,0,251,255,245,255,242,255,242,255,246,255,255,255,9,0,18,0,24,0,30,0,34,0,34,0,29,0,24,0,22,0,21,0,23,0,28,0,34,0,38,0,37,0,34,0,29,0,23,0,19,0,20,0,25,0,29,0,33,0, +37,0,41,0,41,0,39,0,36,0,35,0,34,0,31,0,26,0,20,0,15,0,14,0,15,0,19,0,22,0,23,0,23,0,22,0,22,0,19,0,13,0,4,0,252,255,246,255,245,255,248,255,252,255,3,0,11,0,17,0,19,0,15,0,8,0,0,0,252,255,252,255,254,255,0,0,255,255,253,255,253,255,255,255,3,0,5,0,6, +0,6,0,2,0,252,255,247,255,246,255,249,255,0,0,7,0,10,0,11,0,10,0,11,0,13,0,15,0,16,0,12,0,6,0,254,255,246,255,238,255,230,255,224,255,222,255,224,255,229,255,235,255,242,255,251,255,4,0,12,0,15,0,15,0,14,0,13,0,8,0,1,0,250,255,244,255,237,255,235,255, +238,255,244,255,252,255,6,0,15,0,22,0,25,0,21,0,11,0,255,255,245,255,237,255,233,255,233,255,234,255,234,255,236,255,243,255,250,255,252,255,252,255,250,255,245,255,237,255,230,255,225,255,223,255,223,255,223,255,226,255,229,255,230,255,227,255,222,255, +219,255,218,255,219,255,224,255,231,255,240,255,247,255,249,255,250,255,250,255,250,255,245,255,236,255,225,255,222,255,226,255,232,255,235,255,239,255,243,255,248,255,253,255,255,255,254,255,248,255,239,255,234,255,235,255,241,255,245,255,247,255,248, +255,249,255,249,255,248,255,247,255,245,255,242,255,240,255,238,255,235,255,231,255,225,255,221,255,222,255,225,255,228,255,234,255,241,255,247,255,253,255,4,0,10,0,13,0,15,0,21,0,27,0,33,0,39,0,43,0,44,0,44,0,45,0,48,0,51,0,53,0,54,0,54,0,52,0,50,0, +47,0,44,0,44,0,46,0,45,0,40,0,30,0,18,0,9,0,7,0,8,0,10,0,9,0,2,0,250,255,248,255,251,255,0,0,2,0,2,0,3,0,7,0,10,0,11,0,7,0,255,255,247,255,244,255,245,255,250,255,1,0,12,0,26,0,38,0,46,0,46,0,40,0,31,0,25,0,27,0,35,0,44,0,50,0,54,0,58,0,60,0,59,0,56, +0,48,0,40,0,32,0,29,0,28,0,31,0,33,0,33,0,32,0,29,0,26,0,21,0,14,0,5,0,252,255,244,255,238,255,233,255,230,255,229,255,227,255,224,255,221,255,217,255,214,255,210,255,204,255,198,255,193,255,190,255,191,255,195,255,198,255,199,255,197,255,195,255,194, +255,196,255,200,255,206,255,214,255,219,255,221,255,222,255,224,255,226,255,229,255,231,255,232,255,232,255,234,255,236,255,237,255,237,255,236,255,231,255,227,255,225,255,226,255,231,255,241,255,1,0,20,0,36,0,44,0,45,0,38,0,26,0,11,0,255,255,246,255, +242,255,242,255,241,255,241,255,241,255,242,255,242,255,242,255,242,255,241,255,240,255,237,255,233,255,229,255,225,255,225,255,226,255,227,255,226,255,224,255,223,255,226,255,231,255,233,255,233,255,235,255,239,255,244,255,250,255,0,0,6,0,9,0,8,0,8, +0,11,0,14,0,17,0,19,0,22,0,26,0,31,0,34,0,36,0,37,0,38,0,39,0,40,0,39,0,35,0,30,0,25,0,18,0,7,0,251,255,240,255,236,255,236,255,238,255,240,255,241,255,245,255,252,255,3,0,6,0,7,0,10,0,17,0,28,0,39,0,45,0,45,0,41,0,38,0,36,0,38,0,38,0,37,0,36,0,36,0, +34,0,32,0,30,0,29,0,31,0,36,0,43,0,49,0,51,0,51,0,49,0,44,0,37,0,28,0,20,0,15,0,15,0,20,0,28,0,34,0,36,0,35,0,30,0,23,0,13,0,0,0,243,255,230,255,221,255,215,255,212,255,214,255,221,255,232,255,246,255,4,0,12,0,14,0,10,0,7,0,7,0,10,0,11,0,11,0,12,0,14, +0,16,0,18,0,16,0,12,0,7,0,2,0,253,255,248,255,245,255,242,255,241,255,244,255,249,255,252,255,253,255,254,255,0,0,0,0,251,255,241,255,231,255,224,255,218,255,214,255,211,255,211,255,215,255,219,255,222,255,222,255,219,255,215,255,213,255,214,255,216, +255,218,255,221,255,225,255,230,255,235,255,240,255,241,255,238,255,234,255,231,255,230,255,227,255,223,255,220,255,220,255,222,255,227,255,233,255,239,255,244,255,248,255,249,255,247,255,242,255,234,255,225,255,217,255,212,255,213,255,220,255,230,255, +238,255,243,255,245,255,242,255,238,255,235,255,232,255,228,255,221,255,214,255,211,255,210,255,212,255,215,255,220,255,224,255,229,255,234,255,239,255,241,255,240,255,237,255,235,255,237,255,243,255,253,255,7,0,14,0,22,0,30,0,37,0,39,0,36,0,30,0,26, +0,28,0,34,0,39,0,42,0,41,0,36,0,29,0,22,0,18,0,16,0,17,0,20,0,22,0,21,0,19,0,18,0,20,0,21,0,19,0,13,0,6,0,2,0,1,0,3,0,6,0,6,0,1,0,250,255,246,255,247,255,252,255,4,0,12,0,20,0,27,0,31,0,35,0,39,0,43,0,46,0,47,0,45,0,42,0,41,0,42,0,44,0,44,0,41,0,38,0, +38,0,42,0,51,0,59,0,62,0,57,0,47,0,37,0,29,0,22,0,17,0,14,0,13,0,12,0,10,0,8,0,5,0,1,0,252,255,246,255,242,255,239,255,238,255,238,255,237,255,239,255,243,255,249,255,255,255,3,0,6,0,8,0,8,0,5,0,255,255,247,255,240,255,237,255,239,255,245,255,0,0,12, +0,24,0,33,0,38,0,37,0,31,0,25,0,21,0,18,0,16,0,17,0,20,0,23,0,24,0,23,0,20,0,18,0,15,0,14,0,14,0,15,0,16,0,17,0,16,0,14,0,11,0,7,0,4,0,1,0,253,255,248,255,242,255,236,255,233,255,232,255,232,255,234,255,236,255,238,255,237,255,232,255,223,255,213,255, +206,255,203,255,203,255,205,255,205,255,203,255,200,255,196,255,194,255,197,255,203,255,212,255,222,255,231,255,239,255,243,255,244,255,241,255,237,255,233,255,227,255,220,255,217,255,218,255,223,255,229,255,234,255,240,255,245,255,247,255,246,255,244, +255,240,255,234,255,227,255,222,255,221,255,221,255,221,255,220,255,222,255,225,255,226,255,222,255,214,255,203,255,192,255,183,255,179,255,181,255,188,255,198,255,210,255,222,255,232,255,239,255,241,255,240,255,237,255,235,255,234,255,235,255,236,255, +239,255,244,255,251,255,3,0,12,0,23,0,35,0,47,0,54,0,54,0,50,0,45,0,44,0,48,0,55,0,60,0,61,0,60,0,56,0,50,0,42,0,36,0,32,0,30,0,28,0,29,0,31,0,33,0,34,0,33,0,28,0,23,0,19,0,17,0,16,0,16,0,14,0,9,0,2,0,251,255,248,255,249,255,255,255,8,0,18,0,26,0,30, +0,32,0,33,0,32,0,30,0,24,0,15,0,8,0,4,0,2,0,2,0,5,0,12,0,21,0,28,0,32,0,34,0,34,0,31,0,26,0,19,0,11,0,6,0,4,0,6,0,11,0,17,0,23,0,27,0,29,0,27,0,20,0,9,0,0,0,250,255,249,255,251,255,1,0,10,0,20,0,30,0,37,0,40,0,38,0,31,0,22,0,12,0,2,0,249,255,242,255, +238,255,237,255,241,255,247,255,255,255,6,0,9,0,9,0,4,0,252,255,242,255,232,255,224,255,219,255,217,255,216,255,215,255,216,255,217,255,219,255,221,255,222,255,224,255,226,255,232,255,240,255,249,255,0,0,4,0,7,0,8,0,7,0,5,0,2,0,253,255,246,255,240,255, +236,255,235,255,237,255,240,255,241,255,241,255,239,255,239,255,241,255,245,255,249,255,251,255,253,255,254,255,0,0,4,0,8,0,11,0,7,0,252,255,236,255,221,255,211,255,207,255,207,255,207,255,208,255,210,255,215,255,223,255,232,255,240,255,245,255,246,255, +243,255,239,255,240,255,241,255,241,255,238,255,235,255,233,255,232,255,232,255,235,255,239,255,242,255,244,255,246,255,252,255,4,0,14,0,23,0,30,0,30,0,27,0,26,0,28,0,31,0,33,0,32,0,28,0,19,0,9,0,0,0,251,255,250,255,251,255,252,255,0,0,9,0,22,0,36,0, +46,0,49,0,46,0,42,0,38,0,36,0,33,0,28,0,23,0,20,0,17,0,16,0,16,0,17,0,19,0,22,0,26,0,30,0,30,0,29,0,27,0,25,0,19,0,11,0,2,0,252,255,251,255,251,255,249,255,246,255,243,255,238,255,236,255,241,255,250,255,5,0,13,0,17,0,20,0,21,0,20,0,17,0,12,0,7,0,3,0, +2,0,4,0,5,0,4,0,3,0,2,0,3,0,6,0,9,0,11,0,12,0,11,0,8,0,3,0,254,255,250,255,247,255,247,255,249,255,252,255,253,255,253,255,253,255,253,255,250,255,244,255,237,255,231,255,226,255,221,255,218,255,217,255,218,255,220,255,222,255,223,255,224,255,224,255, +224,255,224,255,223,255,221,255,220,255,223,255,226,255,230,255,233,255,237,255,240,255,245,255,250,255,254,255,0,0,0,0,255,255,252,255,251,255,252,255,254,255,1,0,5,0,8,0,7,0,3,0,0,0,255,255,1,0,3,0,3,0,1,0,254,255,253,255,254,255,255,255,255,255,251, +255,247,255,245,255,246,255,249,255,252,255,251,255,246,255,242,255,239,255,241,255,243,255,246,255,250,255,1,0,8,0,14,0,17,0,17,0,14,0,11,0,8,0,7,0,7,0,8,0,9,0,9,0,9,0,9,0,8,0,6,0,4,0,2,0,0,0,255,255,253,255,252,255,251,255,253,255,1,0,7,0,13,0,17,0, +17,0,15,0,10,0,2,0,249,255,243,255,243,255,248,255,255,255,8,0,14,0,18,0,18,0,15,0,10,0,3,0,252,255,245,255,241,255,239,255,239,255,240,255,243,255,247,255,250,255,0,0,6,0,10,0,10,0,7,0,4,0,3,0,3,0,6,0,11,0,17,0,23,0,25,0,21,0,13,0,6,0,0,0,250,255,244, +255,241,255,243,255,249,255,3,0,12,0,17,0,18,0,15,0,10,0,4,0,254,255,249,255,246,255,247,255,250,255,253,255,254,255,0,0,1,0,1,0,1,0,0,0,255,255,0,0,2,0,4,0,6,0,8,0,9,0,9,0,9,0,11,0,14,0,17,0,21,0,25,0,28,0,28,0,26,0,23,0,19,0,16,0,14,0,15,0,16,0,16, +0,16,0,17,0,19,0,21,0,22,0,22,0,22,0,20,0,14,0,7,0,255,255,249,255,245,255,243,255,242,255,241,255,240,255,239,255,238,255,239,255,239,255,240,255,240,255,241,255,244,255,247,255,250,255,250,255,248,255,243,255,237,255,232,255,230,255,233,255,236,255, +241,255,247,255,252,255,255,255,254,255,249,255,243,255,236,255,231,255,229,255,230,255,233,255,234,255,236,255,240,255,242,255,243,255,243,255,241,255,239,255,238,255,238,255,237,255,235,255,231,255,229,255,229,255,232,255,237,255,240,255,243,255,244, +255,245,255,248,255,251,255,252,255,252,255,250,255,250,255,250,255,252,255,255,255,4,0,8,0,11,0,13,0,13,0,12,0,9,0,5,0,3,0,1,0,255,255,254,255,255,255,1,0,3,0,4,0,3,0,0,0,251,255,245,255,241,255,240,255,240,255,241,255,243,255,246,255,249,255,251,255, +252,255,252,255,249,255,246,255,244,255,242,255,242,255,243,255,246,255,249,255,252,255,254,255,1,0,7,0,13,0,19,0,25,0,30,0,31,0,30,0,27,0,25,0,25,0,28,0,33,0,37,0,39,0,38,0,35,0,33,0,30,0,26,0,25,0,27,0,31,0,35,0,37,0,36,0,32,0,26,0,19,0,12,0,6,0,3, +0,2,0,255,255,250,255,241,255,230,255,220,255,214,255,214,255,218,255,223,255,227,255,231,255,232,255,232,255,234,255,237,255,240,255,243,255,245,255,245,255,242,255,238,255,234,255,233,255,235,255,242,255,252,255,7,0,18,0,25,0,27,0,25,0,21,0,18,0,18, +0,20,0,23,0,25,0,27,0,29,0,28,0,26,0,24,0,25,0,26,0,26,0,24,0,22,0,16,0,10,0,5,0,3,0,4,0,6,0,6,0,5,0,2,0,253,255,247,255,242,255,238,255,236,255,236,255,235,255,233,255,228,255,224,255,222,255,222,255,223,255,226,255,230,255,235,255,240,255,244,255,248, +255,248,255,248,255,246,255,247,255,248,255,250,255,251,255,254,255,1,0,4,0,7,0,9,0,10,0,10,0,10,0,12,0,16,0,22,0,25,0,25,0,21,0,17,0,13,0,11,0,9,0,7,0,6,0,4,0,4,0,4,0,2,0,255,255,251,255,248,255,247,255,249,255,253,255,0,0,4,0,7,0,7,0,6,0,5,0,7,0,8, +0,8,0,9,0,10,0,10,0,9,0,7,0,6,0,7,0,7,0,7,0,7,0,4,0,1,0,253,255,250,255,248,255,248,255,249,255,251,255,255,255,2,0,1,0,253,255,246,255,241,255,237,255,235,255,234,255,233,255,230,255,226,255,223,255,223,255,225,255,225,255,224,255,222,255,221,255,220, +255,219,255,217,255,214,255,213,255,214,255,219,255,227,255,234,255,238,255,239,255,239,255,238,255,237,255,234,255,232,255,234,255,239,255,244,255,249,255,251,255,253,255,255,255,1,0,3,0,5,0,8,0,12,0,15,0,16,0,15,0,14,0,12,0,12,0,14,0,16,0,18,0,18,0, +18,0,16,0,15,0,14,0,12,0,10,0,7,0,5,0,4,0,6,0,10,0,14,0,17,0,20,0,21,0,22,0,20,0,18,0,14,0,9,0,4,0,0,0,0,0,1,0,2,0,3,0,3,0,2,0,0,0,254,255,253,255,253,255,254,255,255,255,0,0,1,0,2,0,2,0,4,0,5,0,7,0,7,0,7,0,8,0,13,0,21,0,28,0,31,0,30,0,27,0,24,0,22,0, +21,0,20,0,20,0,19,0,16,0,14,0,13,0,13,0,13,0,14,0,15,0,18,0,21,0,22,0,22,0,19,0,16,0,15,0,16,0,18,0,21,0,22,0,22,0,19,0,15,0,10,0,6,0,4,0,4,0,6,0,10,0,12,0,13,0,13,0,10,0,7,0,4,0,3,0,5,0,9,0,13,0,16,0,16,0,15,0,12,0,9,0,6,0,1,0,252,255,246,255,242,255, +240,255,242,255,245,255,246,255,245,255,244,255,242,255,241,255,239,255,236,255,232,255,229,255,227,255,228,255,231,255,233,255,234,255,234,255,233,255,230,255,226,255,222,255,220,255,219,255,218,255,217,255,217,255,217,255,218,255,219,255,221,255,223, +255,225,255,227,255,230,255,233,255,234,255,234,255,232,255,231,255,231,255,233,255,236,255,239,255,242,255,243,255,245,255,247,255,251,255,254,255,1,0,3,0,4,0,7,0,9,0,10,0,10,0,9,0,6,0,2,0,254,255,251,255,250,255,250,255,250,255,249,255,248,255,247, +255,248,255,249,255,249,255,248,255,245,255,243,255,244,255,249,255,255,255,3,0,4,0,5,0,5,0,6,0,6,0,4,0,1,0,253,255,251,255,250,255,251,255,253,255,254,255,255,255,255,255,1,0,4,0,6,0,8,0,8,0,7,0,5,0,2,0,1,0,1,0,1,0,3,0,5,0,7,0,8,0,7,0,6,0,5,0,4,0,3, +0,4,0,4,0,4,0,3,0,5,0,7,0,8,0,6,0,2,0,253,255,250,255,249,255,253,255,3,0,7,0,10,0,12,0,14,0,17,0,19,0,19,0,19,0,17,0,15,0,14,0,13,0,13,0,13,0,13,0,13,0,12,0,9,0,6,0,4,0,5,0,6,0,7,0,8,0,11,0,14,0,18,0,22,0,24,0,26,0,26,0,26,0,25,0,25,0,22,0,18,0,13,0, +8,0,6,0,6,0,8,0,10,0,12,0,13,0,14,0,15,0,17,0,18,0,17,0,16,0,15,0,16,0,19,0,21,0,22,0,23,0,22,0,19,0,15,0,11,0,9,0,6,0,4,0,2,0,1,0,0,0,255,255,0,0,1,0,1,0,1,0,255,255,253,255,251,255,248,255,244,255,241,255,240,255,242,255,244,255,247,255,247,255,246, +255,242,255,239,255,237,255,236,255,235,255,234,255,233,255,231,255,229,255,227,255,226,255,227,255,230,255,234,255,241,255,247,255,251,255,252,255,252,255,251,255,250,255,249,255,249,255,250,255,252,255,252,255,250,255,247,255,244,255,242,255,243,255, +245,255,248,255,250,255,252,255,254,255,255,255,255,255,254,255,253,255,252,255,251,255,248,255,243,255,236,255,227,255,221,255,219,255,221,255,226,255,231,255,236,255,238,255,238,255,238,255,238,255,238,255,238,255,239,255,241,255,243,255,245,255,246, +255,247,255,248,255,248,255,247,255,247,255,246,255,244,255,241,255,240,255,239,255,240,255,242,255,244,255,247,255,251,255,254,255,1,0,4,0,6,0,9,0,14,0,20,0,24,0,24,0,20,0,14,0,9,0,6,0,7,0,8,0,10,0,12,0,15,0,18,0,19,0,17,0,13,0,9,0,5,0,3,0,2,0,0,0,254, +255,254,255,255,255,2,0,2,0,0,0,252,255,249,255,247,255,246,255,248,255,250,255,252,255,253,255,254,255,1,0,4,0,6,0,6,0,6,0,5,0,6,0,8,0,12,0,14,0,15,0,15,0,15,0,16,0,17,0,18,0,18,0,17,0,14,0,11,0,8,0,7,0,9,0,11,0,15,0,19,0,21,0,23,0,25,0,26,0,26,0,26, +0,25,0,22,0,18,0,13,0,8,0,5,0,2,0,2,0,3,0,5,0,7,0,9,0,10,0,10,0,8,0,5,0,1,0,254,255,252,255,252,255,252,255,251,255,250,255,249,255,248,255,249,255,249,255,248,255,248,255,247,255,248,255,249,255,250,255,250,255,251,255,252,255,255,255,255,255,254,255, +249,255,244,255,240,255,239,255,238,255,237,255,238,255,239,255,242,255,246,255,250,255,252,255,252,255,251,255,249,255,249,255,249,255,250,255,249,255,248,255,246,255,244,255,242,255,240,255,237,255,236,255,236,255,239,255,242,255,245,255,246,255,246, +255,246,255,244,255,242,255,241,255,239,255,240,255,243,255,245,255,247,255,248,255,250,255,253,255,0,0,2,0,2,0,2,0,2,0,4,0,7,0,10,0,10,0,8,0,6,0,5,0,5,0,6,0,8,0,8,0,7,0,6,0,5,0,5,0,5,0,6,0,9,0,10,0,10,0,8,0,5,0,0,0,251,255,249,255,249,255,251,255,253, +255,255,255,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,11,0,12,0,13,0,13,0,13,0,13,0,12,0,12,0,12,0,12,0,11,0,12,0,13,0,15,0,16,0,18,0,20,0,21,0,21,0,19,0,17,0,12,0,7,0,2,0,254,255,250,255,248,255,248,255,249,255,249,255,249,255,248,255,249,255,249,255,248,255, +247,255,246,255,246,255,247,255,250,255,253,255,0,0,255,255,252,255,248,255,245,255,242,255,240,255,240,255,243,255,246,255,249,255,249,255,249,255,248,255,248,255,248,255,248,255,249,255,251,255,252,255,255,255,1,0,1,0,0,0,254,255,253,255,253,255,253, +255,253,255,252,255,249,255,246,255,245,255,247,255,249,255,250,255,250,255,250,255,250,255,251,255,252,255,254,255,255,255,0,0,0,0,1,0,2,0,4,0,6,0,7,0,7,0,7,0,6,0,3,0,0,0,254,255,252,255,251,255,252,255,253,255,0,0,3,0,8,0,13,0,15,0,15,0,12,0,10,0,9, +0,10,0,12,0,13,0,13,0,12,0,12,0,11,0,11,0,10,0,8,0,5,0,2,0,254,255,251,255,248,255,247,255,248,255,249,255,250,255,250,255,251,255,251,255,252,255,251,255,250,255,248,255,246,255,245,255,244,255,245,255,246,255,246,255,246,255,243,255,240,255,238,255, +238,255,239,255,239,255,238,255,238,255,239,255,242,255,245,255,248,255,250,255,252,255,252,255,251,255,250,255,249,255,248,255,246,255,245,255,246,255,246,255,245,255,243,255,240,255,238,255,236,255,237,255,239,255,241,255,244,255,246,255,249,255,252, +255,255,255,1,0,2,0,1,0,254,255,251,255,247,255,244,255,242,255,242,255,244,255,247,255,253,255,2,0,8,0,14,0,19,0,23,0,24,0,23,0,19,0,15,0,12,0,9,0,6,0,2,0,255,255,253,255,252,255,254,255,2,0,8,0,13,0,16,0,18,0,19,0,20,0,20,0,21,0,20,0,19,0,17,0,14,0, +12,0,9,0,7,0,5,0,4,0,3,0,3,0,5,0,8,0,10,0,12,0,14,0,16,0,18,0,19,0,20,0,22,0,24,0,26,0,26,0,25,0,22,0,19,0,17,0,17,0,17,0,17,0,17,0,18,0,19,0,20,0,20,0,20,0,18,0,16,0,15,0,14,0,13,0,11,0,8,0,5,0,1,0,254,255,252,255,251,255,250,255,249,255,247,255,246, +255,247,255,248,255,249,255,250,255,249,255,248,255,244,255,240,255,236,255,233,255,233,255,234,255,234,255,234,255,234,255,235,255,238,255,241,255,243,255,244,255,242,255,240,255,239,255,240,255,241,255,242,255,243,255,243,255,243,255,244,255,247,255, +250,255,252,255,255,255,1,0,3,0,4,0,3,0,1,0,0,0,255,255,254,255,253,255,252,255,250,255,249,255,248,255,247,255,246,255,245,255,243,255,241,255,240,255,239,255,240,255,240,255,240,255,241,255,241,255,241,255,242,255,244,255,247,255,251,255,255,255,1, +0,1,0,1,0,0,0,0,0,254,255,253,255,250,255,247,255,244,255,242,255,242,255,244,255,247,255,250,255,251,255,252,255,253,255,254,255,255,255,255,255,252,255,249,255,247,255,247,255,247,255,246,255,243,255,241,255,240,255,241,255,242,255,243,255,243,255, +243,255,243,255,244,255,245,255,247,255,251,255,254,255,2,0,4,0,3,0,0,0,252,255,250,255,251,255,254,255,2,0,4,0,6,0,7,0,8,0,8,0,8,0,9,0,11,0,15,0,20,0,25,0,28,0,29,0,26,0,22,0,18,0,15,0,12,0,10,0,9,0,9,0,8,0,9,0,10,0,12,0,15,0,19,0,22,0,24,0,24,0,21, +0,16,0,10,0,5,0,2,0,1,0,2,0,5,0,9,0,12,0,14,0,15,0,16,0,16,0,16,0,16,0,17,0,17,0,15,0,14,0,13,0,13,0,13,0,12,0,10,0,7,0,3,0,0,0,254,255,253,255,251,255,251,255,251,255,252,255,255,255,1,0,2,0,1,0,0,0,255,255,253,255,252,255,250,255,249,255,248,255,248, +255,248,255,249,255,250,255,251,255,253,255,0,0,3,0,6,0,6,0,5,0,4,0,2,0,1,0,0,0,0,0,1,0,0,0,254,255,253,255,253,255,253,255,254,255,255,255,1,0,3,0,4,0,3,0,1,0,255,255,253,255,252,255,252,255,252,255,253,255,254,255,0,0,2,0,1,0,255,255,254,255,254,255, +252,255,250,255,248,255,246,255,243,255,242,255,242,255,244,255,245,255,246,255,247,255,247,255,248,255,249,255,250,255,250,255,249,255,248,255,247,255,245,255,243,255,240,255,237,255,234,255,231,255,229,255,228,255,229,255,232,255,236,255,241,255,245, +255,249,255,251,255,252,255,251,255,248,255,246,255,244,255,243,255,242,255,242,255,243,255,244,255,246,255,248,255,251,255,254,255,0,0,1,0,1,0,1,0,0,0,0,0,1,0,3,0,3,0,2,0,0,0,253,255,252,255,252,255,251,255,251,255,249,255,247,255,247,255,249,255,251, +255,252,255,252,255,251,255,249,255,247,255,246,255,245,255,245,255,245,255,245,255,246,255,247,255,248,255,250,255,252,255,254,255,0,0,2,0,4,0,7,0,8,0,9,0,9,0,9,0,9,0,9,0,11,0,13,0,14,0,15,0,15,0,16,0,16,0,17,0,17,0,17,0,16,0,15,0,14,0,14,0,13,0,12, +0,10,0,7,0,5,0,5,0,5,0,5,0,5,0,4,0,3,0,3,0,4,0,6,0,7,0,9,0,10,0,10,0,10,0,9,0,9,0,9,0,7,0,4,0,1,0,253,255,252,255,252,255,253,255,0,0,2,0,2,0,2,0,3,0,5,0,8,0,11,0,14,0,17,0,18,0,17,0,15,0,13,0,12,0,11,0,10,0,9,0,8,0,8,0,8,0,7,0,6,0,5,0,4,0,4,0,4,0,3, +0,2,0,2,0,4,0,7,0,9,0,12,0,13,0,13,0,12,0,10,0,8,0,6,0,4,0,1,0,255,255,254,255,255,255,1,0,4,0,8,0,11,0,11,0,10,0,8,0,5,0,2,0,255,255,251,255,248,255,245,255,242,255,241,255,240,255,240,255,240,255,238,255,237,255,236,255,236,255,237,255,239,255,241, +255,243,255,245,255,245,255,246,255,247,255,246,255,245,255,243,255,239,255,237,255,234,255,233,255,232,255,233,255,235,255,237,255,241,255,247,255,253,255,2,0,5,0,6,0,4,0,1,0,254,255,252,255,252,255,251,255,251,255,251,255,252,255,253,255,254,255,255, +255,255,255,255,255,0,0,2,0,2,0,0,0,254,255,252,255,250,255,249,255,248,255,249,255,250,255,250,255,249,255,247,255,245,255,243,255,242,255,241,255,242,255,245,255,247,255,249,255,249,255,250,255,250,255,249,255,248,255,247,255,247,255,247,255,247,255, +247,255,247,255,249,255,252,255,255,255,2,0,4,0,3,0,2,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,0,0,255,255,254,255,253,255,252,255,252,255,252,255,254,255,1,0,3,0,4,0,4,0,6,0,8,0,10,0,10,0,9,0,8,0,5,0,3,0,0,0,0,0,1,0,3,0,5,0,6,0,6,0,5,0,4,0,4,0,5,0,6,0,6,0, +7,0,8,0,9,0,9,0,9,0,8,0,6,0,3,0,2,0,2,0,3,0,4,0,6,0,7,0,7,0,8,0,9,0,11,0,12,0,12,0,11,0,9,0,8,0,7,0,6,0,5,0,4,0,3,0,2,0,2,0,3,0,4,0,4,0,5,0,5,0,5,0,5,0,4,0,4,0,4,0,5,0,4,0,4,0,3,0,2,0,1,0,0,0,254,255,251,255,249,255,249,255,251,255,254,255,2,0,4,0,5, +0,5,0,4,0,3,0,2,0,2,0,1,0,1,0,1,0,3,0,5,0,6,0,6,0,5,0,3,0,1,0,255,255,253,255,251,255,249,255,248,255,247,255,247,255,248,255,251,255,253,255,255,255,0,0,0,0,0,0,255,255,0,0,1,0,1,0,255,255,251,255,249,255,249,255,251,255,255,255,2,0,4,0,4,0,3,0,1,0, +255,255,255,255,254,255,254,255,255,255,0,0,2,0,4,0,4,0,1,0,253,255,249,255,245,255,243,255,241,255,241,255,242,255,243,255,244,255,247,255,249,255,251,255,252,255,252,255,251,255,249,255,246,255,243,255,241,255,239,255,239,255,239,255,241,255,243,255, +247,255,251,255,253,255,254,255,253,255,252,255,252,255,252,255,253,255,253,255,252,255,252,255,253,255,254,255,255,255,0,0,255,255,253,255,253,255,255,255,2,0,5,0,7,0,8,0,7,0,6,0,6,0,6,0,7,0,7,0,6,0,5,0,2,0,254,255,250,255,248,255,247,255,247,255,247, +255,249,255,251,255,253,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,254,255,252,255,251,255,250,255,250,255,251,255,253,255,255,255,1,0,3,0,4,0,5,0,6,0,7,0,9,0,11,0,12,0,13,0,13,0,12,0,12,0,11,0,11,0,12,0,12,0,13,0,14, +0,13,0,12,0,10,0,8,0,7,0,6,0,6,0,6,0,7,0,8,0,10,0,12,0,12,0,12,0,10,0,6,0,3,0,1,0,255,255,254,255,252,255,251,255,250,255,250,255,252,255,254,255,255,255,255,255,254,255,253,255,253,255,254,255,1,0,4,0,7,0,8,0,8,0,7,0,6,0,4,0,2,0,255,255,253,255,252, +255,254,255,0,0,2,0,3,0,3,0,3,0,2,0,0,0,254,255,253,255,252,255,251,255,249,255,247,255,245,255,244,255,243,255,244,255,246,255,247,255,247,255,246,255,245,255,245,255,245,255,245,255,244,255,243,255,243,255,243,255,243,255,244,255,244,255,245,255,244, +255,243,255,242,255,241,255,241,255,241,255,241,255,241,255,241,255,242,255,242,255,243,255,244,255,245,255,245,255,245,255,245,255,244,255,244,255,245,255,245,255,245,255,246,255,247,255,249,255,253,255,1,0,4,0,6,0,7,0,8,0,8,0,8,0,9,0,8,0,8,0,9,0,10, +0,10,0,10,0,10,0,10,0,10,0,10,0,9,0,9,0,8,0,9,0,10,0,12,0,13,0,13,0,13,0,11,0,9,0,5,0,2,0,255,255,253,255,252,255,252,255,252,255,251,255,251,255,252,255,255,255,2,0,4,0,4,0,2,0,1,0,0,0,254,255,254,255,253,255,253,255,253,255,254,255,255,255,255,255, +0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,2,0,3,0,2,0,2,0,3,0,5,0,7,0,8,0,8,0,8,0,8,0,7,0,7,0,5,0,4,0,3,0,2,0,2,0,3,0,4,0,4,0,6,0,7,0,8,0,7,0,6,0,4,0,3,0,2,0,2,0,5,0,8,0,11,0,14,0,15,0,15,0,13,0,12,0,10,0,9,0,10,0,10,0,11,0,12,0,12,0,12,0,10,0,7,0,4,0,1,0,0,0, +0,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,254,255,252,255,250,255,249,255,249,255,250,255,252,255,253,255,254,255,254,255,254,255,253,255,252,255,251,255,250,255,249,255,249,255,249,255,248,255,247,255,246,255,246,255,246,255,246,255,246,255,245,255, +245,255,246,255,247,255,249,255,249,255,249,255,247,255,245,255,245,255,245,255,245,255,244,255,242,255,240,255,238,255,236,255,236,255,236,255,237,255,240,255,243,255,246,255,248,255,249,255,248,255,247,255,245,255,244,255,244,255,245,255,247,255,250, +255,252,255,253,255,254,255,254,255,254,255,255,255,0,0,1,0,1,0,1,0,0,0,254,255,253,255,252,255,252,255,253,255,255,255,1,0,3,0,4,0,5,0,4,0,4,0,4,0,4,0,3,0,2,0,255,255,252,255,249,255,247,255,247,255,247,255,249,255,252,255,255,255,3,0,5,0,5,0,4,0,2, +0,0,0,0,0,1,0,1,0,0,0,255,255,253,255,251,255,251,255,252,255,254,255,0,0,2,0,3,0,4,0,5,0,7,0,9,0,9,0,8,0,6,0,5,0,3,0,2,0,2,0,1,0,0,0,255,255,253,255,251,255,251,255,251,255,253,255,255,255,0,0,1,0,2,0,3,0,6,0,7,0,8,0,6,0,4,0,1,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,0,0,1,0,3,0,6,0,8,0,11,0,13,0,14,0,14,0,15,0,15,0,15,0,15,0,13,0,11,0,10,0,9,0,8,0,8,0,6,0,5,0,5,0,5,0,6,0,7,0,8,0,10,0,11,0,11,0,11,0,10,0,8,0,6,0,5,0,4,0,4,0,5,0,6,0,6,0,5,0,4,0,3,0,3,0,2,0,2,0,3,0,4,0,4,0,3,0,2,0,0,0,254,255,253, +255,251,255,250,255,250,255,251,255,252,255,252,255,250,255,249,255,248,255,249,255,250,255,252,255,253,255,254,255,254,255,253,255,251,255,249,255,247,255,247,255,247,255,249,255,250,255,251,255,252,255,252,255,252,255,252,255,252,255,253,255,255,255, +0,0,0,0,0,0,255,255,253,255,252,255,252,255,252,255,253,255,254,255,254,255,253,255,251,255,250,255,248,255,248,255,247,255,248,255,250,255,252,255,253,255,252,255,249,255,247,255,245,255,244,255,243,255,243,255,244,255,244,255,244,255,244,255,243,255, +243,255,242,255,243,255,244,255,245,255,246,255,247,255,248,255,249,255,251,255,252,255,253,255,253,255,253,255,252,255,250,255,248,255,246,255,244,255,244,255,245,255,247,255,249,255,251,255,253,255,254,255,0,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,255,255,253, +255,252,255,252,255,252,255,253,255,254,255,0,0,3,0,6,0,9,0,11,0,12,0,12,0,12,0,12,0,10,0,9,0,7,0,6,0,5,0,4,0,3,0,3,0,3,0,4,0,5,0,6,0,7,0,7,0,8,0,7,0,6,0,6,0,5,0,5,0,5,0,5,0,5,0,3,0,2,0,0,0,255,255,254,255,254,255,255,255,1,0,3,0,4,0,4,0,4,0,4,0,3,0, +2,0,2,0,2,0,3,0,5,0,7,0,7,0,7,0,6,0,5,0,4,0,5,0,5,0,5,0,4,0,3,0,3,0,4,0,5,0,6,0,7,0,7,0,6,0,6,0,5,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,3,0,3,0,2,0,2,0,2,0,3,0,4,0,4,0,5,0,5,0,6,0,5,0,4,0,3,0,2,0,0,0,255,255,254,255,253,255,253,255,254,255,255,255,0, +0,0,0,0,0,255,255,254,255,253,255,252,255,251,255,251,255,251,255,251,255,251,255,251,255,251,255,251,255,251,255,250,255,249,255,249,255,249,255,250,255,252,255,253,255,253,255,254,255,254,255,253,255,252,255,250,255,248,255,247,255,247,255,248,255, +249,255,249,255,249,255,249,255,248,255,248,255,247,255,247,255,247,255,248,255,249,255,250,255,251,255,252,255,252,255,252,255,251,255,251,255,250,255,250,255,249,255,248,255,248,255,248,255,250,255,251,255,252,255,252,255,251,255,250,255,248,255,246, +255,244,255,244,255,244,255,246,255,248,255,251,255,253,255,252,255,251,255,250,255,248,255,246,255,245,255,245,255,247,255,249,255,251,255,254,255,0,0,2,0,3,0,4,0,5,0,5,0,3,0,2,0,1,0,0,0,0,0,1,0,3,0,6,0,7,0,9,0,9,0,9,0,9,0,8,0,8,0,9,0,10,0,11,0,11,0, +10,0,8,0,5,0,2,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,3,0,5,0,7,0,8,0,8,0,6,0,3,0,0,0,254,255,251,255,250,255,250,255,251,255,253,255,255,255,1,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,8,0,7,0,6,0,5,0,3,0,2,0,1,0,0,0,254,255,253,255,253,255,254,255,0, +0,2,0,4,0,5,0,5,0,4,0,4,0,3,0,2,0,0,0,254,255,253,255,252,255,252,255,252,255,251,255,251,255,251,255,251,255,250,255,250,255,249,255,249,255,250,255,252,255,255,255,2,0,4,0,5,0,6,0,6,0,5,0,5,0,3,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,3,0,3,0,4,0,4,0, +3,0,3,0,1,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,0,0,255,255,255,255,255,255,255,255,0,0,1,0,0,0,255,255,255,255,254,255,253,255,252,255,251,255,250,255,249,255,249,255,249,255,250,255,251,255,251,255,251,255,252,255,253,255,253,255,252,255,250,255,249,255, +249,255,250,255,251,255,253,255,254,255,254,255,254,255,252,255,250,255,248,255,246,255,245,255,245,255,245,255,245,255,246,255,248,255,250,255,253,255,254,255,255,255,254,255,254,255,253,255,253,255,253,255,253,255,252,255,253,255,253,255,253,255,253, +255,254,255,254,255,255,255,0,0,2,0,3,0,4,0,4,0,4,0,3,0,2,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,0,3,0,5,0,7,0,8,0,7,0,6,0,3,0,0,0,254,255,252,255,252,255,252,255,254,255,255,255,0,0,0,0,0,0,255,255,254,255,254,255,254,255,255,255,0,0,1, +0,1,0,1,0,2,0,3,0,3,0,3,0,2,0,0,0,255,255,255,255,254,255,253,255,253,255,252,255,252,255,253,255,255,255,0,0,2,0,3,0,4,0,4,0,4,0,3,0,2,0,1,0,255,255,255,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,1,0,3,0,4,0,5,0,5,0,4,0,3,0,3,0,3,0,4,0, +5,0,6,0,7,0,7,0,7,0,7,0,7,0,6,0,5,0,3,0,3,0,2,0,2,0,2,0,2,0,2,0,4,0,5,0,6,0,6,0,5,0,3,0,1,0,255,255,254,255,252,255,251,255,250,255,250,255,250,255,251,255,253,255,254,255,0,0,2,0,4,0,5,0,5,0,5,0,4,0,4,0,3,0,2,0,1,0,0,0,255,255,255,255,0,0,2,0,4,0,6, +0,6,0,5,0,3,0,1,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,252,255,251,255,249,255,248,255,247,255,248,255,249,255,251,255,252,255,252,255,250,255,247,255,245,255,245,255,245,255,245,255,247,255,249,255,251,255,251,255,251,255,250,255,250, +255,250,255,251,255,251,255,251,255,251,255,252,255,252,255,252,255,252,255,252,255,253,255,253,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,254,255,252,255,251,255,250,255,249,255,248,255,248,255,249,255,251,255,252,255,252, +255,251,255,249,255,248,255,247,255,246,255,245,255,245,255,245,255,247,255,249,255,251,255,253,255,254,255,255,255,1,0,1,0,2,0,2,0,2,0,3,0,3,0,3,0,4,0,5,0,6,0,8,0,10,0,11,0,11,0,10,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,10,0,10,0,11,0,11,0,11,0,11,0,10,0, +7,0,4,0,1,0,255,255,254,255,254,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,2,0,2,0,2,0,1,0,0,0,255,255,255,255,0,0,0,0,1,0,1,0,1,0,2,0,3,0,4,0,5,0,6,0,6,0,6,0,5,0,4,0,2,0,0,0,255,255,254,255,255,255,0,0,1,0,1, +0,0,0,254,255,253,255,252,255,251,255,251,255,251,255,251,255,251,255,252,255,253,255,253,255,253,255,254,255,0,0,2,0,3,0,2,0,1,0,0,0,255,255,255,255,0,0,2,0,4,0,5,0,5,0,5,0,4,0,2,0,2,0,1,0,2,0,2,0,3,0,3,0,3,0,3,0,2,0,2,0,0,0,255,255,254,255,253,255, +252,255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,252,255,250,255,249,255,248,255,248,255,248,255,249,255,250,255,250,255,250,255,249,255,248,255,247,255,246,255,245,255,245,255,245,255,245,255,246,255,247,255,248,255,249,255,250,255,251, +255,251,255,251,255,252,255,252,255,253,255,254,255,254,255,255,255,255,255,255,255,0,0,1,0,2,0,3,0,2,0,2,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,253,255, +252,255,252,255,253,255,253,255,254,255,254,255,254,255,255,255,1,0,2,0,3,0,3,0,3,0,4,0,4,0,4,0,3,0,2,0,1,0,255,255,253,255,252,255,252,255,252,255,253,255,255,255,1,0,2,0,3,0,2,0,2,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255, +254,255,254,255,255,255,0,0,1,0,1,0,1,0,2,0,2,0,3,0,4,0,4,0,3,0,2,0,1,0,1,0,1,0,3,0,3,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,3,0,3,0,3,0,3,0,4,0,5,0,5,0,6,0,7,0,7,0,7,0,6,0,5,0,3,0,1,0,255,255,255,255,0,0,1,0,2,0,3,0,4,0,4,0,4,0,4,0,3,0,2,0,1,0,0,0,255,255,254, +255,254,255,255,255,0,0,1,0,1,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,253,255,252,255,251,255,251,255,251,255,252,255,254,255,0,0,0,0,0,0,255,255,254,255,254,255,254,255,253,255,253,255,253,255,253,255, +254,255,254,255,255,255,254,255,254,255,254,255,254,255,255,255,0,0,0,0,0,0,255,255,253,255,252,255,250,255,249,255,248,255,248,255,249,255,250,255,252,255,253,255,254,255,255,255,255,255,254,255,253,255,252,255,252,255,251,255,252,255,252,255,253,255, +253,255,253,255,254,255,254,255,253,255,253,255,252,255,251,255,251,255,251,255,252,255,252,255,253,255,254,255,255,255,255,255,255,255,254,255,253,255,252,255,251,255,252,255,253,255,255,255,0,0,1,0,3,0,4,0,4,0,4,0,2,0,0,0,254,255,253,255,253,255,253, +255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,3,0,3,0,3,0,2,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,3,0,4,0,4,0,4,0,3,0,1,0,0,0,255,255,255,255,255,255,0,0,1,0,2,0,2,0,3,0,3,0,3,0,3,0,4,0,5,0,6,0,6,0,6,0,5,0,4,0,3, +0,2,0,2,0,2,0,3,0,3,0,4,0,5,0,5,0,4,0,2,0,1,0,255,255,254,255,254,255,255,255,0,0,1,0,1,0,2,0,3,0,4,0,4,0,4,0,4,0,3,0,2,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,254,255,253,255,252,255,252, +255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,252,255,251,255,249,255,249,255,248,255,248,255,248,255,248,255,249,255,250,255,251,255,252,255,253,255,254,255,253,255,253,255,252,255,252,255,251,255,251,255,252,255,252,255,253,255, +253,255,253,255,254,255,254,255,254,255,254,255,254,255,0,0,1,0,3,0,4,0,5,0,4,0,3,0,1,0,255,255,253,255,251,255,250,255,250,255,250,255,251,255,253,255,255,255,1,0,3,0,4,0,4,0,4,0,3,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,253, +255,252,255,251,255,251,255,251,255,252,255,254,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,0, +0,1,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,253,255,253,255,254,255,255,255,0,0,1,0,2,0,3,0,4,0,4,0,4,0,4,0,3,0,1,0,0,0,255,255,255,255,255,255,0,0,1,0,3,0,4,0,5,0,5,0,5,0,5,0,5,0,5,0,4,0,3,0,2,0,3,0,3,0,3,0,4,0,3,0,2,0,1,0,0,0,254,255,253,255, +251,255,250,255,250,255,251,255,252,255,254,255,255,255,255,255,255,255,255,255,254,255,254,255,253,255,253,255,254,255,254,255,255,255,0,0,0,0,1,0,2,0,2,0,2,0,1,0,1,0,2,0,3,0,4,0,5,0,6,0,6,0,6,0,7,0,7,0,7,0,7,0,7,0,7,0,6,0,5,0,4,0,2,0,1,0,0,0,1,0,2, +0,3,0,4,0,3,0,2,0,1,0,254,255,252,255,250,255,249,255,248,255,249,255,250,255,251,255,252,255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,252,255,251,255,251, +255,252,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,252,255,252,255,252,255,251,255,251,255,250,255,250,255,250,255,250,255,250,255,251,255,251,255,251,255,251,255,250,255,250,255,251,255,251,255,252,255,252,255,252,255,252,255, +252,255,252,255,252,255,252,255,252,255,252,255,253,255,255,255,0,0,1,0,2,0,2,0,2,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,3,0,4,0,5,0,5,0,5,0,4,0,3,0,2,0,1,0,0,0,0,0,0,0,1,0,2,0,3,0,4,0,4,0,4,0,4,0,3,0,1,0,255,255,254,255,254,255,254,255,254,255,254,255,254,255, +254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,255,255,254,255,252,255,251,255,250,255,250,255,250,255,251,255,252,255,253,255,254,255,0,0,1,0,2,0,3,0,3,0,3,0,3,0,3,0,4,0,4,0,4,0,4,0,4,0,5,0,5,0,5,0,4,0,3,0,2,0,2,0,1,0,2,0,2,0,2,0,3,0,4, +0,4,0,5,0,5,0,5,0,4,0,2,0,2,0,2,0,2,0,1,0,0,0,255,255,255,255,0,0,2,0,4,0,5,0,5,0,5,0,4,0,4,0,3,0,2,0,1,0,1,0,0,0,0,0,255,255,255,255,254,255,253,255,251,255,250,255,250,255,249,255,250,255,251,255,251,255,252,255,252,255,252,255,252,255,252,255,253, +255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,251,255,251,255,251,255,252,255,253,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,254,255,253,255,253,255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,252,255,251,255,250, +255,249,255,249,255,249,255,250,255,250,255,249,255,248,255,247,255,247,255,247,255,248,255,249,255,250,255,250,255,250,255,250,255,250,255,251,255,252,255,254,255,255,255,1,0,3,0,3,0,3,0,3,0,4,0,4,0,5,0,6,0,6,0,7,0,7,0,7,0,6,0,6,0,6,0,6,0,6,0,6,0,6, +0,5,0,4,0,4,0,3,0,2,0,2,0,3,0,4,0,4,0,4,0,3,0,2,0,1,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,1,0,3,0,4,0,5,0,5,0,5,0,5,0,6,0,6,0,5,0,5,0,3,0,1,0,255,255,253,255,252,255,252,255,253,255,255,255,0,0,2,0, +2,0,2,0,1,0,255,255,253,255,252,255,251,255,251,255,251,255,252,255,253,255,253,255,254,255,254,255,254,255,254,255,253,255,253,255,251,255,251,255,250,255,250,255,250,255,250,255,250,255,252,255,254,255,0,0,1,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,2, +0,3,0,4,0,4,0,3,0,2,0,2,0,2,0,3,0,4,0,4,0,5,0,5,0,4,0,3,0,3,0,3,0,2,0,2,0,2,0,1,0,0,0,255,255,253,255,252,255,252,255,252,255,253,255,254,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,253,255,252,255,252,255,251,255,252, +255,252,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,255,255,0,0,1,0,2,0,3,0,3,0,3,0,3,0,2,0,0,0,255,255,254,255,254,255,254,255,254,255,254,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255, +255,254,255,253,255,252,255,253,255,253,255,253,255,252,255,251,255,250,255,249,255,249,255,249,255,250,255,252,255,253,255,255,255,1,0,2,0,3,0,3,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +254,255,254,255,254,255,254,255,254,255,255,255,0,0,1,0,2,0,3,0,3,0,2,0,1,0,0,0,255,255,255,255,0,0,1,0,2,0,3,0,4,0,5,0,4,0,3,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255, +253,255,253,255,253,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,253,255,253,255,254,255,255,255,0,0,0,0,0,0,255,255,253,255,252,255,252,255,251,255,251,255,251,255,250,255,250,255,250,255,251,255,252,255,253,255,254,255, +255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,3,0,2,0,2,0,2,0,2,0,3,0,4,0,5,0,6,0,6,0,7,0,7,0,6,0,6,0,5,0,3,0,2,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,254,255, +254,255,253,255,253,255,252,255,252,255,252,255,251,255,251,255,251,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,254,255,253,255,253,255,252,255,251,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,252,255,252,255,253,255,253, +255,254,255,0,0,1,0,2,0,2,0,1,0,255,255,254,255,253,255,252,255,251,255,252,255,253,255,254,255,255,255,0,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,0,0,0,0,1,0,1,0,2,0,1,0,1,0,0,0,255,255,254,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,253,255,253,255,253,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,0,2,0,4,0,4,0,5,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6, +0,5,0,5,0,4,0,3,0,3,0,2,0,2,0,1,0,1,0,1,0,1,0,2,0,3,0,4,0,5,0,6,0,6,0,6,0,6,0,5,0,3,0,1,0,0,0,254,255,253,255,252,255,252,255,252,255,252,255,253,255,254,255,255,255,0,0,0,0,1,0,0,0,255,255,255,255,254,255,254,255,254,255,253,255,253,255,252,255,252, +255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,251,255,251,255,251,255,250,255,250,255,250,255,250,255,249,255,249,255,249,255,250,255, +250,255,251,255,252,255,252,255,252,255,252,255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,253,255,252,255,252,255,252,255,252,255,253,255,254,255,255,255,255,255,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,3,0,3,0,4,0,4, +0,4,0,4,0,3,0,3,0,3,0,3,0,4,0,4,0,4,0,3,0,3,0,2,0,1,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,0,0,0,0,0,0,1,0,2,0,2,0,3,0,3,0,3,0,4,0,4,0,4,0,5,0,4,0,4,0,3,0,2,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0, +3,0,4,0,4,0,4,0,4,0,3,0,2,0,1,0,0,0,255,255,255,255,254,255,254,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,253,255,253,255,253,255,252,255,252,255,251,255,251,255,251,255,251,255,251,255,251,255,252,255, +253,255,254,255,255,255,0,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,254,255,253,255,253,255,253,255,254,255,254,255,254,255,255,255,255,255,254,255,253,255,252,255,251,255,250,255,249,255,248,255,248, +255,248,255,249,255,251,255,252,255,253,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,253,255,253,255,253,255,253,255, +253,255,253,255,254,255,254,255,255,255,255,255,0,0,0,0,1,0,1,0,2,0,1,0,1,0,0,0,255,255,254,255,254,255,253,255,254,255,254,255,254,255,255,255,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,2,0,2,0,3,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,2,0,3,0,4,0,5,0,5,0,5,0,5, +0,4,0,4,0,3,0,3,0,3,0,3,0,3,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,0,0,255,255,253,255,252,255,252,255,251,255,251,255,251,255,251,255,252,255,252,255,253,255,253,255,254,255,255,255,0,0,0,0,0,0,255,255,255,255,254,255,254, +255,254,255,254,255,254,255,253,255,253,255,253,255,254,255,254,255,255,255,0,0,1,0,2,0,3,0,3,0,3,0,3,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254, +255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,253,255,253,255, +253,255,253,255,254,255,254,255,255,255,255,255,254,255,254,255,254,255,253,255,253,255,252,255,252,255,252,255,252,255,252,255,253,255,253,255,252,255,252,255,251,255,251,255,251,255,252,255,254,255,254,255,254,255,254,255,253,255,253,255,252,255,252, +255,252,255,253,255,254,255,255,255,0,0,0,0,0,0,255,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,1,0,1,0,2,0,2,0,3,0,3,0,4,0,4,0,5,0,5,0,5,0,6,0,6,0,6,0,6,0,5,0,4,0,3,0,3,0,3,0,3,0,3,0,3,0,4,0,4,0,4,0,4,0,3,0,2,0,1,0,0,0,0,0,0,0,0, +0,255,255,254,255,253,255,253,255,253,255,252,255,253,255,253,255,253,255,252,255,252,255,252,255,252,255,253,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,2,0,2,0,3,0,4,0,4,0,4,0,4,0,4,0,4,0, +3,0,3,0,2,0,1,0,1,0,0,0,0,0,255,255,255,255,254,255,253,255,253,255,252,255,252,255,252,255,253,255,253,255,254,255,255,255,255,255,0,0,1,0,1,0,0,0,255,255,254,255,254,255,253,255,252,255,252,255,252,255,252,255,253,255,253,255,254,255,255,255,0,0,1, +0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,0,0,255,255,254,255,253,255,252,255,252,255,252,255,252,255,253,255,254,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,255,255,255,255,254,255,253,255,252,255,252,255,252,255,252,255,253,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,255,255,255,255, +254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,3,0,3,0,3,0,2,0,1,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,253,255,253,255,253,255,252, +255,252,255,252,255,252,255,252,255,251,255,251,255,251,255,252,255,253,255,253,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,255,255,255,255,0,0,2,0,3,0,4,0,5,0,5,0,5,0,4,0,4,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,2,0,2,0,1, +0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,253,255,252,255,251,255,250,255,249,255,249,255,249,255,250,255,251,255,251,255,252,255,252,255,253,255,253,255,254,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,3,0,3,0,3,0,3,0,2,0,1,0,1,0, +2,0,3,0,4,0,5,0,5,0,5,0,4,0,3,0,2,0,1,0,255,255,254,255,253,255,253,255,253,255,253,255,253,255,254,255,255,255,255,255,0,0,255,255,255,255,254,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,253,255,253,255,252,255,251,255,251,255, +251,255,251,255,252,255,253,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,254,255,254,255,254,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,255,255,0,0,1,0,2,0,3,0,3,0,3,0,3,0,3,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1, +0,2,0,2,0,2,0,1,0,1,0,0,0,255,255,254,255,253,255,252,255,252,255,252,255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,2,0,2,0,3,0,3,0,3,0,2, +0,2,0,2,0,2,0,1,0,1,0,0,0,255,255,253,255,253,255,252,255,252,255,252,255,252,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,253,255,252,255,252,255,252,255,253,255,254,255,255,255,255,255,255,255,255,255,0,0,0,0, +0,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,253,255,253,255,253,255,253,255,253,255,252,255,252,255,252,255,253,255,253, +255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,254,255,253,255,252,255,252,255,252,255,252,255,253,255,253,255,255,255,0,0,1,0,2,0,3,0,3,0,4,0,3,0,3,0,3,0,3,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,2, +0,2,0,1,0,1,0,255,255,254,255,253,255,252,255,252,255,252,255,252,255,253,255,253,255,254,255,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,2,0, +2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,253,255,253,255,253,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,254, +255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,254, +255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,254,255,253,255,253,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,3,0,3,0,3,0,3,0,3,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,2,0,2,0,3,0,3,0,3,0,3,0,2,0,2,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,3,0,3,0,2,0,2,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,253,255,254,255,254,255,255,255,255,255,0,0,0, +0,0,0,0,0,255,255,254,255,254,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255, +254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,254,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,253,255,253,255,253,255,253,255,253, +255,253,255,253,255,253,255,253,255,252,255,253,255,253,255,254,255,255,255,255,255,0,0,0,0,1,0,0,0,0,0,255,255,254,255,254,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,2,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,254,255,254,255,253,255,253,255,252,255,252,255,251,255,251,255,252,255,252,255,252,255,252,255,252,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,254, +255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,254,255,254,255,253,255,253,255,253,255,252,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,1,0,1, +0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,3,0,3,0,3,0,2,0,2,0,2,0,2,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,254,255,254,255,254,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255, +254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,1,0,0, +0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,253,255,253,255,252,255,252,255,252,255,253,255,253,255,254,255,254,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,2,0, +2,0,3,0,3,0,3,0,2,0,2,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,254, +255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0, +0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255, +254,255,254,255,254,255,254,255,254,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255, +255,0,0,0,0,1,0,1,0,2,0,2,0,2,0,2,0,1,0,1,0,0,0,255,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254, +255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255, +254,255,254,255,254,255,254,255,254,255,254,255,253,255,253,255,253,255,252,255,252,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,254,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255, +255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,253,255,253,255,253, +255,254,255,254,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254, +255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,1,0,1,0,2,0,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255, +254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,253,255,253,255,254,255,254,255,254,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255, +255,255,255,255,255,255,254,255,254,255,253,255,253,255,253,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,254,255,254,255,253,255,253,255,254,255,254, +255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,253,255,253,255,253,255,253,255,253,255,253,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,254,255,254,255, +254,255,254,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,2,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255, +254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1, +0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,253,255,253,255,254,255,254,255,254,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,254,255,254,255,254,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255, +254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254, +255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,254,255, +254,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,254,255,254,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,254,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0, +0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255, +0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0, +0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255, +0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0, +255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0, +0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0, +0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0, +0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0, +0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255, +0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255, +255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0, +0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255, +255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255, +0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255, +255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255, +255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255, +255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0, +0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255, +255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0, +255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255, +255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255, +255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255, +255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255, +0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0, +0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255, +255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255, +255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255, +255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0, +255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0, +0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255, +255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0, +0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0, +255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255, +255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0, +0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255, +255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0, +0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255, +255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0, +0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255, +255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255, +255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255, +255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255, +0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0, +0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255, +0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0, +0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255, +0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255, +255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255, +255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255, +255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255, +0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0, +0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255, +255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255, +255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255, +255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,255, +0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255, +255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255, +0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255, +255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255, +255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255, +255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255, +255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255, +255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, +0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0, +0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255, +255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255, +255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0, +0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0, +0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0, +255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,0,0,255,255,0, +0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,255,255, +255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,255,255,255,255,0, +0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0, +0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255, +255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255, +255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0, +0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,255,255,255,255, +0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255, +255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255, +255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0, +0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0, +0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,255,255,0,0,255, +255,0,0,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255, +255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,0,0,255,255,0, +0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255, +255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,255, +255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, +255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,255,255,0,0,255, +255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, +255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0, +0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,255,255,0,0,0,0,255,255,0,0,0,0,255,255,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,0,255,255,0, +0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255, +255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255, +255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255, +255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,255,255, +255,255,0,0,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0 }; + +const char* guitar_amp_wav = (const char*) temp_binary_data_2; + +//================== ConvolutionDemo.cpp ================== +static const unsigned char temp_binary_data_3[] = +"/*\r\n" +" ==============================================================================\r\n" +"\r\n" +" This file is part of the JUCE library.\r\n" +" Copyright (c) 2017 - ROLI Ltd.\r\n" +"\r\n" +" JUCE is an open source library subject to commercial or open-source\r\n" +" licensing.\r\n" +"\r\n" +" By using JUCE, you agree to the terms of both the JUCE 5 End-User License\r\n" +" Agreement and JUCE 5 Privacy Policy (both updated and effective as of the\r\n" +" 27th April 2017).\r\n" +"\r\n" +" End User License Agreement: www.juce.com/juce-5-licence\r\n" +" Privacy Policy: www.juce.com/juce-5-privacy-policy\r\n" +"\r\n" +" Or: You may also use this code under the terms of the GPL v3 (see\r\n" +" www.gnu.org/licenses).\r\n" +"\r\n" +" JUCE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r\n" +" EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r\n" +" DISCLAIMED.\r\n" +"\r\n" +" ==============================================================================\r\n" +"*/\r\n" +"\r\n" +"#include \"../DSPDemo.h\"\r\n" +"\r\n" +"//==============================================================================\r\n" +"// @@ START_DEMO\r\n" +"struct ConvolutionDemo\r\n" +"{\r\n" +" void prepare (const ProcessSpec& spec)\r\n" +" {\r\n" +" sampleRate = spec.sampleRate;\r\n" +" convolution.prepare (spec);\r\n" +" updateParameters();\r\n" +" }\r\n" +"\r\n" +" void process (const ProcessContextReplacing& context)\r\n" +" {\r\n" +" if (! bypass)\r\n" +" convolution.process (context);\r\n" +" }\r\n" +"\r\n" +" void reset()\r\n" +" {\r\n" +" convolution.reset();\r\n" +" }\r\n" +"\r\n" +" void updateParameters()\r\n" +" {\r\n" +" if (auto* cabinetTypeParameter = dynamic_cast (parameters[0]))\r\n" +" {\r\n" +" if (cabinetTypeParameter->getCurrentSelectedID() == 1)\r\n" +" {\r\n" +" bypass = true;\r\n" +" }\r\n" +" else\r\n" +" {\r\n" +" bypass = false;\r\n" +"\r\n" +" auto maxSize = static_cast (roundDoubleToInt (8192.0 * sampleRate / 44100.0));\r\n" +"\r\n" +" if (cabinetTypeParameter->getCurrentSelectedID() == 2)\r\n" +" convolution.loadImpulseResponse (BinaryData::guitar_amp_wav,\r\n" +" BinaryData::guitar_amp_wavSize,\r\n" +" false, maxSize);\r\n" +" else\r\n" +" convolution.loadImpulseResponse (BinaryData::cassette_recorder_wav,\r\n" +" BinaryData::cassette_recorder_wavSize,\r\n" +" false, maxSize);\r\n" +" }\r\n" +" }\r\n" +" }\r\n" +"\r\n" +" //==============================================================================\r\n" +" double sampleRate = 0;\r\n" +" bool bypass = false;\r\n" +"\r\n" +" Convolution convolution;\r\n" +"\r\n" +" ChoiceParameter cabinetParam { {\"Bypass\", \"Guitar amplifier 8''\", \"Cassette recorder\"}, 1, \"Cabinet Type\" };\r\n" +"\r\n" +" std::vector parameters { &cabinetParam };\r\n" +"};\r\n" +"// @@ END_DEMO\r\n" +"\r\n" +"RegisterDSPDemo convolutionDemo (\"Convolution\", BinaryData::ConvolutionDemo_cpp);\r\n"; + +const char* ConvolutionDemo_cpp = (const char*) temp_binary_data_3; + +//================== FIRFilterDemo.cpp ================== +static const unsigned char temp_binary_data_4[] = +"/*\r\n" +" ==============================================================================\r\n" +"\r\n" +" This file is part of the JUCE library.\r\n" +" Copyright (c) 2017 - ROLI Ltd.\r\n" +"\r\n" +" JUCE is an open source library subject to commercial or open-source\r\n" +" licensing.\r\n" +"\r\n" +" By using JUCE, you agree to the terms of both the JUCE 5 End-User License\r\n" +" Agreement and JUCE 5 Privacy Policy (both updated and effective as of the\r\n" +" 27th April 2017).\r\n" +"\r\n" +" End User License Agreement: www.juce.com/juce-5-licence\r\n" +" Privacy Policy: www.juce.com/juce-5-privacy-policy\r\n" +"\r\n" +" Or: You may also use this code under the terms of the GPL v3 (see\r\n" +" www.gnu.org/licenses).\r\n" +"\r\n" +" JUCE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r\n" +" EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r\n" +" DISCLAIMED.\r\n" +"\r\n" +" ==============================================================================\r\n" +"*/\r\n" +"\r\n" +"#include \"../DSPDemo.h\"\r\n" +"\r\n" +"//==============================================================================\r\n" +"// @@ START_DEMO\r\n" +"struct FIRFilterDemo\r\n" +"{\r\n" +" void prepare (const ProcessSpec& spec)\r\n" +" {\r\n" +" sampleRate = spec.sampleRate;\r\n" +"\r\n" +" fir.state = FilterDesign::designFIRLowpassWindowMethod (440.0f, sampleRate, 21,\r\n" +" WindowingFunction::blackmann);\r\n" +" fir.prepare (spec);\r\n" +" }\r\n" +"\r\n" +" void process (const ProcessContextReplacing& context)\r\n" +" {\r\n" +" fir.process (context);\r\n" +" }\r\n" +"\r\n" +" void reset()\r\n" +" {\r\n" +" fir.reset();\r\n" +" }\r\n" +"\r\n" +" void updateParameters()\r\n" +" {\r\n" +" if (sampleRate != 0)\r\n" +" {\r\n" +" auto cutoff = static_cast (cutoffParam.getCurrentValue());\r\n" +" auto windowingMethod = static_cast::WindowingMethod> (typeParam.getCurrentSelectedID() - 1);\r\n" +"\r\n" +" *fir.state = *FilterDesign::designFIRLowpassWindowMethod (cutoff, sampleRate, 21, windowingMethod);\r\n" +" }\r\n" +" }\r\n" +"\r\n" +" //==============================================================================\r\n" +" ProcessorDuplicator, FIR::Coefficients> fir;\r\n" +"\r\n" +" double sampleRate = 0;\r\n" +"\r\n" +" SliderParameter cutoffParam { { 20.0, 20000.0 }, 0.4, 440.0f, \"Cutoff\", \"Hz\" };\r\n" +" ChoiceParameter typeParam { { \"Rectangular\", \"Triangular\", \"Hann\", \"Hamming\", \"Blackmann\", \"Blackmann-Harris\", \"Flat Top\", \"Kaiser\" },\r\n" +" 5, \"Windowing Function\" };\r\n" +"\r\n" +" std::vector parameters { &cutoffParam, &typeParam };\r\n" +"};\r\n" +"// @@ END_DEMO\r\n" +"\r\n" +"RegisterDSPDemo firDemo (\"FIR Filter\", BinaryData::FIRFilterDemo_cpp);\r\n"; + +const char* FIRFilterDemo_cpp = (const char*) temp_binary_data_4; + +//================== GainDemo.cpp ================== +static const unsigned char temp_binary_data_5[] = +"/*\r\n" +" ==============================================================================\r\n" +"\r\n" +" This file is part of the JUCE library.\r\n" +" Copyright (c) 2017 - ROLI Ltd.\r\n" +"\r\n" +" JUCE is an open source library subject to commercial or open-source\r\n" +" licensing.\r\n" +"\r\n" +" By using JUCE, you agree to the terms of both the JUCE 5 End-User License\r\n" +" Agreement and JUCE 5 Privacy Policy (both updated and effective as of the\r\n" +" 27th April 2017).\r\n" +"\r\n" +" End User License Agreement: www.juce.com/juce-5-licence\r\n" +" Privacy Policy: www.juce.com/juce-5-privacy-policy\r\n" +"\r\n" +" Or: You may also use this code under the terms of the GPL v3 (see\r\n" +" www.gnu.org/licenses).\r\n" +"\r\n" +" JUCE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r\n" +" EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r\n" +" DISCLAIMED.\r\n" +"\r\n" +" ==============================================================================\r\n" +"*/\r\n" +"\r\n" +"#include \"../DSPDemo.h\"\r\n" +"\r\n" +"//==============================================================================\r\n" +"// @@ START_DEMO\r\n" +"struct GainDemo\r\n" +"{\r\n" +" void prepare (const ProcessSpec&)\r\n" +" {\r\n" +" gain.setGainDecibels (-6.0f);\r\n" +" }\r\n" +"\r\n" +" void process (const ProcessContextReplacing& context)\r\n" +" {\r\n" +" gain.process (context);\r\n" +" }\r\n" +"\r\n" +" void reset()\r\n" +" {\r\n" +" gain.reset();\r\n" +" }\r\n" +"\r\n" +" void updateParameters()\r\n" +" {\r\n" +" gain.setGainDecibels (static_cast (gainParam.getCurrentValue()));\r\n" +" }\r\n" +"\r\n" +" //==============================================================================\r\n" +" Gain gain;\r\n" +" SliderParameter gainParam { { -100.0, 20.0 }, 3.0, -6.0, \"Gain\", \"dB\" };\r\n" +"\r\n" +" std::vector parameters { &gainParam };\r\n" +"};\r\n" +"// @@ END_DEMO\r\n" +"\r\n" +"RegisterDSPDemo gainDemo (\"Gain\", BinaryData::GainDemo_cpp);\r\n"; + +const char* GainDemo_cpp = (const char*) temp_binary_data_5; + +//================== IIRFilterDemo.cpp ================== +static const unsigned char temp_binary_data_6[] = +"/*\r\n" +" ==============================================================================\r\n" +"\r\n" +" This file is part of the JUCE library.\r\n" +" Copyright (c) 2017 - ROLI Ltd.\r\n" +"\r\n" +" JUCE is an open source library subject to commercial or open-source\r\n" +" licensing.\r\n" +"\r\n" +" By using JUCE, you agree to the terms of both the JUCE 5 End-User License\r\n" +" Agreement and JUCE 5 Privacy Policy (both updated and effective as of the\r\n" +" 27th April 2017).\r\n" +"\r\n" +" End User License Agreement: www.juce.com/juce-5-licence\r\n" +" Privacy Policy: www.juce.com/juce-5-privacy-policy\r\n" +"\r\n" +" Or: You may also use this code under the terms of the GPL v3 (see\r\n" +" www.gnu.org/licenses).\r\n" +"\r\n" +" JUCE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r\n" +" EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r\n" +" DISCLAIMED.\r\n" +"\r\n" +" ==============================================================================\r\n" +"*/\r\n" +"\r\n" +"#include \"../DSPDemo.h\"\r\n" +"\r\n" +"//==============================================================================\r\n" +"// @@ START_DEMO\r\n" +"struct IIRFilterDemo\r\n" +"{\r\n" +" void prepare (const ProcessSpec& spec)\r\n" +" {\r\n" +" sampleRate = spec.sampleRate;\r\n" +"\r\n" +" iir.state = IIR::Coefficients::makeLowPass (sampleRate, 440.0);\r\n" +" iir.prepare (spec);\r\n" +" }\r\n" +"\r\n" +" void process (const ProcessContextReplacing& context)\r\n" +" {\r\n" +" iir.process (context);\r\n" +" }\r\n" +"\r\n" +" void reset()\r\n" +" {\r\n" +" iir.reset();\r\n" +" }\r\n" +"\r\n" +" void updateParameters()\r\n" +" {\r\n" +" if (sampleRate != 0)\r\n" +" {\r\n" +" auto cutoff = static_cast (cutoffParam.getCurrentValue());\r\n" +" auto qVal = static_cast (qParam.getCurrentValue());\r\n" +"\r\n" +" switch (typeParam.getCurrentSelectedID())\r\n" +" {\r\n" +" case 1: *iir.state = *IIR::Coefficients::makeLowPass (sampleRate, cutoff, qVal); break;\r\n" +" case 2: *iir.state = *IIR::Coefficients::makeHighPass (sampleRate, cutoff, qVal); break;\r\n" +" case 3: *iir.state = *IIR::Coefficients::makeBandPass (sampleRate, cutoff, qVal); break;\r\n" +" default: break;\r\n" +" }\r\n" +" }\r\n" +" }\r\n" +"\r\n" +" //==============================================================================\r\n" +" ProcessorDuplicator, IIR::Coefficients> iir;\r\n" +"\r\n" +" ChoiceParameter typeParam { { \"Low-pass\", \"High-pass\", \"Band-pass\"}, 1, \"Type\" };\r\n" +" SliderParameter cutoffParam { { 20.0, 20000.0 }, 0.5, 440.0f, \"Cutoff\", \"Hz\" };\r\n" +" SliderParameter qParam { { 0.3, 20.0 }, 0.5, 1.0 / std::sqrt(2.0), \"Q\" };\r\n" +"\r\n" +" std::vector parameters { &typeParam, &cutoffParam, &qParam };\r\n" +" double sampleRate = 0;\r\n" +"};\r\n" +"// @@ END_DEMO\r\n" +"\r\n" +"RegisterDSPDemo iirDemo (\"IIR Filter\", BinaryData::IIRFilterDemo_cpp);\r\n"; + +const char* IIRFilterDemo_cpp = (const char*) temp_binary_data_6; + +//================== OscillatorDemo.cpp ================== +static const unsigned char temp_binary_data_7[] = +"/*\r\n" +" ==============================================================================\r\n" +"\r\n" +" This file is part of the JUCE library.\r\n" +" Copyright (c) 2017 - ROLI Ltd.\r\n" +"\r\n" +" JUCE is an open source library subject to commercial or open-source\r\n" +" licensing.\r\n" +"\r\n" +" By using JUCE, you agree to the terms of both the JUCE 5 End-User License\r\n" +" Agreement and JUCE 5 Privacy Policy (both updated and effective as of the\r\n" +" 27th April 2017).\r\n" +"\r\n" +" End User License Agreement: www.juce.com/juce-5-licence\r\n" +" Privacy Policy: www.juce.com/juce-5-privacy-policy\r\n" +"\r\n" +" Or: You may also use this code under the terms of the GPL v3 (see\r\n" +" www.gnu.org/licenses).\r\n" +"\r\n" +" JUCE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r\n" +" EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r\n" +" DISCLAIMED.\r\n" +"\r\n" +" ==============================================================================\r\n" +"*/\r\n" +"\r\n" +"#include \"../DSPDemo.h\"\r\n" +"\r\n" +"//==============================================================================\r\n" +"// @@ START_DEMO\r\n" +"struct OscillatorDemo\r\n" +"{\r\n" +" void prepare (const ProcessSpec& spec)\r\n" +" {\r\n" +" gain.setGainDecibels (-6.0f);\r\n" +"\r\n" +" for (auto&& oscillator : oscillators)\r\n" +" {\r\n" +" oscillator.setFrequency (440.f);\r\n" +" oscillator.prepare (spec);\r\n" +" }\r\n" +"\r\n" +" tempBuffer = AudioBlock (tempBufferMemory, spec.numChannels, spec.maximumBlockSize);\r\n" +" }\r\n" +"\r\n" +" void process (const ProcessContextReplacing& context)\r\n" +" {\r\n" +" tempBuffer.copy (context.getInputBlock());\r\n" +" tempBuffer.multiply (static_cast (fileMix));\r\n" +"\r\n" +" oscillators[currentOscillatorIdx].process (context);\r\n" +" context.getOutputBlock().multiply (static_cast (1.0 - fileMix));\r\n" +"\r\n" +" context.getOutputBlock().add (tempBuffer);\r\n" +"\r\n" +" gain.process (context);\r\n" +" }\r\n" +"\r\n" +" void reset()\r\n" +" {\r\n" +" oscillators[currentOscillatorIdx].reset();\r\n" +" }\r\n" +"\r\n" +" void updateParameters()\r\n" +" {\r\n" +" currentOscillatorIdx = jmin (numElementsInArray (oscillators),\r\n" +" 3 * (accuracy.getCurrentSelectedID() - 1) + (typeParam.getCurrentSelectedID() - 1));\r\n" +"\r\n" +" auto freq = static_cast (freqParam.getCurrentValue());\r\n" +"\r\n" +" for (auto&& oscillator : oscillators)\r\n" +" oscillator.setFrequency (freq);\r\n" +"\r\n" +" gain.setGainDecibels (static_cast (gainParam.getCurrentValue()));\r\n" +"\r\n" +" fileMix = mixParam.getCurrentValue();\r\n" +" }\r\n" +"\r\n" +" //==============================================================================\r\n" +" Oscillator oscillators[6] =\r\n" +" {\r\n" +" // No Approximation\r\n" +" {[] (float x) { return std::sin (x); }}, // sine\r\n" +" {[] (float x) { return x / float_Pi; }}, // saw\r\n" +" {[] (float x) { return x < 0.0f ? -1.0f : 1.0f; }}, // square\r\n" +"\r\n" +" // Approximated by a wave-table\r\n" +" {[] (float x) { return std::sin (x); }, 100}, // sine\r\n" +" {[] (float x) { return x / float_Pi; }, 100}, // saw\r\n" +" {[] (float x) { return x < 0.0f ? -1.0f : 1.0f; }, 100} // square\r\n" +" };\r\n" +"\r\n" +" int currentOscillatorIdx = 0;\r\n" +" Gain gain;\r\n" +"\r\n" +" ChoiceParameter typeParam { {\"sine\", \"saw\", \"square\"}, 1, \"Type\" };\r\n" +" ChoiceParameter accuracy { {\"No Approximation\", \"Use Wavetable\"}, 1, \"Accuracy\" };\r\n" +" SliderParameter freqParam { { 20.0, 24000.0 }, 0.4, 440.0, \"Frequency\", \"Hz\" };\r\n" +" SliderParameter gainParam { { -100.0, 20.0 }, 3.0, -20.0, \"Gain\", \"dB\" };\r\n" +" SliderParameter mixParam { { 0.0, 1.0 }, 1.0, 0.0, \"File mix\" };\r\n" +"\r\n" +" HeapBlock tempBufferMemory;\r\n" +" AudioBlock tempBuffer;\r\n" +" double fileMix;\r\n" +"\r\n" +" std::vector parameters { &typeParam, &accuracy, &freqParam, &gainParam, &mixParam };\r\n" +"};\r\n" +"// @@ END_DEMO\r\n" +"\r\n" +"RegisterDSPDemo oscillatorDemo (\"Oscillator\", BinaryData::OscillatorDemo_cpp);\r\n"; + +const char* OscillatorDemo_cpp = (const char*) temp_binary_data_7; + +//================== OverdriveDemo.cpp ================== +static const unsigned char temp_binary_data_8[] = +"/*\r\n" +" ==============================================================================\r\n" +"\r\n" +" This file is part of the JUCE library.\r\n" +" Copyright (c) 2017 - ROLI Ltd.\r\n" +"\r\n" +" JUCE is an open source library subject to commercial or open-source\r\n" +" licensing.\r\n" +"\r\n" +" By using JUCE, you agree to the terms of both the JUCE 5 End-User License\r\n" +" Agreement and JUCE 5 Privacy Policy (both updated and effective as of the\r\n" +" 27th April 2017).\r\n" +"\r\n" +" End User License Agreement: www.juce.com/juce-5-licence\r\n" +" Privacy Policy: www.juce.com/juce-5-privacy-policy\r\n" +"\r\n" +" Or: You may also use this code under the terms of the GPL v3 (see\r\n" +" www.gnu.org/licenses).\r\n" +"\r\n" +" JUCE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r\n" +" EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r\n" +" DISCLAIMED.\r\n" +"\r\n" +" ==============================================================================\r\n" +"*/\r\n" +"\r\n" +"#include \"../DSPDemo.h\"\r\n" +"\r\n" +"//==============================================================================\r\n" +"// @@ START_DEMO\r\n" +"struct OverdriveDemo\r\n" +"{\r\n" +" void prepare (const ProcessSpec& spec)\r\n" +" {\r\n" +" sampleRate = spec.sampleRate;\r\n" +"\r\n" +" auto& gainUp = overdrive.get<0>();\r\n" +" gainUp.setGainDecibels (24);\r\n" +"\r\n" +" auto& bias = overdrive.get<1>();\r\n" +" bias.setBias (0.4f);\r\n" +"\r\n" +" auto& wavShaper = overdrive.get<2>();\r\n" +" wavShaper.functionToUse = std::tanh;\r\n" +"\r\n" +" auto& dcFilter = overdrive.get<3>();\r\n" +" dcFilter.state = IIR::Coefficients::makeHighPass (sampleRate, 5.0);\r\n" +"\r\n" +" auto& gainDown = overdrive.get<4>();\r\n" +" gainDown.setGainDecibels (-18.0f);\r\n" +"\r\n" +" overdrive.prepare (spec);\r\n" +" }\r\n" +"\r\n" +" void process (const ProcessContextReplacing& context)\r\n" +" {\r\n" +" overdrive.process (context);\r\n" +" }\r\n" +"\r\n" +" void reset()\r\n" +" {\r\n" +" overdrive.reset();\r\n" +" }\r\n" +"\r\n" +" void updateParameters()\r\n" +" {\r\n" +" if (sampleRate != 0)\r\n" +" {\r\n" +" overdrive.get<0>().setGainDecibels (static_cast (inGainParam.getCurrentValue()));\r\n" +" overdrive.get<4>().setGainDecibels (static_cast (outGainParam.getCurrentValue()));\r\n" +" }\r\n" +" }\r\n" +"\r\n" +" //==============================================================================\r\n" +" using GainProcessor = Gain;\r\n" +" using BiasProcessor = Bias;\r\n" +" using DriveProcessor = WaveShaper;\r\n" +" using DCFilter = ProcessorDuplicator,\r\n" +" IIR::Coefficients>;\r\n" +"\r\n" +" ProcessorChain overdrive;\r\n" +"\r\n" +" SliderParameter inGainParam { { -100.0, 60.0 }, 3, 24.0, \"Input Gain\", \"dB\" };\r\n" +" SliderParameter outGainParam { { -100.0, 20.0 }, 3, -18.0, \"Output Gain\", \"dB\" };\r\n" +"\r\n" +" std::vector parameters { &inGainParam, &outGainParam };\r\n" +" double sampleRate = 0;\r\n" +"};\r\n" +"// @@ END_DEMO\r\n" +"\r\n" +"RegisterDSPDemo overdriveDemo (\"Overdrive\", BinaryData::OverdriveDemo_cpp);\r\n"; + +const char* OverdriveDemo_cpp = (const char*) temp_binary_data_8; + +//================== SIMDRegisterDemo.cpp ================== +static const unsigned char temp_binary_data_9[] = +"/*\r\n" +" ==============================================================================\r\n" +"\r\n" +" This file is part of the JUCE library.\r\n" +" Copyright (c) 2017 - ROLI Ltd.\r\n" +"\r\n" +" JUCE is an open source library subject to commercial or open-source\r\n" +" licensing.\r\n" +"\r\n" +" By using JUCE, you agree to the terms of both the JUCE 5 End-User License\r\n" +" Agreement and JUCE 5 Privacy Policy (both updated and effective as of the\r\n" +" 27th April 2017).\r\n" +"\r\n" +" End User License Agreement: www.juce.com/juce-5-licence\r\n" +" Privacy Policy: www.juce.com/juce-5-privacy-policy\r\n" +"\r\n" +" Or: You may also use this code under the terms of the GPL v3 (see\r\n" +" www.gnu.org/licenses).\r\n" +"\r\n" +" JUCE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r\n" +" EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r\n" +" DISCLAIMED.\r\n" +"\r\n" +" ==============================================================================\r\n" +"*/\r\n" +"\r\n" +"#include \"../DSPDemo.h\"\r\n" +"\r\n" +"#if JUCE_USE_SIMD\r\n" +"\r\n" +"//==============================================================================\r\n" +"// @@ START_DEMO\r\n" +"struct SIMDRegisterDemo\r\n" +"{\r\n" +" void prepare (const ProcessSpec& spec)\r\n" +" {\r\n" +" sampleRate = spec.sampleRate;\r\n" +"\r\n" +" iirCoefficients = IIR::Coefficients::makeLowPass (sampleRate, 440.0f);\r\n" +" iir.reset (new IIR::Filter> (iirCoefficients));\r\n" +"\r\n" +" interleaved = AudioBlock> (interleavedBlockData, 1, spec.maximumBlockSize);\r\n" +" zero = AudioBlock (zeroData, SIMDRegister::size(), spec.maximumBlockSize);\r\n" +"\r\n" +" zero.clear();\r\n" +"\r\n" +" auto monoSpec = spec;\r\n" +" monoSpec.numChannels = 1;\r\n" +" iir->prepare (monoSpec);\r\n" +" }\r\n" +"\r\n" +" void process (const ProcessContextReplacing& context)\r\n" +" {\r\n" +" jassert (context.getInputBlock().getNumSamples() == context.getOutputBlock().getNumSamples());\r\n" +" jassert (context.getInputBlock().getNumChannels() == context.getOutputBlock().getNumChannels());\r\n" +"\r\n" +" auto& input = context.getInputBlock();\r\n" +" auto& output = context.getOutputBlock();\r\n" +" auto n = input.getNumSamples();\r\n" +" auto* inout = channelPointers.getData();\r\n" +"\r\n" +"\r\n" +" for (size_t ch = 0; ch < SIMDRegister::size(); ++ch)\r\n" +" inout[ch] = (ch < input.getNumChannels() ? const_cast (input.getChannelPointer (ch)) : zero.getChannelPointer (ch));\r\n" +"\r\n" +" AudioDataConverters::interleaveSamples (inout, reinterpret_cast (interleaved.getChannelPointer (0)),\r\n" +" static_cast (n), static_cast (SIMDRegister::size()));\r\n" +"\r\n" +"\r\n" +" iir->process (ProcessContextReplacing> (interleaved));\r\n" +"\r\n" +"\r\n" +" for (size_t ch = 0; ch < input.getNumChannels(); ++ch)\r\n" +" inout[ch] = output.getChannelPointer (ch);\r\n" +"\r\n" +" AudioDataConverters::deinterleaveSamples (reinterpret_cast (interleaved.getChannelPointer (0)),\r\n" +" const_cast (inout),\r\n" +" static_cast (n), static_cast (SIMDRegister::size()));\r\n" +" }\r\n" +"\r\n" +" void reset()\r\n" +" {\r\n" +" iir.reset();\r\n" +" }\r\n" +"\r\n" +" void updateParameters()\r\n" +" {\r\n" +" if (sampleRate != 0)\r\n" +" {\r\n" +" auto cutoff = static_cast (cutoffParam.getCurrentValue());\r\n" +" auto qVal = static_cast (qParam.getCurrentValue());\r\n" +"\r\n" +" switch (typeParam.getCurrentSelectedID())\r\n" +" {\r\n" +" case 1: *iirCoefficients = *IIR::Coefficients::makeLowPass (sampleRate, cutoff, qVal); break;\r\n" +" case 2: *iirCoefficients = *IIR::Coefficients::makeHighPass (sampleRate, cutoff, qVal); break;\r\n" +" case 3: *iirCoefficients = *IIR::Coefficients::makeBandPass (sampleRate, cutoff, qVal); break;\r\n" +" default: break;\r\n" +" }\r\n" +" }\r\n" +" }\r\n" +"\r\n" +" //==============================================================================\r\n" +" IIR::Coefficients::Ptr iirCoefficients;\r\n" +" std::unique_ptr>> iir;\r\n" +"\r\n" +" AudioBlock> interleaved;\r\n" +" AudioBlock zero;\r\n" +"\r\n" +" HeapBlock interleavedBlockData, zeroData;\r\n" +" HeapBlock channelPointers { SIMDRegister::size() };\r\n" +"\r\n" +" ChoiceParameter typeParam { { \"Low-pass\", \"High-pass\", \"Band-pass\"}, 1, \"Type\" };\r\n" +" SliderParameter cutoffParam { { 20.0, 20000.0 }, 0.5, 440.0f, \"Cutoff\", \"Hz\" };\r\n" +" SliderParameter qParam { { 0.3, 20.0 }, 0.5, 0.7, \"Q\" };\r\n" +"\r\n" +" std::vector parameters { &typeParam, &cutoffParam, &qParam };\r\n" +" double sampleRate = 0;\r\n" +"};\r\n" +"// @@ END_DEMO\r\n" +"\r\n" +"RegisterDSPDemo simdDemo (\"SIMD Filter\", BinaryData::SIMDRegisterDemo_cpp);\r\n" +"\r\n" +"#endif\r\n"; + +const char* SIMDRegisterDemo_cpp = (const char*) temp_binary_data_9; + +//================== StateVariableFilterDemo.cpp ================== +static const unsigned char temp_binary_data_10[] = +"/*\r\n" +" ==============================================================================\r\n" +"\r\n" +" This file is part of the JUCE library.\r\n" +" Copyright (c) 2017 - ROLI Ltd.\r\n" +"\r\n" +" JUCE is an open source library subject to commercial or open-source\r\n" +" licensing.\r\n" +"\r\n" +" By using JUCE, you agree to the terms of both the JUCE 5 End-User License\r\n" +" Agreement and JUCE 5 Privacy Policy (both updated and effective as of the\r\n" +" 27th April 2017).\r\n" +"\r\n" +" End User License Agreement: www.juce.com/juce-5-licence\r\n" +" Privacy Policy: www.juce.com/juce-5-privacy-policy\r\n" +"\r\n" +" Or: You may also use this code under the terms of the GPL v3 (see\r\n" +" www.gnu.org/licenses).\r\n" +"\r\n" +" JUCE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r\n" +" EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r\n" +" DISCLAIMED.\r\n" +"\r\n" +" ==============================================================================\r\n" +"*/\r\n" +"\r\n" +"#include \"../DSPDemo.h\"\r\n" +"\r\n" +"//==============================================================================\r\n" +"// @@ START_DEMO\r\n" +"struct StateVariableFilterDemo\r\n" +"{\r\n" +" void prepare (const ProcessSpec& spec)\r\n" +" {\r\n" +" sampleRate = spec.sampleRate;\r\n" +"\r\n" +" filter.state = new StateVariableFilter::Parameters;\r\n" +" filter.prepare (spec);\r\n" +" }\r\n" +"\r\n" +" void process (const ProcessContextReplacing& context)\r\n" +" {\r\n" +" filter.process (context);\r\n" +" }\r\n" +"\r\n" +" void reset()\r\n" +" {\r\n" +" filter.reset();\r\n" +" }\r\n" +"\r\n" +" void updateParameters()\r\n" +" {\r\n" +" if (sampleRate != 0)\r\n" +" {\r\n" +" auto cutoff = static_cast (cutoffParam.getCurrentValue());\r\n" +" auto resonance = static_cast (qParam.getCurrentValue());\r\n" +" auto type = static_cast::Type> (typeParam.getCurrentSelectedID() - 1);\r\n" +"\r\n" +" filter.state->type = type;\r\n" +" filter.state->setCutOffFrequency (sampleRate, cutoff, resonance);\r\n" +" }\r\n" +" }\r\n" +"\r\n" +" //==============================================================================\r\n" +" ProcessorDuplicator,\r\n" +" StateVariableFilter::Parameters> filter;\r\n" +"\r\n" +" ChoiceParameter typeParam {{ \"Low-pass\", \"Band-pass\", \"High-pass\"}, 1, \"Type\" };\r\n" +" SliderParameter cutoffParam {{ 20.0, 20000.0 }, 0.5, 440.0f, \"Cutoff\", \"Hz\" };\r\n" +" SliderParameter qParam {{ 0.3, 20.0 }, 0.5, 1.0 / std::sqrt (2.0), \"Resonance\" };\r\n" +"\r\n" +" std::vector parameters { &typeParam, &cutoffParam, &qParam };\r\n" +" double sampleRate = 0;\r\n" +"};\r\n" +"// @@ END_DEMO\r\n" +"\r\n" +"RegisterDSPDemo stateVariableFilterDemo (\"State Variable Filter\", BinaryData::StateVariableFilterDemo_cpp);\r\n"; + +const char* StateVariableFilterDemo_cpp = (const char*) temp_binary_data_10; + +//================== WaveShaperTanhDemo.cpp ================== +static const unsigned char temp_binary_data_11[] = +"/*\r\n" +" ==============================================================================\r\n" +"\r\n" +" This file is part of the JUCE library.\r\n" +" Copyright (c) 2017 - ROLI Ltd.\r\n" +"\r\n" +" JUCE is an open source library subject to commercial or open-source\r\n" +" licensing.\r\n" +"\r\n" +" By using JUCE, you agree to the terms of both the JUCE 5 End-User License\r\n" +" Agreement and JUCE 5 Privacy Policy (both updated and effective as of the\r\n" +" 27th April 2017).\r\n" +"\r\n" +" End User License Agreement: www.juce.com/juce-5-licence\r\n" +" Privacy Policy: www.juce.com/juce-5-privacy-policy\r\n" +"\r\n" +" Or: You may also use this code under the terms of the GPL v3 (see\r\n" +" www.gnu.org/licenses).\r\n" +"\r\n" +" JUCE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r\n" +" EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r\n" +" DISCLAIMED.\r\n" +"\r\n" +" ==============================================================================\r\n" +"*/\r\n" +"\r\n" +"#include \"../DSPDemo.h\"\r\n" +"\r\n" +"//==============================================================================\r\n" +"// @@ START_DEMO\r\n" +"struct WaveShaperTanhDemo\r\n" +"{\r\n" +" void prepare (const ProcessSpec&) {}\r\n" +"\r\n" +" void process (const ProcessContextReplacing& context)\r\n" +" {\r\n" +" shapers[currentShaperIdx].process (context);\r\n" +" }\r\n" +"\r\n" +" void reset()\r\n" +" {\r\n" +" for (auto&& shaper : shapers)\r\n" +" shaper.reset();\r\n" +" }\r\n" +"\r\n" +" void updateParameters()\r\n" +" {\r\n" +" currentShaperIdx = jmin (numElementsInArray (shapers), accuracy.getCurrentSelectedID() - 1);\r\n" +" }\r\n" +"\r\n" +" //==============================================================================\r\n" +" WaveShaper shapers[2] { { std::tanh }, { FastMathApproximations::tanh } };\r\n" +" int currentShaperIdx = 0;\r\n" +"\r\n" +" ChoiceParameter accuracy {{ \"No Approximation\", \"Use fast-math approximation\"}, 1, \"Accuracy\" };\r\n" +" std::vector parameters { &accuracy }; // no params for this demo\r\n" +"};\r\n" +"// @@ END_DEMO\r\n" +"\r\n" +"RegisterDSPDemo waveshaperDemo (\"WaveShaperTanh\", BinaryData::WaveShaperTanhDemo_cpp);\r\n"; + +const char* WaveShaperTanhDemo_cpp = (const char*) temp_binary_data_11; + + +const char* getNamedResource (const char*, int&) throw(); +const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw() +{ + unsigned int hash = 0; + if (resourceNameUTF8 != 0) + while (*resourceNameUTF8 != 0) + hash = 31 * hash + (unsigned int) *resourceNameUTF8++; + + switch (hash) + { + case 0x409ff6ec: numBytes = 37902; return cassette_recorder_wav; + case 0x69523d16: numBytes = 628; return EditorColourScheme_xml; + case 0x700ccf3c: numBytes = 90246; return guitar_amp_wav; + case 0x5922ccdf: numBytes = 2995; return ConvolutionDemo_cpp; + case 0x14aa0aae: numBytes = 2677; return FIRFilterDemo_cpp; + case 0xab621a06: numBytes = 1809; return GainDemo_cpp; + case 0x06a7a4b1: numBytes = 2819; return IIRFilterDemo_cpp; + case 0x6fc33e27: numBytes = 3943; return OscillatorDemo_cpp; + case 0xdfdc547d: numBytes = 3039; return OverdriveDemo_cpp; + case 0x3f21e597: numBytes = 4849; return SIMDRegisterDemo_cpp; + case 0x54e9f84c: numBytes = 2718; return StateVariableFilterDemo_cpp; + case 0x5ce06dd8: numBytes = 2037; return WaveShaperTanhDemo_cpp; + default: break; + } + + numBytes = 0; + return 0; +} + +const char* namedResourceList[] = +{ + "cassette_recorder_wav", + "EditorColourScheme_xml", + "guitar_amp_wav", + "ConvolutionDemo_cpp", + "FIRFilterDemo_cpp", + "GainDemo_cpp", + "IIRFilterDemo_cpp", + "OscillatorDemo_cpp", + "OverdriveDemo_cpp", + "SIMDRegisterDemo_cpp", + "StateVariableFilterDemo_cpp", + "WaveShaperTanhDemo_cpp" +}; + +} diff --git a/examples/DSPDemo/JuceLibraryCode/BinaryData.h b/examples/DSPDemo/JuceLibraryCode/BinaryData.h new file mode 100644 index 0000000000..680b71a2ab --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/BinaryData.h @@ -0,0 +1,56 @@ +/* ========================================================================================= + + This is an auto-generated file: Any edits you make may be overwritten! + +*/ + +#pragma once + +namespace BinaryData +{ + extern const char* cassette_recorder_wav; + const int cassette_recorder_wavSize = 37902; + + extern const char* EditorColourScheme_xml; + const int EditorColourScheme_xmlSize = 628; + + extern const char* guitar_amp_wav; + const int guitar_amp_wavSize = 90246; + + extern const char* ConvolutionDemo_cpp; + const int ConvolutionDemo_cppSize = 2995; + + extern const char* FIRFilterDemo_cpp; + const int FIRFilterDemo_cppSize = 2677; + + extern const char* GainDemo_cpp; + const int GainDemo_cppSize = 1809; + + extern const char* IIRFilterDemo_cpp; + const int IIRFilterDemo_cppSize = 2819; + + extern const char* OscillatorDemo_cpp; + const int OscillatorDemo_cppSize = 3943; + + extern const char* OverdriveDemo_cpp; + const int OverdriveDemo_cppSize = 3039; + + extern const char* SIMDRegisterDemo_cpp; + const int SIMDRegisterDemo_cppSize = 4849; + + extern const char* StateVariableFilterDemo_cpp; + const int StateVariableFilterDemo_cppSize = 2718; + + extern const char* WaveShaperTanhDemo_cpp; + const int WaveShaperTanhDemo_cppSize = 2037; + + // Points to the start of a list of resource names. + extern const char* namedResourceList[]; + + // Number of elements in the namedResourceList array. + const int namedResourceListSize = 12; + + // If you provide the name of one of the binary resource variables above, this function will + // return the corresponding data and its size (or a null pointer if the name isn't found). + const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) throw(); +} diff --git a/examples/DSPDemo/JuceLibraryCode/JuceHeader.h b/examples/DSPDemo/JuceLibraryCode/JuceHeader.h new file mode 100644 index 0000000000..e8eadc491e --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/JuceHeader.h @@ -0,0 +1,45 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + + This is the header file that your files should include in order to get all the + JUCE library headers. You should avoid including the JUCE headers directly in + your own source files, because that wouldn't pick up the correct configuration + options for your app. + +*/ + +#pragma once + +#include "AppConfig.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "BinaryData.h" + +#if ! DONT_SET_USING_JUCE_NAMESPACE + // If your code uses a lot of JUCE classes, then this will obviously save you + // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE. + using namespace juce; +#endif + +#if ! JUCE_DONT_DECLARE_PROJECTINFO +namespace ProjectInfo +{ + const char* const projectName = "DSPDemo"; + const char* const versionString = "1.0.0"; + const int versionNumber = 0x10000; +} +#endif diff --git a/examples/DSPDemo/JuceLibraryCode/ReadMe.txt b/examples/DSPDemo/JuceLibraryCode/ReadMe.txt new file mode 100644 index 0000000000..091a5aa6eb --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/ReadMe.txt @@ -0,0 +1,12 @@ + + Important Note!! + ================ + +The purpose of this folder is to contain files that are auto-generated by the Projucer, +and ALL files in this folder will be mercilessly DELETED and completely re-written whenever +the Projucer saves your project. + +Therefore, it's a bad idea to make any manual changes to the files in here, or to +put any of your own files in here if you don't want to lose them. (Of course you may choose +to add the folder's contents to your version-control system so that you can re-merge your own +modifications after the Projucer has saved its changes). diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_audio_basics.cpp b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_basics.cpp new file mode 100644 index 0000000000..418694873c --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_basics.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_audio_basics.mm b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_basics.mm new file mode 100644 index 0000000000..e0e6c577cc --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_basics.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_audio_devices.cpp b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_devices.cpp new file mode 100644 index 0000000000..fb5c2219d7 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_devices.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_audio_devices.mm b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_devices.mm new file mode 100644 index 0000000000..e58b67ea49 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_devices.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_audio_formats.cpp b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_formats.cpp new file mode 100644 index 0000000000..a3c61170eb --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_formats.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_audio_formats.mm b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_formats.mm new file mode 100644 index 0000000000..f325b8fb67 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_formats.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_audio_processors.cpp b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_processors.cpp new file mode 100644 index 0000000000..bfe172edd0 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_processors.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_audio_processors.mm b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_processors.mm new file mode 100644 index 0000000000..b80ae9017f --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_processors.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_audio_utils.cpp b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_utils.cpp new file mode 100644 index 0000000000..97bd2c568c --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_utils.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_audio_utils.mm b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_utils.mm new file mode 100644 index 0000000000..8eae7c6e2f --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_audio_utils.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_core.cpp b/examples/DSPDemo/JuceLibraryCode/include_juce_core.cpp new file mode 100644 index 0000000000..d0ce1636f0 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_core.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_core.mm b/examples/DSPDemo/JuceLibraryCode/include_juce_core.mm new file mode 100644 index 0000000000..72b10bf817 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_core.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_data_structures.cpp b/examples/DSPDemo/JuceLibraryCode/include_juce_data_structures.cpp new file mode 100644 index 0000000000..9315aa1686 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_data_structures.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_data_structures.mm b/examples/DSPDemo/JuceLibraryCode/include_juce_data_structures.mm new file mode 100644 index 0000000000..695ec43925 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_data_structures.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_dsp.cpp b/examples/DSPDemo/JuceLibraryCode/include_juce_dsp.cpp new file mode 100644 index 0000000000..430d943f26 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_dsp.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_dsp.mm b/examples/DSPDemo/JuceLibraryCode/include_juce_dsp.mm new file mode 100644 index 0000000000..1dea5d08a6 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_dsp.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_events.cpp b/examples/DSPDemo/JuceLibraryCode/include_juce_events.cpp new file mode 100644 index 0000000000..1bba110a97 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_events.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_events.mm b/examples/DSPDemo/JuceLibraryCode/include_juce_events.mm new file mode 100644 index 0000000000..4cc34fc401 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_events.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_graphics.cpp b/examples/DSPDemo/JuceLibraryCode/include_juce_graphics.cpp new file mode 100644 index 0000000000..319c76de0e --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_graphics.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_graphics.mm b/examples/DSPDemo/JuceLibraryCode/include_juce_graphics.mm new file mode 100644 index 0000000000..b28e6dd056 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_graphics.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_gui_basics.cpp b/examples/DSPDemo/JuceLibraryCode/include_juce_gui_basics.cpp new file mode 100644 index 0000000000..216c76bb05 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_gui_basics.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_gui_basics.mm b/examples/DSPDemo/JuceLibraryCode/include_juce_gui_basics.mm new file mode 100644 index 0000000000..6a9726fa5f --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_gui_basics.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_gui_extra.cpp b/examples/DSPDemo/JuceLibraryCode/include_juce_gui_extra.cpp new file mode 100644 index 0000000000..7226e19833 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_gui_extra.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/JuceLibraryCode/include_juce_gui_extra.mm b/examples/DSPDemo/JuceLibraryCode/include_juce_gui_extra.mm new file mode 100644 index 0000000000..c9b6c3bfc6 --- /dev/null +++ b/examples/DSPDemo/JuceLibraryCode/include_juce_gui_extra.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/examples/DSPDemo/Resources/cassette_recorder.wav b/examples/DSPDemo/Resources/cassette_recorder.wav new file mode 100644 index 0000000000..c548b22cdd Binary files /dev/null and b/examples/DSPDemo/Resources/cassette_recorder.wav differ diff --git a/examples/DSPDemo/Resources/guitar_amp.wav b/examples/DSPDemo/Resources/guitar_amp.wav new file mode 100644 index 0000000000..98d402cd04 Binary files /dev/null and b/examples/DSPDemo/Resources/guitar_amp.wav differ diff --git a/examples/DSPDemo/Source/DSPDemo.h b/examples/DSPDemo/Source/DSPDemo.h new file mode 100644 index 0000000000..78e34f5259 --- /dev/null +++ b/examples/DSPDemo/Source/DSPDemo.h @@ -0,0 +1,198 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#pragma once + +#include "../JuceLibraryCode/JuceHeader.h" + +using namespace dsp; + +//============================================================================== +struct DSPDemoParameterBase : public ChangeBroadcaster +{ + DSPDemoParameterBase (const String& labelName) : name (labelName) {} + virtual ~DSPDemoParameterBase() {} + + virtual Component* getComponent() = 0; + + virtual int getPreferredHeight() = 0; + virtual int getPreferredWidth() = 0; + + String name; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DSPDemoParameterBase) +}; + +//============================================================================== +struct SliderParameter : public DSPDemoParameterBase, + private Slider::Listener +{ + SliderParameter (Range range, double skew, double initialValue, + const String& labelName, const String& suffix = {}) + : DSPDemoParameterBase (labelName) + { + slider.setRange (range.getStart(), range.getEnd(), 0.01); + slider.setSkewFactor (skew); + slider.setValue (initialValue); + + if (suffix.isNotEmpty()) + slider.setTextValueSuffix (suffix); + + slider.addListener (this); + } + + Component* getComponent() override { return &slider; } + + int getPreferredHeight() override { return 40; } + int getPreferredWidth() override { return 500; } + + double getCurrentValue() const { return slider.getValue(); } + +private: + Slider slider; + + void sliderValueChanged (Slider*) override { sendChangeMessage(); } +}; + +//============================================================================== +struct ChoiceParameter : public DSPDemoParameterBase, + private ComboBox::Listener +{ + ChoiceParameter (const StringArray& options, int initialId, const String& labelName) + : DSPDemoParameterBase (labelName) + { + parameterBox.addItemList (options, 1); + parameterBox.addListener (this); + + parameterBox.setSelectedId (initialId); + } + + Component* getComponent() override { return ¶meterBox; } + + int getPreferredHeight() override { return 25; } + int getPreferredWidth() override { return 250; } + + int getCurrentSelectedID() const { return parameterBox.getSelectedId(); } + +private: + ComboBox parameterBox; + + void comboBoxChanged (ComboBox*) override { sendChangeMessage(); } +}; + +//============================================================================== +// This is just a base class for the demos which exposes them as an AudioSource with +// an array of parameters +struct DSPDemoBase : public AudioSource +{ + virtual const std::vector& getParameters() = 0; + + AudioSource* inputSource = nullptr; +}; + +//============================================================================== +template +struct DSPDemo : public DSPDemoBase, + public ProcessorWrapper, + private ChangeListener +{ + DSPDemo() + { + for (auto* p : getParameters()) + p->addChangeListener (this); + } + + void prepareToPlay (int blockSize, double sampleRate) override + { + inputSource->prepareToPlay (blockSize, sampleRate); + this->prepare ({ sampleRate, (uint32) blockSize, 2 }); + } + + void releaseResources() override + { + inputSource->releaseResources(); + } + + void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override + { + jassert (bufferToFill.buffer != nullptr); + + inputSource->getNextAudioBlock (bufferToFill); + + dsp::AudioBlock block (*bufferToFill.buffer, + (size_t) bufferToFill.startSample); + + ScopedLock audioLock (audioCallbackLock); + this->process (ProcessContextReplacing (block)); + } + + const std::vector& getParameters() override + { + return this->processor.parameters; + } + + void changeListenerCallback (ChangeBroadcaster*) override + { + ScopedLock audioLock (audioCallbackLock); + static_cast (this->processor).updateParameters(); + } + + CriticalSection audioCallbackLock; +}; + + +//============================================================================== +struct Demo +{ + using CreateDemoFn = std::function; + + String name, code; + CreateDemoFn createDemo; + + Demo (const char* nameToUse, const char* codeToUse, CreateDemoFn create) + : name (nameToUse), code (codeToUse), createDemo (create) + { + code = code.fromFirstOccurrenceOf ("// @@ START_DEMO", false, false) + .upToLastOccurrenceOf ("// @@ END_DEMO", false, false) + .trim(); + + getList().add (this); + } + + static Array& getList() + { + static Array demos; + return demos; + } +}; + +template +struct RegisterDSPDemo : public Demo +{ + RegisterDSPDemo (const char* nameToUse, const char* codeToUse) + : Demo (nameToUse, codeToUse, [](AudioSource& input) { auto* demo = new DSPDemo(); demo->inputSource = &input; return demo; }) + {} +}; diff --git a/examples/DSPDemo/Source/Demos/ConvolutionDemo.cpp b/examples/DSPDemo/Source/Demos/ConvolutionDemo.cpp new file mode 100644 index 0000000000..148b55194f --- /dev/null +++ b/examples/DSPDemo/Source/Demos/ConvolutionDemo.cpp @@ -0,0 +1,89 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#include "../DSPDemo.h" + +//============================================================================== +// @@ START_DEMO +struct ConvolutionDemo +{ + void prepare (const ProcessSpec& spec) + { + sampleRate = spec.sampleRate; + convolution.prepare (spec); + updateParameters(); + } + + void process (ProcessContextReplacing context) + { + context.isBypassed = bypass; + convolution.process (context); + } + + void reset() + { + convolution.reset(); + } + + void updateParameters() + { + if (auto* cabinetTypeParameter = dynamic_cast (parameters[0])) + { + if (cabinetTypeParameter->getCurrentSelectedID() == 1) + { + bypass = true; + } + else + { + bypass = false; + + auto maxSize = static_cast (roundDoubleToInt (8192.0 * sampleRate / 44100.0)); + + if (cabinetTypeParameter->getCurrentSelectedID() == 2) + convolution.loadImpulseResponse (BinaryData::guitar_amp_wav, + BinaryData::guitar_amp_wavSize, + false, maxSize); + else + convolution.loadImpulseResponse (BinaryData::cassette_recorder_wav, + BinaryData::cassette_recorder_wavSize, + false, maxSize); + } + } + } + + //============================================================================== + double sampleRate = 0; + bool bypass = false; + + Convolution convolution; + + ChoiceParameter cabinetParam { {"Bypass", "Guitar amplifier 8''", "Cassette recorder"}, 1, "Cabinet Type" }; + + std::vector parameters { &cabinetParam }; +}; +// @@ END_DEMO + +RegisterDSPDemo convolutionDemo ("Convolution", BinaryData::ConvolutionDemo_cpp); diff --git a/examples/DSPDemo/Source/Demos/FIRFilterDemo.cpp b/examples/DSPDemo/Source/Demos/FIRFilterDemo.cpp new file mode 100644 index 0000000000..b383717a9a --- /dev/null +++ b/examples/DSPDemo/Source/Demos/FIRFilterDemo.cpp @@ -0,0 +1,76 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#include "../DSPDemo.h" + +//============================================================================== +// @@ START_DEMO +struct FIRFilterDemo +{ + void prepare (const ProcessSpec& spec) + { + sampleRate = spec.sampleRate; + + fir.state = FilterDesign::designFIRLowpassWindowMethod (440.0f, sampleRate, 21, + WindowingFunction::blackmann); + fir.prepare (spec); + } + + void process (const ProcessContextReplacing& context) + { + fir.process (context); + } + + void reset() + { + fir.reset(); + } + + void updateParameters() + { + if (sampleRate != 0) + { + auto cutoff = static_cast (cutoffParam.getCurrentValue()); + auto windowingMethod = static_cast::WindowingMethod> (typeParam.getCurrentSelectedID() - 1); + + *fir.state = *FilterDesign::designFIRLowpassWindowMethod (cutoff, sampleRate, 21, windowingMethod); + } + } + + //============================================================================== + ProcessorDuplicator, FIR::Coefficients> fir; + + double sampleRate = 0; + + SliderParameter cutoffParam { { 20.0, 20000.0 }, 0.4, 440.0f, "Cutoff", "Hz" }; + ChoiceParameter typeParam { { "Rectangular", "Triangular", "Hann", "Hamming", "Blackmann", "Blackmann-Harris", "Flat Top", "Kaiser" }, + 5, "Windowing Function" }; + + std::vector parameters { &cutoffParam, &typeParam }; +}; +// @@ END_DEMO + +RegisterDSPDemo firDemo ("FIR Filter", BinaryData::FIRFilterDemo_cpp); diff --git a/modules/juce_video/playback/juce_MovieComponent.h b/examples/DSPDemo/Source/Demos/GainDemo.cpp similarity index 50% rename from modules/juce_video/playback/juce_MovieComponent.h rename to examples/DSPDemo/Source/Demos/GainDemo.cpp index ff04064a1a..6ba26390c6 100644 --- a/modules/juce_video/playback/juce_MovieComponent.h +++ b/examples/DSPDemo/Source/Demos/GainDemo.cpp @@ -24,44 +24,38 @@ ============================================================================== */ -#pragma once +#include "../DSPDemo.h" //============================================================================== -/** - A component that can play back a video file. -*/ -class JUCE_API MovieComponent : public NSViewComponent +// @@ START_DEMO +struct GainDemo { -public: - MovieComponent(); - ~MovieComponent(); + void prepare (const ProcessSpec&) + { + gain.setGainDecibels (-6.0f); + } - bool loadMovie (const File& file); - bool loadMovie (const URL& file); + void process (const ProcessContextReplacing& context) + { + gain.process (context); + } - void closeMovie(); - bool isMovieOpen() const; - String getCurrentMoviePath() const; + void reset() + { + gain.reset(); + } - void play(); - void stop(); + void updateParameters() + { + gain.setGainDecibels (static_cast (gainParam.getCurrentValue())); + } - double getDuration() const; - double getPosition() const; - void setPosition (double seconds); - void setVolume (float newVolume); - float getVolume() const; + //============================================================================== + Gain gain; + SliderParameter gainParam { { -100.0, 20.0 }, 3.0, -6.0, "Gain", "dB" }; - Rectangle getNativeSize() const; - void setBoundsWithCorrectAspectRatio (Rectangle spaceToFitWithin, - RectanglePlacement placement); - -protected: - void resized() override; - -private: - struct Pimpl; - ScopedPointer pimpl; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MovieComponent) + std::vector parameters { &gainParam }; }; +// @@ END_DEMO + +RegisterDSPDemo gainDemo ("Gain", BinaryData::GainDemo_cpp); diff --git a/examples/DSPDemo/Source/Demos/IIRFilterDemo.cpp b/examples/DSPDemo/Source/Demos/IIRFilterDemo.cpp new file mode 100644 index 0000000000..b815dfc90e --- /dev/null +++ b/examples/DSPDemo/Source/Demos/IIRFilterDemo.cpp @@ -0,0 +1,80 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#include "../DSPDemo.h" + +//============================================================================== +// @@ START_DEMO +struct IIRFilterDemo +{ + void prepare (const ProcessSpec& spec) + { + sampleRate = spec.sampleRate; + + iir.state = IIR::Coefficients::makeLowPass (sampleRate, 440.0); + iir.prepare (spec); + } + + void process (const ProcessContextReplacing& context) + { + iir.process (context); + } + + void reset() + { + iir.reset(); + } + + void updateParameters() + { + if (sampleRate != 0) + { + auto cutoff = static_cast (cutoffParam.getCurrentValue()); + auto qVal = static_cast (qParam.getCurrentValue()); + + switch (typeParam.getCurrentSelectedID()) + { + case 1: *iir.state = *IIR::Coefficients::makeLowPass (sampleRate, cutoff, qVal); break; + case 2: *iir.state = *IIR::Coefficients::makeHighPass (sampleRate, cutoff, qVal); break; + case 3: *iir.state = *IIR::Coefficients::makeBandPass (sampleRate, cutoff, qVal); break; + default: break; + } + } + } + + //============================================================================== + ProcessorDuplicator, IIR::Coefficients> iir; + + ChoiceParameter typeParam { { "Low-pass", "High-pass", "Band-pass"}, 1, "Type" }; + SliderParameter cutoffParam { { 20.0, 20000.0 }, 0.5, 440.0f, "Cutoff", "Hz" }; + SliderParameter qParam { { 0.3, 20.0 }, 0.5, 1.0 / std::sqrt(2.0), "Q" }; + + std::vector parameters { &typeParam, &cutoffParam, &qParam }; + double sampleRate = 0; +}; +// @@ END_DEMO + +RegisterDSPDemo iirDemo ("IIR Filter", BinaryData::IIRFilterDemo_cpp); diff --git a/examples/DSPDemo/Source/Demos/OscillatorDemo.cpp b/examples/DSPDemo/Source/Demos/OscillatorDemo.cpp new file mode 100644 index 0000000000..388e0d6f06 --- /dev/null +++ b/examples/DSPDemo/Source/Demos/OscillatorDemo.cpp @@ -0,0 +1,112 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#include "../DSPDemo.h" + +//============================================================================== +// @@ START_DEMO +struct OscillatorDemo +{ + void prepare (const ProcessSpec& spec) + { + gain.setGainDecibels (-6.0f); + + for (auto&& oscillator : oscillators) + { + oscillator.setFrequency (440.f); + oscillator.prepare (spec); + } + + updateParameters(); + + tempBuffer = AudioBlock (tempBufferMemory, spec.numChannels, spec.maximumBlockSize); + } + + void process (const ProcessContextReplacing& context) + { + tempBuffer.copy (context.getInputBlock()); + tempBuffer.multiply (static_cast (fileMix)); + + oscillators[currentOscillatorIdx].process (context); + context.getOutputBlock().multiply (static_cast (1.0 - fileMix)); + + context.getOutputBlock().add (tempBuffer); + + gain.process (context); + } + + void reset() + { + oscillators[currentOscillatorIdx].reset(); + } + + void updateParameters() + { + currentOscillatorIdx = jmin (numElementsInArray (oscillators), + 3 * (accuracy.getCurrentSelectedID() - 1) + (typeParam.getCurrentSelectedID() - 1)); + + auto freq = static_cast (freqParam.getCurrentValue()); + + for (auto&& oscillator : oscillators) + oscillator.setFrequency (freq); + + gain.setGainDecibels (static_cast (gainParam.getCurrentValue())); + + fileMix = mixParam.getCurrentValue(); + } + + //============================================================================== + Oscillator oscillators[6] = + { + // No Approximation + {[] (float x) { return std::sin (x); }}, // sine + {[] (float x) { return x / float_Pi; }}, // saw + {[] (float x) { return x < 0.0f ? -1.0f : 1.0f; }}, // square + + // Approximated by a wave-table + {[] (float x) { return std::sin (x); }, 100}, // sine + {[] (float x) { return x / float_Pi; }, 100}, // saw + {[] (float x) { return x < 0.0f ? -1.0f : 1.0f; }, 100} // square + }; + + int currentOscillatorIdx = 0; + Gain gain; + + ChoiceParameter typeParam { {"sine", "saw", "square"}, 1, "Type" }; + ChoiceParameter accuracy { {"No Approximation", "Use Wavetable"}, 1, "Accuracy" }; + SliderParameter freqParam { { 20.0, 24000.0 }, 0.4, 440.0, "Frequency", "Hz" }; + SliderParameter gainParam { { -100.0, 20.0 }, 3.0, -20.0, "Gain", "dB" }; + SliderParameter mixParam { { 0.0, 1.0 }, 1.0, 0.0, "File mix" }; + + HeapBlock tempBufferMemory; + AudioBlock tempBuffer; + double fileMix; + + std::vector parameters { &typeParam, &accuracy, &freqParam, &gainParam, &mixParam }; +}; +// @@ END_DEMO + +RegisterDSPDemo oscillatorDemo ("Oscillator", BinaryData::OscillatorDemo_cpp); diff --git a/examples/DSPDemo/Source/Demos/OverdriveDemo.cpp b/examples/DSPDemo/Source/Demos/OverdriveDemo.cpp new file mode 100644 index 0000000000..3604520cb7 --- /dev/null +++ b/examples/DSPDemo/Source/Demos/OverdriveDemo.cpp @@ -0,0 +1,91 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#include "../DSPDemo.h" + +//============================================================================== +// @@ START_DEMO +struct OverdriveDemo +{ + void prepare (const ProcessSpec& spec) + { + sampleRate = spec.sampleRate; + + auto& gainUp = overdrive.get<0>(); + gainUp.setGainDecibels (24); + + auto& bias = overdrive.get<1>(); + bias.setBias (0.4f); + + auto& wavShaper = overdrive.get<2>(); + wavShaper.functionToUse = std::tanh; + + auto& dcFilter = overdrive.get<3>(); + dcFilter.state = IIR::Coefficients::makeHighPass (sampleRate, 5.0); + + auto& gainDown = overdrive.get<4>(); + gainDown.setGainDecibels (-18.0f); + + overdrive.prepare (spec); + } + + void process (const ProcessContextReplacing& context) + { + overdrive.process (context); + } + + void reset() + { + overdrive.reset(); + } + + void updateParameters() + { + if (sampleRate != 0) + { + overdrive.get<0>().setGainDecibels (static_cast (inGainParam.getCurrentValue())); + overdrive.get<4>().setGainDecibels (static_cast (outGainParam.getCurrentValue())); + } + } + + //============================================================================== + using GainProcessor = Gain; + using BiasProcessor = Bias; + using DriveProcessor = WaveShaper; + using DCFilter = ProcessorDuplicator, + IIR::Coefficients>; + + ProcessorChain overdrive; + + SliderParameter inGainParam { { -100.0, 60.0 }, 3, 24.0, "Input Gain", "dB" }; + SliderParameter outGainParam { { -100.0, 20.0 }, 3, -18.0, "Output Gain", "dB" }; + + std::vector parameters { &inGainParam, &outGainParam }; + double sampleRate = 0; +}; +// @@ END_DEMO + +RegisterDSPDemo overdriveDemo ("Overdrive", BinaryData::OverdriveDemo_cpp); diff --git a/examples/DSPDemo/Source/Demos/SIMDRegisterDemo.cpp b/examples/DSPDemo/Source/Demos/SIMDRegisterDemo.cpp new file mode 100644 index 0000000000..0649a26d7c --- /dev/null +++ b/examples/DSPDemo/Source/Demos/SIMDRegisterDemo.cpp @@ -0,0 +1,124 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#include "../DSPDemo.h" + +#if JUCE_USE_SIMD + +//============================================================================== +// @@ START_DEMO +struct SIMDRegisterDemo +{ + void prepare (const ProcessSpec& spec) + { + sampleRate = spec.sampleRate; + + iirCoefficients = IIR::Coefficients::makeLowPass (sampleRate, 440.0f); + iir.reset (new IIR::Filter> (iirCoefficients)); + + interleaved = AudioBlock> (interleavedBlockData, 1, spec.maximumBlockSize); + zero = AudioBlock (zeroData, SIMDRegister::size(), spec.maximumBlockSize); + + zero.clear(); + + auto monoSpec = spec; + monoSpec.numChannels = 1; + iir->prepare (monoSpec); + } + + void process (const ProcessContextReplacing& context) + { + jassert (context.getInputBlock().getNumSamples() == context.getOutputBlock().getNumSamples()); + jassert (context.getInputBlock().getNumChannels() == context.getOutputBlock().getNumChannels()); + + auto& input = context.getInputBlock(); + auto& output = context.getOutputBlock(); + auto n = input.getNumSamples(); + auto* inout = channelPointers.getData(); + + + for (size_t ch = 0; ch < SIMDRegister::size(); ++ch) + inout[ch] = (ch < input.getNumChannels() ? const_cast (input.getChannelPointer (ch)) : zero.getChannelPointer (ch)); + + AudioDataConverters::interleaveSamples (inout, reinterpret_cast (interleaved.getChannelPointer (0)), + static_cast (n), static_cast (SIMDRegister::size())); + + + iir->process (ProcessContextReplacing> (interleaved)); + + + for (size_t ch = 0; ch < input.getNumChannels(); ++ch) + inout[ch] = output.getChannelPointer (ch); + + AudioDataConverters::deinterleaveSamples (reinterpret_cast (interleaved.getChannelPointer (0)), + const_cast (inout), + static_cast (n), static_cast (SIMDRegister::size())); + } + + void reset() + { + iir.reset(); + } + + void updateParameters() + { + if (sampleRate != 0) + { + auto cutoff = static_cast (cutoffParam.getCurrentValue()); + auto qVal = static_cast (qParam.getCurrentValue()); + + switch (typeParam.getCurrentSelectedID()) + { + case 1: *iirCoefficients = *IIR::Coefficients::makeLowPass (sampleRate, cutoff, qVal); break; + case 2: *iirCoefficients = *IIR::Coefficients::makeHighPass (sampleRate, cutoff, qVal); break; + case 3: *iirCoefficients = *IIR::Coefficients::makeBandPass (sampleRate, cutoff, qVal); break; + default: break; + } + } + } + + //============================================================================== + IIR::Coefficients::Ptr iirCoefficients; + std::unique_ptr>> iir; + + AudioBlock> interleaved; + AudioBlock zero; + + HeapBlock interleavedBlockData, zeroData; + HeapBlock channelPointers { SIMDRegister::size() }; + + ChoiceParameter typeParam { { "Low-pass", "High-pass", "Band-pass"}, 1, "Type" }; + SliderParameter cutoffParam { { 20.0, 20000.0 }, 0.5, 440.0f, "Cutoff", "Hz" }; + SliderParameter qParam { { 0.3, 20.0 }, 0.5, 0.7, "Q" }; + + std::vector parameters { &typeParam, &cutoffParam, &qParam }; + double sampleRate = 0; +}; +// @@ END_DEMO + +RegisterDSPDemo simdDemo ("SIMD Filter", BinaryData::SIMDRegisterDemo_cpp); + +#endif diff --git a/examples/DSPDemo/Source/Demos/StateVariableFilterDemo.cpp b/examples/DSPDemo/Source/Demos/StateVariableFilterDemo.cpp new file mode 100644 index 0000000000..77f8757379 --- /dev/null +++ b/examples/DSPDemo/Source/Demos/StateVariableFilterDemo.cpp @@ -0,0 +1,77 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#include "../DSPDemo.h" + +//============================================================================== +// @@ START_DEMO +struct StateVariableFilterDemo +{ + void prepare (const ProcessSpec& spec) + { + sampleRate = spec.sampleRate; + + filter.state = new StateVariableFilter::Parameters; + filter.prepare (spec); + } + + void process (const ProcessContextReplacing& context) + { + filter.process (context); + } + + void reset() + { + filter.reset(); + } + + void updateParameters() + { + if (sampleRate != 0) + { + auto cutoff = static_cast (cutoffParam.getCurrentValue()); + auto resonance = static_cast (qParam.getCurrentValue()); + auto type = static_cast::Type> (typeParam.getCurrentSelectedID() - 1); + + filter.state->type = type; + filter.state->setCutOffFrequency (sampleRate, cutoff, resonance); + } + } + + //============================================================================== + ProcessorDuplicator, + StateVariableFilter::Parameters> filter; + + ChoiceParameter typeParam {{ "Low-pass", "Band-pass", "High-pass"}, 1, "Type" }; + SliderParameter cutoffParam {{ 20.0, 20000.0 }, 0.5, 440.0f, "Cutoff", "Hz" }; + SliderParameter qParam {{ 0.3, 20.0 }, 0.5, 1.0 / std::sqrt (2.0), "Resonance" }; + + std::vector parameters { &typeParam, &cutoffParam, &qParam }; + double sampleRate = 0; +}; +// @@ END_DEMO + +RegisterDSPDemo stateVariableFilterDemo ("State Variable Filter", BinaryData::StateVariableFilterDemo_cpp); diff --git a/examples/DSPDemo/Source/Demos/WaveShaperTanhDemo.cpp b/examples/DSPDemo/Source/Demos/WaveShaperTanhDemo.cpp new file mode 100644 index 0000000000..d2e98a87c0 --- /dev/null +++ b/examples/DSPDemo/Source/Demos/WaveShaperTanhDemo.cpp @@ -0,0 +1,60 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#include "../DSPDemo.h" + +//============================================================================== +// @@ START_DEMO +struct WaveShaperTanhDemo +{ + void prepare (const ProcessSpec&) {} + + void process (const ProcessContextReplacing& context) + { + shapers[currentShaperIdx].process (context); + } + + void reset() + { + for (auto&& shaper : shapers) + shaper.reset(); + } + + void updateParameters() + { + currentShaperIdx = jmin (numElementsInArray (shapers), accuracy.getCurrentSelectedID() - 1); + } + + //============================================================================== + WaveShaper shapers[2] { { std::tanh }, { FastMathApproximations::tanh } }; + int currentShaperIdx = 0; + + ChoiceParameter accuracy {{ "No Approximation", "Use fast-math approximation"}, 1, "Accuracy" }; + std::vector parameters { &accuracy }; // no params for this demo +}; +// @@ END_DEMO + +RegisterDSPDemo waveshaperDemo ("WaveShaperTanh", BinaryData::WaveShaperTanhDemo_cpp); diff --git a/examples/DSPDemo/Source/EditorColourScheme.xml b/examples/DSPDemo/Source/EditorColourScheme.xml new file mode 100644 index 0000000000..86b2ea95d3 --- /dev/null +++ b/examples/DSPDemo/Source/EditorColourScheme.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/examples/DSPDemo/Source/Main.cpp b/examples/DSPDemo/Source/Main.cpp new file mode 100644 index 0000000000..dad4f3aad7 --- /dev/null +++ b/examples/DSPDemo/Source/Main.cpp @@ -0,0 +1,186 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#include "Main.h" + +DSPSamplesApplication::DSPSamplesApplication() + : TimeSliceThread ("Audio File Reader Thread"), demoIndex (-1) +{ + loopState.addListener (this); +} + +void DSPSamplesApplication::initialise (const String&) +{ + formatManager.registerBasicFormats(); + audioDeviceManager.addAudioCallback (&audioSourcePlayer); + audioDeviceManager.initialiseWithDefaultDevices (0, 2); + + setCurrentDemo (0); + startThread(); + + mainWindow = new MainWindow (getApplicationName()); +} + +void DSPSamplesApplication::shutdown() +{ + signalThreadShouldExit(); + stop(); + audioDeviceManager.removeAudioCallback (&audioSourcePlayer); + waitForThreadToExit (10000); + mainWindow = nullptr; +} + +//============================================================================== +DSPSamplesApplication& DSPSamplesApplication::getApp() +{ + auto* app = dynamic_cast (JUCEApplication::getInstance()); + jassert (app != nullptr); + return *app; +} + +//============================================================================== +bool DSPSamplesApplication::loadFile (const File& fileToPlay) +{ + stop(); + + audioSourcePlayer.setSource (nullptr); + mainWindow->setTransportSource (nullptr); + transportSource = nullptr; + readerSource = nullptr; + + reader = formatManager.createReaderFor (fileToPlay); + + if (reader != nullptr) + { + readerSource = new AudioFormatReaderSource (reader, false); + readerSource->setLooping (loopState.getValue()); + + init(); + + return true; + } + + return false; +} + +void DSPSamplesApplication::togglePlay() +{ + if (playState.getValue()) + stop(); + else + play(); +} + +void DSPSamplesApplication::stop() +{ + playState = false; + + if (transportSource != nullptr) + { + transportSource->stop(); + transportSource->setPosition (0); + } +} + +void DSPSamplesApplication::init() +{ + if (transportSource == nullptr) + { + transportSource = new AudioTransportSource(); + transportSource->addChangeListener (this); + + if (readerSource != nullptr) + { + if (auto* device = audioDeviceManager.getCurrentAudioDevice()) + { + transportSource->setSource (readerSource, roundToInt (device->getCurrentSampleRate()), this, reader->sampleRate); + + // tell the main window about this so that it can do the seeking behaviour... + mainWindow->setTransportSource (transportSource); + } + } + } + + audioSourcePlayer.setSource (nullptr); + currentDemo = nullptr; + + if (currentDemo == nullptr) + if (auto demo = Demo::getList()[demoIndex]) + if (demo->name.isNotEmpty()) + currentDemo = demo->createDemo (*transportSource); + + audioSourcePlayer.setSource (currentDemo); + + if (mainWindow != nullptr) + mainWindow->initParameters(); +} + +void DSPSamplesApplication::play() +{ + if (readerSource == nullptr) + return; + + if (transportSource->getCurrentPosition() >= transportSource->getLengthInSeconds() + || transportSource->getCurrentPosition() < 0) + transportSource->setPosition (0); + + transportSource->start(); + playState = true; +} + +void DSPSamplesApplication::setLooping (bool shouldLoop) +{ + if (readerSource != nullptr) + readerSource->setLooping (shouldLoop); +} + +void DSPSamplesApplication::changeListenerCallback (ChangeBroadcaster*) +{ + if (playState.getValue() && ! transportSource->isPlaying()) + stop(); +} + +void DSPSamplesApplication::setCurrentDemo (int index, bool force) +{ + if ((index != demoIndex || force) && isPositiveAndBelow (index, Demo::getList().size())) + { + demoIndex = index; + init(); + + if (playState.getValue()) + play(); + } +} + +void DSPSamplesApplication::valueChanged (Value& v) +{ + if (readerSource != nullptr) + readerSource->setLooping (v.getValue()); +} + +//============================================================================== +// This macro generates the main() routine that launches the app. +START_JUCE_APPLICATION (DSPSamplesApplication) diff --git a/examples/DSPDemo/Source/Main.h b/examples/DSPDemo/Source/Main.h new file mode 100644 index 0000000000..ed4aa17954 --- /dev/null +++ b/examples/DSPDemo/Source/Main.h @@ -0,0 +1,143 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#pragma once + +#include "DSPDemo.h" +#include "MainComponent.h" + +//============================================================================== +class DSPSamplesApplication : public JUCEApplication, + private TimeSliceThread, + private Value::Listener, + private ChangeListener +{ +public: + //============================================================================== + DSPSamplesApplication(); + + const String getApplicationName() override { return ProjectInfo::projectName; } + const String getApplicationVersion() override { return ProjectInfo::versionString; } + + //============================================================================== + void initialise (const String&) override; + void shutdown() override; + + //============================================================================== + static DSPSamplesApplication& getApp(); + + //============================================================================== + bool loadFile (const File&); + void togglePlay(); + void stop(); + void init(); + void play(); + void setLooping (bool); + + //============================================================================== + void setCurrentDemo (int index, bool force = false); + int getCurrentDemoIndex() const { return demoIndex; } + const std::vector& getCurrentDemoParameters() { return currentDemo->getParameters(); } + + AudioDeviceManager& getDeviceManager() { return audioDeviceManager; } + AudioFormatManager& getFormatManager() { return formatManager; } + AudioTransportSource* getTransportSource() { return transportSource; } + + Value& getPlayState() { return playState; } + Value& getLoopState() { return loopState; } + + //============================================================================== + struct MainWindow : public DocumentWindow + { + MainWindow (String name) + : DocumentWindow (name, + Desktop::getInstance().getDefaultLookAndFeel() + .findColour (ResizableWindow::backgroundColourId), + DocumentWindow::allButtons) + { + setUsingNativeTitleBar (true); + setContentOwned (mainComponent = new MainContentComponent(), true); + + #if JUCE_ANDROID || JUCE_IOS + setFullScreen (true); + #else + centreWithSize (getWidth(), getHeight()); + setResizable (true, false); + setResizeLimits (500, 400, 32000, 32000); + #endif + setVisible (true); + } + + void closeButtonPressed() override + { + JUCEApplication::getInstance()->systemRequestedQuit(); + } + + void setTransportSource (AudioTransportSource* source) + { + mainComponent->getThumbnailComponent().setTransportSource (source); + } + + void initParameters() + { + mainComponent->initParameters(); + } + + private: + ScopedPointer mainComponent; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow) + }; + + +private: + //============================================================================== + void valueChanged (Value&) override; + void changeListenerCallback (ChangeBroadcaster*) override; + + //============================================================================== + AudioDeviceManager audioDeviceManager; + AudioFormatManager formatManager; + Value playState { var (false) }; + Value loopState { var (false) }; + + double currentSampleRate = 44100.0; + uint32 currentBlockSize = 512; + uint32 currentNumChannels = 2; + + ScopedPointer reader; + ScopedPointer readerSource; + ScopedPointer transportSource; + ScopedPointer currentDemo; + + AudioSourcePlayer audioSourcePlayer; + + ScopedPointer mainWindow; + + int demoIndex = -1; + + AudioBuffer fileReadBuffer; +}; diff --git a/examples/DSPDemo/Source/MainComponent.cpp b/examples/DSPDemo/Source/MainComponent.cpp new file mode 100644 index 0000000000..1524501f66 --- /dev/null +++ b/examples/DSPDemo/Source/MainComponent.cpp @@ -0,0 +1,249 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#include "Main.h" +#include "MainComponent.h" + +//============================================================================== +AudioPlayerHeader::AudioPlayerHeader() + : thumbnailComp (DSPSamplesApplication::getApp().getDeviceManager(), + DSPSamplesApplication::getApp().getFormatManager()) +{ + setOpaque (true); + + addAndMakeVisible (loadButton); + addAndMakeVisible (playButton); + addAndMakeVisible (loopButton); + + loadButton.addListener (this); + playButton.addListener (this); + + addAndMakeVisible (thumbnailComp); + thumbnailComp.addChangeListener (this); + + DSPSamplesApplication::getApp().getPlayState().addListener (this); + loopButton.getToggleStateValue().referTo (DSPSamplesApplication::getApp().getLoopState()); +} + +AudioPlayerHeader::~AudioPlayerHeader() +{ + playButton.removeListener (this); + loadButton.removeListener (this); + loopButton.removeListener (this); + + DSPSamplesApplication::getApp().getPlayState().removeListener (this); +} + +void AudioPlayerHeader::paint (Graphics& g) +{ + g.setColour (getLookAndFeel().findColour (ResizableWindow::backgroundColourId).darker()); + g.fillRect (getLocalBounds()); +} + +void AudioPlayerHeader::resized() +{ + auto bounds = getLocalBounds(); + + auto buttonBounds = bounds.removeFromLeft (jmin (250, bounds.getWidth() / 4)); + auto top = buttonBounds.removeFromTop (40); + + loadButton.setBounds (top.removeFromLeft (buttonBounds.getWidth() / 2).reduced (10, 10)); + playButton.setBounds (top.reduced (10, 10)); + + loopButton.setSize (0, 25); + loopButton.changeWidthToFitText(); + loopButton.setCentrePosition (buttonBounds.getCentre()); + + thumbnailComp.setBounds (bounds); +} + +void AudioPlayerHeader::buttonClicked (Button* button) +{ + auto& app = DSPSamplesApplication::getApp(); + + if (button == &loadButton) + { + app.stop(); + + FileChooser fc ("Select an audio file...", File(), "*.wav;*.mp3;*.aif;"); + + if (fc.browseForFileToOpen()) + { + auto f = fc.getResult(); + + if (! app.loadFile (f)) + NativeMessageBox::showOkCancelBox (AlertWindow::WarningIcon, "Error loading file", "Unable to load audio file", nullptr, nullptr); + else + thumbnailComp.setCurrentFile (f); + } + } + else if (button == &playButton) + { + app.togglePlay(); + } +} + +void AudioPlayerHeader::changeListenerCallback (ChangeBroadcaster*) +{ + auto& app = DSPSamplesApplication::getApp(); + + if (app.getPlayState().getValue()) + app.stop(); + + app.loadFile (thumbnailComp.getCurrentFile()); +} + +void AudioPlayerHeader::valueChanged (Value& v) +{ + playButton.setButtonText (v.getValue() ? "Stop" : "Play"); +} + +//============================================================================== +MainContentComponent::MainContentComponent() +{ + setSize (1000, 800); + setOpaque (true); + + codeEditor.setEnabled (false); + + auto currentDemoIndex = DSPSamplesApplication::getApp().getCurrentDemoIndex(); + demoList.setModel (this); + demoList.updateContent(); + demoList.selectRow (currentDemoIndex); + + addAndMakeVisible (header); + addAndMakeVisible (demoList); + addAndMakeVisible (codeEditor); + + setupDemoColours(); +} + +void MainContentComponent::paint (Graphics& g) +{ + g.setColour (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); + g.fillRect (getLocalBounds()); +} + +void MainContentComponent::resized() +{ + auto r = getLocalBounds(); + auto listWidth = jmin (250, r.getWidth() / 4); + + header.setBounds (r.removeFromTop (80)); + + demoList.setBounds (r.removeFromLeft (listWidth)); + + r.removeFromTop (5); + + if (parametersComponent != nullptr) + parametersComponent->setBounds (r.removeFromTop (parametersComponent->getHeightNeeded()).reduced (20, 0)); + + r.removeFromBottom (10); + + codeEditor.setBounds (r); +} + +void MainContentComponent::paintListBoxItem (int rowNumber, Graphics& g, int width, int height, bool rowIsSelected) +{ + Rectangle r { 0, 0, width, height }; + auto& lf = getLookAndFeel(); + + g.setColour (lf.findColour (rowIsSelected ? static_cast (TextEditor::highlightColourId) : static_cast (ListBox::backgroundColourId))); + g.fillRect (r); + + if (auto demo = Demo::getList()[rowNumber]) + { + g.setColour (lf.findColour (rowIsSelected ? static_cast (TextEditor::highlightedTextColourId) : static_cast (ListBox::textColourId))); + g.drawFittedText (demo->name, r.reduced (10, 2), Justification::centredLeft, 1); + } +} + +int MainContentComponent::getNumRows() +{ + return Demo::getList().size(); +} + +void MainContentComponent::selectedRowsChanged (int lastRowSelected) +{ + if (lastRowSelected >= 0) + { + DSPSamplesApplication::getApp().setCurrentDemo (lastRowSelected); + + if (auto demo = Demo::getList()[DSPSamplesApplication::getApp().getCurrentDemoIndex()]) + { + if (demo->code.isNotEmpty()) + codeDocument.replaceAllContent (demo->code); + + codeEditor.scrollToLine (0); + initParameters(); + } + } +} + +void MainContentComponent::setupDemoColours() +{ + auto& lf = getLookAndFeel(); + + lf.setColour (CodeEditorComponent::backgroundColourId, Colour (0xff263238)); + lf.setColour (CodeEditorComponent::lineNumberTextId, Colour (0xffaaaaaa)); + lf.setColour (CodeEditorComponent::lineNumberBackgroundId, Colour (0xff323e44)); + lf.setColour (CodeEditorComponent::highlightColourId, Colour (0xffe0ec65).withAlpha (0.5f)); + lf.setColour (ScrollBar::ColourIds::thumbColourId, Colour (0xffd0d8e0)); + + lf.setColour (TextEditor::highlightColourId, Colour (0xffe0ec65).withAlpha (0.75f)); + lf.setColour (TextEditor::highlightedTextColourId, Colours::black); + + ScopedPointer xml (XmlDocument::parse (BinaryData::EditorColourScheme_xml)); + + if (xml != nullptr) + { + auto colourSchemeTree = ValueTree::fromXml (*xml); + auto& scheme = codeEditor.getColourScheme(); + + for (auto& type : scheme.types) + { + auto colour = colourSchemeTree.getChildWithProperty ("name", type.name); + + if (colour.isValid()) + type.colour = Colour::fromString (colour ["colour"].toString()); + } + } + + codeEditor.setScrollbarThickness (6); +} + +void MainContentComponent::initParameters() +{ + auto& parameters = DSPSamplesApplication::getApp().getCurrentDemoParameters(); + + if (parametersComponent != nullptr) + parametersComponent = nullptr; + + if (parameters.size() > 0) + addAndMakeVisible (parametersComponent = new DemoParametersComponent (parameters)); + + resized(); +} diff --git a/examples/DSPDemo/Source/MainComponent.h b/examples/DSPDemo/Source/MainComponent.h new file mode 100644 index 0000000000..a3f2a48626 --- /dev/null +++ b/examples/DSPDemo/Source/MainComponent.h @@ -0,0 +1,266 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#pragma once + +#include "../JuceLibraryCode/JuceHeader.h" + +//============================================================================== +class AudioThumbnailComponent : public Component, + public FileDragAndDropTarget, + public ChangeBroadcaster, + private ChangeListener, + private Timer +{ +public: + AudioThumbnailComponent (AudioDeviceManager& adm, AudioFormatManager& afm) + : audioDeviceManager (adm), + thumbnailCache (5), + thumbnail (128, afm, thumbnailCache) + { + thumbnail.addChangeListener (this); + } + + ~AudioThumbnailComponent() + { + thumbnail.removeChangeListener (this); + } + + void paint (Graphics& g) override + { + g.fillAll (Colour (0xff495358)); + + g.setColour (Colours::white); + + if (thumbnail.getTotalLength() > 0.0) + { + thumbnail.drawChannels (g, getLocalBounds().reduced (2), + 0.0, thumbnail.getTotalLength(), 1.0f); + + g.setColour (Colours::black); + g.fillRect (static_cast (currentPosition * getWidth()), 0.0f, + 1.0f, static_cast (getHeight())); + } + else + { + g.drawFittedText ("No audio file loaded.\nDrop a file here or click the \"Load File...\" button.", getLocalBounds(), + Justification::centred, 2); + } + } + + bool isInterestedInFileDrag (const StringArray&) override { return true; } + void filesDropped (const StringArray& files, int, int) override { loadFile (File (files[0]), true); } + + void setCurrentFile (const File& f) + { + if (currentFile == f) + return; + + loadFile (f); + } + + File getCurrentFile() { return currentFile; } + + void setTransportSource (AudioTransportSource* newSource) + { + transportSource = newSource; + + struct ResetCallback : public CallbackMessage + { + ResetCallback (AudioThumbnailComponent& o) : owner (o) {} + void messageCallback() override { owner.reset(); } + + AudioThumbnailComponent& owner; + }; + + (new ResetCallback (*this))->post(); + } + +private: + AudioDeviceManager& audioDeviceManager; + AudioThumbnailCache thumbnailCache; + AudioThumbnail thumbnail; + AudioTransportSource* transportSource = nullptr; + + File currentFile; + double currentPosition = 0.0; + + //============================================================================== + void changeListenerCallback (ChangeBroadcaster*) override { repaint(); } + + void reset() + { + currentPosition = 0.0; + repaint(); + + if (transportSource == nullptr) + stopTimer(); + else + startTimerHz (25); + } + + void loadFile (const File& f, bool notify = false) + { + if (currentFile == f || ! f.existsAsFile()) + return; + + currentFile = f; + thumbnail.setSource (new FileInputSource (f)); + + if (notify) + sendChangeMessage(); + } + + void timerCallback() override + { + if (transportSource != nullptr) + { + currentPosition = transportSource->getCurrentPosition() / thumbnail.getTotalLength(); + repaint(); + } + } + + void mouseDrag (const MouseEvent& e) override + { + if (transportSource != nullptr) + { + const ScopedLock sl (audioDeviceManager.getAudioCallbackLock()); + + transportSource->setPosition ((jmax (static_cast (e.x), 0.0) / getWidth()) + * thumbnail.getTotalLength()); + } + } +}; + +//============================================================================== +class AudioPlayerHeader : public Component, + private Button::Listener, + private ChangeListener, + private Value::Listener +{ +public: + AudioPlayerHeader(); + ~AudioPlayerHeader(); + + void paint (Graphics&) override; + void resized() override; + + AudioThumbnailComponent thumbnailComp; + +private: + //============================================================================== + void buttonClicked (Button*) override; + void changeListenerCallback (ChangeBroadcaster*) override; + void valueChanged (Value& value) override; + + //============================================================================== + TextButton loadButton { "Load File..." }, playButton { "Play" }; + ToggleButton loopButton { "Loop File" }; +}; + +//============================================================================== +class DemoParametersComponent : public Component +{ +public: + DemoParametersComponent (const std::vector& demoParams) + { + parameters = demoParams; + + for (auto demoParameter : parameters) + { + addAndMakeVisible (demoParameter->getComponent()); + + auto* paramLabel = new Label ({}, demoParameter->name); + + paramLabel->attachToComponent (demoParameter->getComponent(), true); + paramLabel->setJustificationType (Justification::centredLeft); + addAndMakeVisible (paramLabel); + labels.add (paramLabel); + } + } + + void resized() override + { + auto bounds = getLocalBounds(); + bounds.removeFromLeft (100); + + for (auto* p : parameters) + { + auto* comp = p->getComponent(); + + comp->setSize (jmin (bounds.getWidth(), p->getPreferredWidth()), p->getPreferredHeight()); + + auto compBounds = bounds.removeFromTop (p->getPreferredHeight()); + comp->setCentrePosition (compBounds.getCentre()); + } + } + + int getHeightNeeded() + { + auto height = 0; + + for (auto* p : parameters) + height += p->getPreferredHeight(); + + return height + 10; + } + +private: + std::vector parameters; + OwnedArray _DEBUG;%(PreprocessorDefinitions) @@ -119,6 +125,7 @@ true true /FC %(AdditionalOptions) + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -194,9 +201,6 @@ true - - true - true @@ -257,6 +261,9 @@ true + + true + true @@ -473,9 +480,6 @@ true - - true - true @@ -752,6 +756,9 @@ true + + true + true @@ -1904,13 +1911,7 @@ true - - true - - - true - - + true @@ -1946,7 +1947,6 @@ - @@ -1966,10 +1966,12 @@ + + @@ -2075,7 +2077,6 @@ - @@ -2402,6 +2403,7 @@ + @@ -2586,8 +2588,12 @@ - - + + + + + + diff --git a/examples/Demo/Builds/VisualStudio2013/JuceDemo_App.vcxproj.filters b/examples/Demo/Builds/VisualStudio2013/JuceDemo_App.vcxproj.filters index 3bf361da97..77633e7dc5 100644 --- a/examples/Demo/Builds/VisualStudio2013/JuceDemo_App.vcxproj.filters +++ b/examples/Demo/Builds/VisualStudio2013/JuceDemo_App.vcxproj.filters @@ -29,6 +29,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -541,9 +544,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -604,6 +604,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -826,9 +829,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -1129,6 +1129,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2365,20 +2368,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2472,9 +2463,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2532,6 +2520,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2544,6 +2535,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2859,9 +2853,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3840,6 +3831,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -4392,10 +4386,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/Demo/Builds/VisualStudio2015/JuceDemo.sln b/examples/Demo/Builds/VisualStudio2015/JuceDemo.sln index fa0dfc217e..27da705d7b 100644 --- a/examples/Demo/Builds/VisualStudio2015/JuceDemo.sln +++ b/examples/Demo/Builds/VisualStudio2015/JuceDemo.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {05F7128C-1654-E8D0-856F-98237CF1EBE4}.Debug|x64.Build.0 = Debug|x64 {05F7128C-1654-E8D0-856F-98237CF1EBE4}.Debug|x64.ActiveCfg = Debug|x64 - {05F7128C-1654-E8D0-856F-98237CF1EBE4}.Release|x64.Build.0 = Release|x64 + {05F7128C-1654-E8D0-856F-98237CF1EBE4}.Debug|x64.Build.0 = Debug|x64 {05F7128C-1654-E8D0-856F-98237CF1EBE4}.Release|x64.ActiveCfg = Release|x64 + {05F7128C-1654-E8D0-856F-98237CF1EBE4}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/Demo/Builds/VisualStudio2015/JuceDemo_App.vcxproj b/examples/Demo/Builds/VisualStudio2015/JuceDemo_App.vcxproj index e4a9eff552..140ea55ff2 100644 --- a/examples/Demo/Builds/VisualStudio2015/JuceDemo_App.vcxproj +++ b/examples/Demo/Builds/VisualStudio2015/JuceDemo_App.vcxproj @@ -16,6 +16,7 @@ {05F7128C-1654-E8D0-856F-98237CF1EBE4} v140 + 8.1 false v140 v140 + 8.1 @@ -32,6 +34,7 @@ true v140 v140 + 8.1 @@ -42,6 +45,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ JuceDemo true v140 + 8.1 @@ -79,6 +84,7 @@ true true /FC %(AdditionalOptions) + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -119,6 +125,7 @@ true true /FC %(AdditionalOptions) + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -193,9 +200,6 @@ true - - true - true @@ -256,6 +260,9 @@ true + + true + true @@ -472,9 +479,6 @@ true - - true - true @@ -751,6 +755,9 @@ true + + true + true @@ -1903,13 +1910,7 @@ true - - true - - - true - - + true @@ -1945,7 +1946,6 @@ - @@ -1965,10 +1965,12 @@ + + @@ -2074,7 +2076,6 @@ - @@ -2401,6 +2402,7 @@ + @@ -2585,8 +2587,12 @@ - - + + + + + + diff --git a/examples/Demo/Builds/VisualStudio2015/JuceDemo_App.vcxproj.filters b/examples/Demo/Builds/VisualStudio2015/JuceDemo_App.vcxproj.filters index b32f4e2a5c..f199e23038 100644 --- a/examples/Demo/Builds/VisualStudio2015/JuceDemo_App.vcxproj.filters +++ b/examples/Demo/Builds/VisualStudio2015/JuceDemo_App.vcxproj.filters @@ -29,6 +29,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -541,9 +544,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -604,6 +604,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -826,9 +829,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -1129,6 +1129,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2365,20 +2368,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2472,9 +2463,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2532,6 +2520,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2544,6 +2535,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2859,9 +2853,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3840,6 +3831,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -4392,10 +4386,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/Demo/Builds/VisualStudio2017/JuceDemo.sln b/examples/Demo/Builds/VisualStudio2017/JuceDemo.sln index 843b72f722..e9c9c6958c 100644 --- a/examples/Demo/Builds/VisualStudio2017/JuceDemo.sln +++ b/examples/Demo/Builds/VisualStudio2017/JuceDemo.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {05F7128C-1654-E8D0-856F-98237CF1EBE4}.Debug|x64.Build.0 = Debug|x64 {05F7128C-1654-E8D0-856F-98237CF1EBE4}.Debug|x64.ActiveCfg = Debug|x64 - {05F7128C-1654-E8D0-856F-98237CF1EBE4}.Release|x64.Build.0 = Release|x64 + {05F7128C-1654-E8D0-856F-98237CF1EBE4}.Debug|x64.Build.0 = Debug|x64 {05F7128C-1654-E8D0-856F-98237CF1EBE4}.Release|x64.ActiveCfg = Release|x64 + {05F7128C-1654-E8D0-856F-98237CF1EBE4}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/Demo/Builds/VisualStudio2017/JuceDemo_App.vcxproj b/examples/Demo/Builds/VisualStudio2017/JuceDemo_App.vcxproj index 208b211dc7..231b42bdf1 100644 --- a/examples/Demo/Builds/VisualStudio2017/JuceDemo_App.vcxproj +++ b/examples/Demo/Builds/VisualStudio2017/JuceDemo_App.vcxproj @@ -16,6 +16,7 @@ {05F7128C-1654-E8D0-856F-98237CF1EBE4} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ JuceDemo true v141 + 10.0.15063.0 @@ -79,6 +84,7 @@ true true /FC %(AdditionalOptions) + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -119,6 +125,7 @@ true true /FC %(AdditionalOptions) + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -193,9 +200,6 @@ true - - true - true @@ -256,6 +260,9 @@ true + + true + true @@ -472,9 +479,6 @@ true - - true - true @@ -751,6 +755,9 @@ true + + true + true @@ -1903,13 +1910,7 @@ true - - true - - - true - - + true @@ -1945,7 +1946,6 @@ - @@ -1965,10 +1965,12 @@ + + @@ -2074,7 +2076,6 @@ - @@ -2401,6 +2402,7 @@ + @@ -2585,8 +2587,12 @@ - - + + + + + + diff --git a/examples/Demo/Builds/VisualStudio2017/JuceDemo_App.vcxproj.filters b/examples/Demo/Builds/VisualStudio2017/JuceDemo_App.vcxproj.filters index 2368f804a9..b97f6d12df 100644 --- a/examples/Demo/Builds/VisualStudio2017/JuceDemo_App.vcxproj.filters +++ b/examples/Demo/Builds/VisualStudio2017/JuceDemo_App.vcxproj.filters @@ -29,6 +29,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -541,9 +544,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -604,6 +604,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -826,9 +829,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -1129,6 +1129,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2365,20 +2368,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2472,9 +2463,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2532,6 +2520,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2544,6 +2535,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2859,9 +2853,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3840,6 +3831,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -4392,10 +4386,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/Demo/Builds/iOS/JuceDemo.xcodeproj/project.pbxproj b/examples/Demo/Builds/iOS/JuceDemo.xcodeproj/project.pbxproj index 82680cba07..c45d9f2db3 100644 --- a/examples/Demo/Builds/iOS/JuceDemo.xcodeproj/project.pbxproj +++ b/examples/Demo/Builds/iOS/JuceDemo.xcodeproj/project.pbxproj @@ -10,10 +10,12 @@ E16EA7E816B50766F3AE4F88 = {isa = PBXBuildFile; fileRef = 8D7BDA5CDDCCD2F7BE67037A; }; BB7001D6FD448E6C0AAE4F30 = {isa = PBXBuildFile; fileRef = 8452076B5EAE822DD445458F; }; 5CA55A61B4ECF6BE53DB459A = {isa = PBXBuildFile; fileRef = ED6ADC3F084F9F3B6177B0C8; }; + 3A0436B207425DCD0CB3E3AD = {isa = PBXBuildFile; fileRef = BC6DF66E6767EBF159E86906; }; 3A285384585A5F664BB4C652 = {isa = PBXBuildFile; fileRef = A078E4C69AFA4FAE8DCC66BD; }; 213167931DD11DF54592222E = {isa = PBXBuildFile; fileRef = 5FAB9E7F62B84DBAA98A0004; }; D8AC2AB9573F991BFDFB431E = {isa = PBXBuildFile; fileRef = 37CB4A819F38E7AF9C77A8CB; }; 299539A945CB87F73C5ECB0B = {isa = PBXBuildFile; fileRef = 4C1FFE22514EB2A178750B86; }; + 0F5AD903C71E59F29293F952 = {isa = PBXBuildFile; fileRef = 809501824B7BBD3A378DEB61; }; 4E306BFA283851066E0DA96E = {isa = PBXBuildFile; fileRef = EACCBFA17F4D07ECE058EEBB; }; 78A2A3F0D3D555397E3C3CF7 = {isa = PBXBuildFile; fileRef = FBCD860CD7113A3136B127C8; }; 21C66018A589DB4DCCA7B48B = {isa = PBXBuildFile; fileRef = 8E87696FD85E6134968D4341; }; @@ -127,6 +129,7 @@ 7AEEF2EE40D3B8AE687C6618 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = FlexBoxDemo.cpp; path = ../../Source/Demos/FlexBoxDemo.cpp; sourceTree = "SOURCE_ROOT"; }; 7D639D6C81A57F107F3FA3D6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_basics.mm"; path = "../../JuceLibraryCode/include_juce_gui_basics.mm"; sourceTree = "SOURCE_ROOT"; }; 7DBF83B26277D13CB3FC1479 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ImagesDemo.cpp; path = ../../Source/Demos/ImagesDemo.cpp; sourceTree = "SOURCE_ROOT"; }; + 809501824B7BBD3A378DEB61 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; 8413B0A6941430B8CEE7A573 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AudioRecordingDemo.cpp; path = ../../Source/Demos/AudioRecordingDemo.cpp; sourceTree = "SOURCE_ROOT"; }; 8452076B5EAE822DD445458F = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 84BAF97675BE522B63DC9A4B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SystemInfoDemo.cpp; path = ../../Source/Demos/SystemInfoDemo.cpp; sourceTree = "SOURCE_ROOT"; }; @@ -156,6 +159,7 @@ B731664FB9EEEBC618BAB5A0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = TimersAndEventsDemo.cpp; path = ../../Source/Demos/TimersAndEventsDemo.cpp; sourceTree = "SOURCE_ROOT"; }; B84A6E341207FA1F60EB5AF1 = {isa = PBXFileReference; lastKnownFileType = image.png; name = "juce_icon.png"; path = "../../Resources/juce_icon.png"; sourceTree = "SOURCE_ROOT"; }; BA0689752E29259BBD3AECAA = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_basics"; path = "../../../../modules/juce_gui_basics"; sourceTree = "SOURCE_ROOT"; }; + BC6DF66E6767EBF159E86906 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; }; C0C8D6D7D14DFAFB169FFDCF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ValueTreesDemo.cpp; path = ../../Source/Demos/ValueTreesDemo.cpp; sourceTree = "SOURCE_ROOT"; }; C542454A6B0F43AFAEA63092 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_graphics"; path = "../../../../modules/juce_graphics"; sourceTree = "SOURCE_ROOT"; }; C68A1D6B6EAA0B70553FF6D3 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; @@ -291,10 +295,12 @@ 8D7BDA5CDDCCD2F7BE67037A, 8452076B5EAE822DD445458F, ED6ADC3F084F9F3B6177B0C8, + BC6DF66E6767EBF159E86906, A078E4C69AFA4FAE8DCC66BD, 5FAB9E7F62B84DBAA98A0004, 37CB4A819F38E7AF9C77A8CB, 4C1FFE22514EB2A178750B86, + 809501824B7BBD3A378DEB61, EACCBFA17F4D07ECE058EEBB, FBCD860CD7113A3136B127C8, 8E87696FD85E6134968D4341, @@ -313,7 +319,7 @@ 963FEEC67CA1488B71067091 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -335,15 +341,17 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; + OTHER_CPLUSPLUSFLAGS = "-pedantic -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 -Wextra-semi"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.JuceDemo; USE_HEADERMAP = NO; }; name = Debug; }; 903E7C1C8383FB576E8BA554 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -366,24 +374,47 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; + OTHER_CPLUSPLUSFLAGS = "-pedantic -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 -Wextra-semi"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.JuceDemo; USE_HEADERMAP = NO; }; name = Release; }; A16C0416417EF9DF7B09973F = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -395,15 +426,36 @@ 5D9A258B559C20D1603B9B9F = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "JuceDemo"; @@ -483,10 +535,12 @@ E16EA7E816B50766F3AE4F88, BB7001D6FD448E6C0AAE4F30, 5CA55A61B4ECF6BE53DB459A, + 3A0436B207425DCD0CB3E3AD, 3A285384585A5F664BB4C652, 213167931DD11DF54592222E, D8AC2AB9573F991BFDFB431E, 299539A945CB87F73C5ECB0B, + 0F5AD903C71E59F29293F952, 4E306BFA283851066E0DA96E, 78A2A3F0D3D555397E3C3CF7, 21C66018A589DB4DCCA7B48B, @@ -497,7 +551,7 @@ 8A0460E8E406AB26F4BA09A8, DB71CE9A0FCC9F1D4DB88011, 8B042CD6831F0E9BD5C0815E, ); buildRules = ( ); dependencies = ( ); name = "JuceDemo - App"; productName = JuceDemo; productReference = 90B1185950EF7670F87EAA3F; productType = "com.apple.product-type.application"; }; - A97F75347E57A9C1AF731F1D = {isa = PBXProject; buildConfigurationList = E3E8152B5B6326971AA2F802; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 00C030852F071EE5DCA3C532 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 605D88E415A9989447F78548; projectDirPath = ""; projectRoot = ""; targets = (00C030852F071EE5DCA3C532); }; + A97F75347E57A9C1AF731F1D = {isa = PBXProject; buildConfigurationList = E3E8152B5B6326971AA2F802; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 00C030852F071EE5DCA3C532 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 605D88E415A9989447F78548; projectDirPath = ""; projectRoot = ""; targets = (00C030852F071EE5DCA3C532); }; }; rootObject = A97F75347E57A9C1AF731F1D; } diff --git a/examples/Demo/JuceDemo.jucer b/examples/Demo/JuceDemo.jucer index bf2bd0bdda..185e055718 100644 --- a/examples/Demo/JuceDemo.jucer +++ b/examples/Demo/JuceDemo.jucer @@ -1,12 +1,12 @@ + splashScreenColour="Dark" companyName="ROLI Ltd." cppLanguageStandard="11"> + microphonePermissionNeeded="1" extraCompilerFlags="-pedantic -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 -Wextra-semi"> + microphonePermissionNeeded="1" extraCompilerFlags="-pedantic -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 -Wextra-semi"> diff --git a/examples/Demo/JuceLibraryCode/AppConfig.h b/examples/Demo/JuceLibraryCode/AppConfig.h index c431c45c32..fa15111208 100644 --- a/examples/Demo/JuceLibraryCode/AppConfig.h +++ b/examples/Demo/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -58,26 +64,17 @@ #define JUCE_MODULE_AVAILABLE_juce_opengl 1 #define JUCE_MODULE_AVAILABLE_juce_video 1 -//============================================================================== -#ifndef JUCE_STANDALONE_APPLICATION - #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) - #define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone - #else - #define JUCE_STANDALONE_APPLICATION 1 - #endif -#endif - #define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 //============================================================================== // juce_audio_devices flags: #ifndef JUCE_ASIO - //#define JUCE_ASIO + //#define JUCE_ASIO 1 #endif #ifndef JUCE_WASAPI - //#define JUCE_WASAPI + //#define JUCE_WASAPI 1 #endif #ifndef JUCE_WASAPI_EXCLUSIVE @@ -85,151 +82,151 @@ #endif #ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 #endif #ifndef JUCE_ALSA - //#define JUCE_ALSA + //#define JUCE_ALSA 1 #endif #ifndef JUCE_JACK - //#define JUCE_JACK + //#define JUCE_JACK 1 #endif #ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 #endif #ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 #endif //============================================================================== // juce_audio_formats flags: #ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 #endif #ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 #endif #ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 #endif #ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 #endif #ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 #endif //============================================================================== // juce_audio_processors flags: #ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 #endif #ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 #endif #ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 #endif //============================================================================== // juce_audio_utils flags: #ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 #endif #ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 #endif //============================================================================== // juce_core flags: #ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 #endif #ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 #endif #ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 #endif #ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 #endif #ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 #endif #ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL + //#define JUCE_USE_CURL 1 #endif #ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 #endif #ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 #endif //============================================================================== // juce_events flags: #ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 #endif //============================================================================== // juce_graphics flags: #ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 #endif #ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 #endif //============================================================================== // juce_gui_basics flags: #ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 #endif #ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 #endif #ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 #endif #ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 #endif //============================================================================== // juce_gui_extra flags: #ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 #endif #ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR @@ -239,18 +236,14 @@ //============================================================================== // juce_video flags: -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - //#define JUCE_QUICKTIME -#endif - #ifndef JUCE_USE_CAMERA - //#define JUCE_USE_CAMERA + //#define JUCE_USE_CAMERA 1 +#endif +//============================================================================== +#ifndef JUCE_STANDALONE_APPLICATION + #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) + #define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone + #else + #define JUCE_STANDALONE_APPLICATION 1 + #endif #endif diff --git a/examples/Demo/Source/Demos/FlexBoxDemo.cpp b/examples/Demo/Source/Demos/FlexBoxDemo.cpp index 0d5064552f..0afd5a3aba 100644 --- a/examples/Demo/Source/Demos/FlexBoxDemo.cpp +++ b/examples/Demo/Source/Demos/FlexBoxDemo.cpp @@ -27,7 +27,7 @@ #include "../JuceDemoHeader.h" // these classes are C++11-only -#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS && JUCE_COMPILER_SUPPORTS_LAMBDAS +#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS struct DemoFlexPanel : public juce::Component, private juce::TextEditor::Listener, diff --git a/examples/Demo/Source/Demos/LookAndFeelDemo.cpp b/examples/Demo/Source/Demos/LookAndFeelDemo.cpp index d12dc870d8..10438295b0 100644 --- a/examples/Demo/Source/Demos/LookAndFeelDemo.cpp +++ b/examples/Demo/Source/Demos/LookAndFeelDemo.cpp @@ -596,9 +596,8 @@ private: void setAllLookAndFeels (LookAndFeel* laf) { - for (int i = 0; i < demoComp.getNumChildComponents(); ++i) - if (Component* c = demoComp.getChildComponent (i)) - c->setLookAndFeel (laf); + for (auto* child : demoComp.getChildren()) + child->setLookAndFeel (laf); } void comboBoxChanged (ComboBox* comboBoxThatHasChanged) override diff --git a/examples/Demo/Source/Demos/UnitTestsDemo.cpp b/examples/Demo/Source/Demos/UnitTestsDemo.cpp index 148662dcdc..6ea7290731 100644 --- a/examples/Demo/Source/Demos/UnitTestsDemo.cpp +++ b/examples/Demo/Source/Demos/UnitTestsDemo.cpp @@ -63,16 +63,21 @@ struct UnitTestClasses private Timer { public: - TestRunnerThread (UnitTestsDemo& utd) + TestRunnerThread (UnitTestsDemo& utd, const String& ctg) : Thread ("Unit Tests"), - owner (utd) + owner (utd), + category (ctg) { } void run() override { CustomTestRunner runner (*this); - runner.runAllTests(); + + if (category == "All Tests") + runner.runAllTests(); + else + runner.runTestsInCategory (category); startTimer (50); // when finished, start the timer which will // wait for the thread to end, then tell our component. @@ -94,6 +99,7 @@ struct UnitTestClasses private: UnitTestsDemo& owner; + const String category; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestRunnerThread) }; @@ -110,13 +116,22 @@ struct UnitTestClasses setOpaque (true); addAndMakeVisible (startTestButton); + startTestButton.addListener (this); + addAndMakeVisible (testResultsBox); testResultsBox.setMultiLine (true); testResultsBox.setFont (Font (Font::getDefaultMonospacedFontName(), 12.0f, Font::plain)); - startTestButton.addListener (this); + addAndMakeVisible (categoriesBox); + categoriesBox.addItem ("All Tests", 1); - logMessage ("This panel runs all the built-in JUCE unit-tests.\n"); + auto categories = UnitTest::getAllCategories(); + categories.sort (true); + + categoriesBox.addItemList (categories, 2); + categoriesBox.setSelectedId (1); + + logMessage ("This panel runs the built-in JUCE unit-tests from the selected category.\n"); logMessage ("To add your own unit-tests, see the JUCE_UNIT_TESTS macro."); } @@ -134,26 +149,29 @@ struct UnitTestClasses void resized() override { - Rectangle r (getLocalBounds().reduced (6)); + auto bounds = getLocalBounds().reduced (6); - startTestButton.setBounds (r.removeFromTop (25).removeFromLeft (200)); - testResultsBox.setBounds (r.withTrimmedTop (5)); + auto topSlice = bounds.removeFromTop (25); + startTestButton.setBounds (topSlice.removeFromLeft (200)); + topSlice.removeFromLeft (10); + categoriesBox.setBounds (topSlice.removeFromLeft (250)); + + bounds.removeFromTop (5); + testResultsBox.setBounds (bounds); } void buttonClicked (Button* buttonThatWasClicked) override { if (buttonThatWasClicked == &startTestButton) - { - startTest(); - } + startTest (categoriesBox.getText()); } - void startTest() + void startTest (const String& category) { testResultsBox.clear(); startTestButton.setEnabled (false); - currentTestThread = new TestRunnerThread (*this); + currentTestThread = new TestRunnerThread (*this, category); currentTestThread->startThread(); } @@ -184,6 +202,7 @@ struct UnitTestClasses ScopedPointer currentTestThread; TextButton startTestButton; + ComboBox categoriesBox; TextEditor testResultsBox; void lookAndFeelChanged() override diff --git a/examples/Demo/Source/Demos/VideoDemo.cpp b/examples/Demo/Source/Demos/VideoDemo.cpp index cdcdc05d47..9ce757df03 100644 --- a/examples/Demo/Source/Demos/VideoDemo.cpp +++ b/examples/Demo/Source/Demos/VideoDemo.cpp @@ -63,9 +63,7 @@ public: void resized() override { - videoComp.setBoundsWithCorrectAspectRatio (Rectangle (0, 0, getWidth(), getHeight() - 30), - Justification::centred); - fileChooser.setBounds (0, getHeight() - 24, getWidth(), 24); + videoComp.setBounds (getLocalBounds().reduced (10)); } bool isInterestedInDragSource (const SourceDetails&) override { return true; } @@ -90,11 +88,7 @@ public: } private: - #if JUCE_MAC - MovieComponent videoComp; - #elif JUCE_DIRECTSHOW - DirectShowComponent videoComp; - #endif + VideoComponent videoComp; bool isDragOver; FilenameComponent fileChooser; @@ -102,7 +96,9 @@ private: void filenameComponentChanged (FilenameComponent*) override { // this is called when the user changes the filename in the file chooser box - if (videoComp.loadMovie (fileChooser.getCurrentFile())) + auto result = videoComp.load (fileChooser.getCurrentFile()); + + if (result.wasOk()) { // loaded the file ok, so let's start it playing.. @@ -112,7 +108,8 @@ private: else { AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, - "Couldn't load the file!", String()); + "Couldn't load the file!", + result.getErrorMessage()); } } diff --git a/examples/Demo/Source/IntroScreen.cpp b/examples/Demo/Source/IntroScreen.cpp index de990cd87a..a5cbf2866d 100644 --- a/examples/Demo/Source/IntroScreen.cpp +++ b/examples/Demo/Source/IntroScreen.cpp @@ -39,7 +39,6 @@ public: addAndMakeVisible (linkButton); addAndMakeVisible (logo); -// versionLabel.setColour (Label::textColourId, Colours::white); versionLabel.setText (String ("{version} built on {date}") .replace ("{version}", SystemStats::getJUCEVersion()) .replace ("{date}", String (__DATE__).replace (" ", " ")), diff --git a/examples/Demo/Source/MainWindow.cpp b/examples/Demo/Source/MainWindow.cpp index a08899b03c..a8e79ba415 100644 --- a/examples/Demo/Source/MainWindow.cpp +++ b/examples/Demo/Source/MainWindow.cpp @@ -755,4 +755,4 @@ Path MainAppWindow::getJUCELogoPath() "M232.4,353c-8.1,0-15-6-15-15.8v-22.5h5.6v22.2c0,6.6,3.9,10.8,9.5,10.8c5.6,0,9.5-4.3,9.5-10.8v-22.2h5.6v22.5C247.5,347,240.5,353,232.4,353z" "M272,353c-10.8,0-19.5-8.6-19.5-19.3c0-10.8,8.8-19.3,19.5-19.3c4.8,0,9,1.6,12.3,4.4l-3.3,4.1c-3.4-2.4-5.7-3.2-8.9-3.2c-7.7,0-13.8,6.2-13.8,14.1c0,7.9,6.1,14.1,13.8,14.1c3.1,0,5.6-1,8.8-3.2l3.3,4.1C280.1,351.9,276.4,353,272,353z" "M290.4,352.5v-37.8h22.7v5H296v11.2h16.5v5H296v11.6h17.2v5H290.4z"); -}; +} diff --git a/examples/HelloWorld/Builds/LinuxMakefile/Makefile b/examples/HelloWorld/Builds/LinuxMakefile/Makefile index 4c6f65f290..5973f44604 100644 --- a/examples/HelloWorld/Builds/LinuxMakefile/Makefile +++ b/examples/HelloWorld/Builds/LinuxMakefile/Makefile @@ -77,6 +77,8 @@ OBJECTS_APP := \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) @echo Linking "HelloWorld - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) diff --git a/examples/HelloWorld/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj b/examples/HelloWorld/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj index 653c3a65eb..ea57567740 100644 --- a/examples/HelloWorld/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj +++ b/examples/HelloWorld/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj @@ -87,7 +87,7 @@ C581D34B32A781E9AED7F7B0, 1C83313FCFBC3FAFA8CDB087, ); name = Source; sourceTree = ""; }; 88AB96D6C191F6480F1CC05F = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -108,8 +108,9 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -117,7 +118,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 0B5D6160680C2FCAC89A9A1D = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -139,8 +140,9 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -149,16 +151,37 @@ USE_HEADERMAP = NO; }; name = Release; }; F6DA01300C80F2338FCBD24A = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "HelloWorld"; @@ -166,15 +189,36 @@ ZERO_LINK = NO; }; name = Debug; }; CA9F73DE863A75BEA780D77E = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "HelloWorld"; WARNING_CFLAGS = -Wreorder; @@ -207,7 +251,7 @@ 026F69AE2DD97CA7C9006986, C39352E04613E968B30D0584, CD0E71EFDCF3177FCE405E9D, ); buildRules = ( ); dependencies = ( ); name = "HelloWorld - App"; productName = HelloWorld; productReference = 630E0739D24A3C9E99CD4592; productType = "com.apple.product-type.application"; }; - E34D5B980741D93050D0BB6B = {isa = PBXProject; buildConfigurationList = D5495970AC0AFC78DD0ADE12; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 192D34128EA37F28BC1CBB22 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = CB9C4DF3F11D65C6BF6B80AD; projectDirPath = ""; projectRoot = ""; targets = (192D34128EA37F28BC1CBB22); }; + E34D5B980741D93050D0BB6B = {isa = PBXProject; buildConfigurationList = D5495970AC0AFC78DD0ADE12; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 192D34128EA37F28BC1CBB22 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = CB9C4DF3F11D65C6BF6B80AD; projectDirPath = ""; projectRoot = ""; targets = (192D34128EA37F28BC1CBB22); }; }; rootObject = E34D5B980741D93050D0BB6B; } diff --git a/examples/HelloWorld/Builds/VisualStudio2015/HelloWorld.sln b/examples/HelloWorld/Builds/VisualStudio2015/HelloWorld.sln index af38500f35..79650452c6 100644 --- a/examples/HelloWorld/Builds/VisualStudio2015/HelloWorld.sln +++ b/examples/HelloWorld/Builds/VisualStudio2015/HelloWorld.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D0620B06-01BA-BA19-C625-CE28F4174EC7}.Debug|x64.Build.0 = Debug|x64 {D0620B06-01BA-BA19-C625-CE28F4174EC7}.Debug|x64.ActiveCfg = Debug|x64 - {D0620B06-01BA-BA19-C625-CE28F4174EC7}.Release|x64.Build.0 = Release|x64 + {D0620B06-01BA-BA19-C625-CE28F4174EC7}.Debug|x64.Build.0 = Debug|x64 {D0620B06-01BA-BA19-C625-CE28F4174EC7}.Release|x64.ActiveCfg = Release|x64 + {D0620B06-01BA-BA19-C625-CE28F4174EC7}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/HelloWorld/Builds/VisualStudio2015/HelloWorld_App.vcxproj b/examples/HelloWorld/Builds/VisualStudio2015/HelloWorld_App.vcxproj index f0eec44729..8af3086135 100644 --- a/examples/HelloWorld/Builds/VisualStudio2015/HelloWorld_App.vcxproj +++ b/examples/HelloWorld/Builds/VisualStudio2015/HelloWorld_App.vcxproj @@ -16,6 +16,7 @@ {D0620B06-01BA-BA19-C625-CE28F4174EC7} v140 + 8.1 false v140 v140 + 8.1 @@ -32,6 +34,7 @@ true v140 v140 + 8.1 @@ -42,6 +45,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ HelloWorld true v140 + 8.1 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -146,6 +153,9 @@ true + + true + true @@ -1470,6 +1480,7 @@ + diff --git a/examples/HelloWorld/Builds/VisualStudio2015/HelloWorld_App.vcxproj.filters b/examples/HelloWorld/Builds/VisualStudio2015/HelloWorld_App.vcxproj.filters index 0a51db6013..59293d85c3 100644 --- a/examples/HelloWorld/Builds/VisualStudio2015/HelloWorld_App.vcxproj.filters +++ b/examples/HelloWorld/Builds/VisualStudio2015/HelloWorld_App.vcxproj.filters @@ -223,6 +223,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2073,6 +2076,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/HelloWorld/Builds/VisualStudio2017/HelloWorld.sln b/examples/HelloWorld/Builds/VisualStudio2017/HelloWorld.sln index dd7590243a..90e41a0c6a 100644 --- a/examples/HelloWorld/Builds/VisualStudio2017/HelloWorld.sln +++ b/examples/HelloWorld/Builds/VisualStudio2017/HelloWorld.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D0620B06-01BA-BA19-C625-CE28F4174EC7}.Debug|x64.Build.0 = Debug|x64 {D0620B06-01BA-BA19-C625-CE28F4174EC7}.Debug|x64.ActiveCfg = Debug|x64 - {D0620B06-01BA-BA19-C625-CE28F4174EC7}.Release|x64.Build.0 = Release|x64 + {D0620B06-01BA-BA19-C625-CE28F4174EC7}.Debug|x64.Build.0 = Debug|x64 {D0620B06-01BA-BA19-C625-CE28F4174EC7}.Release|x64.ActiveCfg = Release|x64 + {D0620B06-01BA-BA19-C625-CE28F4174EC7}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/HelloWorld/Builds/VisualStudio2017/HelloWorld_App.vcxproj b/examples/HelloWorld/Builds/VisualStudio2017/HelloWorld_App.vcxproj index 63fac35131..191763ee14 100644 --- a/examples/HelloWorld/Builds/VisualStudio2017/HelloWorld_App.vcxproj +++ b/examples/HelloWorld/Builds/VisualStudio2017/HelloWorld_App.vcxproj @@ -16,6 +16,7 @@ {D0620B06-01BA-BA19-C625-CE28F4174EC7} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ HelloWorld true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -146,6 +153,9 @@ true + + true + true @@ -1470,6 +1480,7 @@ + diff --git a/examples/HelloWorld/Builds/VisualStudio2017/HelloWorld_App.vcxproj.filters b/examples/HelloWorld/Builds/VisualStudio2017/HelloWorld_App.vcxproj.filters index 53b1518dc6..44ad9a9851 100644 --- a/examples/HelloWorld/Builds/VisualStudio2017/HelloWorld_App.vcxproj.filters +++ b/examples/HelloWorld/Builds/VisualStudio2017/HelloWorld_App.vcxproj.filters @@ -223,6 +223,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2073,6 +2076,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/HelloWorld/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj b/examples/HelloWorld/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj index 063141c523..009aa35bfc 100644 --- a/examples/HelloWorld/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj +++ b/examples/HelloWorld/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj @@ -92,7 +92,7 @@ 88AB96D6C191F6480F1CC05F = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -113,15 +113,16 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.jucehelloworld; USE_HEADERMAP = NO; }; name = Debug; }; 0B5D6160680C2FCAC89A9A1D = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -143,24 +144,46 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.jucehelloworld; USE_HEADERMAP = NO; }; name = Release; }; F6DA01300C80F2338FCBD24A = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -172,15 +195,36 @@ CA9F73DE863A75BEA780D77E = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "HelloWorld"; @@ -217,7 +261,7 @@ 026F69AE2DD97CA7C9006986, C39352E04613E968B30D0584, CD0E71EFDCF3177FCE405E9D, ); buildRules = ( ); dependencies = ( ); name = "HelloWorld - App"; productName = HelloWorld; productReference = 630E0739D24A3C9E99CD4592; productType = "com.apple.product-type.application"; }; - E34D5B980741D93050D0BB6B = {isa = PBXProject; buildConfigurationList = D5495970AC0AFC78DD0ADE12; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 192D34128EA37F28BC1CBB22 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = CB9C4DF3F11D65C6BF6B80AD; projectDirPath = ""; projectRoot = ""; targets = (192D34128EA37F28BC1CBB22); }; + E34D5B980741D93050D0BB6B = {isa = PBXProject; buildConfigurationList = D5495970AC0AFC78DD0ADE12; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 192D34128EA37F28BC1CBB22 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = CB9C4DF3F11D65C6BF6B80AD; projectDirPath = ""; projectRoot = ""; targets = (192D34128EA37F28BC1CBB22); }; }; rootObject = E34D5B980741D93050D0BB6B; } diff --git a/examples/HelloWorld/HelloWorld.jucer b/examples/HelloWorld/HelloWorld.jucer index 1569c44940..286240721b 100644 --- a/examples/HelloWorld/HelloWorld.jucer +++ b/examples/HelloWorld/HelloWorld.jucer @@ -1,9 +1,9 @@ + reportAppUsage="0" splashScreenColour="Dark" cppLanguageStandard="11"> diff --git a/examples/HelloWorld/JuceLibraryCode/AppConfig.h b/examples/HelloWorld/JuceLibraryCode/AppConfig.h index 64d17a02c7..636584d1cb 100644 --- a/examples/HelloWorld/JuceLibraryCode/AppConfig.h +++ b/examples/HelloWorld/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -49,6 +55,90 @@ #define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 #define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -57,88 +147,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif diff --git a/examples/MPETest/Builds/LinuxMakefile/Makefile b/examples/MPETest/Builds/LinuxMakefile/Makefile index f60a493074..e15ff3e04f 100644 --- a/examples/MPETest/Builds/LinuxMakefile/Makefile +++ b/examples/MPETest/Builds/LinuxMakefile/Makefile @@ -84,6 +84,8 @@ OBJECTS_APP := \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) @echo Linking "MPETest - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) diff --git a/examples/MPETest/Builds/MacOSX/MPETest.xcodeproj/project.pbxproj b/examples/MPETest/Builds/MacOSX/MPETest.xcodeproj/project.pbxproj index f3ba49f4e5..f99c6769a2 100644 --- a/examples/MPETest/Builds/MacOSX/MPETest.xcodeproj/project.pbxproj +++ b/examples/MPETest/Builds/MacOSX/MPETest.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ CE2807371257B52B1D2B06E0 = {isa = PBXBuildFile; fileRef = D8FF2E14B072C8B9544C95BF; }; 189A987224B9646B9AA0D399 = {isa = PBXBuildFile; fileRef = C64527E74752ECF0B056A9F5; }; D273118FCE8FE8583D9D4AB2 = {isa = PBXBuildFile; fileRef = CCC23D1BCFBE5FFC700F8608; }; + FBD0FB1E585C84BF818F4CDF = {isa = PBXBuildFile; fileRef = A72937CA4518472989B5644D; }; 354BBD7645C4F76503133A20 = {isa = PBXBuildFile; fileRef = 90E350DA6DF0535788EDA0C7; }; C568BD20102D15116F05E6D4 = {isa = PBXBuildFile; fileRef = AE90B98838251D28244F281D; }; A3BEED6474CF4D29FB8CA568 = {isa = PBXBuildFile; fileRef = 87D653D986B3CB91809A6AA1; }; @@ -64,6 +65,7 @@ 9C6E0B1545D55AF010DBFBC0 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_extra"; path = "../../../../modules/juce_gui_extra"; sourceTree = "SOURCE_ROOT"; }; A373D65BDAB25C19EC6A05AE = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; A39B168B4CC0CDA76F752623 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_events"; path = "../../../../modules/juce_events"; sourceTree = "SOURCE_ROOT"; }; + A72937CA4518472989B5644D = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; }; A7A229511154A5A91A29958D = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-App.plist"; path = "Info-App.plist"; sourceTree = "SOURCE_ROOT"; }; AB1DE39BFBA22179B919703B = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ZoneLayoutComponent.h; path = ../../Source/ZoneLayoutComponent.h; sourceTree = "SOURCE_ROOT"; }; ACC491D8A1B67C3214E49DE7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MPEDemoSynthVoice.h; path = ../../Source/MPEDemoSynthVoice.h; sourceTree = "SOURCE_ROOT"; }; @@ -138,6 +140,7 @@ D8FF2E14B072C8B9544C95BF, C64527E74752ECF0B056A9F5, CCC23D1BCFBE5FFC700F8608, + A72937CA4518472989B5644D, 90E350DA6DF0535788EDA0C7, AE90B98838251D28244F281D, 87D653D986B3CB91809A6AA1, @@ -158,7 +161,7 @@ 27CABD79CAE4AAD868B6F6AE, D2EAA17C8503A297B197A159, ); name = Source; sourceTree = ""; }; 2FFE5285CB0A07579D491975 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -179,8 +182,9 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -188,7 +192,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 74219C60B6FB3AD61BD5CD12 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -210,8 +214,9 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -220,16 +225,37 @@ USE_HEADERMAP = NO; }; name = Release; }; FEF5C4C4E770A72077867343 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "MPETest"; @@ -237,15 +263,36 @@ ZERO_LINK = NO; }; name = Debug; }; 40FE0A8C9EA53BF7A25086B3 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "MPETest"; WARNING_CFLAGS = -Wreorder; @@ -279,6 +326,7 @@ CE2807371257B52B1D2B06E0, 189A987224B9646B9AA0D399, D273118FCE8FE8583D9D4AB2, + FBD0FB1E585C84BF818F4CDF, 354BBD7645C4F76503133A20, C568BD20102D15116F05E6D4, A3BEED6474CF4D29FB8CA568, @@ -293,7 +341,7 @@ 518008B4BCAC2EDE2921458A, EF758DF42F97B8D22FD35F80, AF94D754542EEF998EE0EF72, ); buildRules = ( ); dependencies = ( ); name = "MPETest - App"; productName = MPETest; productReference = BCC50B48B1A4B967949B2DB2; productType = "com.apple.product-type.application"; }; - 9606743A47FFF871B775B1AB = {isa = PBXProject; buildConfigurationList = CC7502C8943D2FC599DFC557; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 0DF05A38ED8E8BF6EB7D9C5C = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 9F958921F12E7C784E909D34; projectDirPath = ""; projectRoot = ""; targets = (0DF05A38ED8E8BF6EB7D9C5C); }; + 9606743A47FFF871B775B1AB = {isa = PBXProject; buildConfigurationList = CC7502C8943D2FC599DFC557; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 0DF05A38ED8E8BF6EB7D9C5C = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 9F958921F12E7C784E909D34; projectDirPath = ""; projectRoot = ""; targets = (0DF05A38ED8E8BF6EB7D9C5C); }; }; rootObject = 9606743A47FFF871B775B1AB; } diff --git a/examples/MPETest/Builds/VisualStudio2015/MPETest.sln b/examples/MPETest/Builds/VisualStudio2015/MPETest.sln index 6ee6175d18..275c79a67c 100644 --- a/examples/MPETest/Builds/VisualStudio2015/MPETest.sln +++ b/examples/MPETest/Builds/VisualStudio2015/MPETest.sln @@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D4B09FE5-F7C6-3530-7AA4-725B57317169}.Debug|Win32.Build.0 = Debug|Win32 {D4B09FE5-F7C6-3530-7AA4-725B57317169}.Debug|Win32.ActiveCfg = Debug|Win32 - {D4B09FE5-F7C6-3530-7AA4-725B57317169}.Release|Win32.Build.0 = Release|Win32 + {D4B09FE5-F7C6-3530-7AA4-725B57317169}.Debug|Win32.Build.0 = Debug|Win32 {D4B09FE5-F7C6-3530-7AA4-725B57317169}.Release|Win32.ActiveCfg = Release|Win32 + {D4B09FE5-F7C6-3530-7AA4-725B57317169}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/MPETest/Builds/VisualStudio2015/MPETest_App.vcxproj b/examples/MPETest/Builds/VisualStudio2015/MPETest_App.vcxproj index 9483221825..58f691d6fa 100644 --- a/examples/MPETest/Builds/VisualStudio2015/MPETest_App.vcxproj +++ b/examples/MPETest/Builds/VisualStudio2015/MPETest_App.vcxproj @@ -16,6 +16,7 @@ {D4B09FE5-F7C6-3530-7AA4-725B57317169} v140 + 8.1 Application false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ MPETest true v140 + 8.1 @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -569,6 +573,9 @@ true + + true + true @@ -1721,13 +1728,7 @@ true - - true - - - true - - + true @@ -1762,7 +1763,6 @@ - @@ -1782,10 +1782,12 @@ + + @@ -1891,7 +1893,6 @@ - @@ -2170,6 +2171,7 @@ + @@ -2354,8 +2356,12 @@ - - + + + + + + diff --git a/examples/MPETest/Builds/VisualStudio2015/MPETest_App.vcxproj.filters b/examples/MPETest/Builds/VisualStudio2015/MPETest_App.vcxproj.filters index f6b3fc852d..363a575d24 100644 --- a/examples/MPETest/Builds/VisualStudio2015/MPETest_App.vcxproj.filters +++ b/examples/MPETest/Builds/VisualStudio2015/MPETest_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -385,9 +388,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -448,6 +448,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -670,9 +673,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -832,6 +832,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2068,20 +2071,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2172,9 +2163,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2232,6 +2220,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2244,6 +2235,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2559,9 +2553,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3396,6 +3387,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -3948,10 +3942,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/MPETest/Builds/VisualStudio2017/MPETest.sln b/examples/MPETest/Builds/VisualStudio2017/MPETest.sln index 52749060b1..0f017c4854 100644 --- a/examples/MPETest/Builds/VisualStudio2017/MPETest.sln +++ b/examples/MPETest/Builds/VisualStudio2017/MPETest.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D4B09FE5-F7C6-3530-7AA4-725B57317169}.Debug|x64.Build.0 = Debug|x64 {D4B09FE5-F7C6-3530-7AA4-725B57317169}.Debug|x64.ActiveCfg = Debug|x64 - {D4B09FE5-F7C6-3530-7AA4-725B57317169}.Release|x64.Build.0 = Release|x64 + {D4B09FE5-F7C6-3530-7AA4-725B57317169}.Debug|x64.Build.0 = Debug|x64 {D4B09FE5-F7C6-3530-7AA4-725B57317169}.Release|x64.ActiveCfg = Release|x64 + {D4B09FE5-F7C6-3530-7AA4-725B57317169}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/MPETest/Builds/VisualStudio2017/MPETest_App.vcxproj b/examples/MPETest/Builds/VisualStudio2017/MPETest_App.vcxproj index 0828cec6a6..42b70cb82f 100644 --- a/examples/MPETest/Builds/VisualStudio2017/MPETest_App.vcxproj +++ b/examples/MPETest/Builds/VisualStudio2017/MPETest_App.vcxproj @@ -16,6 +16,7 @@ {D4B09FE5-F7C6-3530-7AA4-725B57317169} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ MPETest true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -151,9 +158,6 @@ true - - true - true @@ -214,6 +218,9 @@ true + + true + true @@ -430,9 +437,6 @@ true - - true - true @@ -568,6 +572,9 @@ true + + true + true @@ -1720,13 +1727,7 @@ true - - true - - - true - - + true @@ -1761,7 +1762,6 @@ - @@ -1781,10 +1781,12 @@ + + @@ -1890,7 +1892,6 @@ - @@ -2169,6 +2170,7 @@ + @@ -2353,8 +2355,12 @@ - - + + + + + + diff --git a/examples/MPETest/Builds/VisualStudio2017/MPETest_App.vcxproj.filters b/examples/MPETest/Builds/VisualStudio2017/MPETest_App.vcxproj.filters index 8ced403c9e..ddbe38a173 100644 --- a/examples/MPETest/Builds/VisualStudio2017/MPETest_App.vcxproj.filters +++ b/examples/MPETest/Builds/VisualStudio2017/MPETest_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -385,9 +388,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -448,6 +448,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -670,9 +673,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -832,6 +832,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2068,20 +2071,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2172,9 +2163,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2232,6 +2220,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2244,6 +2235,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2559,9 +2553,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3396,6 +3387,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -3948,10 +3942,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/MPETest/JuceLibraryCode/AppConfig.h b/examples/MPETest/JuceLibraryCode/AppConfig.h index 55eef3d08f..835b6ff6b2 100644 --- a/examples/MPETest/JuceLibraryCode/AppConfig.h +++ b/examples/MPETest/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -57,6 +63,181 @@ #define JUCE_MODULE_AVAILABLE_juce_opengl 1 #define JUCE_MODULE_AVAILABLE_juce_video 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif + +//============================================================================== +// juce_video flags: + +#ifndef JUCE_USE_CAMERA + //#define JUCE_USE_CAMERA 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -65,191 +246,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_audio_utils flags: - -#ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER -#endif - -#ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif - -//============================================================================== -// juce_video flags: - -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - //#define JUCE_QUICKTIME -#endif - -#ifndef JUCE_USE_CAMERA - //#define JUCE_USE_CAMERA -#endif diff --git a/examples/MPETest/MPETest.jucer b/examples/MPETest/MPETest.jucer index add2cc1b12..31392e9714 100644 --- a/examples/MPETest/MPETest.jucer +++ b/examples/MPETest/MPETest.jucer @@ -2,8 +2,8 @@ + jucerVersion="5.1.0" displaySplashScreen="0" reportAppUsage="0" + splashScreenColour="Dark" companyName="ROLI Ltd." cppLanguageStandard="11"> diff --git a/examples/MidiTest/Builds/Android/app/CMakeLists.txt b/examples/MidiTest/Builds/Android/app/CMakeLists.txt index ce7aaf2271..45f84f7629 100644 --- a/examples/MidiTest/Builds/Android/app/CMakeLists.txt +++ b/examples/MidiTest/Builds/Android/app/CMakeLists.txt @@ -6,8 +6,9 @@ cmake_minimum_required(VERSION 3.4.1) SET(BINARY_NAME "juce_jni") add_library("cpufeatures" STATIC "${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c") +set_source_files_properties("${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" PROPERTIES COMPILE_FLAGS "-Wno-sign-conversion -Wno-gnu-statement-expression") -add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=23" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_yourcompany_miditest_MidiTest" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/yourcompany/miditest/MidiTest\"" "-DJUCE_ANDROID_GL_ES_VERSION_3_0=1") +add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=23" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_yourcompany_miditest_MidiTest" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/yourcompany/miditest/MidiTest\"" "-DJUCE_ANDROID_GL_ES_VERSION_3_0=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000") include_directories( AFTER "../../../JuceLibraryCode" @@ -41,8 +42,6 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.cpp" "../../../../../modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.h" "../../../../../modules/juce_audio_basics/effects/juce_Decibels.h" - "../../../../../modules/juce_audio_basics/effects/juce_FFT.cpp" - "../../../../../modules/juce_audio_basics/effects/juce_FFT.h" "../../../../../modules/juce_audio_basics/effects/juce_IIRFilter.cpp" "../../../../../modules/juce_audio_basics/effects/juce_IIRFilter.h" "../../../../../modules/juce_audio_basics/effects/juce_LagrangeInterpolator.cpp" @@ -79,6 +78,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_basics/mpe/juce_MPEZone.h" "../../../../../modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp" "../../../../../modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h" + "../../../../../modules/juce_audio_basics/native/juce_mac_CoreAudioLayouts.h" "../../../../../modules/juce_audio_basics/sources/juce_AudioSource.h" "../../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp" "../../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.h" @@ -86,6 +86,8 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h" "../../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.cpp" "../../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h" + "../../../../../modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp" + "../../../../../modules/juce_audio_basics/sources/juce_MemoryAudioSource.h" "../../../../../modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp" "../../../../../modules/juce_audio_basics/sources/juce_MixerAudioSource.h" "../../../../../modules/juce_audio_basics/sources/juce_PositionableAudioSource.h" @@ -267,8 +269,6 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_formats/codecs/juce_MP3AudioFormat.h" "../../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp" "../../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.h" - "../../../../../modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.cpp" - "../../../../../modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.h" "../../../../../modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp" "../../../../../modules/juce_audio_formats/codecs/juce_WavAudioFormat.h" "../../../../../modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp" @@ -383,6 +383,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/containers/juce_DynamicObject.h" "../../../../../modules/juce_core/containers/juce_ElementComparator.h" "../../../../../modules/juce_core/containers/juce_HashMap.h" + "../../../../../modules/juce_core/containers/juce_HashMap_test.cpp" "../../../../../modules/juce_core/containers/juce_LinkedListPointer.h" "../../../../../modules/juce_core/containers/juce_ListenerList.cpp" "../../../../../modules/juce_core/containers/juce_ListenerList.h" @@ -821,6 +822,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_graphics/native/juce_mac_IconHelpers.cpp" "../../../../../modules/juce_graphics/native/juce_RenderingHelpers.h" "../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp" + "../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.h" "../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp" "../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp" "../../../../../modules/juce_graphics/native/juce_win32_Fonts.cpp" @@ -1176,8 +1178,6 @@ set_source_files_properties("../../../../../modules/juce_audio_basics/buffers/ju set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_Decibels.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_FFT.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_FFT.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_IIRFilter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_IIRFilter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_LagrangeInterpolator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1214,6 +1214,7 @@ set_source_files_properties("../../../../../modules/juce_audio_basics/mpe/juce_M set_source_files_properties("../../../../../modules/juce_audio_basics/mpe/juce_MPEZone.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_basics/native/juce_mac_CoreAudioLayouts.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_AudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1221,6 +1222,8 @@ set_source_files_properties("../../../../../modules/juce_audio_basics/sources/ju set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_MemoryAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_MixerAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_PositionableAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1402,8 +1405,6 @@ set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/ju set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_MP3AudioFormat.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_WavAudioFormat.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1518,6 +1519,7 @@ set_source_files_properties("../../../../../modules/juce_core/containers/juce_Dy set_source_files_properties("../../../../../modules/juce_core/containers/juce_DynamicObject.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ElementComparator.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_HashMap.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_core/containers/juce_HashMap_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_LinkedListPointer.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ListenerList.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ListenerList.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1956,6 +1958,7 @@ set_source_files_properties("../../../../../modules/juce_graphics/native/juce_ma set_source_files_properties("../../../../../modules/juce_graphics/native/juce_mac_IconHelpers.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_RenderingHelpers.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Fonts.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/examples/MidiTest/Builds/Android/app/build.gradle b/examples/MidiTest/Builds/Android/app/build.gradle index 0a16a08d97..8ff3785845 100644 --- a/examples/MidiTest/Builds/Android/app/build.gradle +++ b/examples/MidiTest/Builds/Android/app/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 23 - buildToolsVersion "25.0.2" + buildToolsVersion "26.0.0" externalNativeBuild { cmake { path "CMakeLists.txt" @@ -52,18 +52,14 @@ android { } externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGFURATION=DEBUG" - cFlags "-O0" - cppFlags "-O0" + arguments "-DJUCE_BUILD_CONFIGFURATION=DEBUG", "-DCMAKE_CXX_FLAGS_DEBUG=-O0", "-DCMAKE_C_FLAGS_DEBUG=-O0" } } } release_ { externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGFURATION=RELEASE" - cFlags "-O3" - cppFlags "-O3" + arguments "-DJUCE_BUILD_CONFIGFURATION=RELEASE", "-DCMAKE_CXX_FLAGS_RELEASE=-O3", "-DCMAKE_C_FLAGS_RELEASE=-O3" } } } @@ -81,4 +77,11 @@ android { } } +repositories { } + +dependencies { +} + +} + diff --git a/examples/MidiTest/Builds/Android/app/src/main/res/values/string.xml b/examples/MidiTest/Builds/Android/app/src/debug/res/values/string.xml similarity index 100% rename from examples/MidiTest/Builds/Android/app/src/main/res/values/string.xml rename to examples/MidiTest/Builds/Android/app/src/debug/res/values/string.xml diff --git a/examples/MidiTest/Builds/Android/app/src/main/AndroidManifest.xml b/examples/MidiTest/Builds/Android/app/src/main/AndroidManifest.xml index a4a6dfa815..7cbe5937ac 100644 --- a/examples/MidiTest/Builds/Android/app/src/main/AndroidManifest.xml +++ b/examples/MidiTest/Builds/Android/app/src/main/AndroidManifest.xml @@ -4,6 +4,8 @@ package="com.yourcompany.miditest"> + + 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 644a1e16ec..2c72cc52f3 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 @@ -58,6 +58,16 @@ import android.media.AudioManager; import android.media.MediaScannerConnection; import android.media.MediaScannerConnection.MediaScannerConnectionClient; import android.Manifest; +import java.util.concurrent.CancellationException; +import java.util.concurrent.Future; +import java.util.concurrent.Executors; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.Callable; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.locks.ReentrantLock; +import java.util.concurrent.atomic.*; import android.media.midi.*; import android.bluetooth.*; @@ -100,13 +110,18 @@ public class MidiTest extends Activity // these have to match the values of enum PermissionID in C++ class RuntimePermissions: private static final int JUCE_PERMISSIONS_RECORD_AUDIO = 1; private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2; + private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3; + private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4; private static String getAndroidPermissionName (int permissionID) { switch (permissionID) { - case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO; - case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION; + case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO; + case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION; + // use string value as this is not defined in SDKs < 16 + case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE"; + case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE; } // unknown permission ID! @@ -1628,6 +1643,7 @@ public class MidiTest extends Activity //============================================================================== private native void handleKeyDown (long host, int keycode, int textchar); private native void handleKeyUp (long host, int keycode, int textchar); + private native void handleBackButton (long host); public void showKeyboard (String type) { @@ -1655,8 +1671,14 @@ public class MidiTest extends Activity case KeyEvent.KEYCODE_VOLUME_UP: case KeyEvent.KEYCODE_VOLUME_DOWN: return super.onKeyDown (keyCode, event); + case KeyEvent.KEYCODE_BACK: + { + handleBackButton (host); + return true; + } - default: break; + default: + break; } handleKeyDown (host, keyCode, event.getUnicodeChar()); @@ -1876,43 +1898,136 @@ public class MidiTest extends Activity public static class HTTPStream { public HTTPStream (HttpURLConnection connection_, - int[] statusCode, StringBuffer responseHeaders) throws IOException + int[] statusCode_, + StringBuffer responseHeaders_) { connection = connection_; + statusCode = statusCode_; + responseHeaders = responseHeaders_; + } + + private final InputStream getCancellableStream (final boolean isInput) throws ExecutionException + { + synchronized (createFutureLock) + { + if (hasBeenCancelled.get()) + return null; + + streamFuture = executor.submit (new Callable() + { + @Override + public BufferedInputStream call() throws IOException + { + return new BufferedInputStream (isInput ? connection.getInputStream() + : connection.getErrorStream()); + } + }); + } try { - inputStream = new BufferedInputStream (connection.getInputStream()); + if (connection.getConnectTimeout() > 0) + return streamFuture.get (connection.getConnectTimeout(), TimeUnit.MILLISECONDS); + else + return streamFuture.get(); + } + catch (InterruptedException e) + { + return null; + } + catch (TimeoutException e) + { + return null; + } + catch (CancellationException e) + { + return null; + } + } + + public final boolean connect() + { + try + { + try + { + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + inputStream = getCancellableStream (true); + } + } + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally + { + statusCode[0] = connection.getResponseCode(); + } + + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + try + { + if (statusCode[0] >= 400) + inputStream = getCancellableStream (false); + else + inputStream = getCancellableStream (true); + } + 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) { - if (connection.getResponseCode() < 400) - throw e; + return false; } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - if (statusCode[0] >= 400) - inputStream = connection.getErrorStream(); - else - inputStream = connection.getInputStream(); - - 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"); } public final void release() { + hasBeenCancelled.set (true); + try { - inputStream.close(); + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (inputStream != null) + inputStream.close(); } catch (IOException e) {} + finally + { + createStreamLock.unlock(); + } connection.disconnect(); } @@ -1923,7 +2038,11 @@ public class MidiTest extends Activity try { - num = inputStream.read (buffer, 0, numBytes); + synchronized (createStreamLock) + { + if (inputStream != null) + num = inputStream.read (buffer, 0, numBytes); + } } catch (IOException e) {} @@ -1940,8 +2059,16 @@ public class MidiTest extends Activity public final boolean setPosition (long newPos) { return false; } private HttpURLConnection connection; + private int[] statusCode; + private StringBuffer responseHeaders; private InputStream inputStream; private long position; + private final ReentrantLock createStreamLock = new ReentrantLock(); + private final Object createFutureLock = new Object(); + private AtomicBoolean hasBeenCancelled = new AtomicBoolean(); + + private final ExecutorService executor = Executors.newCachedThreadPool (Executors.defaultThreadFactory()); + Future streamFuture; } public static final HTTPStream createHTTPStream (String address, boolean isPost, byte[] postData, diff --git a/examples/MidiTest/Builds/Android/app/src/release/res/values/string.xml b/examples/MidiTest/Builds/Android/app/src/release/res/values/string.xml new file mode 100644 index 0000000000..9c3fea4a3a --- /dev/null +++ b/examples/MidiTest/Builds/Android/app/src/release/res/values/string.xml @@ -0,0 +1,5 @@ + + + + MidiTest + diff --git a/examples/MidiTest/Builds/Android/build.gradle b/examples/MidiTest/Builds/Android/build.gradle index e1c0c91bb7..0109eaa02a 100644 --- a/examples/MidiTest/Builds/Android/build.gradle +++ b/examples/MidiTest/Builds/Android/build.gradle @@ -3,7 +3,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.1' + classpath 'com.android.tools.build:gradle:2.3.3' } } diff --git a/examples/MidiTest/Builds/LinuxMakefile/Makefile b/examples/MidiTest/Builds/LinuxMakefile/Makefile index 0f092c8624..c140fcd114 100644 --- a/examples/MidiTest/Builds/LinuxMakefile/Makefile +++ b/examples/MidiTest/Builds/LinuxMakefile/Makefile @@ -82,6 +82,8 @@ OBJECTS_APP := \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) @echo Linking "MidiTest - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) diff --git a/examples/MidiTest/Builds/MacOSX/MidiTest.xcodeproj/project.pbxproj b/examples/MidiTest/Builds/MacOSX/MidiTest.xcodeproj/project.pbxproj index 54d1764f7c..eaccfd6ddf 100644 --- a/examples/MidiTest/Builds/MacOSX/MidiTest.xcodeproj/project.pbxproj +++ b/examples/MidiTest/Builds/MacOSX/MidiTest.xcodeproj/project.pbxproj @@ -127,7 +127,7 @@ E13EEBD9B7B8AE35C17CD559, 396BE724B1AC489682B74278, ); name = Source; sourceTree = ""; }; 3B991DBD0B9EF35770D99DE0 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -148,17 +148,18 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.9; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - OTHER_CPLUSPLUSFLAGS = "-std=c++14 -Wreorder -Wconstant-conversion -Wint-conversion -Woverloaded-virtual -Wuninitialized -Wunused-parameter -Wshorten-64-to-32 -Wstrict-aliasing -Wshadow -Wconversion -Wsign-compare -Wsign-conversion"; + OTHER_CPLUSPLUSFLAGS = "-std=c++14 -Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.MidiTest; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 8508F29925B0BD0B7BFF3FF3 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -180,27 +181,49 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.9; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - OTHER_CPLUSPLUSFLAGS = "-std=c++14 -Wreorder -Wconstant-conversion -Wint-conversion -Woverloaded-virtual -Wuninitialized -Wunused-parameter -Wshorten-64-to-32 -Wstrict-aliasing -Wshadow -Wconversion -Wsign-compare -Wsign-conversion"; + OTHER_CPLUSPLUSFLAGS = "-std=c++14 -Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.MidiTest; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Release; }; E12A8778C1F50489C01F266F = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "MidiTest"; @@ -208,15 +231,36 @@ ZERO_LINK = NO; }; name = Debug; }; BBC1D92E610807090C266548 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "MidiTest"; WARNING_CFLAGS = -Wreorder; @@ -259,7 +303,7 @@ A1114FDF6F871F83BAF3B6B8, 80C515E0387A6AF48C93D08C, AADBC72B2C7030FAD1D8CAF8, ); buildRules = ( ); dependencies = ( ); name = "MidiTest - App"; productName = MidiTest; productReference = AB7855931CA983F4EE039617; productType = "com.apple.product-type.application"; }; - 08CC3758D6C29BD07C86A240 = {isa = PBXProject; buildConfigurationList = 33B4E927BEBC8696D1D2812E; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 68C4BE0E455A27D9A0CEB672 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 937739BC97C6E6294CDCF171; projectDirPath = ""; projectRoot = ""; targets = (68C4BE0E455A27D9A0CEB672); }; + 08CC3758D6C29BD07C86A240 = {isa = PBXProject; buildConfigurationList = 33B4E927BEBC8696D1D2812E; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 68C4BE0E455A27D9A0CEB672 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 937739BC97C6E6294CDCF171; projectDirPath = ""; projectRoot = ""; targets = (68C4BE0E455A27D9A0CEB672); }; }; rootObject = 08CC3758D6C29BD07C86A240; } diff --git a/examples/MidiTest/Builds/VisualStudio2015/MidiTest.sln b/examples/MidiTest/Builds/VisualStudio2015/MidiTest.sln index a3c00e9826..c7694fd98a 100644 --- a/examples/MidiTest/Builds/VisualStudio2015/MidiTest.sln +++ b/examples/MidiTest/Builds/VisualStudio2015/MidiTest.sln @@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EB720316-22FE-A3C9-7871-F2C2B2FC7A45}.Debug|Win32.Build.0 = Debug|Win32 {EB720316-22FE-A3C9-7871-F2C2B2FC7A45}.Debug|Win32.ActiveCfg = Debug|Win32 - {EB720316-22FE-A3C9-7871-F2C2B2FC7A45}.Release|Win32.Build.0 = Release|Win32 + {EB720316-22FE-A3C9-7871-F2C2B2FC7A45}.Debug|Win32.Build.0 = Debug|Win32 {EB720316-22FE-A3C9-7871-F2C2B2FC7A45}.Release|Win32.ActiveCfg = Release|Win32 + {EB720316-22FE-A3C9-7871-F2C2B2FC7A45}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/MidiTest/Builds/VisualStudio2015/MidiTest_App.vcxproj b/examples/MidiTest/Builds/VisualStudio2015/MidiTest_App.vcxproj index 39f640e849..8d0127644b 100644 --- a/examples/MidiTest/Builds/VisualStudio2015/MidiTest_App.vcxproj +++ b/examples/MidiTest/Builds/VisualStudio2015/MidiTest_App.vcxproj @@ -16,6 +16,7 @@ {EB720316-22FE-A3C9-7871-F2C2B2FC7A45} v140 + 8.1 Application false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ MidiTest true v140 + 8.1 @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -153,9 +160,6 @@ true - - true - true @@ -216,6 +220,9 @@ true + + true + true @@ -432,9 +439,6 @@ true - - true - true @@ -570,6 +574,9 @@ true + + true + true @@ -1689,7 +1696,6 @@ - @@ -1709,10 +1715,12 @@ + + @@ -1818,7 +1826,6 @@ - @@ -2090,6 +2097,7 @@ + diff --git a/examples/MidiTest/Builds/VisualStudio2015/MidiTest_App.vcxproj.filters b/examples/MidiTest/Builds/VisualStudio2015/MidiTest_App.vcxproj.filters index 362730a33d..b8a9ecf43d 100644 --- a/examples/MidiTest/Builds/VisualStudio2015/MidiTest_App.vcxproj.filters +++ b/examples/MidiTest/Builds/VisualStudio2015/MidiTest_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -352,9 +355,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -415,6 +415,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -637,9 +640,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -799,6 +799,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2034,9 +2037,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2094,6 +2094,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2106,6 +2109,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2421,9 +2427,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3237,6 +3240,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/MidiTest/Builds/VisualStudio2017/MidiTest.sln b/examples/MidiTest/Builds/VisualStudio2017/MidiTest.sln index d96fdce7be..dfa9779501 100644 --- a/examples/MidiTest/Builds/VisualStudio2017/MidiTest.sln +++ b/examples/MidiTest/Builds/VisualStudio2017/MidiTest.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EB720316-22FE-A3C9-7871-F2C2B2FC7A45}.Debug|x64.Build.0 = Debug|x64 {EB720316-22FE-A3C9-7871-F2C2B2FC7A45}.Debug|x64.ActiveCfg = Debug|x64 - {EB720316-22FE-A3C9-7871-F2C2B2FC7A45}.Release|x64.Build.0 = Release|x64 + {EB720316-22FE-A3C9-7871-F2C2B2FC7A45}.Debug|x64.Build.0 = Debug|x64 {EB720316-22FE-A3C9-7871-F2C2B2FC7A45}.Release|x64.ActiveCfg = Release|x64 + {EB720316-22FE-A3C9-7871-F2C2B2FC7A45}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/MidiTest/Builds/VisualStudio2017/MidiTest_App.vcxproj b/examples/MidiTest/Builds/VisualStudio2017/MidiTest_App.vcxproj index e5867e41fd..24d85bcac8 100644 --- a/examples/MidiTest/Builds/VisualStudio2017/MidiTest_App.vcxproj +++ b/examples/MidiTest/Builds/VisualStudio2017/MidiTest_App.vcxproj @@ -16,6 +16,7 @@ {EB720316-22FE-A3C9-7871-F2C2B2FC7A45} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ MidiTest true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -569,6 +573,9 @@ true + + true + true @@ -1688,7 +1695,6 @@ - @@ -1708,10 +1714,12 @@ + + @@ -1817,7 +1825,6 @@ - @@ -2089,6 +2096,7 @@ + diff --git a/examples/MidiTest/Builds/VisualStudio2017/MidiTest_App.vcxproj.filters b/examples/MidiTest/Builds/VisualStudio2017/MidiTest_App.vcxproj.filters index 87f80f76cf..5c4b0be35b 100644 --- a/examples/MidiTest/Builds/VisualStudio2017/MidiTest_App.vcxproj.filters +++ b/examples/MidiTest/Builds/VisualStudio2017/MidiTest_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -352,9 +355,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -415,6 +415,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -637,9 +640,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -799,6 +799,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2034,9 +2037,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2094,6 +2094,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2106,6 +2109,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2421,9 +2427,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3237,6 +3240,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/MidiTest/Builds/iOS/MidiTest.xcodeproj/project.pbxproj b/examples/MidiTest/Builds/iOS/MidiTest.xcodeproj/project.pbxproj index 2593ee0c84..12c211d270 100644 --- a/examples/MidiTest/Builds/iOS/MidiTest.xcodeproj/project.pbxproj +++ b/examples/MidiTest/Builds/iOS/MidiTest.xcodeproj/project.pbxproj @@ -135,7 +135,7 @@ 3B991DBD0B9EF35770D99DE0 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -156,15 +156,16 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.MidiTest; USE_HEADERMAP = NO; }; name = Debug; }; 8508F29925B0BD0B7BFF3FF3 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -186,24 +187,46 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.MidiTest; USE_HEADERMAP = NO; }; name = Release; }; E12A8778C1F50489C01F266F = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; @@ -215,15 +238,36 @@ BBC1D92E610807090C266548 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; PRODUCT_NAME = "MidiTest"; @@ -271,7 +315,7 @@ A1114FDF6F871F83BAF3B6B8, 80C515E0387A6AF48C93D08C, AADBC72B2C7030FAD1D8CAF8, ); buildRules = ( ); dependencies = ( ); name = "MidiTest - App"; productName = MidiTest; productReference = AB7855931CA983F4EE039617; productType = "com.apple.product-type.application"; }; - 08CC3758D6C29BD07C86A240 = {isa = PBXProject; buildConfigurationList = 33B4E927BEBC8696D1D2812E; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 68C4BE0E455A27D9A0CEB672 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 937739BC97C6E6294CDCF171; projectDirPath = ""; projectRoot = ""; targets = (68C4BE0E455A27D9A0CEB672); }; + 08CC3758D6C29BD07C86A240 = {isa = PBXProject; buildConfigurationList = 33B4E927BEBC8696D1D2812E; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 68C4BE0E455A27D9A0CEB672 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 937739BC97C6E6294CDCF171; projectDirPath = ""; projectRoot = ""; targets = (68C4BE0E455A27D9A0CEB672); }; }; rootObject = 08CC3758D6C29BD07C86A240; } diff --git a/examples/MidiTest/JuceLibraryCode/AppConfig.h b/examples/MidiTest/JuceLibraryCode/AppConfig.h index 0c0ae04d52..3297659b93 100644 --- a/examples/MidiTest/JuceLibraryCode/AppConfig.h +++ b/examples/MidiTest/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -54,6 +60,174 @@ #define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 #define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -62,172 +236,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_audio_utils flags: - -#ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER -#endif - -#ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif diff --git a/examples/MidiTest/MidiTest.jucer b/examples/MidiTest/MidiTest.jucer index 2e872b3fd5..618cb7c05b 100644 --- a/examples/MidiTest/MidiTest.jucer +++ b/examples/MidiTest/MidiTest.jucer @@ -2,8 +2,8 @@ + jucerVersion="5.1.0" displaySplashScreen="0" reportAppUsage="0" + splashScreenColour="Dark" companyName="ROLI Ltd." cppLanguageStandard="11"> @@ -78,7 +78,7 @@ - + diff --git a/examples/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt b/examples/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt index 3b43e5e23a..c848958b83 100644 --- a/examples/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt +++ b/examples/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt @@ -6,8 +6,9 @@ cmake_minimum_required(VERSION 3.4.1) SET(BINARY_NAME "juce_jni") add_library("cpufeatures" STATIC "${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c") +set_source_files_properties("${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" PROPERTIES COMPILE_FLAGS "-Wno-sign-conversion -Wno-gnu-statement-expression") -add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=10" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_juce_networkgraphicsdemo_JUCENetworkGraphicsDemo" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo\"") +add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=10" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_juce_networkgraphicsdemo_JUCENetworkGraphicsDemo" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo\"" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000") include_directories( AFTER "../../../JuceLibraryCode" @@ -44,8 +45,6 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.cpp" "../../../../../modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.h" "../../../../../modules/juce_audio_basics/effects/juce_Decibels.h" - "../../../../../modules/juce_audio_basics/effects/juce_FFT.cpp" - "../../../../../modules/juce_audio_basics/effects/juce_FFT.h" "../../../../../modules/juce_audio_basics/effects/juce_IIRFilter.cpp" "../../../../../modules/juce_audio_basics/effects/juce_IIRFilter.h" "../../../../../modules/juce_audio_basics/effects/juce_LagrangeInterpolator.cpp" @@ -82,6 +81,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_basics/mpe/juce_MPEZone.h" "../../../../../modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp" "../../../../../modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h" + "../../../../../modules/juce_audio_basics/native/juce_mac_CoreAudioLayouts.h" "../../../../../modules/juce_audio_basics/sources/juce_AudioSource.h" "../../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp" "../../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.h" @@ -89,6 +89,8 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h" "../../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.cpp" "../../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h" + "../../../../../modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp" + "../../../../../modules/juce_audio_basics/sources/juce_MemoryAudioSource.h" "../../../../../modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp" "../../../../../modules/juce_audio_basics/sources/juce_MixerAudioSource.h" "../../../../../modules/juce_audio_basics/sources/juce_PositionableAudioSource.h" @@ -270,8 +272,6 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_formats/codecs/juce_MP3AudioFormat.h" "../../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp" "../../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.h" - "../../../../../modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.cpp" - "../../../../../modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.h" "../../../../../modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp" "../../../../../modules/juce_audio_formats/codecs/juce_WavAudioFormat.h" "../../../../../modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp" @@ -386,6 +386,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/containers/juce_DynamicObject.h" "../../../../../modules/juce_core/containers/juce_ElementComparator.h" "../../../../../modules/juce_core/containers/juce_HashMap.h" + "../../../../../modules/juce_core/containers/juce_HashMap_test.cpp" "../../../../../modules/juce_core/containers/juce_LinkedListPointer.h" "../../../../../modules/juce_core/containers/juce_ListenerList.cpp" "../../../../../modules/juce_core/containers/juce_ListenerList.h" @@ -839,6 +840,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_graphics/native/juce_mac_IconHelpers.cpp" "../../../../../modules/juce_graphics/native/juce_RenderingHelpers.h" "../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp" + "../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.h" "../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp" "../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp" "../../../../../modules/juce_graphics/native/juce_win32_Fonts.cpp" @@ -1254,8 +1256,6 @@ set_source_files_properties("../../../../../modules/juce_audio_basics/buffers/ju set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_Decibels.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_FFT.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_FFT.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_IIRFilter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_IIRFilter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_LagrangeInterpolator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1292,6 +1292,7 @@ set_source_files_properties("../../../../../modules/juce_audio_basics/mpe/juce_M set_source_files_properties("../../../../../modules/juce_audio_basics/mpe/juce_MPEZone.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_basics/native/juce_mac_CoreAudioLayouts.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_AudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1299,6 +1300,8 @@ set_source_files_properties("../../../../../modules/juce_audio_basics/sources/ju set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_MemoryAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_MixerAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_PositionableAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1480,8 +1483,6 @@ set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/ju set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_MP3AudioFormat.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_WavAudioFormat.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1596,6 +1597,7 @@ set_source_files_properties("../../../../../modules/juce_core/containers/juce_Dy set_source_files_properties("../../../../../modules/juce_core/containers/juce_DynamicObject.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ElementComparator.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_HashMap.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_core/containers/juce_HashMap_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_LinkedListPointer.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ListenerList.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ListenerList.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -2049,6 +2051,7 @@ set_source_files_properties("../../../../../modules/juce_graphics/native/juce_ma set_source_files_properties("../../../../../modules/juce_graphics/native/juce_mac_IconHelpers.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_RenderingHelpers.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Fonts.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/examples/NetworkGraphicsDemo/Builds/Android/app/build.gradle b/examples/NetworkGraphicsDemo/Builds/Android/app/build.gradle index fff4a19d7e..77afce373f 100644 --- a/examples/NetworkGraphicsDemo/Builds/Android/app/build.gradle +++ b/examples/NetworkGraphicsDemo/Builds/Android/app/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 10 - buildToolsVersion "25.0.2" + buildToolsVersion "26.0.0" externalNativeBuild { cmake { path "CMakeLists.txt" @@ -52,18 +52,14 @@ android { } externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGFURATION=DEBUG" - cFlags "-Ofast" - cppFlags "-Ofast" + arguments "-DJUCE_BUILD_CONFIGFURATION=DEBUG", "-DCMAKE_CXX_FLAGS_DEBUG=-Ofast", "-DCMAKE_C_FLAGS_DEBUG=-Ofast" } } } release_ { externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGFURATION=RELEASE" - cFlags "-O3" - cppFlags "-O3" + arguments "-DJUCE_BUILD_CONFIGFURATION=RELEASE", "-DCMAKE_CXX_FLAGS_RELEASE=-O3", "-DCMAKE_C_FLAGS_RELEASE=-O3" } } } @@ -81,4 +77,11 @@ android { } } +repositories { } + +dependencies { +} + +} + diff --git a/examples/NetworkGraphicsDemo/Builds/Android/app/src/main/res/values/string.xml b/examples/NetworkGraphicsDemo/Builds/Android/app/src/debug/res/values/string.xml similarity index 100% rename from examples/NetworkGraphicsDemo/Builds/Android/app/src/main/res/values/string.xml rename to examples/NetworkGraphicsDemo/Builds/Android/app/src/debug/res/values/string.xml diff --git a/examples/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml b/examples/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml index e613adf001..a6517c4684 100644 --- a/examples/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml +++ b/examples/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml @@ -4,6 +4,8 @@ package="com.juce.networkgraphicsdemo"> + + 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 d8a963f6b9..c955cd3cdf 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 @@ -58,6 +58,16 @@ import android.media.AudioManager; import android.media.MediaScannerConnection; import android.media.MediaScannerConnection.MediaScannerConnectionClient; import android.Manifest; +import java.util.concurrent.CancellationException; +import java.util.concurrent.Future; +import java.util.concurrent.Executors; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.Callable; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.locks.ReentrantLock; +import java.util.concurrent.atomic.*; @@ -97,13 +107,18 @@ public class JUCENetworkGraphicsDemo extends Activity // these have to match the values of enum PermissionID in C++ class RuntimePermissions: private static final int JUCE_PERMISSIONS_RECORD_AUDIO = 1; private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2; + private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3; + private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4; private static String getAndroidPermissionName (int permissionID) { switch (permissionID) { - case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO; - case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION; + case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO; + case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION; + // use string value as this is not defined in SDKs < 16 + case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE"; + case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE; } // unknown permission ID! @@ -699,6 +714,7 @@ public class JUCENetworkGraphicsDemo extends Activity //============================================================================== private native void handleKeyDown (long host, int keycode, int textchar); private native void handleKeyUp (long host, int keycode, int textchar); + private native void handleBackButton (long host); public void showKeyboard (String type) { @@ -726,8 +742,14 @@ public class JUCENetworkGraphicsDemo extends Activity case KeyEvent.KEYCODE_VOLUME_UP: case KeyEvent.KEYCODE_VOLUME_DOWN: return super.onKeyDown (keyCode, event); + case KeyEvent.KEYCODE_BACK: + { + handleBackButton (host); + return true; + } - default: break; + default: + break; } handleKeyDown (host, keyCode, event.getUnicodeChar()); @@ -947,43 +969,136 @@ public class JUCENetworkGraphicsDemo extends Activity public static class HTTPStream { public HTTPStream (HttpURLConnection connection_, - int[] statusCode, StringBuffer responseHeaders) throws IOException + int[] statusCode_, + StringBuffer responseHeaders_) { connection = connection_; + statusCode = statusCode_; + responseHeaders = responseHeaders_; + } + + private final InputStream getCancellableStream (final boolean isInput) throws ExecutionException + { + synchronized (createFutureLock) + { + if (hasBeenCancelled.get()) + return null; + + streamFuture = executor.submit (new Callable() + { + @Override + public BufferedInputStream call() throws IOException + { + return new BufferedInputStream (isInput ? connection.getInputStream() + : connection.getErrorStream()); + } + }); + } try { - inputStream = new BufferedInputStream (connection.getInputStream()); + if (connection.getConnectTimeout() > 0) + return streamFuture.get (connection.getConnectTimeout(), TimeUnit.MILLISECONDS); + else + return streamFuture.get(); + } + catch (InterruptedException e) + { + return null; + } + catch (TimeoutException e) + { + return null; + } + catch (CancellationException e) + { + return null; + } + } + + public final boolean connect() + { + try + { + try + { + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + inputStream = getCancellableStream (true); + } + } + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally + { + statusCode[0] = connection.getResponseCode(); + } + + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + try + { + if (statusCode[0] >= 400) + inputStream = getCancellableStream (false); + else + inputStream = getCancellableStream (true); + } + 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) { - if (connection.getResponseCode() < 400) - throw e; + return false; } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - if (statusCode[0] >= 400) - inputStream = connection.getErrorStream(); - else - inputStream = connection.getInputStream(); - - 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"); } public final void release() { + hasBeenCancelled.set (true); + try { - inputStream.close(); + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (inputStream != null) + inputStream.close(); } catch (IOException e) {} + finally + { + createStreamLock.unlock(); + } connection.disconnect(); } @@ -994,7 +1109,11 @@ public class JUCENetworkGraphicsDemo extends Activity try { - num = inputStream.read (buffer, 0, numBytes); + synchronized (createStreamLock) + { + if (inputStream != null) + num = inputStream.read (buffer, 0, numBytes); + } } catch (IOException e) {} @@ -1011,8 +1130,16 @@ public class JUCENetworkGraphicsDemo extends Activity public final boolean setPosition (long newPos) { return false; } private HttpURLConnection connection; + private int[] statusCode; + private StringBuffer responseHeaders; private InputStream inputStream; private long position; + private final ReentrantLock createStreamLock = new ReentrantLock(); + private final Object createFutureLock = new Object(); + private AtomicBoolean hasBeenCancelled = new AtomicBoolean(); + + private final ExecutorService executor = Executors.newCachedThreadPool (Executors.defaultThreadFactory()); + Future streamFuture; } public static final HTTPStream createHTTPStream (String address, boolean isPost, byte[] postData, diff --git a/examples/NetworkGraphicsDemo/Builds/Android/app/src/release/res/values/string.xml b/examples/NetworkGraphicsDemo/Builds/Android/app/src/release/res/values/string.xml new file mode 100644 index 0000000000..fe615a2592 --- /dev/null +++ b/examples/NetworkGraphicsDemo/Builds/Android/app/src/release/res/values/string.xml @@ -0,0 +1,5 @@ + + + + JUCE Network Graphics Demo + diff --git a/examples/NetworkGraphicsDemo/Builds/Android/build.gradle b/examples/NetworkGraphicsDemo/Builds/Android/build.gradle index e1c0c91bb7..0109eaa02a 100644 --- a/examples/NetworkGraphicsDemo/Builds/Android/build.gradle +++ b/examples/NetworkGraphicsDemo/Builds/Android/build.gradle @@ -3,7 +3,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.1' + classpath 'com.android.tools.build:gradle:2.3.3' } } diff --git a/examples/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile b/examples/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile index 3b6197ae25..0b9679056c 100644 --- a/examples/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile +++ b/examples/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile @@ -85,6 +85,8 @@ OBJECTS_APP := \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) @echo Linking "JUCE Network Graphics Demo - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) diff --git a/examples/NetworkGraphicsDemo/Builds/MacOSX/JUCE Network Graphics Demo.xcodeproj/project.pbxproj b/examples/NetworkGraphicsDemo/Builds/MacOSX/JUCE Network Graphics Demo.xcodeproj/project.pbxproj index d10d043b52..f8ddf854d1 100644 --- a/examples/NetworkGraphicsDemo/Builds/MacOSX/JUCE Network Graphics Demo.xcodeproj/project.pbxproj +++ b/examples/NetworkGraphicsDemo/Builds/MacOSX/JUCE Network Graphics Demo.xcodeproj/project.pbxproj @@ -158,7 +158,7 @@ 71F5560BE0EE3A17A9CE44F6, 8B59A884C62D960EE9DFEF47, ); name = Source; sourceTree = ""; }; EE7498599191DDC73ECB55B0 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -179,8 +179,9 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.9; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -188,7 +189,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 2E06386CE7CCA5FF76819BFF = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -210,8 +211,9 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.9; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -220,16 +222,37 @@ USE_HEADERMAP = NO; }; name = Release; }; 3BF0365A560ACD4FD24D40CE = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "JUCE Network Graphics Demo"; @@ -237,15 +260,36 @@ ZERO_LINK = NO; }; name = Debug; }; 9C6D2FD441D79104734762A5 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "JUCE Network Graphics Demo"; WARNING_CFLAGS = -Wreorder; @@ -293,7 +337,7 @@ 714944DB86A4D402E7FA269E, C2977559BF9148DB70CA10AE, 865E89B94B41EB14C202CBB0, ); buildRules = ( ); dependencies = ( ); name = "JUCE Network Graphics Demo - App"; productName = "JUCE Network Graphics Demo"; productReference = E4162459ED4C829EF7B19691; productType = "com.apple.product-type.application"; }; - A5398ADB6F5B128C00EB935C = {isa = PBXProject; buildConfigurationList = 02715337C584F3C721251428; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 4311FBCBD02948A0ED96C7DD = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D2EB65517396C974F0415A7F; projectDirPath = ""; projectRoot = ""; targets = (4311FBCBD02948A0ED96C7DD); }; + A5398ADB6F5B128C00EB935C = {isa = PBXProject; buildConfigurationList = 02715337C584F3C721251428; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 4311FBCBD02948A0ED96C7DD = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D2EB65517396C974F0415A7F; projectDirPath = ""; projectRoot = ""; targets = (4311FBCBD02948A0ED96C7DD); }; }; rootObject = A5398ADB6F5B128C00EB935C; } diff --git a/examples/NetworkGraphicsDemo/Builds/VisualStudio2013/JUCE Network Graphics Demo.sln b/examples/NetworkGraphicsDemo/Builds/VisualStudio2013/JUCE Network Graphics Demo.sln index 8677c58d8d..4b09c6d735 100644 --- a/examples/NetworkGraphicsDemo/Builds/VisualStudio2013/JUCE Network Graphics Demo.sln +++ b/examples/NetworkGraphicsDemo/Builds/VisualStudio2013/JUCE Network Graphics Demo.sln @@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Debug|Win32.Build.0 = Debug|Win32 {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Debug|Win32.ActiveCfg = Debug|Win32 - {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Release|Win32.Build.0 = Release|Win32 + {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Debug|Win32.Build.0 = Debug|Win32 {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Release|Win32.ActiveCfg = Release|Win32 + {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/NetworkGraphicsDemo/Builds/VisualStudio2013/JUCE Network Graphics Demo_App.vcxproj b/examples/NetworkGraphicsDemo/Builds/VisualStudio2013/JUCE Network Graphics Demo_App.vcxproj index 83c9ee908e..5eab93e8ad 100644 --- a/examples/NetworkGraphicsDemo/Builds/VisualStudio2013/JUCE Network Graphics Demo_App.vcxproj +++ b/examples/NetworkGraphicsDemo/Builds/VisualStudio2013/JUCE Network Graphics Demo_App.vcxproj @@ -16,6 +16,7 @@ {2F8ABED0-7428-13A5-07CD-EF1F3B43B926} v120 + 8.1 Application false v120 + 8.1 @@ -30,6 +32,7 @@ false true v120 + 8.1 @@ -40,6 +43,7 @@ v120 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ JUCE Network Graphics Demo true v120 + 8.1 @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -569,6 +573,9 @@ true + + true + true @@ -1773,7 +1780,6 @@ - @@ -1793,10 +1799,12 @@ + + @@ -1902,7 +1910,6 @@ - @@ -2181,6 +2188,7 @@ + diff --git a/examples/NetworkGraphicsDemo/Builds/VisualStudio2013/JUCE Network Graphics Demo_App.vcxproj.filters b/examples/NetworkGraphicsDemo/Builds/VisualStudio2013/JUCE Network Graphics Demo_App.vcxproj.filters index 7d4ddc83b6..ddbdae9084 100644 --- a/examples/NetworkGraphicsDemo/Builds/VisualStudio2013/JUCE Network Graphics Demo_App.vcxproj.filters +++ b/examples/NetworkGraphicsDemo/Builds/VisualStudio2013/JUCE Network Graphics Demo_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -379,9 +382,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -442,6 +442,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -664,9 +667,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -826,6 +826,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2166,9 +2169,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2226,6 +2226,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2238,6 +2241,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2553,9 +2559,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3390,6 +3393,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/NetworkGraphicsDemo/Builds/VisualStudio2017/JUCE Network Graphics Demo.sln b/examples/NetworkGraphicsDemo/Builds/VisualStudio2017/JUCE Network Graphics Demo.sln index 3786555539..c5d0d80982 100644 --- a/examples/NetworkGraphicsDemo/Builds/VisualStudio2017/JUCE Network Graphics Demo.sln +++ b/examples/NetworkGraphicsDemo/Builds/VisualStudio2017/JUCE Network Graphics Demo.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Debug|x64.Build.0 = Debug|x64 {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Debug|x64.ActiveCfg = Debug|x64 - {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Release|x64.Build.0 = Release|x64 + {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Debug|x64.Build.0 = Debug|x64 {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Release|x64.ActiveCfg = Release|x64 + {2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/NetworkGraphicsDemo/Builds/VisualStudio2017/JUCE Network Graphics Demo_App.vcxproj b/examples/NetworkGraphicsDemo/Builds/VisualStudio2017/JUCE Network Graphics Demo_App.vcxproj index 44b2826deb..8b023d11e5 100644 --- a/examples/NetworkGraphicsDemo/Builds/VisualStudio2017/JUCE Network Graphics Demo_App.vcxproj +++ b/examples/NetworkGraphicsDemo/Builds/VisualStudio2017/JUCE Network Graphics Demo_App.vcxproj @@ -16,6 +16,7 @@ {2F8ABED0-7428-13A5-07CD-EF1F3B43B926} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ JUCE Network Graphics Demo true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -151,9 +158,6 @@ true - - true - true @@ -214,6 +218,9 @@ true + + true + true @@ -430,9 +437,6 @@ true - - true - true @@ -568,6 +572,9 @@ true + + true + true @@ -1772,7 +1779,6 @@ - @@ -1792,10 +1798,12 @@ + + @@ -1901,7 +1909,6 @@ - @@ -2180,6 +2187,7 @@ + diff --git a/examples/NetworkGraphicsDemo/Builds/VisualStudio2017/JUCE Network Graphics Demo_App.vcxproj.filters b/examples/NetworkGraphicsDemo/Builds/VisualStudio2017/JUCE Network Graphics Demo_App.vcxproj.filters index f1a57722b8..fd82c6dd93 100644 --- a/examples/NetworkGraphicsDemo/Builds/VisualStudio2017/JUCE Network Graphics Demo_App.vcxproj.filters +++ b/examples/NetworkGraphicsDemo/Builds/VisualStudio2017/JUCE Network Graphics Demo_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -379,9 +382,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -442,6 +442,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -664,9 +667,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -826,6 +826,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2166,9 +2169,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2226,6 +2226,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2238,6 +2241,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2553,9 +2559,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3390,6 +3393,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/NetworkGraphicsDemo/Builds/iOS/JUCE Network Graphics Demo.xcodeproj/project.pbxproj b/examples/NetworkGraphicsDemo/Builds/iOS/JUCE Network Graphics Demo.xcodeproj/project.pbxproj index a7c35fac50..379f7963a2 100644 --- a/examples/NetworkGraphicsDemo/Builds/iOS/JUCE Network Graphics Demo.xcodeproj/project.pbxproj +++ b/examples/NetworkGraphicsDemo/Builds/iOS/JUCE Network Graphics Demo.xcodeproj/project.pbxproj @@ -166,7 +166,7 @@ EE7498599191DDC73ECB55B0 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -187,15 +187,16 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.NetworkGraphicsDemo; USE_HEADERMAP = NO; }; name = Debug; }; 2E06386CE7CCA5FF76819BFF = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -217,24 +218,46 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.NetworkGraphicsDemo; USE_HEADERMAP = NO; }; name = Release; }; 3BF0365A560ACD4FD24D40CE = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -246,15 +269,36 @@ 9C6D2FD441D79104734762A5 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "JUCE Network Graphics Demo"; @@ -307,7 +351,7 @@ 714944DB86A4D402E7FA269E, C2977559BF9148DB70CA10AE, 865E89B94B41EB14C202CBB0, ); buildRules = ( ); dependencies = ( ); name = "JUCE Network Graphics Demo - App"; productName = "JUCE Network Graphics Demo"; productReference = E4162459ED4C829EF7B19691; productType = "com.apple.product-type.application"; }; - A5398ADB6F5B128C00EB935C = {isa = PBXProject; buildConfigurationList = 02715337C584F3C721251428; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 4311FBCBD02948A0ED96C7DD = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D2EB65517396C974F0415A7F; projectDirPath = ""; projectRoot = ""; targets = (4311FBCBD02948A0ED96C7DD); }; + A5398ADB6F5B128C00EB935C = {isa = PBXProject; buildConfigurationList = 02715337C584F3C721251428; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 4311FBCBD02948A0ED96C7DD = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D2EB65517396C974F0415A7F; projectDirPath = ""; projectRoot = ""; targets = (4311FBCBD02948A0ED96C7DD); }; }; rootObject = A5398ADB6F5B128C00EB935C; } diff --git a/examples/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h b/examples/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h index 3259bddc2a..245597d201 100644 --- a/examples/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h +++ b/examples/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -57,6 +63,174 @@ #define JUCE_MODULE_AVAILABLE_juce_opengl 1 #define JUCE_MODULE_AVAILABLE_juce_osc 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -65,172 +239,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_audio_utils flags: - -#ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER -#endif - -#ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif diff --git a/examples/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer b/examples/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer index 3f822e0abd..f0024efb31 100644 --- a/examples/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer +++ b/examples/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer @@ -2,8 +2,9 @@ + includeBinaryInAppConfig="1" jucerVersion="5.1.0" displaySplashScreen="0" + reportAppUsage="0" splashScreenColour="Dark" companyName="ROLI Ltd." + cppLanguageStandard="11"> diff --git a/examples/OSCMonitor/Builds/LinuxMakefile/Makefile b/examples/OSCMonitor/Builds/LinuxMakefile/Makefile index 56e668986e..c5891645f4 100644 --- a/examples/OSCMonitor/Builds/LinuxMakefile/Makefile +++ b/examples/OSCMonitor/Builds/LinuxMakefile/Makefile @@ -84,6 +84,8 @@ OBJECTS_APP := \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) @echo Linking "OSCMonitor - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) diff --git a/examples/OSCMonitor/Builds/MacOSX/OSCMonitor.xcodeproj/project.pbxproj b/examples/OSCMonitor/Builds/MacOSX/OSCMonitor.xcodeproj/project.pbxproj index 89b4b569c2..58bc75f1f4 100644 --- a/examples/OSCMonitor/Builds/MacOSX/OSCMonitor.xcodeproj/project.pbxproj +++ b/examples/OSCMonitor/Builds/MacOSX/OSCMonitor.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ EEF1C1AC7B804FD1DD290FF3 = {isa = PBXBuildFile; fileRef = 9919E2B6BB47D980D2621E05; }; 8F90CDDE444EA79E66718A5B = {isa = PBXBuildFile; fileRef = FBA6EB8BE426F4B718F80127; }; 73E26130783B152A4761D427 = {isa = PBXBuildFile; fileRef = 8DEBC3B6CF15D41618B1BE2E; }; + 902ACAB486D4041D598627F6 = {isa = PBXBuildFile; fileRef = 5C0E3D89065E4444921C8A2A; }; 0D4B330237E806FD83EAE57F = {isa = PBXBuildFile; fileRef = A00D6A45BDF5A73D8280A716; }; AFAF70AFAE4EB2218010021D = {isa = PBXBuildFile; fileRef = 88DE251DF6AE9B26738AE499; }; 3E7F8C668A6B9D59129DB060 = {isa = PBXBuildFile; fileRef = 92BF599DA326087F0C148FCD; }; @@ -47,6 +48,7 @@ 358B56F4E9EADBE499A6E4AC = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-App.plist"; path = "Info-App.plist"; sourceTree = "SOURCE_ROOT"; }; 38581D69B32C47722153A7F5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_events.mm"; path = "../../JuceLibraryCode/include_juce_events.mm"; sourceTree = "SOURCE_ROOT"; }; 5BB56FCAD65ECB76C33B8BE6 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_basics"; path = "../../../../modules/juce_audio_basics"; sourceTree = "SOURCE_ROOT"; }; + 5C0E3D89065E4444921C8A2A = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; }; 6325F284F0D69948E272BBEC = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_cryptography"; path = "../../../../modules/juce_cryptography"; sourceTree = "SOURCE_ROOT"; }; 69CCCF783C45EAEC120130F5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_osc.cpp"; path = "../../JuceLibraryCode/include_juce_osc.cpp"; sourceTree = "SOURCE_ROOT"; }; 6C4247B39550441A1914323B = {isa = PBXFileReference; lastKnownFileType = file.nib; name = RecentFilesMenuTemplate.nib; path = RecentFilesMenuTemplate.nib; sourceTree = "SOURCE_ROOT"; }; @@ -128,6 +130,7 @@ 9919E2B6BB47D980D2621E05, FBA6EB8BE426F4B718F80127, 8DEBC3B6CF15D41618B1BE2E, + 5C0E3D89065E4444921C8A2A, A00D6A45BDF5A73D8280A716, 88DE251DF6AE9B26738AE499, 92BF599DA326087F0C148FCD, @@ -147,7 +150,7 @@ 5AC077DA631E45BA65F308A0, 6778E8BDE76400A1AF2624CB, ); name = Source; sourceTree = ""; }; 53FD85A07B8E353D5FDA8342 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -168,8 +171,9 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -177,7 +181,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 9E3735C587170DFFA5FD0E4F = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -199,8 +203,9 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -209,16 +214,37 @@ USE_HEADERMAP = NO; }; name = Release; }; A73601CA8085AB937DA91A68 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "OSCMonitor"; @@ -226,15 +252,36 @@ ZERO_LINK = NO; }; name = Debug; }; DDE4A8B5C0E28817D91763B8 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "OSCMonitor"; WARNING_CFLAGS = -Wreorder; @@ -268,6 +315,7 @@ EEF1C1AC7B804FD1DD290FF3, 8F90CDDE444EA79E66718A5B, 73E26130783B152A4761D427, + 902ACAB486D4041D598627F6, 0D4B330237E806FD83EAE57F, AFAF70AFAE4EB2218010021D, 3E7F8C668A6B9D59129DB060, @@ -281,7 +329,7 @@ 5EAEC7382D18903A6CC34743, F3B61DF6E57FDFD6B2F506F2, F246BDBFC565CFD500CC8D8B, ); buildRules = ( ); dependencies = ( ); name = "OSCMonitor - App"; productName = OSCMonitor; productReference = 1997CE41947A0FA3AE6FD84C; productType = "com.apple.product-type.application"; }; - 6AEE7D5FA068DDF4AE3BC412 = {isa = PBXProject; buildConfigurationList = 167C45A180F421917A997478; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { CE4CE10FF3A0FD3AA7FF7605 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 6A9D07656A985D7935C7FE29; projectDirPath = ""; projectRoot = ""; targets = (CE4CE10FF3A0FD3AA7FF7605); }; + 6AEE7D5FA068DDF4AE3BC412 = {isa = PBXProject; buildConfigurationList = 167C45A180F421917A997478; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { CE4CE10FF3A0FD3AA7FF7605 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 6A9D07656A985D7935C7FE29; projectDirPath = ""; projectRoot = ""; targets = (CE4CE10FF3A0FD3AA7FF7605); }; }; rootObject = 6AEE7D5FA068DDF4AE3BC412; } diff --git a/examples/OSCMonitor/Builds/VisualStudio2015/OSCMonitor.sln b/examples/OSCMonitor/Builds/VisualStudio2015/OSCMonitor.sln index 2800fb5ce6..9f5460c81e 100644 --- a/examples/OSCMonitor/Builds/VisualStudio2015/OSCMonitor.sln +++ b/examples/OSCMonitor/Builds/VisualStudio2015/OSCMonitor.sln @@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E59DC404-E625-1E60-3811-4F0BFB026DF1}.Debug|Win32.Build.0 = Debug|Win32 {E59DC404-E625-1E60-3811-4F0BFB026DF1}.Debug|Win32.ActiveCfg = Debug|Win32 - {E59DC404-E625-1E60-3811-4F0BFB026DF1}.Release|Win32.Build.0 = Release|Win32 + {E59DC404-E625-1E60-3811-4F0BFB026DF1}.Debug|Win32.Build.0 = Debug|Win32 {E59DC404-E625-1E60-3811-4F0BFB026DF1}.Release|Win32.ActiveCfg = Release|Win32 + {E59DC404-E625-1E60-3811-4F0BFB026DF1}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/OSCMonitor/Builds/VisualStudio2015/OSCMonitor_App.vcxproj b/examples/OSCMonitor/Builds/VisualStudio2015/OSCMonitor_App.vcxproj index d108822825..93fa2e45b8 100644 --- a/examples/OSCMonitor/Builds/VisualStudio2015/OSCMonitor_App.vcxproj +++ b/examples/OSCMonitor/Builds/VisualStudio2015/OSCMonitor_App.vcxproj @@ -16,6 +16,7 @@ {E59DC404-E625-1E60-3811-4F0BFB026DF1} v140 + 8.1 Application false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ OSCMonitor true v140 + 8.1 @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -521,6 +525,9 @@ true + + true + true @@ -1700,13 +1707,7 @@ true - - true - - - true - - + true @@ -1737,7 +1738,6 @@ - @@ -1757,10 +1757,12 @@ + + @@ -1866,7 +1868,6 @@ - @@ -2132,6 +2133,7 @@ + @@ -2325,8 +2327,12 @@ - - + + + + + + diff --git a/examples/OSCMonitor/Builds/VisualStudio2015/OSCMonitor_App.vcxproj.filters b/examples/OSCMonitor/Builds/VisualStudio2015/OSCMonitor_App.vcxproj.filters index dd39bab59e..845b1c4aa7 100644 --- a/examples/OSCMonitor/Builds/VisualStudio2015/OSCMonitor_App.vcxproj.filters +++ b/examples/OSCMonitor/Builds/VisualStudio2015/OSCMonitor_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -376,9 +379,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -439,6 +439,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -661,9 +664,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -760,6 +760,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2023,20 +2026,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2115,9 +2106,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2175,6 +2163,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2187,6 +2178,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2502,9 +2496,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3300,6 +3291,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -3879,10 +3873,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/OSCMonitor/Builds/VisualStudio2017/OSCMonitor.sln b/examples/OSCMonitor/Builds/VisualStudio2017/OSCMonitor.sln index f48dd80918..ca746562c0 100644 --- a/examples/OSCMonitor/Builds/VisualStudio2017/OSCMonitor.sln +++ b/examples/OSCMonitor/Builds/VisualStudio2017/OSCMonitor.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E59DC404-E625-1E60-3811-4F0BFB026DF1}.Debug|x64.Build.0 = Debug|x64 {E59DC404-E625-1E60-3811-4F0BFB026DF1}.Debug|x64.ActiveCfg = Debug|x64 - {E59DC404-E625-1E60-3811-4F0BFB026DF1}.Release|x64.Build.0 = Release|x64 + {E59DC404-E625-1E60-3811-4F0BFB026DF1}.Debug|x64.Build.0 = Debug|x64 {E59DC404-E625-1E60-3811-4F0BFB026DF1}.Release|x64.ActiveCfg = Release|x64 + {E59DC404-E625-1E60-3811-4F0BFB026DF1}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/OSCMonitor/Builds/VisualStudio2017/OSCMonitor_App.vcxproj b/examples/OSCMonitor/Builds/VisualStudio2017/OSCMonitor_App.vcxproj index 1f1d8d1d76..01e682d73d 100644 --- a/examples/OSCMonitor/Builds/VisualStudio2017/OSCMonitor_App.vcxproj +++ b/examples/OSCMonitor/Builds/VisualStudio2017/OSCMonitor_App.vcxproj @@ -16,6 +16,7 @@ {E59DC404-E625-1E60-3811-4F0BFB026DF1} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ OSCMonitor true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -151,9 +158,6 @@ true - - true - true @@ -214,6 +218,9 @@ true + + true + true @@ -430,9 +437,6 @@ true - - true - true @@ -520,6 +524,9 @@ true + + true + true @@ -1699,13 +1706,7 @@ true - - true - - - true - - + true @@ -1736,7 +1737,6 @@ - @@ -1756,10 +1756,12 @@ + + @@ -1865,7 +1867,6 @@ - @@ -2131,6 +2132,7 @@ + @@ -2324,8 +2326,12 @@ - - + + + + + + diff --git a/examples/OSCMonitor/Builds/VisualStudio2017/OSCMonitor_App.vcxproj.filters b/examples/OSCMonitor/Builds/VisualStudio2017/OSCMonitor_App.vcxproj.filters index 2995624232..765bb2c82a 100644 --- a/examples/OSCMonitor/Builds/VisualStudio2017/OSCMonitor_App.vcxproj.filters +++ b/examples/OSCMonitor/Builds/VisualStudio2017/OSCMonitor_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -376,9 +379,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -439,6 +439,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -661,9 +664,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -760,6 +760,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2023,20 +2026,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2115,9 +2106,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2175,6 +2163,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2187,6 +2178,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2502,9 +2496,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3300,6 +3291,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -3879,10 +3873,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/OSCMonitor/JuceLibraryCode/AppConfig.h b/examples/OSCMonitor/JuceLibraryCode/AppConfig.h index c2b9d5645f..d43fda9dc7 100644 --- a/examples/OSCMonitor/JuceLibraryCode/AppConfig.h +++ b/examples/OSCMonitor/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -57,6 +63,170 @@ #define JUCE_MODULE_AVAILABLE_juce_osc 1 #define JUCE_MODULE_AVAILABLE_juce_video 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif + +//============================================================================== +// juce_video flags: + +#ifndef JUCE_USE_CAMERA + //#define JUCE_USE_CAMERA 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -65,180 +235,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif - -//============================================================================== -// juce_video flags: - -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - //#define JUCE_QUICKTIME -#endif - -#ifndef JUCE_USE_CAMERA - //#define JUCE_USE_CAMERA -#endif diff --git a/examples/OSCMonitor/OSCMonitor.jucer b/examples/OSCMonitor/OSCMonitor.jucer index 58134142b2..20bd341692 100644 --- a/examples/OSCMonitor/OSCMonitor.jucer +++ b/examples/OSCMonitor/OSCMonitor.jucer @@ -2,8 +2,8 @@ + jucerVersion="5.1.0" displaySplashScreen="0" reportAppUsage="0" + splashScreenColour="Dark" companyName="ROLI Ltd." cppLanguageStandard="11"> diff --git a/examples/OSCReceiver/Builds/Android/app/CMakeLists.txt b/examples/OSCReceiver/Builds/Android/app/CMakeLists.txt index b4c48c28f2..17a1c16bd7 100644 --- a/examples/OSCReceiver/Builds/Android/app/CMakeLists.txt +++ b/examples/OSCReceiver/Builds/Android/app/CMakeLists.txt @@ -6,8 +6,9 @@ cmake_minimum_required(VERSION 3.4.1) SET(BINARY_NAME "juce_jni") add_library("cpufeatures" STATIC "${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c") +set_source_files_properties("${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" PROPERTIES COMPILE_FLAGS "-Wno-sign-conversion -Wno-gnu-statement-expression") -add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=10" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_yourcompany_oscreceiver_OSCReceiver" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/yourcompany/oscreceiver/OSCReceiver\"") +add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=10" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_yourcompany_oscreceiver_OSCReceiver" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/yourcompany/oscreceiver/OSCReceiver\"" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000") include_directories( AFTER "../../../JuceLibraryCode" @@ -37,6 +38,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/containers/juce_DynamicObject.h" "../../../../../modules/juce_core/containers/juce_ElementComparator.h" "../../../../../modules/juce_core/containers/juce_HashMap.h" + "../../../../../modules/juce_core/containers/juce_HashMap_test.cpp" "../../../../../modules/juce_core/containers/juce_LinkedListPointer.h" "../../../../../modules/juce_core/containers/juce_ListenerList.cpp" "../../../../../modules/juce_core/containers/juce_ListenerList.h" @@ -490,6 +492,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_graphics/native/juce_mac_IconHelpers.cpp" "../../../../../modules/juce_graphics/native/juce_RenderingHelpers.h" "../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp" + "../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.h" "../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp" "../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp" "../../../../../modules/juce_graphics/native/juce_win32_Fonts.cpp" @@ -857,6 +860,7 @@ set_source_files_properties("../../../../../modules/juce_core/containers/juce_Dy set_source_files_properties("../../../../../modules/juce_core/containers/juce_DynamicObject.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ElementComparator.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_HashMap.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_core/containers/juce_HashMap_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_LinkedListPointer.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ListenerList.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ListenerList.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1310,6 +1314,7 @@ set_source_files_properties("../../../../../modules/juce_graphics/native/juce_ma set_source_files_properties("../../../../../modules/juce_graphics/native/juce_mac_IconHelpers.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_RenderingHelpers.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Fonts.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/examples/OSCReceiver/Builds/Android/app/build.gradle b/examples/OSCReceiver/Builds/Android/app/build.gradle index 00a6e2dbea..7cc08c6262 100644 --- a/examples/OSCReceiver/Builds/Android/app/build.gradle +++ b/examples/OSCReceiver/Builds/Android/app/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 10 - buildToolsVersion "25.0.2" + buildToolsVersion "26.0.0" externalNativeBuild { cmake { path "CMakeLists.txt" @@ -52,18 +52,14 @@ android { } externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGFURATION=DEBUG" - cFlags "-O0" - cppFlags "-O0" + arguments "-DJUCE_BUILD_CONFIGFURATION=DEBUG", "-DCMAKE_CXX_FLAGS_DEBUG=-O0", "-DCMAKE_C_FLAGS_DEBUG=-O0" } } } release_ { externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGFURATION=RELEASE" - cFlags "-O3" - cppFlags "-O3" + arguments "-DJUCE_BUILD_CONFIGFURATION=RELEASE", "-DCMAKE_CXX_FLAGS_RELEASE=-O3", "-DCMAKE_C_FLAGS_RELEASE=-O3" } } } @@ -81,4 +77,11 @@ android { } } +repositories { } + +dependencies { +} + +} + diff --git a/examples/OSCReceiver/Builds/Android/app/src/main/res/values/string.xml b/examples/OSCReceiver/Builds/Android/app/src/debug/res/values/string.xml similarity index 100% rename from examples/OSCReceiver/Builds/Android/app/src/main/res/values/string.xml rename to examples/OSCReceiver/Builds/Android/app/src/debug/res/values/string.xml diff --git a/examples/OSCReceiver/Builds/Android/app/src/main/AndroidManifest.xml b/examples/OSCReceiver/Builds/Android/app/src/main/AndroidManifest.xml index 9e15206216..9d68a6ee01 100644 --- a/examples/OSCReceiver/Builds/Android/app/src/main/AndroidManifest.xml +++ b/examples/OSCReceiver/Builds/Android/app/src/main/AndroidManifest.xml @@ -4,6 +4,8 @@ package="com.yourcompany.oscreceiver"> + + () + { + @Override + public BufferedInputStream call() throws IOException + { + return new BufferedInputStream (isInput ? connection.getInputStream() + : connection.getErrorStream()); + } + }); + } try { - inputStream = new BufferedInputStream (connection.getInputStream()); + if (connection.getConnectTimeout() > 0) + return streamFuture.get (connection.getConnectTimeout(), TimeUnit.MILLISECONDS); + else + return streamFuture.get(); + } + catch (InterruptedException e) + { + return null; + } + catch (TimeoutException e) + { + return null; + } + catch (CancellationException e) + { + return null; + } + } + + public final boolean connect() + { + try + { + try + { + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + inputStream = getCancellableStream (true); + } + } + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally + { + statusCode[0] = connection.getResponseCode(); + } + + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + try + { + if (statusCode[0] >= 400) + inputStream = getCancellableStream (false); + else + inputStream = getCancellableStream (true); + } + 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) { - if (connection.getResponseCode() < 400) - throw e; + return false; } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - if (statusCode[0] >= 400) - inputStream = connection.getErrorStream(); - else - inputStream = connection.getInputStream(); - - 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"); } public final void release() { + hasBeenCancelled.set (true); + try { - inputStream.close(); + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (inputStream != null) + inputStream.close(); } catch (IOException e) {} + finally + { + createStreamLock.unlock(); + } connection.disconnect(); } @@ -994,7 +1109,11 @@ public class OSCReceiver extends Activity try { - num = inputStream.read (buffer, 0, numBytes); + synchronized (createStreamLock) + { + if (inputStream != null) + num = inputStream.read (buffer, 0, numBytes); + } } catch (IOException e) {} @@ -1011,8 +1130,16 @@ public class OSCReceiver extends Activity public final boolean setPosition (long newPos) { return false; } private HttpURLConnection connection; + private int[] statusCode; + private StringBuffer responseHeaders; private InputStream inputStream; private long position; + private final ReentrantLock createStreamLock = new ReentrantLock(); + private final Object createFutureLock = new Object(); + private AtomicBoolean hasBeenCancelled = new AtomicBoolean(); + + private final ExecutorService executor = Executors.newCachedThreadPool (Executors.defaultThreadFactory()); + Future streamFuture; } public static final HTTPStream createHTTPStream (String address, boolean isPost, byte[] postData, diff --git a/examples/OSCReceiver/Builds/Android/app/src/release/res/values/string.xml b/examples/OSCReceiver/Builds/Android/app/src/release/res/values/string.xml new file mode 100644 index 0000000000..c0f08bbd6f --- /dev/null +++ b/examples/OSCReceiver/Builds/Android/app/src/release/res/values/string.xml @@ -0,0 +1,5 @@ + + + + OSCReceiver + diff --git a/examples/OSCReceiver/Builds/Android/build.gradle b/examples/OSCReceiver/Builds/Android/build.gradle index e1c0c91bb7..0109eaa02a 100644 --- a/examples/OSCReceiver/Builds/Android/build.gradle +++ b/examples/OSCReceiver/Builds/Android/build.gradle @@ -3,7 +3,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.1' + classpath 'com.android.tools.build:gradle:2.3.3' } } diff --git a/examples/OSCReceiver/Builds/LinuxMakefile/Makefile b/examples/OSCReceiver/Builds/LinuxMakefile/Makefile index 47bfafb0aa..a1fa60de4f 100644 --- a/examples/OSCReceiver/Builds/LinuxMakefile/Makefile +++ b/examples/OSCReceiver/Builds/LinuxMakefile/Makefile @@ -78,6 +78,8 @@ OBJECTS_APP := \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) @echo Linking "OSCReceiver - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) diff --git a/examples/OSCReceiver/Builds/MacOSX/OSCReceiver.xcodeproj/project.pbxproj b/examples/OSCReceiver/Builds/MacOSX/OSCReceiver.xcodeproj/project.pbxproj index b111e76da2..e084bcb848 100644 --- a/examples/OSCReceiver/Builds/MacOSX/OSCReceiver.xcodeproj/project.pbxproj +++ b/examples/OSCReceiver/Builds/MacOSX/OSCReceiver.xcodeproj/project.pbxproj @@ -94,7 +94,7 @@ 1CE4EC4CC850DCB4A4676A8A, C4C4A8503D11FA400E85EDB5, ); name = Source; sourceTree = ""; }; 35EA263E2229633CFF9BA17A = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -115,8 +115,9 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -124,7 +125,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 7FE2E6B09FEAE455422E1496 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -146,8 +147,9 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -156,16 +158,37 @@ USE_HEADERMAP = NO; }; name = Release; }; AEC2629A4CDDB6132D9118A8 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "OSCReceiver"; @@ -173,15 +196,36 @@ ZERO_LINK = NO; }; name = Debug; }; 1C079BE0437E0F0DC3C2E542 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "OSCReceiver"; WARNING_CFLAGS = -Wreorder; @@ -215,7 +259,7 @@ 2EA5C343F865CED412BD5E20, E95E181406F96A95EF81C474, 98DB1513FFCA4DC380991BE7, ); buildRules = ( ); dependencies = ( ); name = "OSCReceiver - App"; productName = OSCReceiver; productReference = 0AB2F0BDAF44CF1FE7BA007A; productType = "com.apple.product-type.application"; }; - 9CDCD4F1CF6D5405D574A953 = {isa = PBXProject; buildConfigurationList = 26D2BBF40A8AF71F3DDC53E0; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 5E1B6101A5D94EDEE60C306A = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 9C0E80FC020192937C98CFC2; projectDirPath = ""; projectRoot = ""; targets = (5E1B6101A5D94EDEE60C306A); }; + 9CDCD4F1CF6D5405D574A953 = {isa = PBXProject; buildConfigurationList = 26D2BBF40A8AF71F3DDC53E0; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 5E1B6101A5D94EDEE60C306A = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 9C0E80FC020192937C98CFC2; projectDirPath = ""; projectRoot = ""; targets = (5E1B6101A5D94EDEE60C306A); }; }; rootObject = 9CDCD4F1CF6D5405D574A953; } diff --git a/examples/OSCReceiver/Builds/VisualStudio2015/OSCReceiver.sln b/examples/OSCReceiver/Builds/VisualStudio2015/OSCReceiver.sln index fea221f971..e944356e5a 100644 --- a/examples/OSCReceiver/Builds/VisualStudio2015/OSCReceiver.sln +++ b/examples/OSCReceiver/Builds/VisualStudio2015/OSCReceiver.sln @@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A40EAB9E-5492-90CF-0F05-8362CD22E2D2}.Debug|Win32.Build.0 = Debug|Win32 {A40EAB9E-5492-90CF-0F05-8362CD22E2D2}.Debug|Win32.ActiveCfg = Debug|Win32 - {A40EAB9E-5492-90CF-0F05-8362CD22E2D2}.Release|Win32.Build.0 = Release|Win32 + {A40EAB9E-5492-90CF-0F05-8362CD22E2D2}.Debug|Win32.Build.0 = Debug|Win32 {A40EAB9E-5492-90CF-0F05-8362CD22E2D2}.Release|Win32.ActiveCfg = Release|Win32 + {A40EAB9E-5492-90CF-0F05-8362CD22E2D2}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/OSCReceiver/Builds/VisualStudio2015/OSCReceiver_App.vcxproj b/examples/OSCReceiver/Builds/VisualStudio2015/OSCReceiver_App.vcxproj index 23bdd1ac1b..88310a66f9 100644 --- a/examples/OSCReceiver/Builds/VisualStudio2015/OSCReceiver_App.vcxproj +++ b/examples/OSCReceiver/Builds/VisualStudio2015/OSCReceiver_App.vcxproj @@ -16,6 +16,7 @@ {A40EAB9E-5492-90CF-0F05-8362CD22E2D2} v140 + 8.1 Application false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ OSCReceiver true v140 + 8.1 @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -146,6 +153,9 @@ true + + true + true @@ -1527,6 +1537,7 @@ + diff --git a/examples/OSCReceiver/Builds/VisualStudio2015/OSCReceiver_App.vcxproj.filters b/examples/OSCReceiver/Builds/VisualStudio2015/OSCReceiver_App.vcxproj.filters index 3ed332687a..30bf034405 100644 --- a/examples/OSCReceiver/Builds/VisualStudio2015/OSCReceiver_App.vcxproj.filters +++ b/examples/OSCReceiver/Builds/VisualStudio2015/OSCReceiver_App.vcxproj.filters @@ -235,6 +235,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2163,6 +2166,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/OSCReceiver/Builds/VisualStudio2017/OSCReceiver.sln b/examples/OSCReceiver/Builds/VisualStudio2017/OSCReceiver.sln index cc2f265869..75e131ceda 100644 --- a/examples/OSCReceiver/Builds/VisualStudio2017/OSCReceiver.sln +++ b/examples/OSCReceiver/Builds/VisualStudio2017/OSCReceiver.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A40EAB9E-5492-90CF-0F05-8362CD22E2D2}.Debug|x64.Build.0 = Debug|x64 {A40EAB9E-5492-90CF-0F05-8362CD22E2D2}.Debug|x64.ActiveCfg = Debug|x64 - {A40EAB9E-5492-90CF-0F05-8362CD22E2D2}.Release|x64.Build.0 = Release|x64 + {A40EAB9E-5492-90CF-0F05-8362CD22E2D2}.Debug|x64.Build.0 = Debug|x64 {A40EAB9E-5492-90CF-0F05-8362CD22E2D2}.Release|x64.ActiveCfg = Release|x64 + {A40EAB9E-5492-90CF-0F05-8362CD22E2D2}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/OSCReceiver/Builds/VisualStudio2017/OSCReceiver_App.vcxproj b/examples/OSCReceiver/Builds/VisualStudio2017/OSCReceiver_App.vcxproj index 70621c3fd4..76ffe5de0a 100644 --- a/examples/OSCReceiver/Builds/VisualStudio2017/OSCReceiver_App.vcxproj +++ b/examples/OSCReceiver/Builds/VisualStudio2017/OSCReceiver_App.vcxproj @@ -16,6 +16,7 @@ {A40EAB9E-5492-90CF-0F05-8362CD22E2D2} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ OSCReceiver true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -145,6 +152,9 @@ true + + true + true @@ -1526,6 +1536,7 @@ + diff --git a/examples/OSCReceiver/Builds/VisualStudio2017/OSCReceiver_App.vcxproj.filters b/examples/OSCReceiver/Builds/VisualStudio2017/OSCReceiver_App.vcxproj.filters index 2eba98d777..e775880bb9 100644 --- a/examples/OSCReceiver/Builds/VisualStudio2017/OSCReceiver_App.vcxproj.filters +++ b/examples/OSCReceiver/Builds/VisualStudio2017/OSCReceiver_App.vcxproj.filters @@ -235,6 +235,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2163,6 +2166,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/OSCReceiver/Builds/iOS/OSCReceiver.xcodeproj/project.pbxproj b/examples/OSCReceiver/Builds/iOS/OSCReceiver.xcodeproj/project.pbxproj index 08cd067012..d482e5caaf 100644 --- a/examples/OSCReceiver/Builds/iOS/OSCReceiver.xcodeproj/project.pbxproj +++ b/examples/OSCReceiver/Builds/iOS/OSCReceiver.xcodeproj/project.pbxproj @@ -99,7 +99,7 @@ 35EA263E2229633CFF9BA17A = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -120,15 +120,16 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.OSCReceiver; USE_HEADERMAP = NO; }; name = Debug; }; 7FE2E6B09FEAE455422E1496 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -150,24 +151,46 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.OSCReceiver; USE_HEADERMAP = NO; }; name = Release; }; AEC2629A4CDDB6132D9118A8 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -179,15 +202,36 @@ 1C079BE0437E0F0DC3C2E542 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "OSCReceiver"; @@ -225,7 +269,7 @@ 2EA5C343F865CED412BD5E20, E95E181406F96A95EF81C474, 98DB1513FFCA4DC380991BE7, ); buildRules = ( ); dependencies = ( ); name = "OSCReceiver - App"; productName = OSCReceiver; productReference = 0AB2F0BDAF44CF1FE7BA007A; productType = "com.apple.product-type.application"; }; - 9CDCD4F1CF6D5405D574A953 = {isa = PBXProject; buildConfigurationList = 26D2BBF40A8AF71F3DDC53E0; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 5E1B6101A5D94EDEE60C306A = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 9C0E80FC020192937C98CFC2; projectDirPath = ""; projectRoot = ""; targets = (5E1B6101A5D94EDEE60C306A); }; + 9CDCD4F1CF6D5405D574A953 = {isa = PBXProject; buildConfigurationList = 26D2BBF40A8AF71F3DDC53E0; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 5E1B6101A5D94EDEE60C306A = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 9C0E80FC020192937C98CFC2; projectDirPath = ""; projectRoot = ""; targets = (5E1B6101A5D94EDEE60C306A); }; }; rootObject = 9CDCD4F1CF6D5405D574A953; } diff --git a/examples/OSCReceiver/JuceLibraryCode/AppConfig.h b/examples/OSCReceiver/JuceLibraryCode/AppConfig.h index 18d6e34707..0b8c06a249 100644 --- a/examples/OSCReceiver/JuceLibraryCode/AppConfig.h +++ b/examples/OSCReceiver/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -51,6 +57,90 @@ #define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 #define JUCE_MODULE_AVAILABLE_juce_osc 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -59,88 +149,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif diff --git a/examples/OSCReceiver/OSCReceiver.jucer b/examples/OSCReceiver/OSCReceiver.jucer index 849fac7351..26a7462405 100644 --- a/examples/OSCReceiver/OSCReceiver.jucer +++ b/examples/OSCReceiver/OSCReceiver.jucer @@ -2,8 +2,8 @@ + jucerVersion="5.1.0" displaySplashScreen="0" reportAppUsage="0" + splashScreenColour="Dark" companyName="ROLI Ltd." cppLanguageStandard="11"> diff --git a/examples/OSCSender/Builds/Android/app/CMakeLists.txt b/examples/OSCSender/Builds/Android/app/CMakeLists.txt index bab6e3d0dd..8bc11971ba 100644 --- a/examples/OSCSender/Builds/Android/app/CMakeLists.txt +++ b/examples/OSCSender/Builds/Android/app/CMakeLists.txt @@ -6,8 +6,9 @@ cmake_minimum_required(VERSION 3.4.1) SET(BINARY_NAME "juce_jni") add_library("cpufeatures" STATIC "${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c") +set_source_files_properties("${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" PROPERTIES COMPILE_FLAGS "-Wno-sign-conversion -Wno-gnu-statement-expression") -add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=10" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_yourcompany_oscsender_OSCSender" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/yourcompany/oscsender/OSCSender\"") +add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=10" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_yourcompany_oscsender_OSCSender" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/yourcompany/oscsender/OSCSender\"" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000") include_directories( AFTER "../../../JuceLibraryCode" @@ -37,6 +38,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/containers/juce_DynamicObject.h" "../../../../../modules/juce_core/containers/juce_ElementComparator.h" "../../../../../modules/juce_core/containers/juce_HashMap.h" + "../../../../../modules/juce_core/containers/juce_HashMap_test.cpp" "../../../../../modules/juce_core/containers/juce_LinkedListPointer.h" "../../../../../modules/juce_core/containers/juce_ListenerList.cpp" "../../../../../modules/juce_core/containers/juce_ListenerList.h" @@ -475,6 +477,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_graphics/native/juce_mac_IconHelpers.cpp" "../../../../../modules/juce_graphics/native/juce_RenderingHelpers.h" "../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp" + "../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.h" "../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp" "../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp" "../../../../../modules/juce_graphics/native/juce_win32_Fonts.cpp" @@ -786,6 +789,7 @@ set_source_files_properties("../../../../../modules/juce_core/containers/juce_Dy set_source_files_properties("../../../../../modules/juce_core/containers/juce_DynamicObject.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ElementComparator.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_HashMap.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_core/containers/juce_HashMap_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_LinkedListPointer.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ListenerList.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ListenerList.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1224,6 +1228,7 @@ set_source_files_properties("../../../../../modules/juce_graphics/native/juce_ma set_source_files_properties("../../../../../modules/juce_graphics/native/juce_mac_IconHelpers.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_RenderingHelpers.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Fonts.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/examples/OSCSender/Builds/Android/app/build.gradle b/examples/OSCSender/Builds/Android/app/build.gradle index 4c02f1443d..ca96cdda7e 100644 --- a/examples/OSCSender/Builds/Android/app/build.gradle +++ b/examples/OSCSender/Builds/Android/app/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 10 - buildToolsVersion "25.0.2" + buildToolsVersion "26.0.0" externalNativeBuild { cmake { path "CMakeLists.txt" @@ -52,18 +52,14 @@ android { } externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGFURATION=DEBUG" - cFlags "-O0" - cppFlags "-O0" + arguments "-DJUCE_BUILD_CONFIGFURATION=DEBUG", "-DCMAKE_CXX_FLAGS_DEBUG=-O0", "-DCMAKE_C_FLAGS_DEBUG=-O0" } } } release_ { externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGFURATION=RELEASE" - cFlags "-O3" - cppFlags "-O3" + arguments "-DJUCE_BUILD_CONFIGFURATION=RELEASE", "-DCMAKE_CXX_FLAGS_RELEASE=-O3", "-DCMAKE_C_FLAGS_RELEASE=-O3" } } } @@ -81,4 +77,11 @@ android { } } +repositories { } + +dependencies { +} + +} + diff --git a/examples/OSCSender/Builds/Android/app/src/main/res/values/string.xml b/examples/OSCSender/Builds/Android/app/src/debug/res/values/string.xml similarity index 100% rename from examples/OSCSender/Builds/Android/app/src/main/res/values/string.xml rename to examples/OSCSender/Builds/Android/app/src/debug/res/values/string.xml diff --git a/examples/OSCSender/Builds/Android/app/src/main/AndroidManifest.xml b/examples/OSCSender/Builds/Android/app/src/main/AndroidManifest.xml index 1060ff696f..ceeb4c12f6 100644 --- a/examples/OSCSender/Builds/Android/app/src/main/AndroidManifest.xml +++ b/examples/OSCSender/Builds/Android/app/src/main/AndroidManifest.xml @@ -4,6 +4,8 @@ package="com.yourcompany.oscsender"> + + () + { + @Override + public BufferedInputStream call() throws IOException + { + return new BufferedInputStream (isInput ? connection.getInputStream() + : connection.getErrorStream()); + } + }); + } try { - inputStream = new BufferedInputStream (connection.getInputStream()); + if (connection.getConnectTimeout() > 0) + return streamFuture.get (connection.getConnectTimeout(), TimeUnit.MILLISECONDS); + else + return streamFuture.get(); + } + catch (InterruptedException e) + { + return null; + } + catch (TimeoutException e) + { + return null; + } + catch (CancellationException e) + { + return null; + } + } + + public final boolean connect() + { + try + { + try + { + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + inputStream = getCancellableStream (true); + } + } + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally + { + statusCode[0] = connection.getResponseCode(); + } + + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + try + { + if (statusCode[0] >= 400) + inputStream = getCancellableStream (false); + else + inputStream = getCancellableStream (true); + } + 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) { - if (connection.getResponseCode() < 400) - throw e; + return false; } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - if (statusCode[0] >= 400) - inputStream = connection.getErrorStream(); - else - inputStream = connection.getInputStream(); - - 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"); } public final void release() { + hasBeenCancelled.set (true); + try { - inputStream.close(); + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (inputStream != null) + inputStream.close(); } catch (IOException e) {} + finally + { + createStreamLock.unlock(); + } connection.disconnect(); } @@ -994,7 +1109,11 @@ public class OSCSender extends Activity try { - num = inputStream.read (buffer, 0, numBytes); + synchronized (createStreamLock) + { + if (inputStream != null) + num = inputStream.read (buffer, 0, numBytes); + } } catch (IOException e) {} @@ -1011,8 +1130,16 @@ public class OSCSender extends Activity public final boolean setPosition (long newPos) { return false; } private HttpURLConnection connection; + private int[] statusCode; + private StringBuffer responseHeaders; private InputStream inputStream; private long position; + private final ReentrantLock createStreamLock = new ReentrantLock(); + private final Object createFutureLock = new Object(); + private AtomicBoolean hasBeenCancelled = new AtomicBoolean(); + + private final ExecutorService executor = Executors.newCachedThreadPool (Executors.defaultThreadFactory()); + Future streamFuture; } public static final HTTPStream createHTTPStream (String address, boolean isPost, byte[] postData, diff --git a/examples/OSCSender/Builds/Android/app/src/release/res/values/string.xml b/examples/OSCSender/Builds/Android/app/src/release/res/values/string.xml new file mode 100644 index 0000000000..807c8a59f3 --- /dev/null +++ b/examples/OSCSender/Builds/Android/app/src/release/res/values/string.xml @@ -0,0 +1,5 @@ + + + + OSCSender + diff --git a/examples/OSCSender/Builds/Android/build.gradle b/examples/OSCSender/Builds/Android/build.gradle index e1c0c91bb7..0109eaa02a 100644 --- a/examples/OSCSender/Builds/Android/build.gradle +++ b/examples/OSCSender/Builds/Android/build.gradle @@ -3,7 +3,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.1' + classpath 'com.android.tools.build:gradle:2.3.3' } } diff --git a/examples/OSCSender/Builds/LinuxMakefile/Makefile b/examples/OSCSender/Builds/LinuxMakefile/Makefile index 7d31dbbd10..bfcf0bffe1 100644 --- a/examples/OSCSender/Builds/LinuxMakefile/Makefile +++ b/examples/OSCSender/Builds/LinuxMakefile/Makefile @@ -76,6 +76,8 @@ OBJECTS_APP := \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) @echo Linking "OSCSender - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) diff --git a/examples/OSCSender/Builds/MacOSX/OSCSender.xcodeproj/project.pbxproj b/examples/OSCSender/Builds/MacOSX/OSCSender.xcodeproj/project.pbxproj index 8982b391f5..ca45a06a9a 100644 --- a/examples/OSCSender/Builds/MacOSX/OSCSender.xcodeproj/project.pbxproj +++ b/examples/OSCSender/Builds/MacOSX/OSCSender.xcodeproj/project.pbxproj @@ -81,7 +81,7 @@ A68DF290C9C5236595AEAEB7, E978A0812D52861A2786F473, ); name = Source; sourceTree = ""; }; A2C030EBB24C1B7344C6AE2B = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -102,8 +102,9 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -111,7 +112,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 78984703F810FFE630C99455 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -133,8 +134,9 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -143,16 +145,37 @@ USE_HEADERMAP = NO; }; name = Release; }; 37EE6DAA0F0B202D10D0995B = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "OSCSender"; @@ -160,15 +183,36 @@ ZERO_LINK = NO; }; name = Debug; }; 7EB14792C6494863A729B9F4 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "OSCSender"; WARNING_CFLAGS = -Wreorder; @@ -199,7 +243,7 @@ 1E9F219D82037569524E98CF, CDCF3ED48FB54EFBE0DD9046, 53E02F5676BF451851C9C06E, ); buildRules = ( ); dependencies = ( ); name = "OSCSender - App"; productName = OSCSender; productReference = E6F7F38EEF1BA55231F5B1D4; productType = "com.apple.product-type.application"; }; - 9CD8E1E30EDAF4E86990F260 = {isa = PBXProject; buildConfigurationList = ABFD3DA91CD9955D1FEC14F5; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 3D76C0E767055A9B4699DD95 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 168BF90B7EF8C12090B0A9B2; projectDirPath = ""; projectRoot = ""; targets = (3D76C0E767055A9B4699DD95); }; + 9CD8E1E30EDAF4E86990F260 = {isa = PBXProject; buildConfigurationList = ABFD3DA91CD9955D1FEC14F5; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 3D76C0E767055A9B4699DD95 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 168BF90B7EF8C12090B0A9B2; projectDirPath = ""; projectRoot = ""; targets = (3D76C0E767055A9B4699DD95); }; }; rootObject = 9CD8E1E30EDAF4E86990F260; } diff --git a/examples/OSCSender/Builds/VisualStudio2015/OSCSender.sln b/examples/OSCSender/Builds/VisualStudio2015/OSCSender.sln index b020465bb0..f19eacae90 100644 --- a/examples/OSCSender/Builds/VisualStudio2015/OSCSender.sln +++ b/examples/OSCSender/Builds/VisualStudio2015/OSCSender.sln @@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5B0FE56E-266D-A62C-D8A9-D1F5E7905AF2}.Debug|Win32.Build.0 = Debug|Win32 {5B0FE56E-266D-A62C-D8A9-D1F5E7905AF2}.Debug|Win32.ActiveCfg = Debug|Win32 - {5B0FE56E-266D-A62C-D8A9-D1F5E7905AF2}.Release|Win32.Build.0 = Release|Win32 + {5B0FE56E-266D-A62C-D8A9-D1F5E7905AF2}.Debug|Win32.Build.0 = Debug|Win32 {5B0FE56E-266D-A62C-D8A9-D1F5E7905AF2}.Release|Win32.ActiveCfg = Release|Win32 + {5B0FE56E-266D-A62C-D8A9-D1F5E7905AF2}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/OSCSender/Builds/VisualStudio2015/OSCSender_App.vcxproj b/examples/OSCSender/Builds/VisualStudio2015/OSCSender_App.vcxproj index 6adc375747..ac043b960c 100644 --- a/examples/OSCSender/Builds/VisualStudio2015/OSCSender_App.vcxproj +++ b/examples/OSCSender/Builds/VisualStudio2015/OSCSender_App.vcxproj @@ -16,6 +16,7 @@ {5B0FE56E-266D-A62C-D8A9-D1F5E7905AF2} v140 + 8.1 Application false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ OSCSender true v140 + 8.1 @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -146,6 +153,9 @@ true + + true + true @@ -1425,6 +1435,7 @@ + diff --git a/examples/OSCSender/Builds/VisualStudio2015/OSCSender_App.vcxproj.filters b/examples/OSCSender/Builds/VisualStudio2015/OSCSender_App.vcxproj.filters index b09d4260ee..f5ebf540d0 100644 --- a/examples/OSCSender/Builds/VisualStudio2015/OSCSender_App.vcxproj.filters +++ b/examples/OSCSender/Builds/VisualStudio2015/OSCSender_App.vcxproj.filters @@ -208,6 +208,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -1998,6 +2001,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/OSCSender/Builds/VisualStudio2017/OSCSender.sln b/examples/OSCSender/Builds/VisualStudio2017/OSCSender.sln index 00bb3dfa90..92fe5f48cc 100644 --- a/examples/OSCSender/Builds/VisualStudio2017/OSCSender.sln +++ b/examples/OSCSender/Builds/VisualStudio2017/OSCSender.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5B0FE56E-266D-A62C-D8A9-D1F5E7905AF2}.Debug|x64.Build.0 = Debug|x64 {5B0FE56E-266D-A62C-D8A9-D1F5E7905AF2}.Debug|x64.ActiveCfg = Debug|x64 - {5B0FE56E-266D-A62C-D8A9-D1F5E7905AF2}.Release|x64.Build.0 = Release|x64 + {5B0FE56E-266D-A62C-D8A9-D1F5E7905AF2}.Debug|x64.Build.0 = Debug|x64 {5B0FE56E-266D-A62C-D8A9-D1F5E7905AF2}.Release|x64.ActiveCfg = Release|x64 + {5B0FE56E-266D-A62C-D8A9-D1F5E7905AF2}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/OSCSender/Builds/VisualStudio2017/OSCSender_App.vcxproj b/examples/OSCSender/Builds/VisualStudio2017/OSCSender_App.vcxproj index ed5f375579..b7f2feb0e4 100644 --- a/examples/OSCSender/Builds/VisualStudio2017/OSCSender_App.vcxproj +++ b/examples/OSCSender/Builds/VisualStudio2017/OSCSender_App.vcxproj @@ -16,6 +16,7 @@ {5B0FE56E-266D-A62C-D8A9-D1F5E7905AF2} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ OSCSender true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -145,6 +152,9 @@ true + + true + true @@ -1424,6 +1434,7 @@ + diff --git a/examples/OSCSender/Builds/VisualStudio2017/OSCSender_App.vcxproj.filters b/examples/OSCSender/Builds/VisualStudio2017/OSCSender_App.vcxproj.filters index 14ee96dce8..0525d9fb58 100644 --- a/examples/OSCSender/Builds/VisualStudio2017/OSCSender_App.vcxproj.filters +++ b/examples/OSCSender/Builds/VisualStudio2017/OSCSender_App.vcxproj.filters @@ -208,6 +208,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -1998,6 +2001,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/OSCSender/Builds/iOS/OSCSender.xcodeproj/project.pbxproj b/examples/OSCSender/Builds/iOS/OSCSender.xcodeproj/project.pbxproj index 8f52e2a4d2..9adc62c7c9 100644 --- a/examples/OSCSender/Builds/iOS/OSCSender.xcodeproj/project.pbxproj +++ b/examples/OSCSender/Builds/iOS/OSCSender.xcodeproj/project.pbxproj @@ -89,7 +89,7 @@ A2C030EBB24C1B7344C6AE2B = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -110,15 +110,16 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.OSCSender; USE_HEADERMAP = NO; }; name = Debug; }; 78984703F810FFE630C99455 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -140,24 +141,46 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.OSCSender; USE_HEADERMAP = NO; }; name = Release; }; 37EE6DAA0F0B202D10D0995B = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -169,15 +192,36 @@ 7EB14792C6494863A729B9F4 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "OSCSender"; @@ -213,7 +257,7 @@ 1E9F219D82037569524E98CF, CDCF3ED48FB54EFBE0DD9046, 53E02F5676BF451851C9C06E, ); buildRules = ( ); dependencies = ( ); name = "OSCSender - App"; productName = OSCSender; productReference = E6F7F38EEF1BA55231F5B1D4; productType = "com.apple.product-type.application"; }; - 9CD8E1E30EDAF4E86990F260 = {isa = PBXProject; buildConfigurationList = ABFD3DA91CD9955D1FEC14F5; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 3D76C0E767055A9B4699DD95 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 168BF90B7EF8C12090B0A9B2; projectDirPath = ""; projectRoot = ""; targets = (3D76C0E767055A9B4699DD95); }; + 9CD8E1E30EDAF4E86990F260 = {isa = PBXProject; buildConfigurationList = ABFD3DA91CD9955D1FEC14F5; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 3D76C0E767055A9B4699DD95 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 168BF90B7EF8C12090B0A9B2; projectDirPath = ""; projectRoot = ""; targets = (3D76C0E767055A9B4699DD95); }; }; rootObject = 9CD8E1E30EDAF4E86990F260; } diff --git a/examples/OSCSender/JuceLibraryCode/AppConfig.h b/examples/OSCSender/JuceLibraryCode/AppConfig.h index c811797b8e..0c9e6ad80c 100644 --- a/examples/OSCSender/JuceLibraryCode/AppConfig.h +++ b/examples/OSCSender/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -49,6 +55,79 @@ #define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 #define JUCE_MODULE_AVAILABLE_juce_osc 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -57,77 +136,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif diff --git a/examples/OSCSender/OSCSender.jucer b/examples/OSCSender/OSCSender.jucer index faeeb64c32..26b7eff8bf 100644 --- a/examples/OSCSender/OSCSender.jucer +++ b/examples/OSCSender/OSCSender.jucer @@ -2,8 +2,8 @@ + jucerVersion="5.1.0" displaySplashScreen="0" reportAppUsage="0" + splashScreenColour="Dark" companyName="ROLI Ltd." cppLanguageStandard="11"> diff --git a/examples/OpenGLAppExample/Builds/MacOSX/OpenGLAppExample.xcodeproj/project.pbxproj b/examples/OpenGLAppExample/Builds/MacOSX/OpenGLAppExample.xcodeproj/project.pbxproj index 5c7b3cdd7a..2febd758b6 100644 --- a/examples/OpenGLAppExample/Builds/MacOSX/OpenGLAppExample.xcodeproj/project.pbxproj +++ b/examples/OpenGLAppExample/Builds/MacOSX/OpenGLAppExample.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ F2E327A47E10F43D6991A306 = {isa = PBXBuildFile; fileRef = 50151F5E1EA38C0768AD9AC8; }; 7FF434A451FC85BF1B79BC7F = {isa = PBXBuildFile; fileRef = 3948321FE783006946DC8F1F; }; F9B99B7794442B691803718A = {isa = PBXBuildFile; fileRef = CC144EDF680633EC54BB6C7C; }; + 1D983C056C6ECFB00C81D961 = {isa = PBXBuildFile; fileRef = F791D9DE9743A0D2CA3E81AD; }; 96CB0F03F9B80A334DEA2147 = {isa = PBXBuildFile; fileRef = DB3D37600C745E6F62C5A04B; }; 8A6D37A2A20E92532DE4CDE6 = {isa = PBXBuildFile; fileRef = A2A8888BB2A9B1BF61955BEA; }; 2A954B85CEC7CB6CDDE645AF = {isa = PBXBuildFile; fileRef = 8E5DB762FF5447085518EB85; }; @@ -84,6 +85,7 @@ DCA070129A9B3031E7342AF7 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_opengl"; path = "../../../../modules/juce_opengl"; sourceTree = "SOURCE_ROOT"; }; E388431BD28744CBA815E6D7 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_basics"; path = "../../../../modules/juce_audio_basics"; sourceTree = "SOURCE_ROOT"; }; EE9163FBAA413EB537932E47 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_video.mm"; path = "../../JuceLibraryCode/include_juce_video.mm"; sourceTree = "SOURCE_ROOT"; }; + F791D9DE9743A0D2CA3E81AD = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; }; FD8B62AE07B555A19D70A4A3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; }; A4D3B14A21B5F8202D2A49AE = {isa = PBXGroup; children = ( 7D21460B496E5E03FA58654B, ); name = Resources; sourceTree = ""; }; @@ -133,6 +135,7 @@ 50151F5E1EA38C0768AD9AC8, 3948321FE783006946DC8F1F, CC144EDF680633EC54BB6C7C, + F791D9DE9743A0D2CA3E81AD, DB3D37600C745E6F62C5A04B, A2A8888BB2A9B1BF61955BEA, 8E5DB762FF5447085518EB85, @@ -152,7 +155,7 @@ 6F68D1090F539F5A1A041FAA, 5D365257108A916858E3947F, ); name = Source; sourceTree = ""; }; F08A9A77D1D83904C32A87BF = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -173,8 +176,9 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -182,7 +186,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; B1560FC01F28141593B7C16C = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -204,8 +208,9 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -214,16 +219,37 @@ USE_HEADERMAP = NO; }; name = Release; }; 3132BF724B47EEFACACC0FF2 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "OpenGLAppExample"; @@ -231,15 +257,36 @@ ZERO_LINK = NO; }; name = Debug; }; 71C0F419A1E2F06DF9155ABE = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "OpenGLAppExample"; WARNING_CFLAGS = -Wreorder; @@ -274,6 +321,7 @@ F2E327A47E10F43D6991A306, 7FF434A451FC85BF1B79BC7F, F9B99B7794442B691803718A, + 1D983C056C6ECFB00C81D961, 96CB0F03F9B80A334DEA2147, 8A6D37A2A20E92532DE4CDE6, 2A954B85CEC7CB6CDDE645AF, @@ -287,7 +335,7 @@ 56C1AB4D5E9F6E55C4A4D18C, 9C76B98AD0B6E256C4C90D77, 9CAA70AAF55A5D696C59AA51, ); buildRules = ( ); dependencies = ( ); name = "OpenGLAppExample - App"; productName = OpenGLAppExample; productReference = 7451C664E0B1FF42F028813E; productType = "com.apple.product-type.application"; }; - 92078120DD024E75D724B8AB = {isa = PBXProject; buildConfigurationList = 46FEBDB3E8E7421830E627F2; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 9F2051B91F59B036C151A2F9 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 5EB8D0E327356FA2D5323013; projectDirPath = ""; projectRoot = ""; targets = (9F2051B91F59B036C151A2F9); }; + 92078120DD024E75D724B8AB = {isa = PBXProject; buildConfigurationList = 46FEBDB3E8E7421830E627F2; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 9F2051B91F59B036C151A2F9 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 5EB8D0E327356FA2D5323013; projectDirPath = ""; projectRoot = ""; targets = (9F2051B91F59B036C151A2F9); }; }; rootObject = 92078120DD024E75D724B8AB; } diff --git a/examples/OpenGLAppExample/Builds/VisualStudio2017/OpenGLAppExample.sln b/examples/OpenGLAppExample/Builds/VisualStudio2017/OpenGLAppExample.sln index 349d9131c9..c8b1162034 100644 --- a/examples/OpenGLAppExample/Builds/VisualStudio2017/OpenGLAppExample.sln +++ b/examples/OpenGLAppExample/Builds/VisualStudio2017/OpenGLAppExample.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {182ACA5F-046A-783D-4973-5D5DE8D7D5A5}.Debug|x64.Build.0 = Debug|x64 {182ACA5F-046A-783D-4973-5D5DE8D7D5A5}.Debug|x64.ActiveCfg = Debug|x64 - {182ACA5F-046A-783D-4973-5D5DE8D7D5A5}.Release|x64.Build.0 = Release|x64 + {182ACA5F-046A-783D-4973-5D5DE8D7D5A5}.Debug|x64.Build.0 = Debug|x64 {182ACA5F-046A-783D-4973-5D5DE8D7D5A5}.Release|x64.ActiveCfg = Release|x64 + {182ACA5F-046A-783D-4973-5D5DE8D7D5A5}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/OpenGLAppExample/Builds/VisualStudio2017/OpenGLAppExample_App.vcxproj b/examples/OpenGLAppExample/Builds/VisualStudio2017/OpenGLAppExample_App.vcxproj index 015b45f056..27f176b8ae 100644 --- a/examples/OpenGLAppExample/Builds/VisualStudio2017/OpenGLAppExample_App.vcxproj +++ b/examples/OpenGLAppExample/Builds/VisualStudio2017/OpenGLAppExample_App.vcxproj @@ -16,6 +16,7 @@ {182ACA5F-046A-783D-4973-5D5DE8D7D5A5} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ OpenGLAppExample true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -521,6 +525,9 @@ true + + true + true @@ -1673,13 +1680,7 @@ true - - true - - - true - - + true @@ -1709,7 +1710,6 @@ - @@ -1729,10 +1729,12 @@ + + @@ -1838,7 +1840,6 @@ - @@ -2104,6 +2105,7 @@ + @@ -2288,8 +2290,12 @@ - - + + + + + + diff --git a/examples/OpenGLAppExample/Builds/VisualStudio2017/OpenGLAppExample_App.vcxproj.filters b/examples/OpenGLAppExample/Builds/VisualStudio2017/OpenGLAppExample_App.vcxproj.filters index 57a9abc0d4..1deb4d3fbf 100644 --- a/examples/OpenGLAppExample/Builds/VisualStudio2017/OpenGLAppExample_App.vcxproj.filters +++ b/examples/OpenGLAppExample/Builds/VisualStudio2017/OpenGLAppExample_App.vcxproj.filters @@ -26,6 +26,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -376,9 +379,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -439,6 +439,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -661,9 +664,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -760,6 +760,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -1996,20 +1999,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2085,9 +2076,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2145,6 +2133,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2157,6 +2148,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2472,9 +2466,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3270,6 +3261,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -3822,10 +3816,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/OpenGLAppExample/Builds/iOS/OpenGLAppExample.xcodeproj/project.pbxproj b/examples/OpenGLAppExample/Builds/iOS/OpenGLAppExample.xcodeproj/project.pbxproj index d40c6d719d..60e9bca984 100644 --- a/examples/OpenGLAppExample/Builds/iOS/OpenGLAppExample.xcodeproj/project.pbxproj +++ b/examples/OpenGLAppExample/Builds/iOS/OpenGLAppExample.xcodeproj/project.pbxproj @@ -10,9 +10,11 @@ F2E327A47E10F43D6991A306 = {isa = PBXBuildFile; fileRef = 50151F5E1EA38C0768AD9AC8; }; 7FF434A451FC85BF1B79BC7F = {isa = PBXBuildFile; fileRef = 3948321FE783006946DC8F1F; }; F9B99B7794442B691803718A = {isa = PBXBuildFile; fileRef = CC144EDF680633EC54BB6C7C; }; + 1D983C056C6ECFB00C81D961 = {isa = PBXBuildFile; fileRef = F791D9DE9743A0D2CA3E81AD; }; 2A954B85CEC7CB6CDDE645AF = {isa = PBXBuildFile; fileRef = 8E5DB762FF5447085518EB85; }; 8F43218E0AFA8FBC12C39860 = {isa = PBXBuildFile; fileRef = C3C776709CFEB52B87A9E260; }; 9B23B0143CF257E772E3EC46 = {isa = PBXBuildFile; fileRef = 5108DE103BDE300CC23F1F30; }; + B1C1BA36367047159A75EB5B = {isa = PBXBuildFile; fileRef = D7DC63734E1547DC3C511DCE; }; 3BFCAE441B663BD739FBCCB4 = {isa = PBXBuildFile; fileRef = 6CDDF198D9632DA763449E05; }; 5AE83D61A34B2B62A0610EBB = {isa = PBXBuildFile; fileRef = 9D95CB2E713755CD61842774; }; 3FCDCEFCE3D77BE1FC8A1E17 = {isa = PBXBuildFile; fileRef = 740AFAC150EAC7E6A6D6E6FA; }; @@ -81,9 +83,11 @@ C3C776709CFEB52B87A9E260 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; CC144EDF680633EC54BB6C7C = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; CD873394654FB45C06EA0471 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_events"; path = "../../../../modules/juce_events"; sourceTree = "SOURCE_ROOT"; }; + D7DC63734E1547DC3C511DCE = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; DCA070129A9B3031E7342AF7 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_opengl"; path = "../../../../modules/juce_opengl"; sourceTree = "SOURCE_ROOT"; }; E388431BD28744CBA815E6D7 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_basics"; path = "../../../../modules/juce_audio_basics"; sourceTree = "SOURCE_ROOT"; }; EE9163FBAA413EB537932E47 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_video.mm"; path = "../../JuceLibraryCode/include_juce_video.mm"; sourceTree = "SOURCE_ROOT"; }; + F791D9DE9743A0D2CA3E81AD = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; }; FD8B62AE07B555A19D70A4A3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; }; A4D3B14A21B5F8202D2A49AE = {isa = PBXGroup; children = ( 7D21460B496E5E03FA58654B, ); name = Resources; sourceTree = ""; }; @@ -133,9 +137,11 @@ 50151F5E1EA38C0768AD9AC8, 3948321FE783006946DC8F1F, CC144EDF680633EC54BB6C7C, + F791D9DE9743A0D2CA3E81AD, 8E5DB762FF5447085518EB85, C3C776709CFEB52B87A9E260, 5108DE103BDE300CC23F1F30, + D7DC63734E1547DC3C511DCE, 6CDDF198D9632DA763449E05, 9D95CB2E713755CD61842774, 740AFAC150EAC7E6A6D6E6FA, @@ -154,7 +160,7 @@ F08A9A77D1D83904C32A87BF = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -175,15 +181,16 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.OpenGLAppExample; USE_HEADERMAP = NO; }; name = Debug; }; B1560FC01F28141593B7C16C = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -205,24 +212,46 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.OpenGLAppExample; USE_HEADERMAP = NO; }; name = Release; }; 3132BF724B47EEFACACC0FF2 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -234,15 +263,36 @@ 71C0F419A1E2F06DF9155ABE = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "OpenGLAppExample"; @@ -280,9 +330,11 @@ F2E327A47E10F43D6991A306, 7FF434A451FC85BF1B79BC7F, F9B99B7794442B691803718A, + 1D983C056C6ECFB00C81D961, 2A954B85CEC7CB6CDDE645AF, 8F43218E0AFA8FBC12C39860, 9B23B0143CF257E772E3EC46, + B1C1BA36367047159A75EB5B, 3BFCAE441B663BD739FBCCB4, 5AE83D61A34B2B62A0610EBB, 3FCDCEFCE3D77BE1FC8A1E17, @@ -293,7 +345,7 @@ 56C1AB4D5E9F6E55C4A4D18C, 9C76B98AD0B6E256C4C90D77, 9CAA70AAF55A5D696C59AA51, ); buildRules = ( ); dependencies = ( ); name = "OpenGLAppExample - App"; productName = OpenGLAppExample; productReference = 7451C664E0B1FF42F028813E; productType = "com.apple.product-type.application"; }; - 92078120DD024E75D724B8AB = {isa = PBXProject; buildConfigurationList = 46FEBDB3E8E7421830E627F2; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 9F2051B91F59B036C151A2F9 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 5EB8D0E327356FA2D5323013; projectDirPath = ""; projectRoot = ""; targets = (9F2051B91F59B036C151A2F9); }; + 92078120DD024E75D724B8AB = {isa = PBXProject; buildConfigurationList = 46FEBDB3E8E7421830E627F2; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 9F2051B91F59B036C151A2F9 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 5EB8D0E327356FA2D5323013; projectDirPath = ""; projectRoot = ""; targets = (9F2051B91F59B036C151A2F9); }; }; rootObject = 92078120DD024E75D724B8AB; } diff --git a/examples/OpenGLAppExample/JuceLibraryCode/AppConfig.h b/examples/OpenGLAppExample/JuceLibraryCode/AppConfig.h index 89980ac4f4..cbc91df3ac 100644 --- a/examples/OpenGLAppExample/JuceLibraryCode/AppConfig.h +++ b/examples/OpenGLAppExample/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -56,6 +62,170 @@ #define JUCE_MODULE_AVAILABLE_juce_opengl 1 #define JUCE_MODULE_AVAILABLE_juce_video 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif + +//============================================================================== +// juce_video flags: + +#ifndef JUCE_USE_CAMERA + //#define JUCE_USE_CAMERA 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -64,180 +234,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif - -//============================================================================== -// juce_video flags: - -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - //#define JUCE_QUICKTIME -#endif - -#ifndef JUCE_USE_CAMERA - //#define JUCE_USE_CAMERA -#endif diff --git a/examples/OpenGLAppExample/OpenGLAppExample.jucer b/examples/OpenGLAppExample/OpenGLAppExample.jucer index eee2247715..51d7e15283 100644 --- a/examples/OpenGLAppExample/OpenGLAppExample.jucer +++ b/examples/OpenGLAppExample/OpenGLAppExample.jucer @@ -2,8 +2,8 @@ + jucerVersion="5.1.0" displaySplashScreen="0" reportAppUsage="0" + splashScreenColour="Dark" companyName="ROLI Ltd." cppLanguageStandard="11"> diff --git a/examples/PluckedStringsDemo/Builds/MacOSX/PluckedStringsDemo.xcodeproj/project.pbxproj b/examples/PluckedStringsDemo/Builds/MacOSX/PluckedStringsDemo.xcodeproj/project.pbxproj index 5b79e410f6..23a057817b 100644 --- a/examples/PluckedStringsDemo/Builds/MacOSX/PluckedStringsDemo.xcodeproj/project.pbxproj +++ b/examples/PluckedStringsDemo/Builds/MacOSX/PluckedStringsDemo.xcodeproj/project.pbxproj @@ -128,7 +128,7 @@ 5EB92310230AD637515B4497, 523A7ACD38232D3FDF284960, ); name = Source; sourceTree = ""; }; 7D76E0A2FCFE69F148B1F16C = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -149,8 +149,9 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -158,7 +159,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; FDEFB240EE2325D0CAEF2186 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -180,8 +181,9 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -190,16 +192,37 @@ USE_HEADERMAP = NO; }; name = Release; }; 501C3AFCB1DADC94A49F25E8 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "PluckedStringsDemo"; @@ -207,15 +230,36 @@ ZERO_LINK = NO; }; name = Debug; }; D7116658BB17E924C59B4076 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "PluckedStringsDemo"; WARNING_CFLAGS = -Wreorder; @@ -257,7 +301,7 @@ 28277E0496F9A366F1E8A121, 5EDB4F61A6B9E9073901673E, 922CC2B83A0B55C36D188E46, ); buildRules = ( ); dependencies = ( ); name = "PluckedStringsDemo - App"; productName = PluckedStringsDemo; productReference = 3A8608CBA979E2BD17B50D0E; productType = "com.apple.product-type.application"; }; - 209D68C0E5F80B54B99D6435 = {isa = PBXProject; buildConfigurationList = DE12D5F044F75EB7B3CF17BB; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { B15B6C659E27D8982A94F805 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = B4D11720461A13D5D9F3E047; projectDirPath = ""; projectRoot = ""; targets = (B15B6C659E27D8982A94F805); }; + 209D68C0E5F80B54B99D6435 = {isa = PBXProject; buildConfigurationList = DE12D5F044F75EB7B3CF17BB; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { B15B6C659E27D8982A94F805 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = B4D11720461A13D5D9F3E047; projectDirPath = ""; projectRoot = ""; targets = (B15B6C659E27D8982A94F805); }; }; rootObject = 209D68C0E5F80B54B99D6435; } diff --git a/examples/PluckedStringsDemo/Builds/VisualStudio2013/PluckedStringsDemo.sln b/examples/PluckedStringsDemo/Builds/VisualStudio2013/PluckedStringsDemo.sln index d0f5c7dfc1..e2376ef5de 100644 --- a/examples/PluckedStringsDemo/Builds/VisualStudio2013/PluckedStringsDemo.sln +++ b/examples/PluckedStringsDemo/Builds/VisualStudio2013/PluckedStringsDemo.sln @@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A05B4CDE-58D3-4400-5280-63574E9C8D46}.Debug|Win32.Build.0 = Debug|Win32 {A05B4CDE-58D3-4400-5280-63574E9C8D46}.Debug|Win32.ActiveCfg = Debug|Win32 - {A05B4CDE-58D3-4400-5280-63574E9C8D46}.Release|Win32.Build.0 = Release|Win32 + {A05B4CDE-58D3-4400-5280-63574E9C8D46}.Debug|Win32.Build.0 = Debug|Win32 {A05B4CDE-58D3-4400-5280-63574E9C8D46}.Release|Win32.ActiveCfg = Release|Win32 + {A05B4CDE-58D3-4400-5280-63574E9C8D46}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/PluckedStringsDemo/Builds/VisualStudio2013/PluckedStringsDemo_App.vcxproj b/examples/PluckedStringsDemo/Builds/VisualStudio2013/PluckedStringsDemo_App.vcxproj index 95de987462..30d7829e1e 100644 --- a/examples/PluckedStringsDemo/Builds/VisualStudio2013/PluckedStringsDemo_App.vcxproj +++ b/examples/PluckedStringsDemo/Builds/VisualStudio2013/PluckedStringsDemo_App.vcxproj @@ -16,6 +16,7 @@ {A05B4CDE-58D3-4400-5280-63574E9C8D46} v120 + 8.1 Application false v120 + 8.1 @@ -30,6 +32,7 @@ false true v120 + 8.1 @@ -40,6 +43,7 @@ v120 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ PluckedStringsDemo true v120 + 8.1 @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -569,6 +573,9 @@ true + + true + true @@ -1690,7 +1697,6 @@ - @@ -1710,10 +1716,12 @@ + + @@ -1819,7 +1827,6 @@ - @@ -2091,6 +2098,7 @@ + diff --git a/examples/PluckedStringsDemo/Builds/VisualStudio2013/PluckedStringsDemo_App.vcxproj.filters b/examples/PluckedStringsDemo/Builds/VisualStudio2013/PluckedStringsDemo_App.vcxproj.filters index fab6b6882d..857b4addc6 100644 --- a/examples/PluckedStringsDemo/Builds/VisualStudio2013/PluckedStringsDemo_App.vcxproj.filters +++ b/examples/PluckedStringsDemo/Builds/VisualStudio2013/PluckedStringsDemo_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -349,9 +352,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -412,6 +412,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -634,9 +637,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -796,6 +796,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2037,9 +2040,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2097,6 +2097,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2109,6 +2112,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2424,9 +2430,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3240,6 +3243,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/PluckedStringsDemo/Builds/VisualStudio2017/PluckedStringsDemo.sln b/examples/PluckedStringsDemo/Builds/VisualStudio2017/PluckedStringsDemo.sln index 761214a825..9321368a85 100644 --- a/examples/PluckedStringsDemo/Builds/VisualStudio2017/PluckedStringsDemo.sln +++ b/examples/PluckedStringsDemo/Builds/VisualStudio2017/PluckedStringsDemo.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A05B4CDE-58D3-4400-5280-63574E9C8D46}.Debug|x64.Build.0 = Debug|x64 {A05B4CDE-58D3-4400-5280-63574E9C8D46}.Debug|x64.ActiveCfg = Debug|x64 - {A05B4CDE-58D3-4400-5280-63574E9C8D46}.Release|x64.Build.0 = Release|x64 + {A05B4CDE-58D3-4400-5280-63574E9C8D46}.Debug|x64.Build.0 = Debug|x64 {A05B4CDE-58D3-4400-5280-63574E9C8D46}.Release|x64.ActiveCfg = Release|x64 + {A05B4CDE-58D3-4400-5280-63574E9C8D46}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/PluckedStringsDemo/Builds/VisualStudio2017/PluckedStringsDemo_App.vcxproj b/examples/PluckedStringsDemo/Builds/VisualStudio2017/PluckedStringsDemo_App.vcxproj index f88b860842..d91aa65a85 100644 --- a/examples/PluckedStringsDemo/Builds/VisualStudio2017/PluckedStringsDemo_App.vcxproj +++ b/examples/PluckedStringsDemo/Builds/VisualStudio2017/PluckedStringsDemo_App.vcxproj @@ -16,6 +16,7 @@ {A05B4CDE-58D3-4400-5280-63574E9C8D46} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ PluckedStringsDemo true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -151,9 +158,6 @@ true - - true - true @@ -214,6 +218,9 @@ true + + true + true @@ -430,9 +437,6 @@ true - - true - true @@ -568,6 +572,9 @@ true + + true + true @@ -1689,7 +1696,6 @@ - @@ -1709,10 +1715,12 @@ + + @@ -1818,7 +1826,6 @@ - @@ -2090,6 +2097,7 @@ + diff --git a/examples/PluckedStringsDemo/Builds/VisualStudio2017/PluckedStringsDemo_App.vcxproj.filters b/examples/PluckedStringsDemo/Builds/VisualStudio2017/PluckedStringsDemo_App.vcxproj.filters index 877827023e..38cf63b277 100644 --- a/examples/PluckedStringsDemo/Builds/VisualStudio2017/PluckedStringsDemo_App.vcxproj.filters +++ b/examples/PluckedStringsDemo/Builds/VisualStudio2017/PluckedStringsDemo_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -349,9 +352,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -412,6 +412,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -634,9 +637,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -796,6 +796,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2037,9 +2040,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2097,6 +2097,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2109,6 +2112,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2424,9 +2430,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3240,6 +3243,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/PluckedStringsDemo/JuceLibraryCode/AppConfig.h b/examples/PluckedStringsDemo/JuceLibraryCode/AppConfig.h index 0c0ae04d52..3297659b93 100644 --- a/examples/PluckedStringsDemo/JuceLibraryCode/AppConfig.h +++ b/examples/PluckedStringsDemo/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -54,6 +60,174 @@ #define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 #define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -62,172 +236,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_audio_utils flags: - -#ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER -#endif - -#ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif diff --git a/examples/PluckedStringsDemo/PluckedStringsDemo.jucer b/examples/PluckedStringsDemo/PluckedStringsDemo.jucer index d90e049383..e39f801677 100644 --- a/examples/PluckedStringsDemo/PluckedStringsDemo.jucer +++ b/examples/PluckedStringsDemo/PluckedStringsDemo.jucer @@ -2,8 +2,8 @@ + jucerVersion="5.1.0" displaySplashScreen="0" reportAppUsage="0" + splashScreenColour="Dark" companyName="ROLI Ltd." cppLanguageStandard="11"> + enableIAA="0" displaySplashScreen="0" reportAppUsage="0" splashScreenColour="Dark" + cppLanguageStandard="11"> - + diff --git a/examples/PlugInSamples/Arpeggiator/Builds/MacOSX/Arpeggiator.xcodeproj/project.pbxproj b/examples/PlugInSamples/Arpeggiator/Builds/MacOSX/Arpeggiator.xcodeproj/project.pbxproj index 8787e90506..bb76653458 100644 --- a/examples/PlugInSamples/Arpeggiator/Builds/MacOSX/Arpeggiator.xcodeproj/project.pbxproj +++ b/examples/PlugInSamples/Arpeggiator/Builds/MacOSX/Arpeggiator.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ D0DA0BDE4746B7B12FD847CF = {isa = PBXBuildFile; fileRef = AC840D910B076A8D6E11D0E3; }; 762272ABD27938B84C8E9CB1 = {isa = PBXBuildFile; fileRef = 6965419522A8F4EE3C0E2F45; }; BF943B39DF6CAEF466FDEE9F = {isa = PBXBuildFile; fileRef = 72397638CA72E3953957CF97; }; + 95BEE60865061CC70522E3F0 = {isa = PBXBuildFile; fileRef = 30BD38248938ADACB208BCE6; }; 6AAE082359758785B89D3620 = {isa = PBXBuildFile; fileRef = 79BAABFF142E737F1B69E92D; }; 35F81D0026609F1B1F03C592 = {isa = PBXBuildFile; fileRef = 9C24A5EC057F1DF3D288143C; }; 8A0C4A63928476A51A5ABA85 = {isa = PBXBuildFile; fileRef = 56D6FCED08A719CBB031E441; }; @@ -54,17 +55,18 @@ 2B44B90F3CEDD45A731586AD = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; }; 2F12CFEB1E95BC54E1CD3C7D = {isa = PBXFileReference; lastKnownFileType = file.nib; name = RecentFilesMenuTemplate.nib; path = RecentFilesMenuTemplate.nib; sourceTree = "SOURCE_ROOT"; }; 300E6ADCFB36DD743EED4531 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; + 30BD38248938ADACB208BCE6 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; }; 3E5564A1657A5094900B05E9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_basics.mm"; path = "../../JuceLibraryCode/include_juce_audio_basics.mm"; sourceTree = "SOURCE_ROOT"; }; + 427916B14A13C9592134DE85 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; 4CD86AD12C974AF8686B6F9E = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_plugin_client_VST_utils.mm"; path = "../../JuceLibraryCode/include_juce_audio_plugin_client_VST_utils.mm"; sourceTree = "SOURCE_ROOT"; }; 506896452A740D03C9E5E254 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_opengl.mm"; path = "../../JuceLibraryCode/include_juce_opengl.mm"; sourceTree = "SOURCE_ROOT"; }; - 5D388CC3880062CA7D34DAC7 = {isa = PBXFileReference; lastKnownFileType = file.r; name = "include_juce_audio_plugin_client_AU.r"; path = "../../JuceLibraryCode/include_juce_audio_plugin_client_AU.r"; sourceTree = "SOURCE_ROOT"; }; - 625312519BED207C9047A862 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_formats.mm"; path = "../../JuceLibraryCode/include_juce_audio_formats.mm"; sourceTree = "SOURCE_ROOT"; }; B7A2991D3F6CDC78EE921F1D = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Arpeggiator.vst; sourceTree = "BUILT_PRODUCTS_DIR"; }; 40D80A7071E7DF99EF20511D = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Arpeggiator.component; sourceTree = "BUILT_PRODUCTS_DIR"; }; - 427916B14A13C9592134DE85 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; 509EAB8A04273892F0DFB9AD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; }; 56D6FCED08A719CBB031E441 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; + 5D388CC3880062CA7D34DAC7 = {isa = PBXFileReference; lastKnownFileType = file.r; name = "include_juce_audio_plugin_client_AU.r"; path = "../../JuceLibraryCode/include_juce_audio_plugin_client_AU.r"; sourceTree = "SOURCE_ROOT"; }; 610811262821957123FBBAA5 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_core"; path = "../../../../../modules/juce_core"; sourceTree = "SOURCE_ROOT"; }; + 625312519BED207C9047A862 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_formats.mm"; path = "../../JuceLibraryCode/include_juce_audio_formats.mm"; sourceTree = "SOURCE_ROOT"; }; 6965419522A8F4EE3C0E2F45 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; 6C612817F52B969A5F16CE94 = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libArpeggiator.a; sourceTree = "BUILT_PRODUCTS_DIR"; }; 6D6B8C8C2F02E290AAFF57D1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_plugin_client_AU_1.mm"; path = "../../JuceLibraryCode/include_juce_audio_plugin_client_AU_1.mm"; sourceTree = "SOURCE_ROOT"; }; @@ -151,6 +153,7 @@ AC840D910B076A8D6E11D0E3, 6965419522A8F4EE3C0E2F45, 72397638CA72E3953957CF97, + 30BD38248938ADACB208BCE6, 79BAABFF142E737F1B69E92D, 9C24A5EC057F1DF3D288143C, 56D6FCED08A719CBB031E441, @@ -176,7 +179,7 @@ 6A83695CF366C87636A392BE = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; 024F8B1B5C243015CA8FEF35 = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; D83A1735FBD5B491316453B8 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -202,18 +205,19 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "../../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-VST.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; OTHER_LDFLAGS = "-bundle -lArpeggiator"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.Arpeggiator; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; WRAPPER_EXTENSION = vst; }; name = Debug; }; AC0ABA95F0350939E21390E1 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -240,18 +244,19 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "../../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-VST.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; OTHER_LDFLAGS = "-bundle -lArpeggiator"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.Arpeggiator; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; WRAPPER_EXTENSION = vst; }; name = Release; }; 575D0AC8DD9926D1C8349BE2 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -277,11 +282,12 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "../../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-AU.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; OTHER_LDFLAGS = "-bundle -lArpeggiator"; OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\""; PRODUCT_BUNDLE_IDENTIFIER = com.roli.Arpeggiator; @@ -289,7 +295,7 @@ USE_HEADERMAP = NO; WRAPPER_EXTENSION = component; }; name = Debug; }; 6B6E02F5844A057FE3738154 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -316,11 +322,12 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "../../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-AU.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; OTHER_LDFLAGS = "-bundle -lArpeggiator"; OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\""; PRODUCT_BUNDLE_IDENTIFIER = com.roli.Arpeggiator; @@ -328,7 +335,7 @@ USE_HEADERMAP = NO; WRAPPER_EXTENSION = component; }; name = Release; }; 47B6BE82623EE30A5AA944A2 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -354,12 +361,12 @@ INSTALL_PATH = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.Arpeggiator; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 3C43BDBC68E42CE3DAB2F269 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -386,22 +393,43 @@ INSTALL_PATH = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.Arpeggiator; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Release; }; A6E581C14CB7121F9770B6E8 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "Arpeggiator"; @@ -409,15 +437,36 @@ ZERO_LINK = NO; }; name = Debug; }; EFCCE2C580425A3CD207D953 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "Arpeggiator"; WARNING_CFLAGS = -Wreorder; @@ -446,6 +495,7 @@ E1EAF7A85355978D529D0FAA, D0DA0BDE4746B7B12FD847CF, BF943B39DF6CAEF466FDEE9F, + 95BEE60865061CC70522E3F0, 6AAE082359758785B89D3620, 35F81D0026609F1B1F03C592, 8A0C4A63928476A51A5ABA85, @@ -475,6 +525,7 @@ D0DA0BDE4746B7B12FD847CF, 762272ABD27938B84C8E9CB1, BF943B39DF6CAEF466FDEE9F, + 95BEE60865061CC70522E3F0, 6AAE082359758785B89D3620, 35F81D0026609F1B1F03C592, 8A0C4A63928476A51A5ABA85, @@ -513,7 +564,7 @@ 2B8F857D37C80F13FC988EB2, ); runOnlyForDeploymentPostprocessing = 0; }; 319717B733C323BE76160BD4 = {isa = PBXNativeTarget; buildConfigurationList = AFF7B7B2889999928579D32F; buildPhases = ( 1CDAF3706AC2D6D164846859, ); buildRules = ( ); dependencies = ( ); name = "Arpeggiator - Shared Code"; productName = Arpeggiator; productReference = 6C612817F52B969A5F16CE94; productType = "com.apple.product-type.library.static"; }; - 4A5323BE8842B95E4FCCD6ED = {isa = PBXProject; buildConfigurationList = B601BADC34558F9AD61C80D7; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 08D74DB290FCD09A8D4810BB = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };892A28E616D56F05C8C11049 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };07D9D33E3466A8A497086BEE = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };319717B733C323BE76160BD4 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 7678EFC533FC99BEEF151913; projectDirPath = ""; projectRoot = ""; targets = (08D74DB290FCD09A8D4810BB, 892A28E616D56F05C8C11049, 07D9D33E3466A8A497086BEE, 319717B733C323BE76160BD4); }; + 4A5323BE8842B95E4FCCD6ED = {isa = PBXProject; buildConfigurationList = B601BADC34558F9AD61C80D7; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 08D74DB290FCD09A8D4810BB = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };892A28E616D56F05C8C11049 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };07D9D33E3466A8A497086BEE = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };319717B733C323BE76160BD4 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 7678EFC533FC99BEEF151913; projectDirPath = ""; projectRoot = ""; targets = (08D74DB290FCD09A8D4810BB, 892A28E616D56F05C8C11049, 07D9D33E3466A8A497086BEE, 319717B733C323BE76160BD4); }; }; rootObject = 4A5323BE8842B95E4FCCD6ED; } diff --git a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator.sln b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator.sln index d8330cff42..3ee3838997 100644 --- a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator.sln +++ b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator.sln @@ -14,14 +14,14 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7B4A2CB7-0625-C36D-39FB-C651743A206F}.Debug|Win32.Build.0 = Debug|Win32 {7B4A2CB7-0625-C36D-39FB-C651743A206F}.Debug|Win32.ActiveCfg = Debug|Win32 - {7B4A2CB7-0625-C36D-39FB-C651743A206F}.Release|Win32.Build.0 = Release|Win32 + {7B4A2CB7-0625-C36D-39FB-C651743A206F}.Debug|Win32.Build.0 = Debug|Win32 {7B4A2CB7-0625-C36D-39FB-C651743A206F}.Release|Win32.ActiveCfg = Release|Win32 - {7B14DB3F-59CC-58D2-4DC7-03A1BD2836FB}.Debug|Win32.Build.0 = Debug|Win32 + {7B4A2CB7-0625-C36D-39FB-C651743A206F}.Release|Win32.Build.0 = Release|Win32 {7B14DB3F-59CC-58D2-4DC7-03A1BD2836FB}.Debug|Win32.ActiveCfg = Debug|Win32 - {7B14DB3F-59CC-58D2-4DC7-03A1BD2836FB}.Release|Win32.Build.0 = Release|Win32 + {7B14DB3F-59CC-58D2-4DC7-03A1BD2836FB}.Debug|Win32.Build.0 = Debug|Win32 {7B14DB3F-59CC-58D2-4DC7-03A1BD2836FB}.Release|Win32.ActiveCfg = Release|Win32 + {7B14DB3F-59CC-58D2-4DC7-03A1BD2836FB}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator_SharedCode.vcxproj b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator_SharedCode.vcxproj index f2682d704c..4af1d21575 100644 --- a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator_SharedCode.vcxproj +++ b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator_SharedCode.vcxproj @@ -16,6 +16,7 @@ {7B14DB3F-59CC-58D2-4DC7-03A1BD2836FB} v140 + 8.1 StaticLibrary false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ Arpeggiator true v140 + 8.1 @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -158,9 +165,6 @@ true - - true - true @@ -221,6 +225,9 @@ true + + true + true @@ -437,9 +444,6 @@ true - - true - true @@ -599,6 +603,9 @@ true + + true + true @@ -1751,13 +1758,7 @@ true - - true - - - true - - + true @@ -1786,7 +1787,6 @@ - @@ -1806,10 +1806,12 @@ + + @@ -1915,7 +1917,6 @@ - @@ -2227,6 +2228,7 @@ + @@ -2411,8 +2413,12 @@ - - + + + + + + diff --git a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator_SharedCode.vcxproj.filters b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator_SharedCode.vcxproj.filters index f5ae004a5e..2eabc6b132 100644 --- a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator_SharedCode.vcxproj.filters +++ b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator_SharedCode.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -388,9 +391,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -451,6 +451,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -673,9 +676,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -850,6 +850,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2086,20 +2089,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2172,9 +2163,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2232,6 +2220,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2244,6 +2235,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2559,9 +2553,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3495,6 +3486,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -4047,10 +4041,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator_VST.vcxproj b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator_VST.vcxproj index 86c2559db8..94a4a880aa 100644 --- a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator_VST.vcxproj +++ b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2015/Arpeggiator_VST.vcxproj @@ -16,6 +16,7 @@ {7B4A2CB7-0625-C36D-39FB-C651743A206F} v140 + 8.1 DynamicLibrary false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v140 + 8.1 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator.sln b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator.sln index 13ee3582ac..3107ab6662 100644 --- a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator.sln +++ b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator.sln @@ -14,14 +14,14 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7B4A2CB7-0625-C36D-39FB-C651743A206F}.Debug|x64.Build.0 = Debug|x64 {7B4A2CB7-0625-C36D-39FB-C651743A206F}.Debug|x64.ActiveCfg = Debug|x64 - {7B4A2CB7-0625-C36D-39FB-C651743A206F}.Release|x64.Build.0 = Release|x64 + {7B4A2CB7-0625-C36D-39FB-C651743A206F}.Debug|x64.Build.0 = Debug|x64 {7B4A2CB7-0625-C36D-39FB-C651743A206F}.Release|x64.ActiveCfg = Release|x64 - {7B14DB3F-59CC-58D2-4DC7-03A1BD2836FB}.Debug|x64.Build.0 = Debug|x64 + {7B4A2CB7-0625-C36D-39FB-C651743A206F}.Release|x64.Build.0 = Release|x64 {7B14DB3F-59CC-58D2-4DC7-03A1BD2836FB}.Debug|x64.ActiveCfg = Debug|x64 - {7B14DB3F-59CC-58D2-4DC7-03A1BD2836FB}.Release|x64.Build.0 = Release|x64 + {7B14DB3F-59CC-58D2-4DC7-03A1BD2836FB}.Debug|x64.Build.0 = Debug|x64 {7B14DB3F-59CC-58D2-4DC7-03A1BD2836FB}.Release|x64.ActiveCfg = Release|x64 + {7B14DB3F-59CC-58D2-4DC7-03A1BD2836FB}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator_SharedCode.vcxproj b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator_SharedCode.vcxproj index b8ba45fc36..3d3113923c 100644 --- a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator_SharedCode.vcxproj +++ b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator_SharedCode.vcxproj @@ -16,6 +16,7 @@ {7B14DB3F-59CC-58D2-4DC7-03A1BD2836FB} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ Arpeggiator true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -151,9 +158,6 @@ true - - true - true @@ -214,6 +218,9 @@ true + + true + true @@ -430,9 +437,6 @@ true - - true - true @@ -592,6 +596,9 @@ true + + true + true @@ -1744,13 +1751,7 @@ true - - true - - - true - - + true @@ -1779,7 +1780,6 @@ - @@ -1799,10 +1799,12 @@ + + @@ -1908,7 +1910,6 @@ - @@ -2220,6 +2221,7 @@ + @@ -2404,8 +2406,12 @@ - - + + + + + + diff --git a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator_SharedCode.vcxproj.filters b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator_SharedCode.vcxproj.filters index cb65f542e1..15e1ad14e0 100644 --- a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator_SharedCode.vcxproj.filters +++ b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator_SharedCode.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -388,9 +391,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -451,6 +451,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -673,9 +676,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -850,6 +850,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2086,20 +2089,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2172,9 +2163,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2232,6 +2220,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2244,6 +2235,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2559,9 +2553,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3495,6 +3486,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -4047,10 +4041,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator_VST.vcxproj b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator_VST.vcxproj index 081f5200c8..8d93c10625 100644 --- a/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator_VST.vcxproj +++ b/examples/PlugInSamples/Arpeggiator/Builds/VisualStudio2017/Arpeggiator_VST.vcxproj @@ -16,6 +16,7 @@ {7B4A2CB7-0625-C36D-39FB-C651743A206F} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v141 + 10.0.15063.0 @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/Arpeggiator/JuceLibraryCode/AppConfig.h b/examples/PlugInSamples/Arpeggiator/JuceLibraryCode/AppConfig.h index 63686905bf..08038a2297 100644 --- a/examples/PlugInSamples/Arpeggiator/JuceLibraryCode/AppConfig.h +++ b/examples/PlugInSamples/Arpeggiator/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -57,6 +63,181 @@ #define JUCE_MODULE_AVAILABLE_juce_opengl 1 #define JUCE_MODULE_AVAILABLE_juce_video 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_plugin_client flags: + +#ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS + //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS 1 +#endif + +#ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS + //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif + +//============================================================================== +// juce_video flags: + +#ifndef JUCE_USE_CAMERA + //#define JUCE_USE_CAMERA 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -66,194 +247,6 @@ #endif #endif -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_plugin_client flags: - -#ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS - //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS -#endif - -#ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS - //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif - -//============================================================================== -// juce_video flags: - -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - #define JUCE_QUICKTIME 0 -#endif - -#ifndef JUCE_USE_CAMERA - //#define JUCE_USE_CAMERA -#endif - //============================================================================== // Audio plugin settings.. @@ -275,8 +268,8 @@ #ifndef JucePlugin_Build_AAX #define JucePlugin_Build_AAX 0 #endif -#ifndef JucePlugin_Build_STANDALONE - #define JucePlugin_Build_STANDALONE 0 +#ifndef JucePlugin_Build_Standalone + #define JucePlugin_Build_Standalone 0 #endif #ifndef JucePlugin_Enable_IAA #define JucePlugin_Enable_IAA 0 diff --git a/examples/PlugInSamples/GainPlugIn/Builds/MacOSX/GainPlugIn.xcodeproj/project.pbxproj b/examples/PlugInSamples/GainPlugIn/Builds/MacOSX/GainPlugIn.xcodeproj/project.pbxproj index fc7c9b0b57..2a76e40d44 100644 --- a/examples/PlugInSamples/GainPlugIn/Builds/MacOSX/GainPlugIn.xcodeproj/project.pbxproj +++ b/examples/PlugInSamples/GainPlugIn/Builds/MacOSX/GainPlugIn.xcodeproj/project.pbxproj @@ -14,6 +14,7 @@ 46AB8BC7FA7E34563E5F005C = {isa = PBXBuildFile; fileRef = 9D6BD8DE6FC16E28FE2169F0; }; 9F2D7A648AEF91BE4D602EAF = {isa = PBXBuildFile; fileRef = F8F9E0D474403C57C8F0D211; }; 289C698FD9DC4E79275CF86D = {isa = PBXBuildFile; fileRef = F00ECA1608A6FE20D2590505; }; + 4EBB095214CB5A349E224ABA = {isa = PBXBuildFile; fileRef = 3FF83E79A175F46A651127DC; }; CE59F17AE351D2C1CE9576C3 = {isa = PBXBuildFile; fileRef = CC9362142B6BAC4A72B9C872; }; 353BAEC02C6386CEE3594B18 = {isa = PBXBuildFile; fileRef = C6B52DA1DA289B8A57DEF4F9; }; C4CDB09203A906EA7EAA2026 = {isa = PBXBuildFile; fileRef = A970D3F194D02E962DFBA282; }; @@ -62,6 +63,7 @@ 3011D9B18FF9AE4F53DBE7D6 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_basics"; path = "../../../../../modules/juce_gui_basics"; sourceTree = "SOURCE_ROOT"; }; 380D7D8ABD419DB53E620E2B = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_devices.mm"; path = "../../JuceLibraryCode/include_juce_audio_devices.mm"; sourceTree = "SOURCE_ROOT"; }; 3F96318499BA2580780842AB = {isa = PBXFileReference; lastKnownFileType = file.r; name = "include_juce_audio_plugin_client_AU.r"; path = "../../JuceLibraryCode/include_juce_audio_plugin_client_AU.r"; sourceTree = "SOURCE_ROOT"; }; + 3FF83E79A175F46A651127DC = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; }; 4B9F0ABDCBB3C33CCC72608C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_audio_plugin_client_VST2.cpp"; path = "../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp"; sourceTree = "SOURCE_ROOT"; }; 5025F0054324107E418D3F5F = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_data_structures"; path = "../../../../../modules/juce_data_structures"; sourceTree = "SOURCE_ROOT"; }; 5E02EFCB21F6DB2235E1BF0F = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_video"; path = "../../../../../modules/juce_video"; sourceTree = "SOURCE_ROOT"; }; @@ -158,6 +160,7 @@ 9D6BD8DE6FC16E28FE2169F0, F8F9E0D474403C57C8F0D211, F00ECA1608A6FE20D2590505, + 3FF83E79A175F46A651127DC, CC9362142B6BAC4A72B9C872, C6B52DA1DA289B8A57DEF4F9, A970D3F194D02E962DFBA282, @@ -184,7 +187,7 @@ 28E3B1FE50FFC5B2A58897A0 = {isa = XCBuildConfiguration; buildSettings = { }; name = Debug; }; 987E131B9EAD1C8CE9786F9C = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; 2258034E5AABF301ACB109C1 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -210,18 +213,19 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../../modules", "../../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-VST.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; OTHER_LDFLAGS = "-bundle -lGainPlugIn"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.GainPlugIn; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; WRAPPER_EXTENSION = vst; }; name = Debug; }; B5B4DDE9429C2F747AEAFEBC = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -248,18 +252,19 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../../modules", "../../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-VST.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; OTHER_LDFLAGS = "-bundle -lGainPlugIn"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.GainPlugIn; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; WRAPPER_EXTENSION = vst; }; name = Release; }; 1F8B7104586EEA017DC9E66D = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -285,18 +290,19 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../../modules", "../../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-VST3.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST3/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; OTHER_LDFLAGS = "-bundle -lGainPlugIn"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.GainPlugIn; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; WRAPPER_EXTENSION = vst3; }; name = Debug; }; 8C4CBD97ADA22451A0CBDB2A = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -323,18 +329,19 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../../modules", "../../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-VST3.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST3/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; OTHER_LDFLAGS = "-bundle -lGainPlugIn"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.GainPlugIn; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; WRAPPER_EXTENSION = vst3; }; name = Release; }; 913C8DA77769EF7E429930F2 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -360,11 +367,12 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../../modules", "../../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-AU.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; OTHER_LDFLAGS = "-bundle -lGainPlugIn"; OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\""; PRODUCT_BUNDLE_IDENTIFIER = com.roli.GainPlugIn; @@ -372,7 +380,7 @@ USE_HEADERMAP = NO; WRAPPER_EXTENSION = component; }; name = Debug; }; 93405247663082AE0B727930 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -399,11 +407,12 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../../modules", "../../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-AU.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; OTHER_LDFLAGS = "-bundle -lGainPlugIn"; OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\""; PRODUCT_BUNDLE_IDENTIFIER = com.roli.GainPlugIn; @@ -411,7 +420,7 @@ USE_HEADERMAP = NO; WRAPPER_EXTENSION = component; }; name = Release; }; 2CB812B0DEE790549B33EA23 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -437,12 +446,12 @@ INSTALL_PATH = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.GainPlugIn; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 1A69EAB78F178B933E748B51 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -469,22 +478,43 @@ INSTALL_PATH = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.GainPlugIn; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Release; }; 12107CEF96782BFB9B82B7AC = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "GainPlugIn"; @@ -492,15 +522,36 @@ ZERO_LINK = NO; }; name = Debug; }; 45D810B7791D9C5C8C959A8B = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "GainPlugIn"; WARNING_CFLAGS = -Wreorder; @@ -531,6 +582,7 @@ FA171B2FEC24575B5157EB15, 46AB8BC7FA7E34563E5F005C, 289C698FD9DC4E79275CF86D, + 4EBB095214CB5A349E224ABA, CE59F17AE351D2C1CE9576C3, 353BAEC02C6386CEE3594B18, C4CDB09203A906EA7EAA2026, @@ -556,6 +608,7 @@ FA171B2FEC24575B5157EB15, 46AB8BC7FA7E34563E5F005C, 289C698FD9DC4E79275CF86D, + 4EBB095214CB5A349E224ABA, CE59F17AE351D2C1CE9576C3, 353BAEC02C6386CEE3594B18, C4CDB09203A906EA7EAA2026, @@ -585,6 +638,7 @@ 46AB8BC7FA7E34563E5F005C, 9F2D7A648AEF91BE4D602EAF, 289C698FD9DC4E79275CF86D, + 4EBB095214CB5A349E224ABA, CE59F17AE351D2C1CE9576C3, 353BAEC02C6386CEE3594B18, C4CDB09203A906EA7EAA2026, @@ -623,7 +677,7 @@ E7EDCC066F7BFE33413D78FE, ); runOnlyForDeploymentPostprocessing = 0; }; EF7E12AA943CABF4C9ACE9FC = {isa = PBXNativeTarget; buildConfigurationList = 2D1D1BFA76D5FF752D06187F; buildPhases = ( E57E58AA3A8632B697CF894F, ); buildRules = ( ); dependencies = ( ); name = "GainPlugIn - Shared Code"; productName = GainPlugIn; productReference = 074F1E0FAFBD4B127B869BC2; productType = "com.apple.product-type.library.static"; }; - 14B1FDE882BA4A9678780A26 = {isa = PBXProject; buildConfigurationList = 738DD13F786359A977312E92; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 67946078D4B1207C2A6BDB4F = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };BBE761975F619DAA1B4D0F57 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };8777AC1501FECCF360363C10 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };95B232D53C8384ECDA8C519B = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };EF7E12AA943CABF4C9ACE9FC = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 807311746F9F870D03BE88D9; projectDirPath = ""; projectRoot = ""; targets = (67946078D4B1207C2A6BDB4F, BBE761975F619DAA1B4D0F57, 8777AC1501FECCF360363C10, 95B232D53C8384ECDA8C519B, EF7E12AA943CABF4C9ACE9FC); }; + 14B1FDE882BA4A9678780A26 = {isa = PBXProject; buildConfigurationList = 738DD13F786359A977312E92; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 67946078D4B1207C2A6BDB4F = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };BBE761975F619DAA1B4D0F57 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };8777AC1501FECCF360363C10 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };95B232D53C8384ECDA8C519B = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };EF7E12AA943CABF4C9ACE9FC = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 807311746F9F870D03BE88D9; projectDirPath = ""; projectRoot = ""; targets = (67946078D4B1207C2A6BDB4F, BBE761975F619DAA1B4D0F57, 8777AC1501FECCF360363C10, 95B232D53C8384ECDA8C519B, EF7E12AA943CABF4C9ACE9FC); }; }; rootObject = 14B1FDE882BA4A9678780A26; } diff --git a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn.sln b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn.sln index e40f220703..9dbba38aaa 100644 --- a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn.sln +++ b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn.sln @@ -19,18 +19,18 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2A769212-432C-7313-391E-68B46A0888F2}.Debug|Win32.Build.0 = Debug|Win32 {2A769212-432C-7313-391E-68B46A0888F2}.Debug|Win32.ActiveCfg = Debug|Win32 - {2A769212-432C-7313-391E-68B46A0888F2}.Release|Win32.Build.0 = Release|Win32 + {2A769212-432C-7313-391E-68B46A0888F2}.Debug|Win32.Build.0 = Debug|Win32 {2A769212-432C-7313-391E-68B46A0888F2}.Release|Win32.ActiveCfg = Release|Win32 - {5810FF56-5ACC-8BFE-EFCE-D9655FEC8E5B}.Debug|Win32.Build.0 = Debug|Win32 + {2A769212-432C-7313-391E-68B46A0888F2}.Release|Win32.Build.0 = Release|Win32 {5810FF56-5ACC-8BFE-EFCE-D9655FEC8E5B}.Debug|Win32.ActiveCfg = Debug|Win32 - {5810FF56-5ACC-8BFE-EFCE-D9655FEC8E5B}.Release|Win32.Build.0 = Release|Win32 + {5810FF56-5ACC-8BFE-EFCE-D9655FEC8E5B}.Debug|Win32.Build.0 = Debug|Win32 {5810FF56-5ACC-8BFE-EFCE-D9655FEC8E5B}.Release|Win32.ActiveCfg = Release|Win32 - {E83746D9-1736-E433-6CEF-9C347DF444D1}.Debug|Win32.Build.0 = Debug|Win32 + {5810FF56-5ACC-8BFE-EFCE-D9655FEC8E5B}.Release|Win32.Build.0 = Release|Win32 {E83746D9-1736-E433-6CEF-9C347DF444D1}.Debug|Win32.ActiveCfg = Debug|Win32 - {E83746D9-1736-E433-6CEF-9C347DF444D1}.Release|Win32.Build.0 = Release|Win32 + {E83746D9-1736-E433-6CEF-9C347DF444D1}.Debug|Win32.Build.0 = Debug|Win32 {E83746D9-1736-E433-6CEF-9C347DF444D1}.Release|Win32.ActiveCfg = Release|Win32 + {E83746D9-1736-E433-6CEF-9C347DF444D1}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_SharedCode.vcxproj b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_SharedCode.vcxproj index 4cc5812478..a74a11fee4 100644 --- a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_SharedCode.vcxproj +++ b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_SharedCode.vcxproj @@ -16,6 +16,7 @@ {E83746D9-1736-E433-6CEF-9C347DF444D1} v140 + 8.1 StaticLibrary false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ GainPlugIn true v140 + 8.1 @@ -65,7 +70,7 @@ Disabled EditAndContinue - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreaded true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -158,9 +165,6 @@ true - - true - true @@ -221,6 +225,9 @@ true + + true + true @@ -437,9 +444,6 @@ true - - true - true @@ -599,6 +603,9 @@ true + + true + true @@ -1751,13 +1758,7 @@ true - - true - - - true - - + true @@ -1786,7 +1787,6 @@ - @@ -1806,10 +1806,12 @@ + + @@ -1915,7 +1917,6 @@ - @@ -2227,6 +2228,7 @@ + @@ -2411,8 +2413,12 @@ - - + + + + + + diff --git a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_SharedCode.vcxproj.filters b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_SharedCode.vcxproj.filters index 1aea36b611..92c223d150 100644 --- a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_SharedCode.vcxproj.filters +++ b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_SharedCode.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -388,9 +391,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -451,6 +451,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -673,9 +676,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -850,6 +850,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2086,20 +2089,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2172,9 +2163,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2232,6 +2220,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2244,6 +2235,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2559,9 +2553,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3495,6 +3486,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -4047,10 +4041,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_VST.vcxproj b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_VST.vcxproj index 1dc2e44f16..5685685fab 100644 --- a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_VST.vcxproj +++ b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_VST.vcxproj @@ -16,6 +16,7 @@ {2A769212-432C-7313-391E-68B46A0888F2} v140 + 8.1 DynamicLibrary false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v140 + 8.1 @@ -67,7 +72,7 @@ Disabled EditAndContinue - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreaded true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_VST3.vcxproj b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_VST3.vcxproj index d13f0ce6d8..8ed2968b2c 100644 --- a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_VST3.vcxproj +++ b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2015/GainPlugIn_VST3.vcxproj @@ -16,6 +16,7 @@ {5810FF56-5ACC-8BFE-EFCE-D9655FEC8E5B} v140 + 8.1 DynamicLibrary false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v140 + 8.1 @@ -67,7 +72,7 @@ Disabled EditAndContinue - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreaded true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn.sln b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn.sln index 8d87621eec..acc6ab8db6 100644 --- a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn.sln +++ b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn.sln @@ -19,18 +19,18 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2A769212-432C-7313-391E-68B46A0888F2}.Debug|x64.Build.0 = Debug|x64 {2A769212-432C-7313-391E-68B46A0888F2}.Debug|x64.ActiveCfg = Debug|x64 - {2A769212-432C-7313-391E-68B46A0888F2}.Release|x64.Build.0 = Release|x64 + {2A769212-432C-7313-391E-68B46A0888F2}.Debug|x64.Build.0 = Debug|x64 {2A769212-432C-7313-391E-68B46A0888F2}.Release|x64.ActiveCfg = Release|x64 - {5810FF56-5ACC-8BFE-EFCE-D9655FEC8E5B}.Debug|x64.Build.0 = Debug|x64 + {2A769212-432C-7313-391E-68B46A0888F2}.Release|x64.Build.0 = Release|x64 {5810FF56-5ACC-8BFE-EFCE-D9655FEC8E5B}.Debug|x64.ActiveCfg = Debug|x64 - {5810FF56-5ACC-8BFE-EFCE-D9655FEC8E5B}.Release|x64.Build.0 = Release|x64 + {5810FF56-5ACC-8BFE-EFCE-D9655FEC8E5B}.Debug|x64.Build.0 = Debug|x64 {5810FF56-5ACC-8BFE-EFCE-D9655FEC8E5B}.Release|x64.ActiveCfg = Release|x64 - {E83746D9-1736-E433-6CEF-9C347DF444D1}.Debug|x64.Build.0 = Debug|x64 + {5810FF56-5ACC-8BFE-EFCE-D9655FEC8E5B}.Release|x64.Build.0 = Release|x64 {E83746D9-1736-E433-6CEF-9C347DF444D1}.Debug|x64.ActiveCfg = Debug|x64 - {E83746D9-1736-E433-6CEF-9C347DF444D1}.Release|x64.Build.0 = Release|x64 + {E83746D9-1736-E433-6CEF-9C347DF444D1}.Debug|x64.Build.0 = Debug|x64 {E83746D9-1736-E433-6CEF-9C347DF444D1}.Release|x64.ActiveCfg = Release|x64 + {E83746D9-1736-E433-6CEF-9C347DF444D1}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_SharedCode.vcxproj b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_SharedCode.vcxproj index fb5546b1a3..87f29f09ea 100644 --- a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_SharedCode.vcxproj +++ b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_SharedCode.vcxproj @@ -16,6 +16,7 @@ {E83746D9-1736-E433-6CEF-9C347DF444D1} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ GainPlugIn true v141 + 10.0.15063.0 @@ -67,7 +72,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -106,7 +112,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreaded true @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -151,9 +158,6 @@ true - - true - true @@ -214,6 +218,9 @@ true + + true + true @@ -430,9 +437,6 @@ true - - true - true @@ -592,6 +596,9 @@ true + + true + true @@ -1744,13 +1751,7 @@ true - - true - - - true - - + true @@ -1779,7 +1780,6 @@ - @@ -1799,10 +1799,12 @@ + + @@ -1908,7 +1910,6 @@ - @@ -2220,6 +2221,7 @@ + @@ -2404,8 +2406,12 @@ - - + + + + + + diff --git a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_SharedCode.vcxproj.filters b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_SharedCode.vcxproj.filters index 21748f8422..c03a8c6347 100644 --- a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_SharedCode.vcxproj.filters +++ b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_SharedCode.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -388,9 +391,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -451,6 +451,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -673,9 +676,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -850,6 +850,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2086,20 +2089,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2172,9 +2163,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2232,6 +2220,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2244,6 +2235,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2559,9 +2553,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3495,6 +3486,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -4047,10 +4041,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_VST.vcxproj b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_VST.vcxproj index 5a4f24fa1d..0dda4714f5 100644 --- a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_VST.vcxproj +++ b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_VST.vcxproj @@ -16,6 +16,7 @@ {2A769212-432C-7313-391E-68B46A0888F2} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v141 + 10.0.15063.0 @@ -69,7 +74,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreaded true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_VST3.vcxproj b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_VST3.vcxproj index 5dad3dac00..599959b8f7 100644 --- a/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_VST3.vcxproj +++ b/examples/PlugInSamples/GainPlugIn/Builds/VisualStudio2017/GainPlugIn_VST3.vcxproj @@ -16,6 +16,7 @@ {5810FF56-5ACC-8BFE-EFCE-D9655FEC8E5B} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v141 + 10.0.15063.0 @@ -69,7 +74,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreaded true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/GainPlugIn/GainPlugIn.jucer b/examples/PlugInSamples/GainPlugIn/GainPlugIn.jucer index 15866c5ba6..86cbe81c4c 100644 --- a/examples/PlugInSamples/GainPlugIn/GainPlugIn.jucer +++ b/examples/PlugInSamples/GainPlugIn/GainPlugIn.jucer @@ -8,10 +8,10 @@ pluginIsSynth="0" pluginWantsMidiIn="0" pluginProducesMidiOut="0" pluginSilenceInIsSilenceOut="1" pluginEditorRequiresKeys="0" pluginAUExportPrefix="GainPlugInAU" pluginRTASCategory="" aaxIdentifier="com.roli.GainPlugIn" - pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="5.0.2" + pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="5.1.0" pluginIsMidiEffectPlugin="0" buildAUv3="0" buildStandalone="0" enableIAA="0" displaySplashScreen="0" reportAppUsage="0" splashScreenColour="Dark" - companyName="ROLI Ltd."> + companyName="ROLI Ltd." cppLanguageStandard="11"> + vstFolder="" aaxFolder="" extraCompilerFlags="-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"> diff --git a/examples/PlugInSamples/GainPlugIn/JuceLibraryCode/AppConfig.h b/examples/PlugInSamples/GainPlugIn/JuceLibraryCode/AppConfig.h index 5badc7e91c..1d746960fb 100644 --- a/examples/PlugInSamples/GainPlugIn/JuceLibraryCode/AppConfig.h +++ b/examples/PlugInSamples/GainPlugIn/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -57,6 +63,181 @@ #define JUCE_MODULE_AVAILABLE_juce_opengl 1 #define JUCE_MODULE_AVAILABLE_juce_video 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_plugin_client flags: + +#ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS + //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS 1 +#endif + +#ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS + //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif + +//============================================================================== +// juce_video flags: + +#ifndef JUCE_USE_CAMERA + //#define JUCE_USE_CAMERA 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -66,194 +247,6 @@ #endif #endif -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_plugin_client flags: - -#ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS - //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS -#endif - -#ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS - //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif - -//============================================================================== -// juce_video flags: - -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - #define JUCE_QUICKTIME 0 -#endif - -#ifndef JUCE_USE_CAMERA - //#define JUCE_USE_CAMERA -#endif - //============================================================================== // Audio plugin settings.. @@ -275,8 +268,8 @@ #ifndef JucePlugin_Build_AAX #define JucePlugin_Build_AAX 0 #endif -#ifndef JucePlugin_Build_STANDALONE - #define JucePlugin_Build_STANDALONE 0 +#ifndef JucePlugin_Build_Standalone + #define JucePlugin_Build_Standalone 0 #endif #ifndef JucePlugin_Enable_IAA #define JucePlugin_Enable_IAA 0 diff --git a/examples/PlugInSamples/InterAppAudioEffect/Builds/iOS/InterAppAudioEffect.xcodeproj/project.pbxproj b/examples/PlugInSamples/InterAppAudioEffect/Builds/iOS/InterAppAudioEffect.xcodeproj/project.pbxproj index 3fed18c3e7..e60ed6f752 100644 --- a/examples/PlugInSamples/InterAppAudioEffect/Builds/iOS/InterAppAudioEffect.xcodeproj/project.pbxproj +++ b/examples/PlugInSamples/InterAppAudioEffect/Builds/iOS/InterAppAudioEffect.xcodeproj/project.pbxproj @@ -154,7 +154,7 @@ 8DA1E39A676F877EB549B8CA = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; CODE_SIGN_ENTITLEMENTS = "InterAppAudioEffect.entitlements"; COMBINE_HIDPI_IMAGES = YES; @@ -178,6 +178,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "../../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-Standalone_Plugin.plist; + INFOPLIST_PREPROCESS = NO; 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; @@ -185,7 +186,7 @@ 07EA55A19B872E1F49C62539 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; CODE_SIGN_ENTITLEMENTS = "InterAppAudioEffect.entitlements"; COMBINE_HIDPI_IMAGES = YES; @@ -210,6 +211,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../../modules", "../../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-Standalone_Plugin.plist; + INFOPLIST_PREPROCESS = NO; 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; @@ -217,7 +219,7 @@ E6FA0B75AC78727D8A3F1888 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -247,7 +249,7 @@ 665044AFDC3F0D4E11643857 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -278,16 +280,37 @@ 4650CE5DEC4B4B8ED96435A4 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -299,15 +322,36 @@ C2BB86E774E1461CAF0D87DD = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "InterAppAudioEffect"; @@ -371,7 +415,7 @@ FAC41C26E955C024553DC96C, ); runOnlyForDeploymentPostprocessing = 0; }; A3401CC1AC6C5B89EFBAEF01 = {isa = PBXNativeTarget; buildConfigurationList = AA6F190D4FECB06C7A7A0658; buildPhases = ( 177DC2A7A303F23EDDE5183A, ); buildRules = ( ); dependencies = ( ); name = "InterAppAudioEffect - Shared Code"; productName = InterAppAudioEffect; productReference = 873711620EC157BCCFFF80B1; productType = "com.apple.product-type.library.static"; }; - DF3D0C1B88ADC0274AE6BD73 = {isa = PBXProject; buildConfigurationList = 016ACE6B9EC6F47020502F4F; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 03BD5476C606A5BA65CD4FDF = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };51FB6E6A2D0998D38E999826 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 1; }; com.apple.Sandbox = { enabled = 0; }; }; };A3401CC1AC6C5B89EFBAEF01 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = EC01685A042C62251C5AF093; projectDirPath = ""; projectRoot = ""; targets = (03BD5476C606A5BA65CD4FDF, 51FB6E6A2D0998D38E999826, A3401CC1AC6C5B89EFBAEF01); }; + DF3D0C1B88ADC0274AE6BD73 = {isa = PBXProject; buildConfigurationList = 016ACE6B9EC6F47020502F4F; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 03BD5476C606A5BA65CD4FDF = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };51FB6E6A2D0998D38E999826 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 1; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };A3401CC1AC6C5B89EFBAEF01 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = EC01685A042C62251C5AF093; projectDirPath = ""; projectRoot = ""; targets = (03BD5476C606A5BA65CD4FDF, 51FB6E6A2D0998D38E999826, A3401CC1AC6C5B89EFBAEF01); }; }; rootObject = DF3D0C1B88ADC0274AE6BD73; } diff --git a/examples/PlugInSamples/InterAppAudioEffect/InterAppAudioEffect.jucer b/examples/PlugInSamples/InterAppAudioEffect/InterAppAudioEffect.jucer index 8b699cf8b3..9f07821121 100644 --- a/examples/PlugInSamples/InterAppAudioEffect/InterAppAudioEffect.jucer +++ b/examples/PlugInSamples/InterAppAudioEffect/InterAppAudioEffect.jucer @@ -9,9 +9,9 @@ pluginIsSynth="0" pluginWantsMidiIn="0" pluginProducesMidiOut="0" pluginIsMidiEffectPlugin="0" pluginEditorRequiresKeys="0" pluginAUExportPrefix="InterAppAudioEffectAU" pluginRTASCategory="" aaxIdentifier="com.yourcompany.InterAppAudioEffect" - pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="5.0.2" + pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="5.1.0" companyName="ROLI Ltd." buildStandalone="1" displaySplashScreen="0" - reportAppUsage="0" splashScreenColour="Dark"> + reportAppUsage="0" splashScreenColour="Dark" cppLanguageStandard="11"> {6682B889-29F8-82A9-59E4-6F23A6DEF43F} v140 + 8.1 DynamicLibrary false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v140 + 8.1 @@ -67,8 +72,8 @@ Disabled EditAndContinue - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="c:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="C:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -106,7 +112,7 @@ if not exist "$(OutDir)\MultiOutSynth.aaxplugin\Contents\Win32" mkdir copy /Y "$(OutDir)\MultiOutSynth.aaxdll" "$(OutDir)\MultiOutSynth.aaxplugin\Contents\Win32\MultiOutSynth.aaxplugin" -call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\MultiOutSynth.aaxplugin\Contents\Win32" "c:\\SDKs\\AAX\\Utilities\\PlugIn.ico" +call "C:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\MultiOutSynth.aaxplugin\Contents\Win32" "C:\\SDKs\\AAX\\Utilities\\PlugIn.ico" @@ -119,8 +125,8 @@ call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Mul Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="c:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="C:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) MultiThreadedDLL true @@ -130,6 +136,7 @@ call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Mul Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -159,7 +166,7 @@ if not exist "$(OutDir)\MultiOutSynth.aaxplugin\Contents\Win32" mkdir copy /Y "$(OutDir)\MultiOutSynth.aaxdll" "$(OutDir)\MultiOutSynth.aaxplugin\Contents\Win32\MultiOutSynth.aaxplugin" -call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\MultiOutSynth.aaxplugin\Contents\Win32" "c:\\SDKs\\AAX\\Utilities\\PlugIn.ico" +call "C:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\MultiOutSynth.aaxplugin\Contents\Win32" "C:\\SDKs\\AAX\\Utilities\\PlugIn.ico" diff --git a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_SharedCode.vcxproj b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_SharedCode.vcxproj index b3e8a9ace3..62a0bb78db 100644 --- a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_SharedCode.vcxproj +++ b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_SharedCode.vcxproj @@ -16,6 +16,7 @@ {33FE4627-BBEA-82E1-5512-8C1F218CF560} v140 + 8.1 StaticLibrary false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ MultiOutSynth true v140 + 8.1 @@ -65,7 +70,7 @@ Disabled EditAndContinue - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=1;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=1;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -158,9 +165,6 @@ true - - true - true @@ -221,6 +225,9 @@ true + + true + true @@ -437,9 +444,6 @@ true - - true - true @@ -599,6 +603,9 @@ true + + true + true @@ -1751,13 +1758,7 @@ true - - true - - - true - - + true @@ -1787,7 +1788,6 @@ - @@ -1807,10 +1807,12 @@ + + @@ -1916,7 +1918,6 @@ - @@ -2228,6 +2229,7 @@ + @@ -2412,8 +2414,12 @@ - - + + + + + + diff --git a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_SharedCode.vcxproj.filters b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_SharedCode.vcxproj.filters index 1a06096a78..d22f291d49 100644 --- a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_SharedCode.vcxproj.filters +++ b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_SharedCode.vcxproj.filters @@ -26,6 +26,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -391,9 +394,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -454,6 +454,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -676,9 +679,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -853,6 +853,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2089,20 +2092,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2178,9 +2169,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2238,6 +2226,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2250,6 +2241,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2565,9 +2559,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3501,6 +3492,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -4053,10 +4047,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_VST.vcxproj b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_VST.vcxproj index e1a006c487..c2e31b56fb 100644 --- a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_VST.vcxproj +++ b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_VST.vcxproj @@ -16,6 +16,7 @@ {7790E2A1-4049-EC16-F460-753EE395D0C9} v140 + 8.1 DynamicLibrary false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v140 + 8.1 @@ -67,7 +72,7 @@ Disabled EditAndContinue - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_VST3.vcxproj b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_VST3.vcxproj index 49242547e3..a81d55a38a 100644 --- a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_VST3.vcxproj +++ b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2015/MultiOutSynth_VST3.vcxproj @@ -16,6 +16,7 @@ {44876436-075F-C9F0-C107-5BB5C5DE6638} v140 + 8.1 DynamicLibrary false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v140 + 8.1 @@ -67,7 +72,7 @@ Disabled EditAndContinue - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth.sln b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth.sln index 3ab79baec7..5fb434d050 100644 --- a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth.sln +++ b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth.sln @@ -24,22 +24,22 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7790E2A1-4049-EC16-F460-753EE395D0C9}.Debug|x64.Build.0 = Debug|x64 {7790E2A1-4049-EC16-F460-753EE395D0C9}.Debug|x64.ActiveCfg = Debug|x64 - {7790E2A1-4049-EC16-F460-753EE395D0C9}.Release|x64.Build.0 = Release|x64 + {7790E2A1-4049-EC16-F460-753EE395D0C9}.Debug|x64.Build.0 = Debug|x64 {7790E2A1-4049-EC16-F460-753EE395D0C9}.Release|x64.ActiveCfg = Release|x64 - {44876436-075F-C9F0-C107-5BB5C5DE6638}.Debug|x64.Build.0 = Debug|x64 + {7790E2A1-4049-EC16-F460-753EE395D0C9}.Release|x64.Build.0 = Release|x64 {44876436-075F-C9F0-C107-5BB5C5DE6638}.Debug|x64.ActiveCfg = Debug|x64 - {44876436-075F-C9F0-C107-5BB5C5DE6638}.Release|x64.Build.0 = Release|x64 + {44876436-075F-C9F0-C107-5BB5C5DE6638}.Debug|x64.Build.0 = Debug|x64 {44876436-075F-C9F0-C107-5BB5C5DE6638}.Release|x64.ActiveCfg = Release|x64 - {6682B889-29F8-82A9-59E4-6F23A6DEF43F}.Debug|x64.Build.0 = Debug|x64 + {44876436-075F-C9F0-C107-5BB5C5DE6638}.Release|x64.Build.0 = Release|x64 {6682B889-29F8-82A9-59E4-6F23A6DEF43F}.Debug|x64.ActiveCfg = Debug|x64 - {6682B889-29F8-82A9-59E4-6F23A6DEF43F}.Release|x64.Build.0 = Release|x64 + {6682B889-29F8-82A9-59E4-6F23A6DEF43F}.Debug|x64.Build.0 = Debug|x64 {6682B889-29F8-82A9-59E4-6F23A6DEF43F}.Release|x64.ActiveCfg = Release|x64 - {33FE4627-BBEA-82E1-5512-8C1F218CF560}.Debug|x64.Build.0 = Debug|x64 + {6682B889-29F8-82A9-59E4-6F23A6DEF43F}.Release|x64.Build.0 = Release|x64 {33FE4627-BBEA-82E1-5512-8C1F218CF560}.Debug|x64.ActiveCfg = Debug|x64 - {33FE4627-BBEA-82E1-5512-8C1F218CF560}.Release|x64.Build.0 = Release|x64 + {33FE4627-BBEA-82E1-5512-8C1F218CF560}.Debug|x64.Build.0 = Debug|x64 {33FE4627-BBEA-82E1-5512-8C1F218CF560}.Release|x64.ActiveCfg = Release|x64 + {33FE4627-BBEA-82E1-5512-8C1F218CF560}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_AAX.vcxproj b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_AAX.vcxproj index ab198e4fbf..2380be018f 100644 --- a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_AAX.vcxproj +++ b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_AAX.vcxproj @@ -16,6 +16,7 @@ {6682B889-29F8-82A9-59E4-6F23A6DEF43F} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v141 + 10.0.15063.0 @@ -69,8 +74,8 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="c:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="C:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -106,7 +112,7 @@ if not exist "$(OutDir)\MultiOutSynth.aaxplugin\Contents\x64" mkdir &q copy /Y "$(OutDir)\MultiOutSynth.aaxdll" "$(OutDir)\MultiOutSynth.aaxplugin\Contents\x64\MultiOutSynth.aaxplugin" -call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\MultiOutSynth.aaxplugin\Contents\x64" "c:\\SDKs\\AAX\\Utilities\\PlugIn.ico" +call "C:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\MultiOutSynth.aaxplugin\Contents\x64" "C:\\SDKs\\AAX\\Utilities\\PlugIn.ico" @@ -119,8 +125,8 @@ call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Mul Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="c:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="C:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) MultiThreadedDLL true @@ -130,6 +136,7 @@ call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Mul Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -158,7 +165,7 @@ if not exist "$(OutDir)\MultiOutSynth.aaxplugin\Contents\x64" mkdir &q copy /Y "$(OutDir)\MultiOutSynth.aaxdll" "$(OutDir)\MultiOutSynth.aaxplugin\Contents\x64\MultiOutSynth.aaxplugin" -call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\MultiOutSynth.aaxplugin\Contents\x64" "c:\\SDKs\\AAX\\Utilities\\PlugIn.ico" +call "C:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\MultiOutSynth.aaxplugin\Contents\x64" "C:\\SDKs\\AAX\\Utilities\\PlugIn.ico" diff --git a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_SharedCode.vcxproj b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_SharedCode.vcxproj index bbb7fe56f9..8aac33d377 100644 --- a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_SharedCode.vcxproj +++ b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_SharedCode.vcxproj @@ -16,6 +16,7 @@ {33FE4627-BBEA-82E1-5512-8C1F218CF560} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ MultiOutSynth true v141 + 10.0.15063.0 @@ -67,7 +72,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=1;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -106,7 +112,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=1;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -151,9 +158,6 @@ true - - true - true @@ -214,6 +218,9 @@ true + + true + true @@ -430,9 +437,6 @@ true - - true - true @@ -592,6 +596,9 @@ true + + true + true @@ -1744,13 +1751,7 @@ true - - true - - - true - - + true @@ -1780,7 +1781,6 @@ - @@ -1800,10 +1800,12 @@ + + @@ -1909,7 +1911,6 @@ - @@ -2221,6 +2222,7 @@ + @@ -2405,8 +2407,12 @@ - - + + + + + + diff --git a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_SharedCode.vcxproj.filters b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_SharedCode.vcxproj.filters index 4c3dfa49f5..b71050b914 100644 --- a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_SharedCode.vcxproj.filters +++ b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_SharedCode.vcxproj.filters @@ -26,6 +26,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -391,9 +394,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -454,6 +454,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -676,9 +679,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -853,6 +853,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2089,20 +2092,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2178,9 +2169,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2238,6 +2226,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2250,6 +2241,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2565,9 +2559,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3501,6 +3492,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -4053,10 +4047,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_VST.vcxproj b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_VST.vcxproj index 3ff5c00fed..dd047619c4 100644 --- a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_VST.vcxproj +++ b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_VST.vcxproj @@ -16,6 +16,7 @@ {7790E2A1-4049-EC16-F460-753EE395D0C9} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v141 + 10.0.15063.0 @@ -69,7 +74,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_VST3.vcxproj b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_VST3.vcxproj index 7d72b0e8c0..65aa9313f0 100644 --- a/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_VST3.vcxproj +++ b/examples/PlugInSamples/MultiOutSynth/Builds/VisualStudio2017/MultiOutSynth_VST3.vcxproj @@ -16,6 +16,7 @@ {44876436-075F-C9F0-C107-5BB5C5DE6638} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v141 + 10.0.15063.0 @@ -69,7 +74,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/MultiOutSynth/JuceLibraryCode/AppConfig.h b/examples/PlugInSamples/MultiOutSynth/JuceLibraryCode/AppConfig.h index 0363ada444..629e3b3eeb 100644 --- a/examples/PlugInSamples/MultiOutSynth/JuceLibraryCode/AppConfig.h +++ b/examples/PlugInSamples/MultiOutSynth/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -57,6 +63,181 @@ #define JUCE_MODULE_AVAILABLE_juce_opengl 1 #define JUCE_MODULE_AVAILABLE_juce_video 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_plugin_client flags: + +#ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS + //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS 1 +#endif + +#ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS + //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif + +//============================================================================== +// juce_video flags: + +#ifndef JUCE_USE_CAMERA + //#define JUCE_USE_CAMERA 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -66,194 +247,6 @@ #endif #endif -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_plugin_client flags: - -#ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS - //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS -#endif - -#ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS - //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif - -//============================================================================== -// juce_video flags: - -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - #define JUCE_QUICKTIME 0 -#endif - -#ifndef JUCE_USE_CAMERA - //#define JUCE_USE_CAMERA -#endif - //============================================================================== // Audio plugin settings.. @@ -275,8 +268,8 @@ #ifndef JucePlugin_Build_AAX #define JucePlugin_Build_AAX 1 #endif -#ifndef JucePlugin_Build_STANDALONE - #define JucePlugin_Build_STANDALONE 0 +#ifndef JucePlugin_Build_Standalone + #define JucePlugin_Build_Standalone 0 #endif #ifndef JucePlugin_Enable_IAA #define JucePlugin_Enable_IAA 0 diff --git a/examples/PlugInSamples/MultiOutSynth/MultiOutSynth.jucer b/examples/PlugInSamples/MultiOutSynth/MultiOutSynth.jucer index c56944e245..ad459a079c 100644 --- a/examples/PlugInSamples/MultiOutSynth/MultiOutSynth.jucer +++ b/examples/PlugInSamples/MultiOutSynth/MultiOutSynth.jucer @@ -9,10 +9,10 @@ pluginSilenceInIsSilenceOut="0" pluginEditorRequiresKeys="0" pluginAUExportPrefix="MultiOutSynthAU" pluginRTASCategory="" aaxIdentifier="com.roli.MultiOutSynth" pluginAAXCategory="AAX_ePlugInCategory_SWGenerators" - jucerVersion="5.0.2" companyName="ROLI Ltd." companyWebsite="www.roli.com" + jucerVersion="5.1.0" companyName="ROLI Ltd." companyWebsite="www.roli.com" companyEmail="info@juce.com" pluginIsMidiEffectPlugin="0" buildAUv3="0" buildStandalone="0" enableIAA="0" displaySplashScreen="0" reportAppUsage="0" - splashScreenColour="Dark"> + splashScreenColour="Dark" cppLanguageStandard="11"> @@ -24,7 +24,7 @@ {047A8F76-26B6-FCC1-DC5E-2B0920870033} v140 + 8.1 DynamicLibrary false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v140 + 8.1 @@ -67,8 +72,8 @@ Disabled EditAndContinue - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="c:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="C:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -106,7 +112,7 @@ if not exist "$(OutDir)\NoiseGate.aaxplugin\Contents\Win32" mkdir &quo copy /Y "$(OutDir)\NoiseGate.aaxdll" "$(OutDir)\NoiseGate.aaxplugin\Contents\Win32\NoiseGate.aaxplugin" -call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\NoiseGate.aaxplugin\Contents\Win32" "c:\\SDKs\\AAX\\Utilities\\PlugIn.ico" +call "C:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\NoiseGate.aaxplugin\Contents\Win32" "C:\\SDKs\\AAX\\Utilities\\PlugIn.ico" @@ -119,8 +125,8 @@ call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Noi Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="c:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="C:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) MultiThreadedDLL true @@ -130,6 +136,7 @@ call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Noi Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -159,7 +166,7 @@ if not exist "$(OutDir)\NoiseGate.aaxplugin\Contents\Win32" mkdir &quo copy /Y "$(OutDir)\NoiseGate.aaxdll" "$(OutDir)\NoiseGate.aaxplugin\Contents\Win32\NoiseGate.aaxplugin" -call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\NoiseGate.aaxplugin\Contents\Win32" "c:\\SDKs\\AAX\\Utilities\\PlugIn.ico" +call "C:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\NoiseGate.aaxplugin\Contents\Win32" "C:\\SDKs\\AAX\\Utilities\\PlugIn.ico" diff --git a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_SharedCode.vcxproj b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_SharedCode.vcxproj index 4df4073ac9..3d39eb1e08 100644 --- a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_SharedCode.vcxproj +++ b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_SharedCode.vcxproj @@ -16,6 +16,7 @@ {C400EBA2-5D53-0AF7-AA8B-7F64FB12D8EC} v140 + 8.1 StaticLibrary false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ NoiseGate true v140 + 8.1 @@ -65,7 +70,7 @@ Disabled EditAndContinue - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=1;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=1;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -158,9 +165,6 @@ true - - true - true @@ -221,6 +225,9 @@ true + + true + true @@ -437,9 +444,6 @@ true - - true - true @@ -599,6 +603,9 @@ true + + true + true @@ -1751,13 +1758,7 @@ true - - true - - - true - - + true @@ -1786,7 +1787,6 @@ - @@ -1806,10 +1806,12 @@ + + @@ -1915,7 +1917,6 @@ - @@ -2227,6 +2228,7 @@ + @@ -2411,8 +2413,12 @@ - - + + + + + + diff --git a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_SharedCode.vcxproj.filters b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_SharedCode.vcxproj.filters index 5c6aeae7d4..d49293f0ac 100644 --- a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_SharedCode.vcxproj.filters +++ b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_SharedCode.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -388,9 +391,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -451,6 +451,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -673,9 +676,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -850,6 +850,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2086,20 +2089,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2172,9 +2163,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2232,6 +2220,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2244,6 +2235,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2559,9 +2553,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3495,6 +3486,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -4047,10 +4041,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_VST.vcxproj b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_VST.vcxproj index 54f5779adb..c18faa3e31 100644 --- a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_VST.vcxproj +++ b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_VST.vcxproj @@ -16,6 +16,7 @@ {A536DDEE-63EA-6626-E173-346797F44F1C} v140 + 8.1 DynamicLibrary false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v140 + 8.1 @@ -67,7 +72,7 @@ Disabled EditAndContinue - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_VST3.vcxproj b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_VST3.vcxproj index 0a08ed1566..b84136de2e 100644 --- a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_VST3.vcxproj +++ b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2015/NoiseGate_VST3.vcxproj @@ -16,6 +16,7 @@ {79CECA03-F5D8-FAA6-DF41-B5C10F2E99DC} v140 + 8.1 DynamicLibrary false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v140 + 8.1 @@ -67,7 +72,7 @@ Disabled EditAndContinue - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate.sln b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate.sln index 603374431f..92d4206257 100644 --- a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate.sln +++ b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate.sln @@ -24,22 +24,22 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A536DDEE-63EA-6626-E173-346797F44F1C}.Debug|x64.Build.0 = Debug|x64 {A536DDEE-63EA-6626-E173-346797F44F1C}.Debug|x64.ActiveCfg = Debug|x64 - {A536DDEE-63EA-6626-E173-346797F44F1C}.Release|x64.Build.0 = Release|x64 + {A536DDEE-63EA-6626-E173-346797F44F1C}.Debug|x64.Build.0 = Debug|x64 {A536DDEE-63EA-6626-E173-346797F44F1C}.Release|x64.ActiveCfg = Release|x64 - {79CECA03-F5D8-FAA6-DF41-B5C10F2E99DC}.Debug|x64.Build.0 = Debug|x64 + {A536DDEE-63EA-6626-E173-346797F44F1C}.Release|x64.Build.0 = Release|x64 {79CECA03-F5D8-FAA6-DF41-B5C10F2E99DC}.Debug|x64.ActiveCfg = Debug|x64 - {79CECA03-F5D8-FAA6-DF41-B5C10F2E99DC}.Release|x64.Build.0 = Release|x64 + {79CECA03-F5D8-FAA6-DF41-B5C10F2E99DC}.Debug|x64.Build.0 = Debug|x64 {79CECA03-F5D8-FAA6-DF41-B5C10F2E99DC}.Release|x64.ActiveCfg = Release|x64 - {047A8F76-26B6-FCC1-DC5E-2B0920870033}.Debug|x64.Build.0 = Debug|x64 + {79CECA03-F5D8-FAA6-DF41-B5C10F2E99DC}.Release|x64.Build.0 = Release|x64 {047A8F76-26B6-FCC1-DC5E-2B0920870033}.Debug|x64.ActiveCfg = Debug|x64 - {047A8F76-26B6-FCC1-DC5E-2B0920870033}.Release|x64.Build.0 = Release|x64 + {047A8F76-26B6-FCC1-DC5E-2B0920870033}.Debug|x64.Build.0 = Debug|x64 {047A8F76-26B6-FCC1-DC5E-2B0920870033}.Release|x64.ActiveCfg = Release|x64 - {C400EBA2-5D53-0AF7-AA8B-7F64FB12D8EC}.Debug|x64.Build.0 = Debug|x64 + {047A8F76-26B6-FCC1-DC5E-2B0920870033}.Release|x64.Build.0 = Release|x64 {C400EBA2-5D53-0AF7-AA8B-7F64FB12D8EC}.Debug|x64.ActiveCfg = Debug|x64 - {C400EBA2-5D53-0AF7-AA8B-7F64FB12D8EC}.Release|x64.Build.0 = Release|x64 + {C400EBA2-5D53-0AF7-AA8B-7F64FB12D8EC}.Debug|x64.Build.0 = Debug|x64 {C400EBA2-5D53-0AF7-AA8B-7F64FB12D8EC}.Release|x64.ActiveCfg = Release|x64 + {C400EBA2-5D53-0AF7-AA8B-7F64FB12D8EC}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_AAX.vcxproj b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_AAX.vcxproj index ba686cfd1b..75b21d7a69 100644 --- a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_AAX.vcxproj +++ b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_AAX.vcxproj @@ -16,6 +16,7 @@ {047A8F76-26B6-FCC1-DC5E-2B0920870033} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v141 + 10.0.15063.0 @@ -69,8 +74,8 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="c:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="C:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -106,7 +112,7 @@ if not exist "$(OutDir)\NoiseGate.aaxplugin\Contents\x64" mkdir " copy /Y "$(OutDir)\NoiseGate.aaxdll" "$(OutDir)\NoiseGate.aaxplugin\Contents\x64\NoiseGate.aaxplugin" -call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\NoiseGate.aaxplugin\Contents\x64" "c:\\SDKs\\AAX\\Utilities\\PlugIn.ico" +call "C:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\NoiseGate.aaxplugin\Contents\x64" "C:\\SDKs\\AAX\\Utilities\\PlugIn.ico" @@ -119,8 +125,8 @@ call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Noi Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="c:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="C:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) MultiThreadedDLL true @@ -130,6 +136,7 @@ call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Noi Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -158,7 +165,7 @@ if not exist "$(OutDir)\NoiseGate.aaxplugin\Contents\x64" mkdir " copy /Y "$(OutDir)\NoiseGate.aaxdll" "$(OutDir)\NoiseGate.aaxplugin\Contents\x64\NoiseGate.aaxplugin" -call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\NoiseGate.aaxplugin\Contents\x64" "c:\\SDKs\\AAX\\Utilities\\PlugIn.ico" +call "C:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\NoiseGate.aaxplugin\Contents\x64" "C:\\SDKs\\AAX\\Utilities\\PlugIn.ico" diff --git a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_SharedCode.vcxproj b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_SharedCode.vcxproj index 637894ca8b..727c553a97 100644 --- a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_SharedCode.vcxproj +++ b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_SharedCode.vcxproj @@ -16,6 +16,7 @@ {C400EBA2-5D53-0AF7-AA8B-7F64FB12D8EC} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ NoiseGate true v141 + 10.0.15063.0 @@ -67,7 +72,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=1;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -106,7 +112,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=1;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -151,9 +158,6 @@ true - - true - true @@ -214,6 +218,9 @@ true + + true + true @@ -430,9 +437,6 @@ true - - true - true @@ -592,6 +596,9 @@ true + + true + true @@ -1744,13 +1751,7 @@ true - - true - - - true - - + true @@ -1779,7 +1780,6 @@ - @@ -1799,10 +1799,12 @@ + + @@ -1908,7 +1910,6 @@ - @@ -2220,6 +2221,7 @@ + @@ -2404,8 +2406,12 @@ - - + + + + + + diff --git a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_SharedCode.vcxproj.filters b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_SharedCode.vcxproj.filters index d0556be306..2551b1fd47 100644 --- a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_SharedCode.vcxproj.filters +++ b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_SharedCode.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -388,9 +391,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -451,6 +451,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -673,9 +676,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -850,6 +850,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2086,20 +2089,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2172,9 +2163,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2232,6 +2220,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2244,6 +2235,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2559,9 +2553,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3495,6 +3486,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -4047,10 +4041,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_VST.vcxproj b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_VST.vcxproj index 9753009b69..9522a48f0f 100644 --- a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_VST.vcxproj +++ b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_VST.vcxproj @@ -16,6 +16,7 @@ {A536DDEE-63EA-6626-E173-346797F44F1C} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v141 + 10.0.15063.0 @@ -69,7 +74,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_VST3.vcxproj b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_VST3.vcxproj index 71dadf061b..206d8dcbeb 100644 --- a/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_VST3.vcxproj +++ b/examples/PlugInSamples/NoiseGate/Builds/VisualStudio2017/NoiseGate_VST3.vcxproj @@ -16,6 +16,7 @@ {79CECA03-F5D8-FAA6-DF41-B5C10F2E99DC} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v141 + 10.0.15063.0 @@ -69,7 +74,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/NoiseGate/JuceLibraryCode/AppConfig.h b/examples/PlugInSamples/NoiseGate/JuceLibraryCode/AppConfig.h index f3b739f070..78542a2d27 100644 --- a/examples/PlugInSamples/NoiseGate/JuceLibraryCode/AppConfig.h +++ b/examples/PlugInSamples/NoiseGate/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -57,6 +63,181 @@ #define JUCE_MODULE_AVAILABLE_juce_opengl 1 #define JUCE_MODULE_AVAILABLE_juce_video 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_plugin_client flags: + +#ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS + //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS 1 +#endif + +#ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS + //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif + +//============================================================================== +// juce_video flags: + +#ifndef JUCE_USE_CAMERA + //#define JUCE_USE_CAMERA 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -66,194 +247,6 @@ #endif #endif -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_plugin_client flags: - -#ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS - //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS -#endif - -#ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS - //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif - -//============================================================================== -// juce_video flags: - -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - #define JUCE_QUICKTIME 0 -#endif - -#ifndef JUCE_USE_CAMERA - //#define JUCE_USE_CAMERA -#endif - //============================================================================== // Audio plugin settings.. @@ -275,8 +268,8 @@ #ifndef JucePlugin_Build_AAX #define JucePlugin_Build_AAX 1 #endif -#ifndef JucePlugin_Build_STANDALONE - #define JucePlugin_Build_STANDALONE 0 +#ifndef JucePlugin_Build_Standalone + #define JucePlugin_Build_Standalone 0 #endif #ifndef JucePlugin_Enable_IAA #define JucePlugin_Enable_IAA 0 diff --git a/examples/PlugInSamples/NoiseGate/NoiseGate.jucer b/examples/PlugInSamples/NoiseGate/NoiseGate.jucer index 4d1a0b43a4..17690add16 100644 --- a/examples/PlugInSamples/NoiseGate/NoiseGate.jucer +++ b/examples/PlugInSamples/NoiseGate/NoiseGate.jucer @@ -8,17 +8,17 @@ pluginIsSynth="0" pluginWantsMidiIn="0" pluginProducesMidiOut="0" pluginSilenceInIsSilenceOut="0" pluginEditorRequiresKeys="0" pluginAUExportPrefix="NoiseGateAU" pluginRTASCategory="" aaxIdentifier="com.roli.NoiseGate" - pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="5.0.2" + pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="5.1.0" pluginIsMidiEffectPlugin="0" buildAUv3="0" buildStandalone="0" enableIAA="0" displaySplashScreen="0" reportAppUsage="0" splashScreenColour="Dark" - companyName="ROLI Ltd."> + companyName="ROLI Ltd." cppLanguageStandard="11"> - {14B52CC8-E419-ABEE-5E58-923ED2747D28} v140_xp + 8.1 false v140_xp v140_xp + 8.1 @@ -32,6 +34,7 @@ true v140_xp v140_xp + 8.1 @@ -42,6 +45,7 @@ v140_xp + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v140_xp + 8.1 @@ -69,8 +74,8 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="c:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="C:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) MultiThreadedDebug true @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -106,7 +112,7 @@ if not exist "$(OutDir)\Surround.aaxplugin\Contents\x64" mkdir "$ copy /Y "$(OutDir)\Surround.aaxdll" "$(OutDir)\Surround.aaxplugin\Contents\x64\Surround.aaxplugin" -call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Surround.aaxplugin\Contents\x64" "c:\\SDKs\\AAX\\Utilities\\PlugIn.ico" +call "C:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Surround.aaxplugin\Contents\x64" "C:\\SDKs\\AAX\\Utilities\\PlugIn.ico" @@ -119,8 +125,8 @@ call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Sur Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="c:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="C:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) MultiThreaded true @@ -130,6 +136,7 @@ call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Sur Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -158,7 +165,7 @@ if not exist "$(OutDir)\Surround.aaxplugin\Contents\x64" mkdir "$ copy /Y "$(OutDir)\Surround.aaxdll" "$(OutDir)\Surround.aaxplugin\Contents\x64\Surround.aaxplugin" -call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Surround.aaxplugin\Contents\x64" "c:\\SDKs\\AAX\\Utilities\\PlugIn.ico" +call "C:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Surround.aaxplugin\Contents\x64" "C:\\SDKs\\AAX\\Utilities\\PlugIn.ico" diff --git a/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_SharedCode.vcxproj b/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_SharedCode.vcxproj index fee3b13b35..c8fee712c8 100644 --- a/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_SharedCode.vcxproj +++ b/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_SharedCode.vcxproj @@ -16,6 +16,7 @@ {E23EFE1E-497A-07DF-40A4-45EC79B5684F} v140_xp + 8.1 false v140_xp v140_xp + 8.1 @@ -32,6 +34,7 @@ true v140_xp v140_xp + 8.1 @@ -42,6 +45,7 @@ v140_xp + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ Surround true v140_xp + 8.1 @@ -67,7 +72,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=1;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -106,7 +112,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=1;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreaded true @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -151,9 +158,6 @@ true - - true - true @@ -214,6 +218,9 @@ true + + true + true @@ -430,9 +437,6 @@ true - - true - true @@ -592,6 +596,9 @@ true + + true + true @@ -1744,13 +1751,7 @@ true - - true - - - true - - + true @@ -1780,7 +1781,6 @@ - @@ -1800,10 +1800,12 @@ + + @@ -1909,7 +1911,6 @@ - @@ -2221,6 +2222,7 @@ + @@ -2405,8 +2407,12 @@ - - + + + + + + diff --git a/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_SharedCode.vcxproj.filters b/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_SharedCode.vcxproj.filters index 6aad3855bb..897670271d 100644 --- a/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_SharedCode.vcxproj.filters +++ b/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_SharedCode.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -388,9 +391,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -451,6 +451,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -673,9 +676,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -850,6 +850,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2086,20 +2089,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2175,9 +2166,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2235,6 +2223,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2247,6 +2238,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2562,9 +2556,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3498,6 +3489,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -4050,10 +4044,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_VST.vcxproj b/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_VST.vcxproj index d3b02643db..57e9e2f36f 100644 --- a/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_VST.vcxproj +++ b/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_VST.vcxproj @@ -16,6 +16,7 @@ {55C862BB-34A6-D462-7677-B40B5A2B2D47} v140_xp + 8.1 false v140_xp v140_xp + 8.1 @@ -32,6 +34,7 @@ true v140_xp v140_xp + 8.1 @@ -42,6 +45,7 @@ v140_xp + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v140_xp + 8.1 @@ -69,7 +74,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreaded true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_VST3.vcxproj b/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_VST3.vcxproj index 0012e8e135..dc7e860993 100644 --- a/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_VST3.vcxproj +++ b/examples/PlugInSamples/Surround/Builds/VisualStudio2015/Surround_VST3.vcxproj @@ -16,6 +16,7 @@ {02900CD6-1E72-2F77-FBBC-5E75F6E44D01} v140_xp + 8.1 false v140_xp v140_xp + 8.1 @@ -32,6 +34,7 @@ true v140_xp v140_xp + 8.1 @@ -42,6 +45,7 @@ v140_xp + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v140_xp + 8.1 @@ -69,7 +74,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreaded true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround.sln b/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround.sln index 98a903b1dc..7bd33e6aba 100644 --- a/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround.sln +++ b/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround.sln @@ -24,22 +24,22 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {55C862BB-34A6-D462-7677-B40B5A2B2D47}.Debug|x64.Build.0 = Debug|x64 {55C862BB-34A6-D462-7677-B40B5A2B2D47}.Debug|x64.ActiveCfg = Debug|x64 - {55C862BB-34A6-D462-7677-B40B5A2B2D47}.Release|x64.Build.0 = Release|x64 + {55C862BB-34A6-D462-7677-B40B5A2B2D47}.Debug|x64.Build.0 = Debug|x64 {55C862BB-34A6-D462-7677-B40B5A2B2D47}.Release|x64.ActiveCfg = Release|x64 - {02900CD6-1E72-2F77-FBBC-5E75F6E44D01}.Debug|x64.Build.0 = Debug|x64 + {55C862BB-34A6-D462-7677-B40B5A2B2D47}.Release|x64.Build.0 = Release|x64 {02900CD6-1E72-2F77-FBBC-5E75F6E44D01}.Debug|x64.ActiveCfg = Debug|x64 - {02900CD6-1E72-2F77-FBBC-5E75F6E44D01}.Release|x64.Build.0 = Release|x64 + {02900CD6-1E72-2F77-FBBC-5E75F6E44D01}.Debug|x64.Build.0 = Debug|x64 {02900CD6-1E72-2F77-FBBC-5E75F6E44D01}.Release|x64.ActiveCfg = Release|x64 - {14B52CC8-E419-ABEE-5E58-923ED2747D28}.Debug|x64.Build.0 = Debug|x64 + {02900CD6-1E72-2F77-FBBC-5E75F6E44D01}.Release|x64.Build.0 = Release|x64 {14B52CC8-E419-ABEE-5E58-923ED2747D28}.Debug|x64.ActiveCfg = Debug|x64 - {14B52CC8-E419-ABEE-5E58-923ED2747D28}.Release|x64.Build.0 = Release|x64 + {14B52CC8-E419-ABEE-5E58-923ED2747D28}.Debug|x64.Build.0 = Debug|x64 {14B52CC8-E419-ABEE-5E58-923ED2747D28}.Release|x64.ActiveCfg = Release|x64 - {E23EFE1E-497A-07DF-40A4-45EC79B5684F}.Debug|x64.Build.0 = Debug|x64 + {14B52CC8-E419-ABEE-5E58-923ED2747D28}.Release|x64.Build.0 = Release|x64 {E23EFE1E-497A-07DF-40A4-45EC79B5684F}.Debug|x64.ActiveCfg = Debug|x64 - {E23EFE1E-497A-07DF-40A4-45EC79B5684F}.Release|x64.Build.0 = Release|x64 + {E23EFE1E-497A-07DF-40A4-45EC79B5684F}.Debug|x64.Build.0 = Debug|x64 {E23EFE1E-497A-07DF-40A4-45EC79B5684F}.Release|x64.ActiveCfg = Release|x64 + {E23EFE1E-497A-07DF-40A4-45EC79B5684F}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_AAX.vcxproj b/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_AAX.vcxproj index 5eca6e5ebf..d4a2264a32 100644 --- a/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_AAX.vcxproj +++ b/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_AAX.vcxproj @@ -16,6 +16,7 @@ {14B52CC8-E419-ABEE-5E58-923ED2747D28} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v141 + 10.0.15063.0 @@ -69,8 +74,8 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="c:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="C:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -106,7 +112,7 @@ if not exist "$(OutDir)\Surround.aaxplugin\Contents\x64" mkdir "$ copy /Y "$(OutDir)\Surround.aaxdll" "$(OutDir)\Surround.aaxplugin\Contents\x64\Surround.aaxplugin" -call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Surround.aaxplugin\Contents\x64" "c:\\SDKs\\AAX\\Utilities\\PlugIn.ico" +call "C:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Surround.aaxplugin\Contents\x64" "C:\\SDKs\\AAX\\Utilities\\PlugIn.ico" @@ -119,8 +125,8 @@ call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Sur Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="c:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=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=1;JucePlugin_Build_Standalone=0;JucePlugin_AAXLibs_path="C:\\SDKs\\AAX\\Libs";%(PreprocessorDefinitions) MultiThreadedDLL true @@ -130,6 +136,7 @@ call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Sur Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -158,7 +165,7 @@ if not exist "$(OutDir)\Surround.aaxplugin\Contents\x64" mkdir "$ copy /Y "$(OutDir)\Surround.aaxdll" "$(OutDir)\Surround.aaxplugin\Contents\x64\Surround.aaxplugin" -call "c:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Surround.aaxplugin\Contents\x64" "c:\\SDKs\\AAX\\Utilities\\PlugIn.ico" +call "C:\\SDKs\\AAX\\Utilities\\CreatePackage.bat" "$(OutDir)\Surround.aaxplugin\Contents\x64" "C:\\SDKs\\AAX\\Utilities\\PlugIn.ico" diff --git a/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_SharedCode.vcxproj b/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_SharedCode.vcxproj index 27f25f5b31..ba1585d81b 100644 --- a/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_SharedCode.vcxproj +++ b/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_SharedCode.vcxproj @@ -16,6 +16,7 @@ {E23EFE1E-497A-07DF-40A4-45EC79B5684F} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ Surround true v141 + 10.0.15063.0 @@ -67,7 +72,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=1;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -106,7 +112,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=1;JucePlugin_Build_Standalone=0;JUCE_SHARED_CODE=1;_LIB;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -151,9 +158,6 @@ true - - true - true @@ -214,6 +218,9 @@ true + + true + true @@ -430,9 +437,6 @@ true - - true - true @@ -592,6 +596,9 @@ true + + true + true @@ -1744,13 +1751,7 @@ true - - true - - - true - - + true @@ -1780,7 +1781,6 @@ - @@ -1800,10 +1800,12 @@ + + @@ -1909,7 +1911,6 @@ - @@ -2221,6 +2222,7 @@ + @@ -2405,8 +2407,12 @@ - - + + + + + + diff --git a/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_SharedCode.vcxproj.filters b/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_SharedCode.vcxproj.filters index 722fc8b179..14324fc632 100644 --- a/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_SharedCode.vcxproj.filters +++ b/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_SharedCode.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -388,9 +391,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -451,6 +451,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -673,9 +676,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -850,6 +850,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2086,20 +2089,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2175,9 +2166,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2235,6 +2223,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2247,6 +2238,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2562,9 +2556,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3498,6 +3489,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -4050,10 +4044,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_VST.vcxproj b/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_VST.vcxproj index d31aa1433a..3a937de428 100644 --- a/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_VST.vcxproj +++ b/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_VST.vcxproj @@ -16,6 +16,7 @@ {55C862BB-34A6-D462-7677-B40B5A2B2D47} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v141 + 10.0.15063.0 @@ -69,7 +74,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_VST3.vcxproj b/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_VST3.vcxproj index 6e99e6e8e9..91ceef3e46 100644 --- a/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_VST3.vcxproj +++ b/examples/PlugInSamples/Surround/Builds/VisualStudio2017/Surround_VST3.vcxproj @@ -16,6 +16,7 @@ {02900CD6-1E72-2F77-FBBC-5E75F6E44D01} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v141 + 10.0.15063.0 @@ -69,7 +74,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -109,7 +115,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;c:\SDKs\AAX;c:\SDKs\AAX\Interfaces;c:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;C:\SDKs\AAX;C:\SDKs\AAX\Interfaces;C:\SDKs\AAX\Interfaces\ACF;..\..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/PlugInSamples/Surround/JuceLibraryCode/AppConfig.h b/examples/PlugInSamples/Surround/JuceLibraryCode/AppConfig.h index 4ecedcf30f..5f6397a551 100644 --- a/examples/PlugInSamples/Surround/JuceLibraryCode/AppConfig.h +++ b/examples/PlugInSamples/Surround/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -57,6 +63,181 @@ #define JUCE_MODULE_AVAILABLE_juce_opengl 1 #define JUCE_MODULE_AVAILABLE_juce_video 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_plugin_client flags: + +#ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS + //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS 1 +#endif + +#ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS + //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif + +//============================================================================== +// juce_video flags: + +#ifndef JUCE_USE_CAMERA + //#define JUCE_USE_CAMERA 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -66,194 +247,6 @@ #endif #endif -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_plugin_client flags: - -#ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS - //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS -#endif - -#ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS - //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif - -//============================================================================== -// juce_video flags: - -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - #define JUCE_QUICKTIME 0 -#endif - -#ifndef JUCE_USE_CAMERA - //#define JUCE_USE_CAMERA -#endif - //============================================================================== // Audio plugin settings.. @@ -275,8 +268,8 @@ #ifndef JucePlugin_Build_AAX #define JucePlugin_Build_AAX 1 #endif -#ifndef JucePlugin_Build_STANDALONE - #define JucePlugin_Build_STANDALONE 0 +#ifndef JucePlugin_Build_Standalone + #define JucePlugin_Build_Standalone 0 #endif #ifndef JucePlugin_Enable_IAA #define JucePlugin_Enable_IAA 0 diff --git a/examples/PlugInSamples/Surround/Surround.jucer b/examples/PlugInSamples/Surround/Surround.jucer index 3c907e1884..689446bc7b 100644 --- a/examples/PlugInSamples/Surround/Surround.jucer +++ b/examples/PlugInSamples/Surround/Surround.jucer @@ -9,9 +9,9 @@ pluginIsMidiEffectPlugin="0" pluginSilenceInIsSilenceOut="0" pluginEditorRequiresKeys="0" pluginAUExportPrefix="SurroundAU" pluginRTASCategory="" aaxIdentifier="com.roli.Surround" pluginAAXCategory="AAX_ePlugInCategory_Dynamics" - jucerVersion="5.0.2" buildAUv3="0" buildStandalone="0" enableIAA="0" + jucerVersion="5.1.0" buildAUv3="0" buildStandalone="0" enableIAA="0" displaySplashScreen="0" reportAppUsage="0" splashScreenColour="Dark" - companyName="ROLI Ltd."> + companyName="ROLI Ltd." cppLanguageStandard="11"> + vst3Folder="" aaxFolder="" extraDefs="" extraCompilerFlags="-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"> diff --git a/examples/SimpleFFTExample/Builds/MacOSX/SimpleFFTExample.xcodeproj/project.pbxproj b/examples/SimpleFFTExample/Builds/MacOSX/SimpleFFTExample.xcodeproj/project.pbxproj index aba4b4dbf7..28425966c5 100644 --- a/examples/SimpleFFTExample/Builds/MacOSX/SimpleFFTExample.xcodeproj/project.pbxproj +++ b/examples/SimpleFFTExample/Builds/MacOSX/SimpleFFTExample.xcodeproj/project.pbxproj @@ -124,7 +124,7 @@ 3E9AA92331ACE90F1BDE77D8, 668227B90C7AD85717519435, ); name = Source; sourceTree = ""; }; 98A968A1085AE2C43974C9D9 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -145,8 +145,9 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -154,7 +155,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 58FAAEBF3AE1ED695E3DC7E2 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -176,8 +177,9 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -186,16 +188,37 @@ USE_HEADERMAP = NO; }; name = Release; }; F1DB30FBBCE0275545D5B9CE = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "SimpleFFTExample"; @@ -203,15 +226,36 @@ ZERO_LINK = NO; }; name = Debug; }; BABA4BB800F65EA14B6DB5E3 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "SimpleFFTExample"; WARNING_CFLAGS = -Wreorder; @@ -253,7 +297,7 @@ 48322B9DE3337E69E96F7551, 69128EEF3B23EA7E960EBE08, B8B3353D164D52CC62A584F2, ); buildRules = ( ); dependencies = ( ); name = "SimpleFFTExample - App"; productName = SimpleFFTExample; productReference = 8D8ED3E7474D65E7177750A8; productType = "com.apple.product-type.application"; }; - CF307CC82EF6FB552266854D = {isa = PBXProject; buildConfigurationList = C877108FC7BF2DA280A51F46; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { D0E4014BABB86AAE963C0EC0 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 4DB04A617E8DFE6D06731154; projectDirPath = ""; projectRoot = ""; targets = (D0E4014BABB86AAE963C0EC0); }; + CF307CC82EF6FB552266854D = {isa = PBXProject; buildConfigurationList = C877108FC7BF2DA280A51F46; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { D0E4014BABB86AAE963C0EC0 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 4DB04A617E8DFE6D06731154; projectDirPath = ""; projectRoot = ""; targets = (D0E4014BABB86AAE963C0EC0); }; }; rootObject = CF307CC82EF6FB552266854D; } diff --git a/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample.sln b/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample.sln index 3fc8186466..dd57f88cdb 100644 --- a/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample.sln +++ b/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample.sln @@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5F11C54A-E1F5-0119-1E0A-E26E0B8E911C}.Debug|Win32.Build.0 = Debug|Win32 {5F11C54A-E1F5-0119-1E0A-E26E0B8E911C}.Debug|Win32.ActiveCfg = Debug|Win32 - {5F11C54A-E1F5-0119-1E0A-E26E0B8E911C}.Release|Win32.Build.0 = Release|Win32 + {5F11C54A-E1F5-0119-1E0A-E26E0B8E911C}.Debug|Win32.Build.0 = Debug|Win32 {5F11C54A-E1F5-0119-1E0A-E26E0B8E911C}.Release|Win32.ActiveCfg = Release|Win32 + {5F11C54A-E1F5-0119-1E0A-E26E0B8E911C}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj b/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj index f16f8029d1..baed4c6c3f 100644 --- a/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj +++ b/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj @@ -16,6 +16,7 @@ {5F11C54A-E1F5-0119-1E0A-E26E0B8E911C} v120 + 8.1 Application false v120 + 8.1 @@ -30,6 +32,7 @@ false true v120 + 8.1 @@ -40,6 +43,7 @@ v120 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ SimpleFFTExample true v120 + 8.1 @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -569,6 +573,9 @@ true + + true + true @@ -1688,7 +1695,6 @@ - @@ -1708,10 +1714,12 @@ + + @@ -1817,7 +1825,6 @@ - @@ -2089,6 +2096,7 @@ + diff --git a/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj.filters b/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj.filters index 356a710c58..95c7592a68 100644 --- a/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj.filters +++ b/examples/SimpleFFTExample/Builds/VisualStudio2013/SimpleFFTExample_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -349,9 +352,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -412,6 +412,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -634,9 +637,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -796,6 +796,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2031,9 +2034,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2091,6 +2091,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2103,6 +2106,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2418,9 +2424,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3234,6 +3237,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample.sln b/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample.sln index 6fddebd300..6ce721ced3 100644 --- a/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample.sln +++ b/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5F11C54A-E1F5-0119-1E0A-E26E0B8E911C}.Debug|x64.Build.0 = Debug|x64 {5F11C54A-E1F5-0119-1E0A-E26E0B8E911C}.Debug|x64.ActiveCfg = Debug|x64 - {5F11C54A-E1F5-0119-1E0A-E26E0B8E911C}.Release|x64.Build.0 = Release|x64 + {5F11C54A-E1F5-0119-1E0A-E26E0B8E911C}.Debug|x64.Build.0 = Debug|x64 {5F11C54A-E1F5-0119-1E0A-E26E0B8E911C}.Release|x64.ActiveCfg = Release|x64 + {5F11C54A-E1F5-0119-1E0A-E26E0B8E911C}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj b/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj index 00b881deb5..c334d6d2a6 100644 --- a/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj +++ b/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj @@ -16,6 +16,7 @@ {5F11C54A-E1F5-0119-1E0A-E26E0B8E911C} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ SimpleFFTExample true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -151,9 +158,6 @@ true - - true - true @@ -214,6 +218,9 @@ true + + true + true @@ -430,9 +437,6 @@ true - - true - true @@ -568,6 +572,9 @@ true + + true + true @@ -1687,7 +1694,6 @@ - @@ -1707,10 +1713,12 @@ + + @@ -1816,7 +1824,6 @@ - @@ -2088,6 +2095,7 @@ + diff --git a/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj.filters b/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj.filters index cc5dc5519a..1bebdd00cb 100644 --- a/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj.filters +++ b/examples/SimpleFFTExample/Builds/VisualStudio2017/SimpleFFTExample_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -349,9 +352,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -412,6 +412,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -634,9 +637,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -796,6 +796,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2031,9 +2034,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2091,6 +2091,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2103,6 +2106,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2418,9 +2424,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3234,6 +3237,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/SimpleFFTExample/JuceLibraryCode/AppConfig.h b/examples/SimpleFFTExample/JuceLibraryCode/AppConfig.h index 0c0ae04d52..3297659b93 100644 --- a/examples/SimpleFFTExample/JuceLibraryCode/AppConfig.h +++ b/examples/SimpleFFTExample/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -54,6 +60,174 @@ #define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 #define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -62,172 +236,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_audio_utils flags: - -#ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER -#endif - -#ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif diff --git a/examples/SimpleFFTExample/SimpleFFTExample.jucer b/examples/SimpleFFTExample/SimpleFFTExample.jucer index a51f15ab10..bc68914dd1 100644 --- a/examples/SimpleFFTExample/SimpleFFTExample.jucer +++ b/examples/SimpleFFTExample/SimpleFFTExample.jucer @@ -2,8 +2,8 @@ + jucerVersion="5.1.0" displaySplashScreen="0" reportAppUsage="0" + splashScreenColour="Dark" companyName="ROLI Ltd." cppLanguageStandard="11"> + + - + 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 2e8e8f397c..771774e919 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 @@ -58,6 +58,16 @@ import android.media.AudioManager; import android.media.MediaScannerConnection; import android.media.MediaScannerConnection.MediaScannerConnectionClient; import android.Manifest; +import java.util.concurrent.CancellationException; +import java.util.concurrent.Future; +import java.util.concurrent.Executors; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.Callable; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.locks.ReentrantLock; +import java.util.concurrent.atomic.*; import android.media.midi.*; import android.bluetooth.*; @@ -100,13 +110,18 @@ public class JuceDemoPlugin extends Activity // these have to match the values of enum PermissionID in C++ class RuntimePermissions: private static final int JUCE_PERMISSIONS_RECORD_AUDIO = 1; private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2; + private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3; + private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4; private static String getAndroidPermissionName (int permissionID) { switch (permissionID) { - case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO; - case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION; + case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO; + case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION; + // use string value as this is not defined in SDKs < 16 + case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE"; + case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE; } // unknown permission ID! @@ -1628,6 +1643,7 @@ public class JuceDemoPlugin extends Activity //============================================================================== private native void handleKeyDown (long host, int keycode, int textchar); private native void handleKeyUp (long host, int keycode, int textchar); + private native void handleBackButton (long host); public void showKeyboard (String type) { @@ -1655,8 +1671,14 @@ public class JuceDemoPlugin extends Activity case KeyEvent.KEYCODE_VOLUME_UP: case KeyEvent.KEYCODE_VOLUME_DOWN: return super.onKeyDown (keyCode, event); + case KeyEvent.KEYCODE_BACK: + { + handleBackButton (host); + return true; + } - default: break; + default: + break; } handleKeyDown (host, keyCode, event.getUnicodeChar()); @@ -1876,43 +1898,136 @@ public class JuceDemoPlugin extends Activity public static class HTTPStream { public HTTPStream (HttpURLConnection connection_, - int[] statusCode, StringBuffer responseHeaders) throws IOException + int[] statusCode_, + StringBuffer responseHeaders_) { connection = connection_; + statusCode = statusCode_; + responseHeaders = responseHeaders_; + } + + private final InputStream getCancellableStream (final boolean isInput) throws ExecutionException + { + synchronized (createFutureLock) + { + if (hasBeenCancelled.get()) + return null; + + streamFuture = executor.submit (new Callable() + { + @Override + public BufferedInputStream call() throws IOException + { + return new BufferedInputStream (isInput ? connection.getInputStream() + : connection.getErrorStream()); + } + }); + } try { - inputStream = new BufferedInputStream (connection.getInputStream()); + if (connection.getConnectTimeout() > 0) + return streamFuture.get (connection.getConnectTimeout(), TimeUnit.MILLISECONDS); + else + return streamFuture.get(); + } + catch (InterruptedException e) + { + return null; + } + catch (TimeoutException e) + { + return null; + } + catch (CancellationException e) + { + return null; + } + } + + public final boolean connect() + { + try + { + try + { + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + inputStream = getCancellableStream (true); + } + } + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally + { + statusCode[0] = connection.getResponseCode(); + } + + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + try + { + if (statusCode[0] >= 400) + inputStream = getCancellableStream (false); + else + inputStream = getCancellableStream (true); + } + 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) { - if (connection.getResponseCode() < 400) - throw e; + return false; } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - if (statusCode[0] >= 400) - inputStream = connection.getErrorStream(); - else - inputStream = connection.getInputStream(); - - 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"); } public final void release() { + hasBeenCancelled.set (true); + try { - inputStream.close(); + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (inputStream != null) + inputStream.close(); } catch (IOException e) {} + finally + { + createStreamLock.unlock(); + } connection.disconnect(); } @@ -1923,7 +2038,11 @@ public class JuceDemoPlugin extends Activity try { - num = inputStream.read (buffer, 0, numBytes); + synchronized (createStreamLock) + { + if (inputStream != null) + num = inputStream.read (buffer, 0, numBytes); + } } catch (IOException e) {} @@ -1940,8 +2059,16 @@ public class JuceDemoPlugin extends Activity public final boolean setPosition (long newPos) { return false; } private HttpURLConnection connection; + private int[] statusCode; + private StringBuffer responseHeaders; private InputStream inputStream; private long position; + private final ReentrantLock createStreamLock = new ReentrantLock(); + private final Object createFutureLock = new Object(); + private AtomicBoolean hasBeenCancelled = new AtomicBoolean(); + + private final ExecutorService executor = Executors.newCachedThreadPool (Executors.defaultThreadFactory()); + Future streamFuture; } public static final HTTPStream createHTTPStream (String address, boolean isPost, byte[] postData, diff --git a/examples/audio plugin demo/Builds/Android/app/src/release/res/values/string.xml b/examples/audio plugin demo/Builds/Android/app/src/release/res/values/string.xml new file mode 100644 index 0000000000..73aad349fb --- /dev/null +++ b/examples/audio plugin demo/Builds/Android/app/src/release/res/values/string.xml @@ -0,0 +1,5 @@ + + + + JuceDemoPlugin + diff --git a/examples/audio plugin demo/Builds/Android/build.gradle b/examples/audio plugin demo/Builds/Android/build.gradle index e1c0c91bb7..0109eaa02a 100644 --- a/examples/audio plugin demo/Builds/Android/build.gradle +++ b/examples/audio plugin demo/Builds/Android/build.gradle @@ -3,7 +3,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.1' + classpath 'com.android.tools.build:gradle:2.3.3' } } diff --git a/examples/audio plugin demo/Builds/LinuxMakefile/Makefile b/examples/audio plugin demo/Builds/LinuxMakefile/Makefile index 95738b0403..e1d27502d3 100644 --- a/examples/audio plugin demo/Builds/LinuxMakefile/Makefile +++ b/examples/audio plugin demo/Builds/LinuxMakefile/Makefile @@ -107,9 +107,13 @@ OBJECTS_SHARED_CODE := \ $(JUCE_OBJDIR)/include_juce_gui_basics_e3f79785.o \ $(JUCE_OBJDIR)/include_juce_gui_extra_6dee1c1a.o \ -.PHONY: clean all +.PHONY: clean all VST Standalone + +all : VST Standalone + +VST : $(JUCE_OUTDIR)/$(JUCE_TARGET_VST) +Standalone : $(JUCE_OUTDIR)/$(JUCE_TARGET_STANDALONE_PLUGIN) -all : $(JUCE_OUTDIR)/$(JUCE_TARGET_VST) $(JUCE_OUTDIR)/$(JUCE_TARGET_STANDALONE_PLUGIN) $(JUCE_OUTDIR)/$(JUCE_TARGET_VST) : check-pkg-config $(OBJECTS_VST) $(RESOURCES) $(JUCE_OUTDIR)/$(JUCE_TARGET_SHARED_CODE) @echo Linking "JuceDemoPlugin - VST" 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 ed78350343..efd9fa86ed 100644 --- a/examples/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj +++ b/examples/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj @@ -187,7 +187,7 @@ 103368FE85719AF0B91BA072 = {isa = XCBuildConfiguration; buildSettings = { }; name = Release; }; A4B12DFADE1730C6014F332B = {isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -213,6 +213,7 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-VST.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.11; @@ -224,7 +225,7 @@ WRAPPER_EXTENSION = vst; }; name = Debug; }; D56C28DC5C3854D6AA9E04C2 = {isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -251,6 +252,7 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-VST.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.11; @@ -262,7 +264,7 @@ WRAPPER_EXTENSION = vst; }; name = Release; }; 1FA913B64C8ADDFFCA9768E1 = {isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -288,6 +290,7 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-AU.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.11; @@ -300,7 +303,7 @@ WRAPPER_EXTENSION = component; }; name = Debug; }; 9E686ABA5935BF9B713A0C5A = {isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -327,6 +330,7 @@ GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-AU.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.11; @@ -339,7 +343,7 @@ WRAPPER_EXTENSION = component; }; name = Release; }; 9847BE636E2825D8B76947EE = {isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; CODE_SIGN_ENTITLEMENTS = "JuceDemoPlugin.entitlements"; COMBINE_HIDPI_IMAGES = YES; @@ -363,6 +367,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_AppExtension.plist; + INFOPLIST_PREPROCESS = NO; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-lJuceDemoPlugin"; @@ -371,7 +376,7 @@ USE_HEADERMAP = NO; }; name = Debug; }; 5D13FAF3C958860246498452 = {isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; CODE_SIGN_ENTITLEMENTS = "JuceDemoPlugin.entitlements"; COMBINE_HIDPI_IMAGES = YES; @@ -396,6 +401,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_AppExtension.plist; + INFOPLIST_PREPROCESS = NO; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-lJuceDemoPlugin"; @@ -404,7 +410,7 @@ USE_HEADERMAP = NO; }; name = Release; }; 36EE658E7C17E7D4290A5F03 = {isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -427,6 +433,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-Standalone_Plugin.plist; + INFOPLIST_PREPROCESS = NO; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-lJuceDemoPlugin"; @@ -435,7 +442,7 @@ USE_HEADERMAP = NO; }; name = Debug; }; CDA9FA754F176B45AF024C64 = {isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -459,6 +466,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-Standalone_Plugin.plist; + INFOPLIST_PREPROCESS = NO; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; OTHER_LDFLAGS = "-lJuceDemoPlugin"; @@ -467,7 +475,7 @@ USE_HEADERMAP = NO; }; name = Release; }; DE68D772AF78FA0D411FC4D4 = {isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -498,7 +506,7 @@ USE_HEADERMAP = NO; }; name = Debug; }; CD0D0EA3F45AD047F14FD2E8 = {isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -530,31 +538,73 @@ USE_HEADERMAP = NO; }; name = Release; }; 6758D5C5D24024DB6F83E78F = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "JuceDemoPlugin"; WARNING_CFLAGS = -Wreorder; ZERO_LINK = NO; }; name = Debug; }; FDD382CE3C754F66D9DB396A = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "JuceDemoPlugin"; WARNING_CFLAGS = -Wreorder; @@ -631,8 +681,6 @@ A3E7AD82A575444E87B942AA = {isa = XCConfigurationList; buildConfigurations = ( 9847BE636E2825D8B76947EE, 5D13FAF3C958860246498452, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; - 48EF3FC35F069A453302FDAE = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - B003460B11C0B7C1CC07E666, ); runOnlyForDeploymentPostprocessing = 0; }; 21D46B5E90C6126A53C1443D = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 98D108769B3D5FA294AAB584, ); runOnlyForDeploymentPostprocessing = 0; }; 9FF557C26450DE83C5DDB798 = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -650,7 +698,6 @@ 221F46E90C0A8651AB76A0E5, B46C12D99498E9FA8F1D083A, ); runOnlyForDeploymentPostprocessing = 0; }; C6D88D358CA321193FD3CC4F = {isa = PBXNativeTarget; buildConfigurationList = A3E7AD82A575444E87B942AA; buildPhases = ( - 48EF3FC35F069A453302FDAE, 21D46B5E90C6126A53C1443D, 9FF557C26450DE83C5DDB798, ); buildRules = ( ); dependencies = ( 603921D0E698F75EB96EAC53, ); name = "JuceDemoPlugin - AUv3 AppExtension"; productName = JuceDemoPlugin; productReference = E4EE10B38F49E1F661E81D7F; productType = "com.apple.product-type.app-extension"; }; @@ -702,7 +749,7 @@ 80AB3252A67CCE24226B54A2, ); runOnlyForDeploymentPostprocessing = 0; }; C3F206BB3277FBADE3BD615B = {isa = PBXNativeTarget; buildConfigurationList = 08D73ACBC0F6E2A4747629EE; buildPhases = ( 4E087312D44130771EB1E9C2, ); buildRules = ( ); dependencies = ( ); name = "JuceDemoPlugin - Shared Code"; productName = JuceDemoPlugin; productReference = 4D6248E85C22578615FA809C; productType = "com.apple.product-type.library.static"; }; - 85250052F3E019894332668E = {isa = PBXProject; buildConfigurationList = 0720B453F376663EAB98BF9B; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { D4A200CA175E6673EB359B63 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };921CB4BBA34ADBC5270F81EF = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };71E1E34CFC671ACBBCE0726C = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };C6D88D358CA321193FD3CC4F = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 1; }; }; };F2918F451F1385B37AF4A6ED = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };C3F206BB3277FBADE3BD615B = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 4074359E1E7C4D54E87C3461; projectDirPath = ""; projectRoot = ""; targets = (D4A200CA175E6673EB359B63, 921CB4BBA34ADBC5270F81EF, 71E1E34CFC671ACBBCE0726C, C6D88D358CA321193FD3CC4F, F2918F451F1385B37AF4A6ED, C3F206BB3277FBADE3BD615B); }; + 85250052F3E019894332668E = {isa = PBXProject; buildConfigurationList = 0720B453F376663EAB98BF9B; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { D4A200CA175E6673EB359B63 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };921CB4BBA34ADBC5270F81EF = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };71E1E34CFC671ACBBCE0726C = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };C6D88D358CA321193FD3CC4F = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 1; }; }; };F2918F451F1385B37AF4A6ED = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };C3F206BB3277FBADE3BD615B = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 4074359E1E7C4D54E87C3461; projectDirPath = ""; projectRoot = ""; targets = (D4A200CA175E6673EB359B63, 921CB4BBA34ADBC5270F81EF, 71E1E34CFC671ACBBCE0726C, C6D88D358CA321193FD3CC4F, F2918F451F1385B37AF4A6ED, C3F206BB3277FBADE3BD615B); }; }; rootObject = 85250052F3E019894332668E; } diff --git a/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin.sln b/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin.sln index d43fa98bc5..dcde4a6fc3 100644 --- a/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin.sln +++ b/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin.sln @@ -19,18 +19,18 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D82A1FD0-FB5C-8174-477C-8EF5CA51D2A8}.Debug|x64.Build.0 = Debug|x64 {D82A1FD0-FB5C-8174-477C-8EF5CA51D2A8}.Debug|x64.ActiveCfg = Debug|x64 - {D82A1FD0-FB5C-8174-477C-8EF5CA51D2A8}.Release|x64.Build.0 = Release|x64 + {D82A1FD0-FB5C-8174-477C-8EF5CA51D2A8}.Debug|x64.Build.0 = Debug|x64 {D82A1FD0-FB5C-8174-477C-8EF5CA51D2A8}.Release|x64.ActiveCfg = Release|x64 - {DF786751-7581-02E8-2BB4-E217CD55C907}.Debug|x64.Build.0 = Debug|x64 + {D82A1FD0-FB5C-8174-477C-8EF5CA51D2A8}.Release|x64.Build.0 = Release|x64 {DF786751-7581-02E8-2BB4-E217CD55C907}.Debug|x64.ActiveCfg = Debug|x64 - {DF786751-7581-02E8-2BB4-E217CD55C907}.Release|x64.Build.0 = Release|x64 + {DF786751-7581-02E8-2BB4-E217CD55C907}.Debug|x64.Build.0 = Debug|x64 {DF786751-7581-02E8-2BB4-E217CD55C907}.Release|x64.ActiveCfg = Release|x64 - {1AB90829-CCC5-D7C1-BC4A-70C8D3DAD372}.Debug|x64.Build.0 = Debug|x64 + {DF786751-7581-02E8-2BB4-E217CD55C907}.Release|x64.Build.0 = Release|x64 {1AB90829-CCC5-D7C1-BC4A-70C8D3DAD372}.Debug|x64.ActiveCfg = Debug|x64 - {1AB90829-CCC5-D7C1-BC4A-70C8D3DAD372}.Release|x64.Build.0 = Release|x64 + {1AB90829-CCC5-D7C1-BC4A-70C8D3DAD372}.Debug|x64.Build.0 = Debug|x64 {1AB90829-CCC5-D7C1-BC4A-70C8D3DAD372}.Release|x64.ActiveCfg = Release|x64 + {1AB90829-CCC5-D7C1-BC4A-70C8D3DAD372}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_SharedCode.vcxproj b/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_SharedCode.vcxproj index ba704e51ce..15cff7e06d 100644 --- a/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_SharedCode.vcxproj +++ b/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_SharedCode.vcxproj @@ -16,6 +16,7 @@ {1AB90829-CCC5-D7C1-BC4A-70C8D3DAD372} v140 + 8.1 false v140 v140 + 8.1 @@ -32,6 +34,7 @@ true v140 v140 + 8.1 @@ -42,6 +45,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ JuceDemoPlugin true v140 + 8.1 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -641,6 +645,9 @@ true + + true + true @@ -1763,7 +1770,6 @@ - @@ -1783,10 +1789,12 @@ + + @@ -1892,7 +1900,6 @@ - @@ -2210,6 +2217,7 @@ + diff --git a/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_SharedCode.vcxproj.filters b/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_SharedCode.vcxproj.filters index 7b0cf08fad..0848ccfa01 100644 --- a/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_SharedCode.vcxproj.filters +++ b/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_SharedCode.vcxproj.filters @@ -20,6 +20,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -367,9 +370,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -430,6 +430,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -652,9 +655,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -892,6 +892,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2136,9 +2139,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2196,6 +2196,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2208,6 +2211,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2523,9 +2529,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3477,6 +3480,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_StandalonePlugin.vcxproj b/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_StandalonePlugin.vcxproj index 2e2a3a702a..626fc23b1d 100644 --- a/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_StandalonePlugin.vcxproj +++ b/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_StandalonePlugin.vcxproj @@ -16,6 +16,7 @@ {DF786751-7581-02E8-2BB4-E217CD55C907} v140 + 8.1 false v140 v140 + 8.1 @@ -32,6 +34,7 @@ true v140 v140 + 8.1 @@ -42,6 +45,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v140 + 8.1 @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_VST.vcxproj b/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_VST.vcxproj index 095242c305..a1adae48af 100644 --- a/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_VST.vcxproj +++ b/examples/audio plugin demo/Builds/VisualStudio2015/JuceDemoPlugin_VST.vcxproj @@ -16,6 +16,7 @@ {D82A1FD0-FB5C-8174-477C-8EF5CA51D2A8} v140 + 8.1 false v140 v140 + 8.1 @@ -32,6 +34,7 @@ true v140 v140 + 8.1 @@ -42,6 +45,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v140 + 8.1 @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin.sln b/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin.sln index d1c39bc3b7..82de5aec00 100644 --- a/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin.sln +++ b/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin.sln @@ -19,18 +19,18 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D82A1FD0-FB5C-8174-477C-8EF5CA51D2A8}.Debug|x64.Build.0 = Debug|x64 {D82A1FD0-FB5C-8174-477C-8EF5CA51D2A8}.Debug|x64.ActiveCfg = Debug|x64 - {D82A1FD0-FB5C-8174-477C-8EF5CA51D2A8}.Release|x64.Build.0 = Release|x64 + {D82A1FD0-FB5C-8174-477C-8EF5CA51D2A8}.Debug|x64.Build.0 = Debug|x64 {D82A1FD0-FB5C-8174-477C-8EF5CA51D2A8}.Release|x64.ActiveCfg = Release|x64 - {DF786751-7581-02E8-2BB4-E217CD55C907}.Debug|x64.Build.0 = Debug|x64 + {D82A1FD0-FB5C-8174-477C-8EF5CA51D2A8}.Release|x64.Build.0 = Release|x64 {DF786751-7581-02E8-2BB4-E217CD55C907}.Debug|x64.ActiveCfg = Debug|x64 - {DF786751-7581-02E8-2BB4-E217CD55C907}.Release|x64.Build.0 = Release|x64 + {DF786751-7581-02E8-2BB4-E217CD55C907}.Debug|x64.Build.0 = Debug|x64 {DF786751-7581-02E8-2BB4-E217CD55C907}.Release|x64.ActiveCfg = Release|x64 - {1AB90829-CCC5-D7C1-BC4A-70C8D3DAD372}.Debug|x64.Build.0 = Debug|x64 + {DF786751-7581-02E8-2BB4-E217CD55C907}.Release|x64.Build.0 = Release|x64 {1AB90829-CCC5-D7C1-BC4A-70C8D3DAD372}.Debug|x64.ActiveCfg = Debug|x64 - {1AB90829-CCC5-D7C1-BC4A-70C8D3DAD372}.Release|x64.Build.0 = Release|x64 + {1AB90829-CCC5-D7C1-BC4A-70C8D3DAD372}.Debug|x64.Build.0 = Debug|x64 {1AB90829-CCC5-D7C1-BC4A-70C8D3DAD372}.Release|x64.ActiveCfg = Release|x64 + {1AB90829-CCC5-D7C1-BC4A-70C8D3DAD372}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_SharedCode.vcxproj b/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_SharedCode.vcxproj index 346c84bc23..c717a547bc 100644 --- a/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_SharedCode.vcxproj +++ b/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_SharedCode.vcxproj @@ -16,6 +16,7 @@ {1AB90829-CCC5-D7C1-BC4A-70C8D3DAD372} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ JuceDemoPlugin true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -641,6 +645,9 @@ true + + true + true @@ -1763,7 +1770,6 @@ - @@ -1783,10 +1789,12 @@ + + @@ -1892,7 +1900,6 @@ - @@ -2210,6 +2217,7 @@ + diff --git a/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_SharedCode.vcxproj.filters b/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_SharedCode.vcxproj.filters index 03fe5c973f..71ae1da3c1 100644 --- a/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_SharedCode.vcxproj.filters +++ b/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_SharedCode.vcxproj.filters @@ -20,6 +20,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -367,9 +370,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -430,6 +430,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -652,9 +655,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -892,6 +892,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2136,9 +2139,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2196,6 +2196,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2208,6 +2211,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2523,9 +2529,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3477,6 +3480,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_StandalonePlugin.vcxproj b/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_StandalonePlugin.vcxproj index 8cea998d6e..e28cf6e95c 100644 --- a/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_StandalonePlugin.vcxproj +++ b/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_StandalonePlugin.vcxproj @@ -16,6 +16,7 @@ {DF786751-7581-02E8-2BB4-E217CD55C907} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v141 + 10.0.15063.0 @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) diff --git a/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_VST.vcxproj b/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_VST.vcxproj index e345f89249..192e2e7091 100644 --- a/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_VST.vcxproj +++ b/examples/audio plugin demo/Builds/VisualStudio2017/JuceDemoPlugin_VST.vcxproj @@ -16,6 +16,7 @@ {D82A1FD0-FB5C-8174-477C-8EF5CA51D2A8} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -57,6 +61,7 @@ true $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code v141 + 10.0.15063.0 @@ -80,6 +85,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -120,6 +126,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) 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 9853939bb7..5dbfd681a3 100644 --- a/examples/audio plugin demo/Builds/iOS/JuceDemoPlugin.xcodeproj/project.pbxproj +++ b/examples/audio plugin demo/Builds/iOS/JuceDemoPlugin.xcodeproj/project.pbxproj @@ -161,7 +161,7 @@ 9847BE636E2825D8B76947EE = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -184,13 +184,14 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_AppExtension.plist; + INFOPLIST_PREPROCESS = NO; OTHER_LDFLAGS = "-lJuceDemoPlugin"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.JuceDemoPlugin.JuceDemoPluginAUv3; USE_HEADERMAP = NO; }; name = Debug; }; 5D13FAF3C958860246498452 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -214,13 +215,14 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-AUv3_AppExtension.plist; + INFOPLIST_PREPROCESS = NO; OTHER_LDFLAGS = "-lJuceDemoPlugin"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.JuceDemoPlugin.JuceDemoPluginAUv3; USE_HEADERMAP = NO; }; name = Release; }; 36EE658E7C17E7D4290A5F03 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -243,13 +245,14 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-Standalone_Plugin.plist; + INFOPLIST_PREPROCESS = NO; OTHER_LDFLAGS = "-lJuceDemoPlugin"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.JuceDemoPlugin; USE_HEADERMAP = NO; }; name = Debug; }; CDA9FA754F176B45AF024C64 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -273,13 +276,14 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "../../../../modules/juce_audio_plugin_client", "$(inherited)"); INFOPLIST_FILE = Info-Standalone_Plugin.plist; + INFOPLIST_PREPROCESS = NO; OTHER_LDFLAGS = "-lJuceDemoPlugin"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.JuceDemoPlugin; USE_HEADERMAP = NO; }; name = Release; }; DE68D772AF78FA0D411FC4D4 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -308,7 +312,7 @@ CD0D0EA3F45AD047F14FD2E8 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -338,16 +342,37 @@ 6758D5C5D24024DB6F83E78F = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -359,15 +384,36 @@ FDD382CE3C754F66D9DB396A = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "JuceDemoPlugin"; @@ -391,8 +437,6 @@ A3E7AD82A575444E87B942AA = {isa = XCConfigurationList; buildConfigurations = ( 9847BE636E2825D8B76947EE, 5D13FAF3C958860246498452, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; - 48EF3FC35F069A453302FDAE = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5C9D625FC4760D6D1B0C0D88, ); runOnlyForDeploymentPostprocessing = 0; }; 21D46B5E90C6126A53C1443D = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 98D108769B3D5FA294AAB584, ); runOnlyForDeploymentPostprocessing = 0; }; 9FF557C26450DE83C5DDB798 = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -409,7 +453,6 @@ 221F46E90C0A8651AB76A0E5, CE14B61B7D5CAB066CED37D8, ); runOnlyForDeploymentPostprocessing = 0; }; C6D88D358CA321193FD3CC4F = {isa = PBXNativeTarget; buildConfigurationList = A3E7AD82A575444E87B942AA; buildPhases = ( - 48EF3FC35F069A453302FDAE, 21D46B5E90C6126A53C1443D, 9FF557C26450DE83C5DDB798, ); buildRules = ( ); dependencies = ( 603921D0E698F75EB96EAC53, ); name = "JuceDemoPlugin - AUv3 AppExtension"; productName = JuceDemoPlugin; productReference = E4EE10B38F49E1F661E81D7F; productType = "com.apple.product-type.app-extension"; }; @@ -463,7 +506,7 @@ 80AB3252A67CCE24226B54A2, ); runOnlyForDeploymentPostprocessing = 0; }; C3F206BB3277FBADE3BD615B = {isa = PBXNativeTarget; buildConfigurationList = 08D73ACBC0F6E2A4747629EE; buildPhases = ( 4E087312D44130771EB1E9C2, ); buildRules = ( ); dependencies = ( ); name = "JuceDemoPlugin - Shared Code"; productName = JuceDemoPlugin; productReference = 4D6248E85C22578615FA809C; productType = "com.apple.product-type.library.static"; }; - 85250052F3E019894332668E = {isa = PBXProject; buildConfigurationList = 0720B453F376663EAB98BF9B; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { D4A200CA175E6673EB359B63 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };C6D88D358CA321193FD3CC4F = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 1; }; }; };F2918F451F1385B37AF4A6ED = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };C3F206BB3277FBADE3BD615B = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 4074359E1E7C4D54E87C3461; projectDirPath = ""; projectRoot = ""; targets = (D4A200CA175E6673EB359B63, C6D88D358CA321193FD3CC4F, F2918F451F1385B37AF4A6ED, C3F206BB3277FBADE3BD615B); }; + 85250052F3E019894332668E = {isa = PBXProject; buildConfigurationList = 0720B453F376663EAB98BF9B; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { D4A200CA175E6673EB359B63 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };C6D88D358CA321193FD3CC4F = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 1; }; }; };F2918F451F1385B37AF4A6ED = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; };C3F206BB3277FBADE3BD615B = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 4074359E1E7C4D54E87C3461; projectDirPath = ""; projectRoot = ""; targets = (D4A200CA175E6673EB359B63, C6D88D358CA321193FD3CC4F, F2918F451F1385B37AF4A6ED, C3F206BB3277FBADE3BD615B); }; }; rootObject = 85250052F3E019894332668E; } diff --git a/examples/audio plugin demo/JuceDemoPlugin.jucer b/examples/audio plugin demo/JuceDemoPlugin.jucer index a62dd03aa2..12169a0bb6 100644 --- a/examples/audio plugin demo/JuceDemoPlugin.jucer +++ b/examples/audio plugin demo/JuceDemoPlugin.jucer @@ -8,13 +8,13 @@ pluginProducesMidiOut="1" pluginSilenceInIsSilenceOut="0" pluginTailLength="0" pluginEditorRequiresKeys="1" pluginAUExportPrefix="JuceDemoProjectAU" pluginAUViewClass="JuceDemoProjectAU_V1" pluginRTASCategory="" - bundleIdentifier="com.juce.JuceDemoPlugin" jucerVersion="5.0.2" + bundleIdentifier="com.juce.JuceDemoPlugin" jucerVersion="5.1.0" companyName="ROLI Ltd." aaxIdentifier="com.yourcompany.JuceDemoPlugin" buildAAX="0" pluginAAXCategory="AAX_ePlugInCategory_Dynamics" includeBinaryInAppConfig="1" buildVST3="0" pluginManufacturerEmail="support@yourcompany.com" companyWebsite="www.juce.com" companyEmail="info@juce.com" pluginIsMidiEffectPlugin="0" buildAUv3="1" buildStandalone="1" enableIAA="0" displaySplashScreen="0" - reportAppUsage="0" splashScreenColour="Dark"> + reportAppUsage="0" splashScreenColour="Dark" cppLanguageStandard="11"> @@ -129,7 +129,7 @@ + androidMinimumSDK="23" microphonePermissionNeeded="1" androidInternetNeeded="0"> diff --git a/examples/audio plugin demo/JuceLibraryCode/AppConfig.h b/examples/audio plugin demo/JuceLibraryCode/AppConfig.h index 325f480008..250fbd91ef 100644 --- a/examples/audio plugin demo/JuceLibraryCode/AppConfig.h +++ b/examples/audio plugin demo/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -55,84 +61,75 @@ #define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 #define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 -//============================================================================== -#ifndef JUCE_STANDALONE_APPLICATION - #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) - #define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone - #else - #define JUCE_STANDALONE_APPLICATION 0 - #endif -#endif - #define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 //============================================================================== // juce_audio_devices flags: #ifndef JUCE_ASIO - //#define JUCE_ASIO + //#define JUCE_ASIO 1 #endif #ifndef JUCE_WASAPI - //#define JUCE_WASAPI + //#define JUCE_WASAPI 1 #endif #ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 #endif #ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 #endif #ifndef JUCE_ALSA - //#define JUCE_ALSA + //#define JUCE_ALSA 1 #endif #ifndef JUCE_JACK - //#define JUCE_JACK + //#define JUCE_JACK 1 #endif #ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 #endif #ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 #endif //============================================================================== // juce_audio_formats flags: #ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 #endif #ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 #endif #ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 #endif #ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 #endif #ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 #endif //============================================================================== // juce_audio_plugin_client flags: #ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS - //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS + //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS 1 #endif #ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS - //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS + //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS 1 #endif //============================================================================== @@ -143,7 +140,7 @@ #endif #ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 #endif #ifndef JUCE_PLUGINHOST_AU @@ -154,94 +151,102 @@ // juce_audio_utils flags: #ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 #endif #ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 #endif //============================================================================== // juce_core flags: #ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 #endif #ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 #endif #ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 #endif #ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 #endif #ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 #endif #ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL + //#define JUCE_USE_CURL 1 #endif #ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 #endif #ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 #endif //============================================================================== // juce_events flags: #ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 #endif //============================================================================== // juce_graphics flags: #ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 #endif #ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 #endif //============================================================================== // juce_gui_basics flags: #ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 #endif #ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 #endif #ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 #endif #ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 #endif //============================================================================== // juce_gui_extra flags: #ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 #endif #ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif +//============================================================================== +#ifndef JUCE_STANDALONE_APPLICATION + #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) + #define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone + #else + #define JUCE_STANDALONE_APPLICATION 0 + #endif #endif //============================================================================== @@ -265,8 +270,8 @@ #ifndef JucePlugin_Build_AAX #define JucePlugin_Build_AAX 0 #endif -#ifndef JucePlugin_Build_STANDALONE - #define JucePlugin_Build_STANDALONE 1 +#ifndef JucePlugin_Build_Standalone + #define JucePlugin_Build_Standalone 1 #endif #ifndef JucePlugin_Enable_IAA #define JucePlugin_Enable_IAA 0 diff --git a/examples/audio plugin demo/Source/PluginEditor.cpp b/examples/audio plugin demo/Source/PluginEditor.cpp index 7489e1992e..c9ddc70f65 100644 --- a/examples/audio plugin demo/Source/PluginEditor.cpp +++ b/examples/audio plugin demo/Source/PluginEditor.cpp @@ -154,7 +154,7 @@ static String timeToTimecodeString (double seconds) const int absMillisecs = std::abs (millisecs); return String::formatted ("%02d:%02d:%02d.%03d", - millisecs / 360000, + millisecs / 3600000, (absMillisecs / 60000) % 60, (absMillisecs / 1000) % 60, absMillisecs % 1000); diff --git a/examples/audio plugin demo/Source/PluginProcessor.cpp b/examples/audio plugin demo/Source/PluginProcessor.cpp index 3f24e47c81..33200af2ae 100644 --- a/examples/audio plugin demo/Source/PluginProcessor.cpp +++ b/examples/audio plugin demo/Source/PluginProcessor.cpp @@ -47,8 +47,6 @@ class SineWaveVoice : public SynthesiserVoice { public: SineWaveVoice() - : angleDelta (0.0), - tailOff (0.0) { } @@ -112,7 +110,6 @@ public: } private: - template void processBlock (AudioBuffer& outputBuffer, int startSample, int numSamples) { @@ -122,8 +119,7 @@ private: { while (--numSamples >= 0) { - const FloatType currentSample = - static_cast (std::sin (currentAngle) * level * tailOff); + auto currentSample = static_cast (std::sin (currentAngle) * level * tailOff); for (int i = outputBuffer.getNumChannels(); --i >= 0;) outputBuffer.addSample (i, startSample, currentSample); @@ -146,7 +142,7 @@ private: { while (--numSamples >= 0) { - const FloatType currentSample = static_cast (std::sin (currentAngle) * level); + auto currentSample = static_cast (std::sin (currentAngle) * level); for (int i = outputBuffer.getNumChannels(); --i >= 0;) outputBuffer.addSample (i, startSample, currentSample); @@ -158,17 +154,12 @@ private: } } - double currentAngle, angleDelta, level, tailOff; + double currentAngle = 0, angleDelta = 0, level = 0, tailOff = 0; }; //============================================================================== JuceDemoPluginAudioProcessor::JuceDemoPluginAudioProcessor() - : AudioProcessor (getBusesProperties()), - lastUIWidth (400), - lastUIHeight (200), - gainParam (nullptr), - delayParam (nullptr), - delayPosition (0) + : AudioProcessor (getBusesProperties()) { lastPosInfo.resetToDefault(); @@ -202,16 +193,19 @@ bool JuceDemoPluginAudioProcessor::isBusesLayoutSupported (const BusesLayout& la { // Only mono/stereo and input/output must have same layout const AudioChannelSet& mainOutput = layouts.getMainOutputChannelSet(); + const AudioChannelSet& mainInput = layouts.getMainInputChannelSet(); - // input and output layout must be the same - if (layouts.getMainInputChannelSet() != mainOutput) + // input and output layout must either be the same or the input must be disabled altogether + if (! mainInput.isDisabled() && mainInput != mainOutput) return false; // do not allow disabling the main buses - if (mainOutput.isDisabled()) return false; + if (mainOutput.isDisabled()) + return false; // only allow stereo and mono - if (mainOutput.size() > 2) return false; + if (mainOutput.size() > 2) + return false; return true; } @@ -308,13 +302,13 @@ void JuceDemoPluginAudioProcessor::applyDelay (AudioBuffer& buffer, A for (int channel = 0; channel < getTotalNumOutputChannels(); ++channel) { - FloatType* const channelData = buffer.getWritePointer (channel); - FloatType* const delayData = delayBuffer.getWritePointer (jmin (channel, delayBuffer.getNumChannels() - 1)); + auto channelData = buffer.getWritePointer (channel); + auto delayData = delayBuffer.getWritePointer (jmin (channel, delayBuffer.getNumChannels() - 1)); delayPos = delayPosition; for (int i = 0; i < numSamples; ++i) { - const FloatType in = channelData[i]; + auto in = channelData[i]; channelData[i] += delayData[delayPos]; delayData[delayPos] = (delayData[delayPos] + in) * delayLevel; @@ -363,8 +357,8 @@ void JuceDemoPluginAudioProcessor::getStateInformation (MemoryBlock& destData) xml.setAttribute ("uiHeight", lastUIHeight); // Store the values of all our parameters, using their param ID as the XML attribute - for (int i = 0; i < getNumParameters(); ++i) - if (AudioProcessorParameterWithID* p = dynamic_cast (getParameters().getUnchecked(i))) + for (auto* param : getParameters()) + if (auto* p = dynamic_cast (param)) xml.setAttribute (p->paramID, p->getValue()); // then use this helper function to stuff it into the binary blob and return it.. @@ -389,8 +383,8 @@ void JuceDemoPluginAudioProcessor::setStateInformation (const void* data, int si lastUIHeight = jmax (xmlState->getIntAttribute ("uiHeight", lastUIHeight), 200); // Now reload our parameters.. - for (int i = 0; i < getNumParameters(); ++i) - if (AudioProcessorParameterWithID* p = dynamic_cast (getParameters().getUnchecked(i))) + for (auto* param : getParameters()) + if (auto* p = dynamic_cast (param)) p->setValue ((float) xmlState->getDoubleAttribute (p->paramID, p->getValue())); } } diff --git a/examples/audio plugin demo/Source/PluginProcessor.h b/examples/audio plugin demo/Source/PluginProcessor.h index d1dc07141e..430815a319 100644 --- a/examples/audio plugin demo/Source/PluginProcessor.h +++ b/examples/audio plugin demo/Source/PluginProcessor.h @@ -98,11 +98,11 @@ public: // these are used to persist the UI's size - the values are stored along with the // filter's other parameters, and the UI component will update them when it gets // resized. - int lastUIWidth, lastUIHeight; + int lastUIWidth = 400, lastUIHeight = 200; // Our parameters - AudioParameterFloat* gainParam; - AudioParameterFloat* delayParam; + AudioParameterFloat* gainParam = nullptr; + AudioParameterFloat* delayParam = nullptr; private: //============================================================================== @@ -115,7 +115,8 @@ private: AudioBuffer delayBufferFloat; AudioBuffer delayBufferDouble; - int delayPosition; + + int delayPosition = 0; Synthesiser synth; diff --git a/examples/audio plugin host/Builds/LinuxMakefile/Makefile b/examples/audio plugin host/Builds/LinuxMakefile/Makefile index bf01d4f43d..0f5c65487b 100644 --- a/examples/audio plugin host/Builds/LinuxMakefile/Makefile +++ b/examples/audio plugin host/Builds/LinuxMakefile/Makefile @@ -89,6 +89,8 @@ OBJECTS_APP := \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) @echo Linking "Plugin Host - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) diff --git a/examples/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj b/examples/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj index 58e8467a15..5239e4fee9 100644 --- a/examples/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj +++ b/examples/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj @@ -11,6 +11,7 @@ 21D330A5B13178B12BEAFC3C = {isa = PBXBuildFile; fileRef = D4EBC17BDB7F88CCBC76730B; }; B288A89F96704F142ED8E939 = {isa = PBXBuildFile; fileRef = 5ACC21AA45BBF48C3C64D56D; }; 851C1165C9E4ACDD19C56A96 = {isa = PBXBuildFile; fileRef = 942A0F04EFB8D0B2FF9780BA; }; + AF42316D915057E930A5624E = {isa = PBXBuildFile; fileRef = A4B568E26157FC282214976F; }; 2B4B9CF71F94BDD1E3AC89AE = {isa = PBXBuildFile; fileRef = B0935EBBA4F6E2B05F3D1C0A; }; AC3BED74AC7C6D9F5739F38B = {isa = PBXBuildFile; fileRef = 9794142D24966F93FFDE51A1; }; E3CB85BA817BC9E3942A8AB0 = {isa = PBXBuildFile; fileRef = 9F9B445E6755CAA19E4344ED; }; @@ -83,6 +84,7 @@ 9794142D24966F93FFDE51A1 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 9BA1DD697B98005D24F7EC3C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = FilterGraph.cpp; path = ../../Source/FilterGraph.cpp; sourceTree = "SOURCE_ROOT"; }; 9F9B445E6755CAA19E4344ED = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; + A4B568E26157FC282214976F = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; }; A5E7CA8A71D049BE2BD33861 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; }; A66EFAC64B1B67B536C73415 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = HostStartup.cpp; path = ../../Source/HostStartup.cpp; sourceTree = "SOURCE_ROOT"; }; B0935EBBA4F6E2B05F3D1C0A = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; @@ -154,6 +156,7 @@ D4EBC17BDB7F88CCBC76730B, 5ACC21AA45BBF48C3C64D56D, 942A0F04EFB8D0B2FF9780BA, + A4B568E26157FC282214976F, B0935EBBA4F6E2B05F3D1C0A, 9794142D24966F93FFDE51A1, 9F9B445E6755CAA19E4344ED, @@ -175,7 +178,7 @@ D1C4804CD275CB57A5C89A2D, D85C0D11EE4F6C73B9EB5BCD, ); name = Source; sourceTree = ""; }; C8B793AC1BEFBE7A99BE8352 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -196,17 +199,18 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.pluginhost; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 49453CC5AD9F08D2738464AC = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -228,27 +232,49 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("~/SDKs/VST_SDK/VST3_SDK", "../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; - MACOSX_DEPLOYMENT_TARGET = 10.5; + MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.pluginhost; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Release; }; 8D1CA827F1EFD443BDCF198A = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "Plugin Host"; @@ -256,15 +282,36 @@ ZERO_LINK = NO; }; name = Debug; }; C9295196717FABE454A210B7 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "Plugin Host"; WARNING_CFLAGS = -Wreorder; @@ -304,6 +351,7 @@ 21D330A5B13178B12BEAFC3C, B288A89F96704F142ED8E939, 851C1165C9E4ACDD19C56A96, + AF42316D915057E930A5624E, 2B4B9CF71F94BDD1E3AC89AE, AC3BED74AC7C6D9F5739F38B, E3CB85BA817BC9E3942A8AB0, @@ -319,7 +367,7 @@ 2429BB4D705CC57F49418CFB, E8E94B3C187DA578BFCBDA98, C515A1FE1A53D3968C22FAEF, ); buildRules = ( ); dependencies = ( ); name = "Plugin Host - App"; productName = "Plugin Host"; productReference = 8D8BBC353637DA442C5575DA; productType = "com.apple.product-type.application"; }; - ADE6E539DB98A302483A82D0 = {isa = PBXProject; buildConfigurationList = 493C2C5E457692E5149C5525; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { DE12B7643D374BFF7E4FEB1C = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 65BEFC705A89E5C8A9E35C97; projectDirPath = ""; projectRoot = ""; targets = (DE12B7643D374BFF7E4FEB1C); }; + ADE6E539DB98A302483A82D0 = {isa = PBXProject; buildConfigurationList = 493C2C5E457692E5149C5525; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { DE12B7643D374BFF7E4FEB1C = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 65BEFC705A89E5C8A9E35C97; projectDirPath = ""; projectRoot = ""; targets = (DE12B7643D374BFF7E4FEB1C); }; }; rootObject = ADE6E539DB98A302483A82D0; } diff --git a/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host.sln b/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host.sln index 5153569804..c849d615e4 100644 --- a/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host.sln +++ b/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host.sln @@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5666EAA2-C82B-D06A-5228-D0E810428536}.Debug|Win32.Build.0 = Debug|Win32 {5666EAA2-C82B-D06A-5228-D0E810428536}.Debug|Win32.ActiveCfg = Debug|Win32 - {5666EAA2-C82B-D06A-5228-D0E810428536}.Release|Win32.Build.0 = Release|Win32 + {5666EAA2-C82B-D06A-5228-D0E810428536}.Debug|Win32.Build.0 = Debug|Win32 {5666EAA2-C82B-D06A-5228-D0E810428536}.Release|Win32.ActiveCfg = Release|Win32 + {5666EAA2-C82B-D06A-5228-D0E810428536}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host_App.vcxproj b/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host_App.vcxproj index b468cde3b1..b455357927 100644 --- a/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host_App.vcxproj +++ b/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host_App.vcxproj @@ -16,6 +16,7 @@ {5666EAA2-C82B-D06A-5228-D0E810428536} v120 + 8.1 Application false v120 + 8.1 @@ -30,6 +32,7 @@ false true v120 + 8.1 @@ -40,6 +43,7 @@ v120 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ Plugin Host true v120 + 8.1 @@ -65,7 +70,7 @@ Disabled EditAndContinue - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2013_78A5020=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;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -106,7 +112,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=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;%(PreprocessorDefinitions) MultiThreaded true @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -157,9 +164,6 @@ true - - true - true @@ -220,6 +224,9 @@ true + + true + true @@ -436,9 +443,6 @@ true - - true - true @@ -574,6 +578,9 @@ true + + true + true @@ -1726,13 +1733,7 @@ true - - true - - - true - - + true @@ -1766,7 +1767,6 @@ - @@ -1786,10 +1786,12 @@ + + @@ -1895,7 +1897,6 @@ - @@ -2174,6 +2175,7 @@ + @@ -2358,8 +2360,12 @@ - - + + + + + + diff --git a/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host_App.vcxproj.filters b/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host_App.vcxproj.filters index 0defa9cd5a..fbcc25b526 100644 --- a/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host_App.vcxproj.filters +++ b/examples/audio plugin host/Builds/VisualStudio2013/Plugin Host_App.vcxproj.filters @@ -20,6 +20,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -397,9 +400,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -460,6 +460,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -682,9 +685,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -844,6 +844,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2080,20 +2083,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2181,9 +2172,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2241,6 +2229,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2253,6 +2244,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2568,9 +2562,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3405,6 +3396,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -3957,10 +3951,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host.sln b/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host.sln index abded0f68c..0e4ab32c3c 100644 --- a/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host.sln +++ b/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5666EAA2-C82B-D06A-5228-D0E810428536}.Debug|x64.Build.0 = Debug|x64 {5666EAA2-C82B-D06A-5228-D0E810428536}.Debug|x64.ActiveCfg = Debug|x64 - {5666EAA2-C82B-D06A-5228-D0E810428536}.Release|x64.Build.0 = Release|x64 + {5666EAA2-C82B-D06A-5228-D0E810428536}.Debug|x64.Build.0 = Debug|x64 {5666EAA2-C82B-D06A-5228-D0E810428536}.Release|x64.ActiveCfg = Release|x64 + {5666EAA2-C82B-D06A-5228-D0E810428536}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host_App.vcxproj b/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host_App.vcxproj index 0e8d34c089..b70dd87143 100644 --- a/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host_App.vcxproj +++ b/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host_App.vcxproj @@ -16,6 +16,7 @@ {5666EAA2-C82B-D06A-5228-D0E810428536} v140 + 8.1 false v140 v140 + 8.1 @@ -32,6 +34,7 @@ true v140 v140 + 8.1 @@ -42,6 +45,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ Plugin Host true v140 + 8.1 @@ -67,7 +72,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=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;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -106,7 +112,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=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;%(PreprocessorDefinitions) MultiThreaded true @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -156,9 +163,6 @@ true - - true - true @@ -219,6 +223,9 @@ true + + true + true @@ -435,9 +442,6 @@ true - - true - true @@ -573,6 +577,9 @@ true + + true + true @@ -1725,13 +1732,7 @@ true - - true - - - true - - + true @@ -1765,7 +1766,6 @@ - @@ -1785,10 +1785,12 @@ + + @@ -1894,7 +1896,6 @@ - @@ -2173,6 +2174,7 @@ + @@ -2357,8 +2359,12 @@ - - + + + + + + diff --git a/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host_App.vcxproj.filters b/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host_App.vcxproj.filters index b8d0fbc274..db4c8889c3 100644 --- a/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host_App.vcxproj.filters +++ b/examples/audio plugin host/Builds/VisualStudio2015/Plugin Host_App.vcxproj.filters @@ -20,6 +20,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -397,9 +400,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -460,6 +460,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -682,9 +685,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -844,6 +844,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2080,20 +2083,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2181,9 +2172,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2241,6 +2229,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2253,6 +2244,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2568,9 +2562,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3405,6 +3396,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -3957,10 +3951,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/audio plugin host/Builds/VisualStudio2017/Plugin Host.sln b/examples/audio plugin host/Builds/VisualStudio2017/Plugin Host.sln index 66d5c36dad..78a549f801 100644 --- a/examples/audio plugin host/Builds/VisualStudio2017/Plugin Host.sln +++ b/examples/audio plugin host/Builds/VisualStudio2017/Plugin Host.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5666EAA2-C82B-D06A-5228-D0E810428536}.Debug|x64.Build.0 = Debug|x64 {5666EAA2-C82B-D06A-5228-D0E810428536}.Debug|x64.ActiveCfg = Debug|x64 - {5666EAA2-C82B-D06A-5228-D0E810428536}.Release|x64.Build.0 = Release|x64 + {5666EAA2-C82B-D06A-5228-D0E810428536}.Debug|x64.Build.0 = Debug|x64 {5666EAA2-C82B-D06A-5228-D0E810428536}.Release|x64.ActiveCfg = Release|x64 + {5666EAA2-C82B-D06A-5228-D0E810428536}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/audio plugin host/Builds/VisualStudio2017/Plugin Host_App.vcxproj b/examples/audio plugin host/Builds/VisualStudio2017/Plugin Host_App.vcxproj index f8f5f83681..a81e4bd1fe 100644 --- a/examples/audio plugin host/Builds/VisualStudio2017/Plugin Host_App.vcxproj +++ b/examples/audio plugin host/Builds/VisualStudio2017/Plugin Host_App.vcxproj @@ -16,6 +16,7 @@ {5666EAA2-C82B-D06A-5228-D0E810428536} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ Plugin Host true v141 + 10.0.15063.0 @@ -67,7 +72,7 @@ Disabled ProgramDatabase - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=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;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -106,7 +112,7 @@ Full - c:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) + C:\SDKs\VST_SDK\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=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;%(PreprocessorDefinitions) MultiThreaded true @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -156,9 +163,6 @@ true - - true - true @@ -219,6 +223,9 @@ true + + true + true @@ -435,9 +442,6 @@ true - - true - true @@ -573,6 +577,9 @@ true + + true + true @@ -1725,13 +1732,7 @@ true - - true - - - true - - + true @@ -1765,7 +1766,6 @@ - @@ -1785,10 +1785,12 @@ + + @@ -1894,7 +1896,6 @@ - @@ -2173,6 +2174,7 @@ + @@ -2357,8 +2359,12 @@ - - + + + + + + diff --git a/examples/audio plugin host/Builds/VisualStudio2017/Plugin Host_App.vcxproj.filters b/examples/audio plugin host/Builds/VisualStudio2017/Plugin Host_App.vcxproj.filters index 68f3c64e07..99e8ec8b9a 100644 --- a/examples/audio plugin host/Builds/VisualStudio2017/Plugin Host_App.vcxproj.filters +++ b/examples/audio plugin host/Builds/VisualStudio2017/Plugin Host_App.vcxproj.filters @@ -20,6 +20,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -397,9 +400,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -460,6 +460,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -682,9 +685,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -844,6 +844,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2080,20 +2083,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2181,9 +2172,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2241,6 +2229,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2253,6 +2244,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2568,9 +2562,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3405,6 +3396,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -3957,10 +3951,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/examples/audio plugin host/JuceLibraryCode/AppConfig.h b/examples/audio plugin host/JuceLibraryCode/AppConfig.h index 3952f7d597..38617944dc 100644 --- a/examples/audio plugin host/JuceLibraryCode/AppConfig.h +++ b/examples/audio plugin host/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -57,22 +63,13 @@ #define JUCE_MODULE_AVAILABLE_juce_opengl 1 #define JUCE_MODULE_AVAILABLE_juce_video 1 -//============================================================================== -#ifndef JUCE_STANDALONE_APPLICATION - #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) - #define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone - #else - #define JUCE_STANDALONE_APPLICATION 1 - #endif -#endif - #define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 //============================================================================== // juce_audio_devices flags: #ifndef JUCE_ASIO - //#define JUCE_ASIO + //#define JUCE_ASIO 1 #endif #ifndef JUCE_WASAPI @@ -80,7 +77,7 @@ #endif #ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 #endif #ifndef JUCE_DIRECTSOUND @@ -92,15 +89,15 @@ #endif #ifndef JUCE_JACK - //#define JUCE_JACK + //#define JUCE_JACK 1 #endif #ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 #endif #ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 #endif //============================================================================== @@ -115,15 +112,15 @@ #endif #ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 #endif #ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 #endif #ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 #endif //============================================================================== @@ -156,72 +153,72 @@ // juce_core flags: #ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 #endif #ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 #endif #ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 #endif #ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 #endif #ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 #endif #ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL + //#define JUCE_USE_CURL 1 #endif #ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 #endif #ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 #endif //============================================================================== // juce_events flags: #ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 #endif //============================================================================== // juce_graphics flags: #ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 #endif #ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 #endif //============================================================================== // juce_gui_basics flags: #ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 #endif #ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 #endif #ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 #endif #ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 #endif //============================================================================== @@ -232,24 +229,20 @@ #endif #ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 #endif //============================================================================== // juce_video flags: -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - #define JUCE_QUICKTIME 0 -#endif - #ifndef JUCE_USE_CAMERA #define JUCE_USE_CAMERA 0 #endif +//============================================================================== +#ifndef JUCE_STANDALONE_APPLICATION + #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) + #define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone + #else + #define JUCE_STANDALONE_APPLICATION 1 + #endif +#endif diff --git a/examples/audio plugin host/Plugin Host.jucer b/examples/audio plugin host/Plugin Host.jucer index ef31fb7a54..178a75b5e1 100644 --- a/examples/audio plugin host/Plugin Host.jucer +++ b/examples/audio plugin host/Plugin Host.jucer @@ -2,17 +2,17 @@ + splashScreenColour="Dark" cppLanguageStandard="11"> + objCExtraSuffix="M73TRi" vst3Folder="" extraCompilerFlags="-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"> + osxSDK="default" osxCompatibility="default" osxArchitecture="default"/> diff --git a/examples/audio plugin host/Source/FilterGraph.cpp b/examples/audio plugin host/Source/FilterGraph.cpp index c6802ec658..343ec5bd1a 100644 --- a/examples/audio plugin host/Source/FilterGraph.cpp +++ b/examples/audio plugin host/Source/FilterGraph.cpp @@ -34,18 +34,18 @@ //============================================================================== const int FilterGraph::midiChannelNumber = 0x1000; -FilterGraph::FilterGraph (AudioPluginFormatManager& formatManager_) +FilterGraph::FilterGraph (AudioPluginFormatManager& fm) : FileBasedDocument (filenameSuffix, filenameWildcard, "Load a filter graph", "Save a filter graph"), - formatManager (formatManager_), lastUID (0) + formatManager (fm) { InternalPluginFormat internalFormat; - addFilter (internalFormat.getDescriptionFor (InternalPluginFormat::audioInputFilter), 0.5f, 0.1f); - addFilter (internalFormat.getDescriptionFor (InternalPluginFormat::midiInputFilter), 0.25f, 0.1f); - addFilter (internalFormat.getDescriptionFor (InternalPluginFormat::audioOutputFilter), 0.5f, 0.9f); + addFilter (internalFormat.audioInDesc, { 0.5, 0.1 }); + addFilter (internalFormat.midiInDesc, { 0.25, 0.1 }); + addFilter (internalFormat.audioOutDesc, { 0.5, 0.9 }); graph.addListener (this); @@ -69,12 +69,12 @@ int FilterGraph::getNumFilters() const noexcept return graph.getNumNodes(); } -AudioProcessorGraph::Node::Ptr FilterGraph::getNode (const int index) const noexcept +AudioProcessorGraph::Node::Ptr FilterGraph::getNode (int index) const noexcept { return graph.getNode (index); } -AudioProcessorGraph::Node::Ptr FilterGraph::getNodeForId (const uint32 uid) const +AudioProcessorGraph::Node::Ptr FilterGraph::getNodeForId (uint32 uid) const { return graph.getNodeForId (uid); } @@ -90,31 +90,27 @@ AudioProcessorGraph::Node::Ptr FilterGraph::getNodeForName (const String& name) return nullptr; } -void FilterGraph::addFilter (const PluginDescription* desc, double x, double y) +void FilterGraph::addFilter (const PluginDescription& desc, Point p) { - if (desc != nullptr) + struct AsyncCallback : public AudioPluginFormat::InstantiationCompletionCallback { - struct AsyncCallback : public AudioPluginFormat::InstantiationCompletionCallback + AsyncCallback (FilterGraph& g, Point pos) : owner (g), position (pos) + {} + + void completionCallback (AudioPluginInstance* instance, const String& error) override { - AsyncCallback (FilterGraph* myself, double inX, double inY) - : owner (myself), posX (inX), posY (inY) - {} + owner.addFilterCallback (instance, error, position); + } - void completionCallback (AudioPluginInstance* instance, const String& error) override - { - owner->addFilterCallback (instance, error, posX, posY); - } + FilterGraph& owner; + Point position; + }; - FilterGraph* owner; - double posX, posY; - }; - - formatManager.createPluginInstanceAsync (*desc, graph.getSampleRate(), graph.getBlockSize(), - new AsyncCallback (this, x, y)); - } + formatManager.createPluginInstanceAsync (desc, graph.getSampleRate(), graph.getBlockSize(), + new AsyncCallback (*this, p)); } -void FilterGraph::addFilterCallback (AudioPluginInstance* instance, const String& error, double x, double y) +void FilterGraph::addFilterCallback (AudioPluginInstance* instance, const String& error, Point pos) { if (instance == nullptr) { @@ -125,12 +121,11 @@ void FilterGraph::addFilterCallback (AudioPluginInstance* instance, const String else { instance->enableAllBuses(); - AudioProcessorGraph::Node* node = graph.addNode (instance); - if (node != nullptr) + if (auto* node = graph.addNode (instance)) { - node->properties.set ("x", x); - node->properties.set ("y", y); + node->properties.set ("x", pos.x); + node->properties.set ("y", pos.y); changed(); } } @@ -167,11 +162,11 @@ void FilterGraph::setNodePosition (const uint32 nodeId, double x, double y) Point FilterGraph::getNodePosition (const uint32 nodeId) const { - if (AudioProcessorGraph::Node::Ptr n = graph.getNodeForId (nodeId)) - return Point (static_cast (n->properties ["x"]), - static_cast (n->properties ["y"])); + if (auto n = graph.getNodeForId (nodeId)) + return { static_cast (n->properties ["x"]), + static_cast (n->properties ["y"]) }; - return Point(); + return {}; } //============================================================================== @@ -245,14 +240,13 @@ String FilterGraph::getDocumentTitle() void FilterGraph::newDocument() { clear(); - - setFile (File()); + setFile ({}); InternalPluginFormat internalFormat; - addFilter (internalFormat.getDescriptionFor (InternalPluginFormat::audioInputFilter), 0.5f, 0.1f); - addFilter (internalFormat.getDescriptionFor (InternalPluginFormat::midiInputFilter), 0.25f, 0.1f); - addFilter (internalFormat.getDescriptionFor (InternalPluginFormat::audioOutputFilter), 0.5f, 0.9f); + addFilter (internalFormat.audioInDesc, { 0.5, 0.1 }); + addFilter (internalFormat.midiInDesc, { 0.25, 0.1 }); + addFilter (internalFormat.audioOutDesc, { 0.5, 0.9 }); setChangedFlag (false); } diff --git a/examples/audio plugin host/Source/FilterGraph.h b/examples/audio plugin host/Source/FilterGraph.h index 5ce6613633..ba61d844be 100644 --- a/examples/audio plugin host/Source/FilterGraph.h +++ b/examples/audio plugin host/Source/FilterGraph.h @@ -52,9 +52,9 @@ public: AudioProcessorGraph::Node::Ptr getNodeForId (uint32 uid) const; AudioProcessorGraph::Node::Ptr getNodeForName (const String& name) const; - void addFilter (const PluginDescription*, double x, double y); + void addFilter (const PluginDescription&, Point); - void addFilterCallback (AudioPluginInstance* instance, const String& error, double x, double y); + void addFilterCallback (AudioPluginInstance*, const String& error, Point pos); void removeFilter (const uint32 filterUID); void disconnectFilter (const uint32 filterUID); @@ -113,7 +113,7 @@ private: AudioPluginFormatManager& formatManager; AudioProcessorGraph graph; - uint32 lastUID; + uint32 lastUID = 0; uint32 getNextUID() noexcept; void createNodeFromXml (const XmlElement& xml); diff --git a/examples/audio plugin host/Source/GraphEditorPanel.cpp b/examples/audio plugin host/Source/GraphEditorPanel.cpp index 004a31f194..18cdf6efb0 100644 --- a/examples/audio plugin host/Source/GraphEditorPanel.cpp +++ b/examples/audio plugin host/Source/GraphEditorPanel.cpp @@ -32,12 +32,9 @@ //============================================================================== -class PluginWindow; -static Array activePluginWindows; +static Array activePluginWindows; -PluginWindow::PluginWindow (Component* const pluginEditor, - AudioProcessorGraph::Node* const o, - WindowFormatType t) +PluginWindow::PluginWindow (AudioProcessorEditor* pluginEditor, AudioProcessorGraph::Node* o, WindowFormatType t) : DocumentWindow (pluginEditor->getName(), LookAndFeel::getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId), DocumentWindow::minimiseButton | DocumentWindow::closeButton), @@ -73,19 +70,17 @@ void PluginWindow::closeAllCurrentlyOpenWindows() delete activePluginWindows.getUnchecked (i); Component dummyModalComp; - dummyModalComp.enterModalState(); + dummyModalComp.enterModalState (false); MessageManager::getInstance()->runDispatchLoopUntil (50); } } //============================================================================== -class ProcessorProgramPropertyComp : public PropertyComponent, - private AudioProcessorListener +struct ProcessorProgramPropertyComp : public PropertyComponent, + private AudioProcessorListener { -public: ProcessorProgramPropertyComp (const String& name, AudioProcessor& p) - : PropertyComponent (name), - owner (p) + : PropertyComponent (name), owner (p) { owner.addListener (this); } @@ -95,21 +90,18 @@ public: owner.removeListener (this); } - void refresh() { } - void audioProcessorChanged (AudioProcessor*) { } - void audioProcessorParameterChanged (AudioProcessor*, int, float) { } + void refresh() override {} + void audioProcessorChanged (AudioProcessor*) override {} + void audioProcessorParameterChanged (AudioProcessor*, int, float) override {} -private: AudioProcessor& owner; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProcessorProgramPropertyComp) }; -class ProgramAudioProcessorEditor : public AudioProcessorEditor +struct ProgramAudioProcessorEditor : public AudioProcessorEditor { -public: - ProgramAudioProcessorEditor (AudioProcessor* const p) - : AudioProcessorEditor (p) + ProgramAudioProcessorEditor (AudioProcessor* p) : AudioProcessorEditor (p) { jassert (p != nullptr); setOpaque (true); @@ -118,17 +110,17 @@ public: Array programs; - const int numPrograms = p->getNumPrograms(); + auto numPrograms = p->getNumPrograms(); int totalHeight = 0; for (int i = 0; i < numPrograms; ++i) { - String name (p->getProgramName (i).trim()); + auto name = p->getProgramName (i).trim(); if (name.isEmpty()) name = "Unnamed"; - ProcessorProgramPropertyComp* const pc = new ProcessorProgramPropertyComp (name, *p); + auto pc = new ProcessorProgramPropertyComp (name, *p); programs.add (pc); totalHeight += pc->getPreferredHeight(); } @@ -148,26 +140,35 @@ public: panel.setBounds (getLocalBounds()); } -private: PropertyPanel panel; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProgramAudioProcessorEditor) }; //============================================================================== -PluginWindow* PluginWindow::getWindowFor (AudioProcessorGraph::Node* const node, - WindowFormatType type) +PluginWindow* PluginWindow::getWindowFor (AudioProcessorGraph::Node* node, WindowFormatType type) { jassert (node != nullptr); - for (int i = activePluginWindows.size(); --i >= 0;) - if (activePluginWindows.getUnchecked(i)->owner == node - && activePluginWindows.getUnchecked(i)->type == type) - return activePluginWindows.getUnchecked(i); + for (auto* w : activePluginWindows) + if (w->owner == node && w->type == type) + return w; - AudioProcessor* processor = node->getProcessor(); + auto* processor = node->getProcessor(); AudioProcessorEditor* ui = nullptr; + if (auto* pluginInstance = dynamic_cast (processor)) + { + auto description = pluginInstance->getPluginDescription(); + + if (description.pluginFormatName == "Internal") + { + getCommandManager().invokeDirectly (CommandIDs::showAudioSettings, false); + + return nullptr; + } + } + if (type == Normal) { ui = processor->createEditorIfNeeded(); @@ -178,17 +179,14 @@ PluginWindow* PluginWindow::getWindowFor (AudioProcessorGraph::Node* const node, if (ui == nullptr) { - if (type == Generic || type == Parameters) - ui = new GenericAudioProcessorEditor (processor); - else if (type == Programs) - ui = new ProgramAudioProcessorEditor (processor); - else if (type == AudioIO) - ui = new FilterIOConfigurationWindow (processor); + if (type == Generic || type == Parameters) ui = new GenericAudioProcessorEditor (processor); + else if (type == Programs) ui = new ProgramAudioProcessorEditor (processor); + else if (type == AudioIO) ui = new FilterIOConfigurationWindow (processor); } if (ui != nullptr) { - if (AudioPluginInstance* const plugin = dynamic_cast (processor)) + if (auto* plugin = dynamic_cast (processor)) ui->setName (plugin->getName()); return new PluginWindow (ui, node, type); @@ -216,19 +214,13 @@ void PluginWindow::closeButtonPressed() } //============================================================================== -class PinComponent : public Component, - public SettableTooltipClient +struct PinComponent : public Component, + public SettableTooltipClient { -public: - PinComponent (FilterGraph& graph_, - const uint32 filterID_, const int index_, const bool isInput_) - : filterID (filterID_), - index (index_), - isInput (isInput_), - busIdx (0), - graph (graph_) + PinComponent (FilterGraph& g, uint32 id, int i, bool isIn) + : graph (g), pluginID (id), index (i), isInput (isIn) { - if (const AudioProcessorGraph::Node::Ptr node = graph.getNodeForId (filterID_)) + if (auto node = graph.getNodeForId (pluginID)) { String tip; @@ -239,17 +231,14 @@ public: } else { - const AudioProcessor& processor = *node->getProcessor(); + auto& processor = *node->getProcessor(); + auto channel = processor.getOffsetInBusBufferForAbsoluteChannelIndex (isInput, index, busIdx); - int channel; - channel = processor.getOffsetInBusBufferForAbsoluteChannelIndex (isInput, index, busIdx); - - if (const AudioProcessor::Bus* bus = processor.getBus (isInput, busIdx)) - tip = bus->getName() + String (": ") - + AudioChannelSet::getAbbreviatedChannelTypeName (bus->getCurrentLayout().getTypeOfChannel (channel)); + if (auto* bus = processor.getBus (isInput, busIdx)) + tip = bus->getName() + ": " + AudioChannelSet::getAbbreviatedChannelTypeName (bus->getCurrentLayout().getTypeOfChannel (channel)); else tip = (isInput ? "Main Input: " - : "Main Output: ") + String (index + 1); + : "Main Output: ") + String (index + 1); } @@ -266,10 +255,9 @@ public: Path p; p.addEllipse (w * 0.25f, h * 0.25f, w * 0.5f, h * 0.5f); - p.addRectangle (w * 0.4f, isInput ? (0.5f * h) : 0.0f, w * 0.2f, h * 0.5f); - Colour colour = (index == FilterGraph::midiChannelNumber ? Colours::red : Colours::green); + auto colour = (index == FilterGraph::midiChannelNumber ? Colours::red : Colours::green); g.setColour (colour.withRotatedHue (static_cast (busIdx) / 5.0f)); g.fillPath (p); @@ -277,10 +265,8 @@ public: void mouseDown (const MouseEvent& e) override { - getGraphPanel()->beginConnectorDrag (isInput ? 0 : filterID, - index, - isInput ? filterID : 0, - index, + getGraphPanel()->beginConnectorDrag (isInput ? 0 : pluginID, index, + isInput ? pluginID : 0, index, e); } @@ -294,38 +280,26 @@ public: getGraphPanel()->endDraggingConnector (e); } - const uint32 filterID; - const int index; - const bool isInput; - int busIdx; - -private: - FilterGraph& graph; - GraphEditorPanel* getGraphPanel() const noexcept { return findParentComponentOfClass(); } + FilterGraph& graph; + const uint32 pluginID; + const int index; + const bool isInput; + int busIdx = 0; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PinComponent) }; //============================================================================== -class FilterComponent : public Component +struct FilterComponent : public Component { -public: - FilterComponent (FilterGraph& graph_, - const uint32 filterID_) - : graph (graph_), - filterID (filterID_), - numInputs (0), - numOutputs (0), - pinSize (16), - font (13.0f, Font::bold), - numIns (0), - numOuts (0) + FilterComponent (FilterGraph& g, uint32 id) : graph (g), pluginID (id) { - shadow.setShadowProperties (DropShadow (Colours::black.withAlpha (0.5f), 3, Point (0, 1))); + shadow.setShadowProperties (DropShadow (Colours::black.withAlpha (0.5f), 3, { 0, 1 })); setComponentEffect (&shadow); setSize (150, 60); @@ -336,6 +310,9 @@ public: deleteAllChildren(); } + FilterComponent (const FilterComponent&) = delete; + FilterComponent& operator= (const FilterComponent&) = delete; + void mouseDown (const MouseEvent& e) override { originalPos = localPointToGlobal (Point()); @@ -355,22 +332,22 @@ public: m.addItem (6, "Configure Audio I/O"); m.addItem (7, "Test state save/load"); - const int r = m.show(); + auto r = m.show(); if (r == 1) { - graph.removeFilter (filterID); + graph.removeFilter (pluginID); return; } else if (r == 2) { - graph.disconnectFilter (filterID); + graph.disconnectFilter (pluginID); } else { - if (AudioProcessorGraph::Node::Ptr f = graph.getNodeForId (filterID)) + if (auto f = graph.getNodeForId (pluginID)) { - AudioProcessor* const processor = f->getProcessor(); + auto* processor = f->getProcessor(); jassert (processor != nullptr); if (r == 7) @@ -393,7 +370,7 @@ public: default: break; }; - if (PluginWindow* const w = PluginWindow::getWindowFor (f, type)) + if (auto* w = PluginWindow::getWindowFor (f, type)) w->toFront (true); } } @@ -405,12 +382,12 @@ public: { if (! e.mods.isPopupMenu()) { - Point pos (originalPos + Point (e.getDistanceFromDragStartX(), e.getDistanceFromDragStartY())); + auto pos = originalPos + e.getOffsetFromDragStart(); if (getParentComponent() != nullptr) pos = getParentComponent()->getLocalPoint (nullptr, pos); - graph.setNodePosition (filterID, + graph.setNodePosition (pluginID, (pos.getX() + getWidth() / 2) / (double) getParentWidth(), (pos.getY() + getHeight() / 2) / (double) getParentHeight()); @@ -426,16 +403,16 @@ public: } else if (e.getNumberOfClicks() == 2) { - if (const AudioProcessorGraph::Node::Ptr f = graph.getNodeForId (filterID)) - if (PluginWindow* const w = PluginWindow::getWindowFor (f, PluginWindow::Normal)) + if (auto f = graph.getNodeForId (pluginID)) + if (auto* w = PluginWindow::getWindowFor (f, PluginWindow::Normal)) w->toFront (true); } } bool hitTest (int x, int y) override { - for (int i = getNumChildComponents(); --i >= 0;) - if (getChildComponent(i)->getBounds().contains (x, y)) + for (auto* child : getChildren()) + if (child->getBounds().contains (x, y)) return true; return x >= 3 && x < getWidth() - 6 && y >= pinSize && y < getHeight() - pinSize; @@ -459,54 +436,46 @@ public: void resized() override { - if (AudioProcessorGraph::Node::Ptr f = graph.getNodeForId (filterID)) + if (auto f = graph.getNodeForId (pluginID)) { - if (AudioProcessor* const processor = f->getProcessor()) + if (auto* processor = f->getProcessor()) { - for (int i = 0; i < getNumChildComponents(); ++i) + for (auto* child : getChildren()) { - if (PinComponent* const pc = dynamic_cast (getChildComponent(i))) + if (auto* pin = dynamic_cast (child)) { - const bool isInput = pc->isInput; - int busIdx, channelIdx; - - channelIdx = - processor->getOffsetInBusBufferForAbsoluteChannelIndex (isInput, pc->index, busIdx); + const bool isInput = pin->isInput; + int busIdx = 0; + processor->getOffsetInBusBufferForAbsoluteChannelIndex (isInput, pin->index, busIdx); const int total = isInput ? numIns : numOuts; - const int index = pc->index == FilterGraph::midiChannelNumber ? (total - 1) : pc->index; + const int index = pin->index == FilterGraph::midiChannelNumber ? (total - 1) : pin->index; - const float totalSpaces = static_cast (total) + (static_cast (jmax (0, processor->getBusCount (isInput) - 1)) * 0.5f); - const float indexPos = static_cast (index) + (static_cast (busIdx) * 0.5f); + auto totalSpaces = static_cast (total) + (static_cast (jmax (0, processor->getBusCount (isInput) - 1)) * 0.5f); + auto indexPos = static_cast (index) + (static_cast (busIdx) * 0.5f); - pc->setBounds (proportionOfWidth ((1.0f + indexPos) / (totalSpaces + 1.0f)) - pinSize / 2, - pc->isInput ? 0 : (getHeight() - pinSize), - pinSize, pinSize); + pin->setBounds (proportionOfWidth ((1.0f + indexPos) / (totalSpaces + 1.0f)) - pinSize / 2, + pin->isInput ? 0 : (getHeight() - pinSize), + pinSize, pinSize); } } } } } - void getPinPos (const int index, const bool isInput, float& x, float& y) + Point getPinPos (int index, bool isInput) const { - for (int i = 0; i < getNumChildComponents(); ++i) - { - if (PinComponent* const pc = dynamic_cast (getChildComponent(i))) - { - if (pc->index == index && isInput == pc->isInput) - { - x = getX() + pc->getX() + pc->getWidth() * 0.5f; - y = getY() + pc->getY() + pc->getHeight() * 0.5f; - break; - } - } - } + for (auto* child : getChildren()) + if (auto* pin = dynamic_cast (child)) + if (pin->index == index && isInput == pin->isInput) + return getPosition().toFloat() + pin->getBounds().getCentre().toFloat(); + + return {}; } void update() { - const AudioProcessorGraph::Node::Ptr f (graph.getNodeForId (filterID)); + const AudioProcessorGraph::Node::Ptr f (graph.getNodeForId (pluginID)); if (f == nullptr) { @@ -537,7 +506,7 @@ public: setName (f->getProcessor()->getName()); { - Point p = graph.getNodePosition (filterID); + Point p = graph.getNodePosition (pluginID); setCentreRelative ((float) p.x, (float) p.y); } @@ -550,117 +519,93 @@ public: int i; for (i = 0; i < f->getProcessor()->getTotalNumInputChannels(); ++i) - addAndMakeVisible (new PinComponent (graph, filterID, i, true)); + addAndMakeVisible (new PinComponent (graph, pluginID, i, true)); if (f->getProcessor()->acceptsMidi()) - addAndMakeVisible (new PinComponent (graph, filterID, FilterGraph::midiChannelNumber, true)); + addAndMakeVisible (new PinComponent (graph, pluginID, FilterGraph::midiChannelNumber, true)); for (i = 0; i < f->getProcessor()->getTotalNumOutputChannels(); ++i) - addAndMakeVisible (new PinComponent (graph, filterID, i, false)); + addAndMakeVisible (new PinComponent (graph, pluginID, i, false)); if (f->getProcessor()->producesMidi()) - addAndMakeVisible (new PinComponent (graph, filterID, FilterGraph::midiChannelNumber, false)); + addAndMakeVisible (new PinComponent (graph, pluginID, FilterGraph::midiChannelNumber, false)); resized(); } } - FilterGraph& graph; - const uint32 filterID; - int numInputs, numOutputs; - -private: - int pinSize; - Point originalPos; - Font font; - int numIns, numOuts; - DropShadowEffect shadow; - GraphEditorPanel* getGraphPanel() const noexcept { return findParentComponentOfClass(); } - FilterComponent (const FilterComponent&); - FilterComponent& operator= (const FilterComponent&); + FilterGraph& graph; + const uint32 pluginID; + int numInputs = 0, numOutputs = 0; + int pinSize = 16; + Point originalPos; + Font font { 13.0f, Font::bold }; + int numIns = 0, numOuts = 0; + DropShadowEffect shadow; }; + //============================================================================== -class ConnectorComponent : public Component, - public SettableTooltipClient +struct ConnectorComponent : public Component, + public SettableTooltipClient { -public: - ConnectorComponent (FilterGraph& graph_) - : sourceFilterID (0), - destFilterID (0), - sourceFilterChannel (0), - destFilterChannel (0), - graph (graph_), - lastInputX (0), - lastInputY (0), - lastOutputX (0), - lastOutputY (0) + ConnectorComponent (FilterGraph& g) : graph (g) { setAlwaysOnTop (true); } - void setInput (const uint32 sourceFilterID_, const int sourceFilterChannel_) + void setInput (uint32 newSourceID, int newSourceChannel) { - if (sourceFilterID != sourceFilterID_ || sourceFilterChannel != sourceFilterChannel_) + if (sourceFilterID != newSourceID || sourceFilterChannel != newSourceChannel) { - sourceFilterID = sourceFilterID_; - sourceFilterChannel = sourceFilterChannel_; + sourceFilterID = newSourceID; + sourceFilterChannel = newSourceChannel; update(); } } - void setOutput (const uint32 destFilterID_, const int destFilterChannel_) + void setOutput (uint32 newDestID, int newDestChannel) { - if (destFilterID != destFilterID_ || destFilterChannel != destFilterChannel_) + if (destFilterID != newDestID || destFilterChannel != newDestChannel) { - destFilterID = destFilterID_; - destFilterChannel = destFilterChannel_; + destFilterID = newDestID; + destFilterChannel = newDestChannel; update(); } } - void dragStart (int x, int y) + void dragStart (Point pos) { - lastInputX = (float) x; - lastInputY = (float) y; + lastInputPos = pos; resizeToFit(); } - void dragEnd (int x, int y) + void dragEnd (Point pos) { - lastOutputX = (float) x; - lastOutputY = (float) y; + lastOutputPos = pos; resizeToFit(); } void update() { - float x1, y1, x2, y2; - getPoints (x1, y1, x2, y2); + Point p1, p2; + getPoints (p1, p2); - if (lastInputX != x1 - || lastInputY != y1 - || lastOutputX != x2 - || lastOutputY != y2) - { + if (lastInputPos != p1 || lastOutputPos != p2) resizeToFit(); - } } void resizeToFit() { - float x1, y1, x2, y2; - getPoints (x1, y1, x2, y2); + Point p1, p2; + getPoints (p1, p2); - const Rectangle newBounds ((int) jmin (x1, x2) - 4, - (int) jmin (y1, y2) - 4, - (int) std::abs (x1 - x2) + 8, - (int) std::abs (y1 - y2) + 8); + auto newBounds = Rectangle (p1, p2).expanded (4.0f).getSmallestIntegerContainer(); if (newBounds != getBounds()) setBounds (newBounds); @@ -670,20 +615,18 @@ public: repaint(); } - void getPoints (float& x1, float& y1, float& x2, float& y2) const + void getPoints (Point& p1, Point& p2) const { - x1 = lastInputX; - y1 = lastInputY; - x2 = lastOutputX; - y2 = lastOutputY; + p1 = lastInputPos; + p2 = lastOutputPos; - if (GraphEditorPanel* const hostPanel = getGraphPanel()) + if (auto* hostPanel = getGraphPanel()) { - if (FilterComponent* srcFilterComp = hostPanel->getComponentForFilter (sourceFilterID)) - srcFilterComp->getPinPos (sourceFilterChannel, false, x1, y1); + if (auto* src = hostPanel->getComponentForFilter (sourceFilterID)) + p1 = src->getPinPos (sourceFilterChannel, false); - if (FilterComponent* dstFilterComp = hostPanel->getComponentForFilter (destFilterID)) - dstFilterComp->getPinPos (destFilterChannel, true, x2, y2); + if (auto* dest = hostPanel->getComponentForFilter (destFilterID)) + p2 = dest->getPinPos (destFilterChannel, true); } } @@ -704,10 +647,12 @@ public: bool hitTest (int x, int y) override { - if (hitPath.contains ((float) x, (float) y)) + auto pos = Point (x, y).toFloat(); + + if (hitPath.contains (pos)) { double distanceFromStart, distanceFromEnd; - getDistancesFromEnds (x, y, distanceFromStart, distanceFromEnd); + getDistancesFromEnds (pos, distanceFromStart, distanceFromEnd); // avoid clicking the connector when over a pin return distanceFromStart > 7.0 && distanceFromEnd > 7.0; @@ -734,7 +679,7 @@ public: graph.removeConnection (sourceFilterID, sourceFilterChannel, destFilterID, destFilterChannel); double distanceFromStart, distanceFromEnd; - getDistancesFromEnds (e.x, e.y, distanceFromStart, distanceFromEnd); + getDistancesFromEnds (e.position, distanceFromStart, distanceFromEnd); const bool isNearerSource = (distanceFromStart < distanceFromEnd); getGraphPanel()->beginConnectorDrag (isNearerSource ? 0 : sourceFilterID, @@ -753,24 +698,20 @@ public: void resized() override { - float x1, y1, x2, y2; - getPoints (x1, y1, x2, y2); + Point p1, p2; + getPoints (p1, p2); - lastInputX = x1; - lastInputY = y1; - lastOutputX = x2; - lastOutputY = y2; + lastInputPos = p1; + lastOutputPos = p2; - x1 -= getX(); - y1 -= getY(); - x2 -= getX(); - y2 -= getY(); + p1 -= getPosition().toFloat(); + p2 -= getPosition().toFloat(); linePath.clear(); - linePath.startNewSubPath (x1, y1); - linePath.cubicTo (x1, y1 + (y2 - y1) * 0.33f, - x2, y1 + (y2 - y1) * 0.66f, - x2, y2); + linePath.startNewSubPath (p1); + linePath.cubicTo (p1.x, p1.y + (p2.y - p1.y) * 0.33f, + p2.x, p1.y + (p2.y - p1.y) * 0.66f, + p2.x, p2.y); PathStrokeType wideStroke (8.0f); wideStroke.createStrokedPath (hitPath, linePath); @@ -778,8 +719,8 @@ public: PathStrokeType stroke (2.5f); stroke.createStrokedPath (linePath, linePath); - const float arrowW = 5.0f; - const float arrowL = 4.0f; + auto arrowW = 5.0f; + auto arrowL = 4.0f; Path arrow; arrow.addTriangle (-arrowL, arrowW, @@ -787,44 +728,40 @@ public: arrowL, 0.0f); arrow.applyTransform (AffineTransform() - .rotated (float_Pi * 0.5f - (float) atan2 (x2 - x1, y2 - y1)) - .translated ((x1 + x2) * 0.5f, - (y1 + y2) * 0.5f)); + .rotated (float_Pi * 0.5f - (float) atan2 (p2.x - p1.x, p2.y - p1.y)) + .translated ((p1 + p2) * 0.5f)); linePath.addPath (arrow); linePath.setUsingNonZeroWinding (true); } - uint32 sourceFilterID, destFilterID; - int sourceFilterChannel, destFilterChannel; - -private: - FilterGraph& graph; - float lastInputX, lastInputY, lastOutputX, lastOutputY; - Path linePath, hitPath; - bool dragging; - GraphEditorPanel* getGraphPanel() const noexcept { return findParentComponentOfClass(); } - void getDistancesFromEnds (int x, int y, double& distanceFromStart, double& distanceFromEnd) const + void getDistancesFromEnds (Point p, double& distanceFromStart, double& distanceFromEnd) const { - float x1, y1, x2, y2; - getPoints (x1, y1, x2, y2); + Point p1, p2; + getPoints (p1, p2); - distanceFromStart = juce_hypot (x - (x1 - getX()), y - (y1 - getY())); - distanceFromEnd = juce_hypot (x - (x2 - getX()), y - (y2 - getY())); + distanceFromStart = p1.getDistanceFrom (p); + distanceFromEnd = p2.getDistanceFrom (p); } + FilterGraph& graph; + uint32 sourceFilterID = 0, destFilterID = 0; + int sourceFilterChannel = 0, destFilterChannel = 0; + Point lastInputPos, lastOutputPos; + Path linePath, hitPath; + bool dragging = false; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ConnectorComponent) }; //============================================================================== -GraphEditorPanel::GraphEditorPanel (FilterGraph& graph_) - : graph (graph_) +GraphEditorPanel::GraphEditorPanel (FilterGraph& g) : graph (g) { graph.addChangeListener (this); setOpaque (true); @@ -848,39 +785,38 @@ void GraphEditorPanel::mouseDown (const MouseEvent& e) { PopupMenu m; - if (MainHostWindow* const mainWindow = findParentComponentOfClass()) + if (auto* mainWindow = findParentComponentOfClass()) { mainWindow->addPluginsToMenu (m); - const int r = m.show(); + auto r = m.show(); - createNewPlugin (mainWindow->getChosenType (r), e.x, e.y); + if (auto* desc = mainWindow->getChosenType (r)) + createNewPlugin (*desc, e.position.toInt()); } } } -void GraphEditorPanel::createNewPlugin (const PluginDescription* desc, int x, int y) +void GraphEditorPanel::createNewPlugin (const PluginDescription& desc, Point position) { - graph.addFilter (desc, x / (double) getWidth(), y / (double) getHeight()); + graph.addFilter (desc, position.toDouble() / Point ((double) getWidth(), (double) getHeight())); } FilterComponent* GraphEditorPanel::getComponentForFilter (const uint32 filterID) const { - for (int i = getNumChildComponents(); --i >= 0;) - { - if (FilterComponent* const fc = dynamic_cast (getChildComponent (i))) - if (fc->filterID == filterID) + for (auto* child : getChildren()) + if (auto* fc = dynamic_cast (child)) + if (fc->pluginID == filterID) return fc; - } return nullptr; } ConnectorComponent* GraphEditorPanel::getComponentForConnection (const AudioProcessorGraph::Connection& conn) const { - for (int i = getNumChildComponents(); --i >= 0;) + for (auto* child : getChildren()) { - if (ConnectorComponent* const c = dynamic_cast (getChildComponent (i))) + if (auto* c = dynamic_cast (child)) if (c->sourceFilterID == conn.sourceNodeId && c->destFilterID == conn.destNodeId && c->sourceFilterChannel == conn.sourceChannelIndex @@ -891,17 +827,12 @@ ConnectorComponent* GraphEditorPanel::getComponentForConnection (const AudioProc return nullptr; } -PinComponent* GraphEditorPanel::findPinAt (const int x, const int y) const +PinComponent* GraphEditorPanel::findPinAt (Point pos) const { - for (int i = getNumChildComponents(); --i >= 0;) - { - if (FilterComponent* fc = dynamic_cast (getChildComponent (i))) - { - if (PinComponent* pin = dynamic_cast (fc->getComponentAt (x - fc->getX(), - y - fc->getY()))) + for (auto* child : getChildren()) + if (auto* fc = dynamic_cast (child)) + if (auto* pin = dynamic_cast (fc->getComponentAt (pos.toInt() - fc->getPosition()))) return pin; - } - } return nullptr; } @@ -918,15 +849,13 @@ void GraphEditorPanel::changeListenerCallback (ChangeBroadcaster*) void GraphEditorPanel::updateComponents() { - for (int i = getNumChildComponents(); --i >= 0;) - { - if (FilterComponent* const fc = dynamic_cast (getChildComponent (i))) + for (auto* child : getChildren()) + if (auto* fc = dynamic_cast (child)) fc->update(); - } for (int i = getNumChildComponents(); --i >= 0;) { - ConnectorComponent* const cc = dynamic_cast (getChildComponent (i)); + auto* cc = dynamic_cast (getChildComponent (i)); if (cc != nullptr && cc != draggingConnector) { @@ -944,11 +873,11 @@ void GraphEditorPanel::updateComponents() for (int i = graph.getNumFilters(); --i >= 0;) { - const AudioProcessorGraph::Node::Ptr f (graph.getNode (i)); + auto f = graph.getNode (i); if (getComponentForFilter (f->nodeId) == 0) { - FilterComponent* const comp = new FilterComponent (graph, f->nodeId); + auto* comp = new FilterComponent (graph, f->nodeId); addAndMakeVisible (comp); comp->update(); } @@ -956,11 +885,11 @@ void GraphEditorPanel::updateComponents() for (int i = graph.getNumConnections(); --i >= 0;) { - const AudioProcessorGraph::Connection* const c = graph.getConnection (i); + auto* c = graph.getConnection (i); if (getComponentForConnection (*c) == 0) { - ConnectorComponent* const comp = new ConnectorComponent (graph); + auto* comp = new ConnectorComponent (graph); addAndMakeVisible (comp); comp->setInput (c->sourceNodeId, c->sourceChannelIndex); @@ -989,46 +918,43 @@ void GraphEditorPanel::beginConnectorDrag (const uint32 sourceFilterID, const in void GraphEditorPanel::dragConnector (const MouseEvent& e) { - const MouseEvent e2 (e.getEventRelativeTo (this)); + auto e2 = e.getEventRelativeTo (this); if (draggingConnector != nullptr) { - draggingConnector->setTooltip (String()); + draggingConnector->setTooltip ({}); - int x = e2.x; - int y = e2.y; + auto pos = e2.position; - if (PinComponent* const pin = findPinAt (x, y)) + if (auto* pin = findPinAt (pos)) { - uint32 srcFilter = draggingConnector->sourceFilterID; - int srcChannel = draggingConnector->sourceFilterChannel; - uint32 dstFilter = draggingConnector->destFilterID; - int dstChannel = draggingConnector->destFilterChannel; + auto srcFilter = draggingConnector->sourceFilterID; + auto srcChannel = draggingConnector->sourceFilterChannel; + auto dstFilter = draggingConnector->destFilterID; + auto dstChannel = draggingConnector->destFilterChannel; if (srcFilter == 0 && ! pin->isInput) { - srcFilter = pin->filterID; + srcFilter = pin->pluginID; srcChannel = pin->index; } else if (dstFilter == 0 && pin->isInput) { - dstFilter = pin->filterID; + dstFilter = pin->pluginID; dstChannel = pin->index; } if (graph.canConnect (srcFilter, srcChannel, dstFilter, dstChannel)) { - x = pin->getParentComponent()->getX() + pin->getX() + pin->getWidth() / 2; - y = pin->getParentComponent()->getY() + pin->getY() + pin->getHeight() / 2; - + pos = (pin->getParentComponent()->getPosition() + pin->getBounds().getCentre()).toFloat(); draggingConnector->setTooltip (pin->getTooltip()); } } if (draggingConnector->sourceFilterID == 0) - draggingConnector->dragStart (x, y); + draggingConnector->dragStart (pos); else - draggingConnector->dragEnd (x, y); + draggingConnector->dragEnd (pos); } } @@ -1037,25 +963,25 @@ void GraphEditorPanel::endDraggingConnector (const MouseEvent& e) if (draggingConnector == nullptr) return; - draggingConnector->setTooltip (String()); + draggingConnector->setTooltip ({}); - const MouseEvent e2 (e.getEventRelativeTo (this)); + auto e2 = e.getEventRelativeTo (this); - uint32 srcFilter = draggingConnector->sourceFilterID; - int srcChannel = draggingConnector->sourceFilterChannel; - uint32 dstFilter = draggingConnector->destFilterID; - int dstChannel = draggingConnector->destFilterChannel; + auto srcFilter = draggingConnector->sourceFilterID; + auto srcChannel = draggingConnector->sourceFilterChannel; + auto dstFilter = draggingConnector->destFilterID; + auto dstChannel = draggingConnector->destFilterChannel; draggingConnector = nullptr; - if (PinComponent* const pin = findPinAt (e2.x, e2.y)) + if (auto* pin = findPinAt (e2.position)) { if (srcFilter == 0) { if (pin->isInput) return; - srcFilter = pin->filterID; + srcFilter = pin->pluginID; srcChannel = pin->index; } else @@ -1063,7 +989,7 @@ void GraphEditorPanel::endDraggingConnector (const MouseEvent& e) if (! pin->isInput) return; - dstFilter = pin->filterID; + dstFilter = pin->pluginID; dstChannel = pin->index; } @@ -1073,10 +999,9 @@ void GraphEditorPanel::endDraggingConnector (const MouseEvent& e) //============================================================================== -class TooltipBar : public Component, - private Timer +struct TooltipBar : public Component, + private Timer { -public: TooltipBar() { startTimer (100); @@ -1091,13 +1016,12 @@ public: void timerCallback() override { - Component* const underMouse = Desktop::getInstance().getMainMouseSource().getComponentUnderMouse(); - TooltipClient* const ttc = dynamic_cast (underMouse); - String newTip; - if (ttc != nullptr && ! (underMouse->isMouseButtonDown() || underMouse->isCurrentlyBlockedByAnotherModalComponent())) - newTip = ttc->getTooltip(); + if (auto* underMouse = Desktop::getInstance().getMainMouseSource().getComponentUnderMouse()) + if (auto* ttc = dynamic_cast (underMouse)) + if (! (underMouse->isMouseButtonDown() || underMouse->isCurrentlyBlockedByAnotherModalComponent())) + newTip = ttc->getTooltip(); if (newTip != tip) { @@ -1106,21 +1030,19 @@ public: } } -private: String tip; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TooltipBar) }; //============================================================================== -GraphDocumentComponent::GraphDocumentComponent (AudioPluginFormatManager& formatManager, - AudioDeviceManager* deviceManager_) - : graph (new FilterGraph (formatManager)), deviceManager (deviceManager_), +GraphDocumentComponent::GraphDocumentComponent (AudioPluginFormatManager& fm, AudioDeviceManager& dm) + : graph (new FilterGraph (fm)), deviceManager (dm), graphPlayer (getAppProperties().getUserSettings()->getBoolValue ("doublePrecisionProcessing", false)) { addAndMakeVisible (graphPanel = new GraphEditorPanel (*graph)); - deviceManager->addChangeListener (graphPanel); + deviceManager.addChangeListener (graphPanel); graphPlayer.setProcessor (&graph->getGraph()); @@ -1131,8 +1053,8 @@ GraphDocumentComponent::GraphDocumentComponent (AudioPluginFormatManager& format addAndMakeVisible (statusBar = new TooltipBar()); - deviceManager->addAudioCallback (&graphPlayer); - deviceManager->addMidiInputCallback (String(), &graphPlayer.getMidiMessageCollector()); + deviceManager.addAudioCallback (&graphPlayer); + deviceManager.addMidiInputCallback (String(), &graphPlayer.getMidiMessageCollector()); graphPanel->updateComponents(); } @@ -1154,9 +1076,9 @@ void GraphDocumentComponent::resized() keyboardComp->setBounds (0, getHeight() - keysHeight, getWidth(), keysHeight); } -void GraphDocumentComponent::createNewPlugin (const PluginDescription* desc, int x, int y) +void GraphDocumentComponent::createNewPlugin (const PluginDescription& desc, Point pos) { - graphPanel->createNewPlugin (desc, x, y); + graphPanel->createNewPlugin (desc, pos); } void GraphDocumentComponent::unfocusKeyboardComponent() @@ -1166,12 +1088,17 @@ void GraphDocumentComponent::unfocusKeyboardComponent() void GraphDocumentComponent::releaseGraph() { - deviceManager->removeAudioCallback (&graphPlayer); - deviceManager->removeMidiInputCallback (String(), &graphPlayer.getMidiMessageCollector()); - deviceManager->removeChangeListener (graphPanel); + deviceManager.removeAudioCallback (&graphPlayer); + deviceManager.removeMidiInputCallback (String(), &graphPlayer.getMidiMessageCollector()); + deviceManager.removeChangeListener (graphPanel); deleteAllChildren(); graphPlayer.setProcessor (nullptr); graph = nullptr; } + +void GraphDocumentComponent::setDoublePrecision (bool doublePrecision) +{ + graphPlayer.setDoublePrecisionProcessing (doublePrecision); +} diff --git a/examples/audio plugin host/Source/GraphEditorPanel.h b/examples/audio plugin host/Source/GraphEditorPanel.h index 4f8f3c9729..147820cb06 100644 --- a/examples/audio plugin host/Source/GraphEditorPanel.h +++ b/examples/audio plugin host/Source/GraphEditorPanel.h @@ -28,9 +28,9 @@ #include "FilterGraph.h" -class FilterComponent; -class ConnectorComponent; -class PinComponent; +struct FilterComponent; +struct ConnectorComponent; +struct PinComponent; //============================================================================== @@ -47,11 +47,11 @@ public: void paint (Graphics& g); void mouseDown (const MouseEvent& e); - void createNewPlugin (const PluginDescription* desc, int x, int y); + void createNewPlugin (const PluginDescription&, Point position); FilterComponent* getComponentForFilter (uint32 filterID) const; ConnectorComponent* getComponentForConnection (const AudioProcessorGraph::Connection& conn) const; - PinComponent* findPinAt (int x, int y) const; + PinComponent* findPinAt (Point) const; void resized(); void changeListenerCallback (ChangeBroadcaster*); @@ -84,12 +84,12 @@ class GraphDocumentComponent : public Component public: //============================================================================== GraphDocumentComponent (AudioPluginFormatManager& formatManager, - AudioDeviceManager* deviceManager); + AudioDeviceManager& deviceManager); ~GraphDocumentComponent(); //============================================================================== - void createNewPlugin (const PluginDescription* desc, int x, int y); - inline void setDoublePrecision (bool doublePrecision) { graphPlayer.setDoublePrecisionProcessing (doublePrecision); } + void createNewPlugin (const PluginDescription&, Point position); + void setDoublePrecision (bool doublePrecision); //============================================================================== ScopedPointer graph; @@ -105,7 +105,7 @@ public: private: //============================================================================== - AudioDeviceManager* deviceManager; + AudioDeviceManager& deviceManager; AudioProcessorPlayer graphPlayer; MidiKeyboardState keyState; @@ -134,7 +134,7 @@ public: NumTypes }; - PluginWindow (Component* pluginEditor, AudioProcessorGraph::Node*, WindowFormatType); + PluginWindow (AudioProcessorEditor*, AudioProcessorGraph::Node*, WindowFormatType); ~PluginWindow(); static PluginWindow* getWindowFor (AudioProcessorGraph::Node*, WindowFormatType); diff --git a/examples/audio plugin host/Source/InternalFilters.cpp b/examples/audio plugin host/Source/InternalFilters.cpp index 7dc542b5e8..4a9e52dbac 100644 --- a/examples/audio plugin host/Source/InternalFilters.cpp +++ b/examples/audio plugin host/Source/InternalFilters.cpp @@ -54,17 +54,13 @@ void InternalPluginFormat::createPluginInstance (const PluginDescription& desc, void* userData, void (*callback) (void*, AudioPluginInstance*, const String&)) { - AudioPluginInstance* retval = nullptr; - if (desc.name == audioOutDesc.name) - retval = new AudioProcessorGraph::AudioGraphIOProcessor (AudioProcessorGraph::AudioGraphIOProcessor::audioOutputNode); + AudioPluginInstance* p = nullptr; - if (desc.name == audioInDesc.name) - retval = new AudioProcessorGraph::AudioGraphIOProcessor (AudioProcessorGraph::AudioGraphIOProcessor::audioInputNode); + if (desc.name == audioOutDesc.name) p = new AudioProcessorGraph::AudioGraphIOProcessor (AudioProcessorGraph::AudioGraphIOProcessor::audioOutputNode); + if (desc.name == audioInDesc.name) p = new AudioProcessorGraph::AudioGraphIOProcessor (AudioProcessorGraph::AudioGraphIOProcessor::audioInputNode); + if (desc.name == midiInDesc.name) p = new AudioProcessorGraph::AudioGraphIOProcessor (AudioProcessorGraph::AudioGraphIOProcessor::midiInputNode); - if (desc.name == midiInDesc.name) - retval = new AudioProcessorGraph::AudioGraphIOProcessor (AudioProcessorGraph::AudioGraphIOProcessor::midiInputNode); - - callback (userData, retval, retval == nullptr ? NEEDS_TRANS ("Invalid internal filter name") : String()); + callback (userData, p, p == nullptr ? NEEDS_TRANS ("Invalid internal filter name") : String()); } bool InternalPluginFormat::requiresUnblockedMessageThreadDuringCreation (const PluginDescription&) const noexcept @@ -72,21 +68,9 @@ bool InternalPluginFormat::requiresUnblockedMessageThreadDuringCreation (const P return false; } -const PluginDescription* InternalPluginFormat::getDescriptionFor (const InternalFilterType type) +void InternalPluginFormat::getAllTypes (OwnedArray& results) { - switch (type) - { - case audioInputFilter: return &audioInDesc; - case audioOutputFilter: return &audioOutDesc; - case midiInputFilter: return &midiInDesc; - default: break; - } - - return 0; -} - -void InternalPluginFormat::getAllTypes (OwnedArray & results) -{ - for (int i = 0; i < (int) endOfFilterTypes; ++i) - results.add (new PluginDescription (*getDescriptionFor ((InternalFilterType) i))); + results.add (new PluginDescription (audioInDesc)); + results.add (new PluginDescription (audioOutDesc)); + results.add (new PluginDescription (midiInDesc)); } diff --git a/examples/audio plugin host/Source/InternalFilters.h b/examples/audio plugin host/Source/InternalFilters.h index 988cf27d2d..e24aafd3e7 100644 --- a/examples/audio plugin host/Source/InternalFilters.h +++ b/examples/audio plugin host/Source/InternalFilters.h @@ -41,41 +41,25 @@ public: ~InternalPluginFormat() {} //============================================================================== - enum InternalFilterType - { - audioInputFilter = 0, - audioOutputFilter, - midiInputFilter, + PluginDescription audioInDesc, audioOutDesc, midiInDesc; - endOfFilterTypes - }; - - const PluginDescription* getDescriptionFor (const InternalFilterType type); - - void getAllTypes (OwnedArray & results); + void getAllTypes (OwnedArray&); //============================================================================== - String getName() const override { return "Internal"; } - bool fileMightContainThisPluginType (const String&) override { return true; } - FileSearchPath getDefaultLocationsToSearch() override { return FileSearchPath(); } - bool canScanForPlugins() const override { return false; } - void findAllTypesForFile (OwnedArray &, const String&) override {} - bool doesPluginStillExist (const PluginDescription&) override { return true; } - String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) override { return fileOrIdentifier; } - bool pluginNeedsRescanning (const PluginDescription&) override { return false; } - StringArray searchPathsForPlugins (const FileSearchPath&, bool, bool) override { return StringArray(); } + String getName() const override { return "Internal"; } + bool fileMightContainThisPluginType (const String&) override { return true; } + FileSearchPath getDefaultLocationsToSearch() override { return {}; } + bool canScanForPlugins() const override { return false; } + void findAllTypesForFile (OwnedArray &, const String&) override {} + bool doesPluginStillExist (const PluginDescription&) override { return true; } + String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) override { return fileOrIdentifier; } + bool pluginNeedsRescanning (const PluginDescription&) override { return false; } + StringArray searchPathsForPlugins (const FileSearchPath&, bool, bool) override { return {}; } private: //============================================================================== - void createPluginInstance (const PluginDescription& description, - double initialSampleRate, - int initialBufferSize, - void* userData, - void (*callback) (void*, AudioPluginInstance*, const String&)) override; + void createPluginInstance (const PluginDescription&, double initialSampleRate, int initialBufferSize, + void* userData, void (*callback) (void*, AudioPluginInstance*, const String&)) override; + bool requiresUnblockedMessageThreadDuringCreation (const PluginDescription&) const noexcept override; -private: - //============================================================================== - PluginDescription audioInDesc; - PluginDescription audioOutDesc; - PluginDescription midiInDesc; }; diff --git a/examples/audio plugin host/Source/MainHostWindow.cpp b/examples/audio plugin host/Source/MainHostWindow.cpp index d44f0aaee0..37c96af1ed 100644 --- a/examples/audio plugin host/Source/MainHostWindow.cpp +++ b/examples/audio plugin host/Source/MainHostWindow.cpp @@ -91,7 +91,7 @@ MainHostWindow::MainHostWindow() setResizeLimits (500, 400, 10000, 10000); centreWithSize (800, 600); - setContentOwned (new GraphDocumentComponent (formatManager, &deviceManager), false); + setContentOwned (new GraphDocumentComponent (formatManager, deviceManager), false); restoreWindowStateFromString (getAppProperties().getUserSettings()->getValue ("mainWindowPos")); @@ -149,22 +149,37 @@ void MainHostWindow::closeButtonPressed() tryToQuitApplication(); } -bool MainHostWindow::tryToQuitApplication() +struct AsyncQuitRetrier : private Timer +{ + AsyncQuitRetrier() { startTimer (500); } + + void timerCallback() override + { + stopTimer(); + delete this; + + if (auto app = JUCEApplicationBase::getInstance()) + app->systemRequestedQuit(); + } +}; + +void MainHostWindow::tryToQuitApplication() { PluginWindow::closeAllCurrentlyOpenWindows(); - if (getGraphEditor() == nullptr - || getGraphEditor()->graph->saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) + if (ModalComponentManager::getInstance()->cancelAllModalComponents()) + { + new AsyncQuitRetrier(); + } + else if (getGraphEditor() == nullptr + || getGraphEditor()->graph->saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) { // Some plug-ins do not want [NSApp stop] to be called // before the plug-ins are not deallocated. getGraphEditor()->releaseGraph(); JUCEApplication::quit(); - return true; } - - return false; } void MainHostWindow::changeListenerCallback (ChangeBroadcaster* changed) @@ -294,9 +309,10 @@ void MainHostWindow::menuItemSelected (int menuItemID, int /*topLevelMenuIndex*/ } else { - createPlugin (getChosenType (menuItemID), - proportionOfWidth (0.3f + Random::getSystemRandom().nextFloat() * 0.6f), - proportionOfHeight (0.3f + Random::getSystemRandom().nextFloat() * 0.6f)); + if (auto* desc = getChosenType (menuItemID)) + createPlugin (*desc, + { proportionOfWidth (0.3f + Random::getSystemRandom().nextFloat() * 0.6f), + proportionOfHeight (0.3f + Random::getSystemRandom().nextFloat() * 0.6f) }); } } @@ -307,10 +323,10 @@ void MainHostWindow::menuBarActivated (bool isActivated) graphEditor->unfocusKeyboardComponent(); } -void MainHostWindow::createPlugin (const PluginDescription* desc, int x, int y) +void MainHostWindow::createPlugin (const PluginDescription& desc, Point pos) { if (auto* graphEditor = getGraphEditor()) - graphEditor->createNewPlugin (desc, x, y); + graphEditor->createNewPlugin (desc, pos); } void MainHostWindow::addPluginsToMenu (PopupMenu& m) const @@ -320,7 +336,8 @@ void MainHostWindow::addPluginsToMenu (PopupMenu& m) const int i = 0; for (auto* t : internalTypes) - m.addItem (++i, t->name, graphEditor->graph->getNodeForName (t->name) == nullptr); + m.addItem (++i, t->name + " (" + t->pluginFormatName + ")", + graphEditor->graph->getNodeForName (t->name) == nullptr); } m.addSeparator(); @@ -555,7 +572,8 @@ void MainHostWindow::filesDropped (const StringArray& files, int x, int y) auto pos = graphEditor->getLocalPoint (this, Point (x, y)); for (int i = 0; i < jmin (5, typesFound.size()); ++i) - createPlugin (typesFound.getUnchecked(i), pos.x, pos.y); + if (auto* desc = typesFound.getUnchecked(i)) + createPlugin (*desc, pos); } } } diff --git a/examples/audio plugin host/Source/MainHostWindow.h b/examples/audio plugin host/Source/MainHostWindow.h index 837a18863e..fd16dc6ab0 100644 --- a/examples/audio plugin host/Source/MainHostWindow.h +++ b/examples/audio plugin host/Source/MainHostWindow.h @@ -81,9 +81,9 @@ public: void getCommandInfo (CommandID commandID, ApplicationCommandInfo& result); bool perform (const InvocationInfo& info); - bool tryToQuitApplication(); + void tryToQuitApplication(); - void createPlugin (const PluginDescription*, int x, int y); + void createPlugin (const PluginDescription&, Point pos); void addPluginsToMenu (PopupMenu&) const; const PluginDescription* getChosenType (int menuID) const; diff --git a/extras/AudioPerformanceTest/AudioPerformanceTest.jucer b/extras/AudioPerformanceTest/AudioPerformanceTest.jucer index f9456024f6..38ac5ec694 100644 --- a/extras/AudioPerformanceTest/AudioPerformanceTest.jucer +++ b/extras/AudioPerformanceTest/AudioPerformanceTest.jucer @@ -2,8 +2,9 @@ + includeBinaryInAppConfig="1" jucerVersion="5.1.0" displaySplashScreen="0" + reportAppUsage="0" splashScreenColour="Dark" companyName="ROLI Ltd." + cppLanguageStandard="11"> diff --git a/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt b/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt index e260b74ffe..fbdf6ccd26 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt +++ b/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt @@ -6,8 +6,9 @@ cmake_minimum_required(VERSION 3.4.1) SET(BINARY_NAME "juce_jni") add_library("cpufeatures" STATIC "${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c") +set_source_files_properties("${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" PROPERTIES COMPILE_FLAGS "-Wno-sign-conversion -Wno-gnu-statement-expression") -add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=23" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_juce_audioperformancetest_AudioPerformanceTest" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/juce/audioperformancetest/AudioPerformanceTest\"" "-DJUCE_ANDROID_GL_ES_VERSION_3_0=1") +add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=23" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_juce_audioperformancetest_AudioPerformanceTest" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/juce/audioperformancetest/AudioPerformanceTest\"" "-DJUCE_ANDROID_GL_ES_VERSION_3_0=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000") include_directories( AFTER "../../../JuceLibraryCode" @@ -40,8 +41,6 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.cpp" "../../../../../modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.h" "../../../../../modules/juce_audio_basics/effects/juce_Decibels.h" - "../../../../../modules/juce_audio_basics/effects/juce_FFT.cpp" - "../../../../../modules/juce_audio_basics/effects/juce_FFT.h" "../../../../../modules/juce_audio_basics/effects/juce_IIRFilter.cpp" "../../../../../modules/juce_audio_basics/effects/juce_IIRFilter.h" "../../../../../modules/juce_audio_basics/effects/juce_LagrangeInterpolator.cpp" @@ -78,6 +77,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_basics/mpe/juce_MPEZone.h" "../../../../../modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp" "../../../../../modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h" + "../../../../../modules/juce_audio_basics/native/juce_mac_CoreAudioLayouts.h" "../../../../../modules/juce_audio_basics/sources/juce_AudioSource.h" "../../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp" "../../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.h" @@ -85,6 +85,8 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h" "../../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.cpp" "../../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h" + "../../../../../modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp" + "../../../../../modules/juce_audio_basics/sources/juce_MemoryAudioSource.h" "../../../../../modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp" "../../../../../modules/juce_audio_basics/sources/juce_MixerAudioSource.h" "../../../../../modules/juce_audio_basics/sources/juce_PositionableAudioSource.h" @@ -266,8 +268,6 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_formats/codecs/juce_MP3AudioFormat.h" "../../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp" "../../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.h" - "../../../../../modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.cpp" - "../../../../../modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.h" "../../../../../modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp" "../../../../../modules/juce_audio_formats/codecs/juce_WavAudioFormat.h" "../../../../../modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp" @@ -382,6 +382,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/containers/juce_DynamicObject.h" "../../../../../modules/juce_core/containers/juce_ElementComparator.h" "../../../../../modules/juce_core/containers/juce_HashMap.h" + "../../../../../modules/juce_core/containers/juce_HashMap_test.cpp" "../../../../../modules/juce_core/containers/juce_LinkedListPointer.h" "../../../../../modules/juce_core/containers/juce_ListenerList.cpp" "../../../../../modules/juce_core/containers/juce_ListenerList.h" @@ -820,6 +821,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_graphics/native/juce_mac_IconHelpers.cpp" "../../../../../modules/juce_graphics/native/juce_RenderingHelpers.h" "../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp" + "../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.h" "../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp" "../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp" "../../../../../modules/juce_graphics/native/juce_win32_Fonts.cpp" @@ -1175,8 +1177,6 @@ set_source_files_properties("../../../../../modules/juce_audio_basics/buffers/ju set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_Decibels.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_FFT.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_FFT.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_IIRFilter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_IIRFilter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/effects/juce_LagrangeInterpolator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1213,6 +1213,7 @@ set_source_files_properties("../../../../../modules/juce_audio_basics/mpe/juce_M set_source_files_properties("../../../../../modules/juce_audio_basics/mpe/juce_MPEZone.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_basics/native/juce_mac_CoreAudioLayouts.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_AudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_BufferingAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1220,6 +1221,8 @@ set_source_files_properties("../../../../../modules/juce_audio_basics/sources/ju set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_MemoryAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_MixerAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_basics/sources/juce_PositionableAudioSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1401,8 +1404,6 @@ set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/ju set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_MP3AudioFormat.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_WavAudioFormat.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1517,6 +1518,7 @@ set_source_files_properties("../../../../../modules/juce_core/containers/juce_Dy set_source_files_properties("../../../../../modules/juce_core/containers/juce_DynamicObject.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ElementComparator.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_HashMap.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_core/containers/juce_HashMap_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_LinkedListPointer.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ListenerList.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/containers/juce_ListenerList.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1955,6 +1957,7 @@ set_source_files_properties("../../../../../modules/juce_graphics/native/juce_ma set_source_files_properties("../../../../../modules/juce_graphics/native/juce_mac_IconHelpers.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_RenderingHelpers.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_graphics/native/juce_win32_Fonts.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/extras/AudioPerformanceTest/Builds/Android/app/build.gradle b/extras/AudioPerformanceTest/Builds/Android/app/build.gradle index 3c781846a5..a68bb51b48 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/build.gradle +++ b/extras/AudioPerformanceTest/Builds/Android/app/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 23 - buildToolsVersion "25.0.2" + buildToolsVersion "26.0.0" externalNativeBuild { cmake { path "CMakeLists.txt" @@ -52,9 +52,7 @@ android { } externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGFURATION=DEBUG" - cFlags "-O0" - cppFlags "-O0" + arguments "-DJUCE_BUILD_CONFIGFURATION=DEBUG", "-DCMAKE_CXX_FLAGS_DEBUG=-O0", "-DCMAKE_C_FLAGS_DEBUG=-O0" } } } @@ -64,9 +62,7 @@ android { } externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGFURATION=RELEASE" - cFlags "-Ofast" - cppFlags "-Ofast" + arguments "-DJUCE_BUILD_CONFIGFURATION=RELEASE", "-DCMAKE_CXX_FLAGS_RELEASE=-Ofast", "-DCMAKE_C_FLAGS_RELEASE=-Ofast" } } } @@ -84,4 +80,11 @@ android { } } +repositories { } + +dependencies { +} + +} + diff --git a/extras/AudioPerformanceTest/Builds/Android/app/src/main/res/values/string.xml b/extras/AudioPerformanceTest/Builds/Android/app/src/debug/res/values/string.xml similarity index 100% rename from extras/AudioPerformanceTest/Builds/Android/app/src/main/res/values/string.xml rename to extras/AudioPerformanceTest/Builds/Android/app/src/debug/res/values/string.xml diff --git a/extras/AudioPerformanceTest/Builds/Android/app/src/main/AndroidManifest.xml b/extras/AudioPerformanceTest/Builds/Android/app/src/main/AndroidManifest.xml index d26e06e3a3..50272962d4 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/src/main/AndroidManifest.xml +++ b/extras/AudioPerformanceTest/Builds/Android/app/src/main/AndroidManifest.xml @@ -4,6 +4,8 @@ package="com.juce.audioperformancetest"> + + 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 92d5586a2b..80c95d6473 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 @@ -58,6 +58,16 @@ import android.media.AudioManager; import android.media.MediaScannerConnection; import android.media.MediaScannerConnection.MediaScannerConnectionClient; import android.Manifest; +import java.util.concurrent.CancellationException; +import java.util.concurrent.Future; +import java.util.concurrent.Executors; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.Callable; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.locks.ReentrantLock; +import java.util.concurrent.atomic.*; import android.media.midi.*; import android.bluetooth.*; @@ -100,13 +110,18 @@ public class AudioPerformanceTest extends Activity // these have to match the values of enum PermissionID in C++ class RuntimePermissions: private static final int JUCE_PERMISSIONS_RECORD_AUDIO = 1; private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2; + private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3; + private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4; private static String getAndroidPermissionName (int permissionID) { switch (permissionID) { - case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO; - case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION; + case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO; + case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION; + // use string value as this is not defined in SDKs < 16 + case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE"; + case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE; } // unknown permission ID! @@ -1628,6 +1643,7 @@ public class AudioPerformanceTest extends Activity //============================================================================== private native void handleKeyDown (long host, int keycode, int textchar); private native void handleKeyUp (long host, int keycode, int textchar); + private native void handleBackButton (long host); public void showKeyboard (String type) { @@ -1655,8 +1671,14 @@ public class AudioPerformanceTest extends Activity case KeyEvent.KEYCODE_VOLUME_UP: case KeyEvent.KEYCODE_VOLUME_DOWN: return super.onKeyDown (keyCode, event); + case KeyEvent.KEYCODE_BACK: + { + handleBackButton (host); + return true; + } - default: break; + default: + break; } handleKeyDown (host, keyCode, event.getUnicodeChar()); @@ -1876,43 +1898,136 @@ public class AudioPerformanceTest extends Activity public static class HTTPStream { public HTTPStream (HttpURLConnection connection_, - int[] statusCode, StringBuffer responseHeaders) throws IOException + int[] statusCode_, + StringBuffer responseHeaders_) { connection = connection_; + statusCode = statusCode_; + responseHeaders = responseHeaders_; + } + + private final InputStream getCancellableStream (final boolean isInput) throws ExecutionException + { + synchronized (createFutureLock) + { + if (hasBeenCancelled.get()) + return null; + + streamFuture = executor.submit (new Callable() + { + @Override + public BufferedInputStream call() throws IOException + { + return new BufferedInputStream (isInput ? connection.getInputStream() + : connection.getErrorStream()); + } + }); + } try { - inputStream = new BufferedInputStream (connection.getInputStream()); + if (connection.getConnectTimeout() > 0) + return streamFuture.get (connection.getConnectTimeout(), TimeUnit.MILLISECONDS); + else + return streamFuture.get(); + } + catch (InterruptedException e) + { + return null; + } + catch (TimeoutException e) + { + return null; + } + catch (CancellationException e) + { + return null; + } + } + + public final boolean connect() + { + try + { + try + { + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + inputStream = getCancellableStream (true); + } + } + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally + { + statusCode[0] = connection.getResponseCode(); + } + + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + try + { + if (statusCode[0] >= 400) + inputStream = getCancellableStream (false); + else + inputStream = getCancellableStream (true); + } + 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) { - if (connection.getResponseCode() < 400) - throw e; + return false; } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - if (statusCode[0] >= 400) - inputStream = connection.getErrorStream(); - else - inputStream = connection.getInputStream(); - - 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"); } public final void release() { + hasBeenCancelled.set (true); + try { - inputStream.close(); + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (inputStream != null) + inputStream.close(); } catch (IOException e) {} + finally + { + createStreamLock.unlock(); + } connection.disconnect(); } @@ -1923,7 +2038,11 @@ public class AudioPerformanceTest extends Activity try { - num = inputStream.read (buffer, 0, numBytes); + synchronized (createStreamLock) + { + if (inputStream != null) + num = inputStream.read (buffer, 0, numBytes); + } } catch (IOException e) {} @@ -1940,8 +2059,16 @@ public class AudioPerformanceTest extends Activity public final boolean setPosition (long newPos) { return false; } private HttpURLConnection connection; + private int[] statusCode; + private StringBuffer responseHeaders; private InputStream inputStream; private long position; + private final ReentrantLock createStreamLock = new ReentrantLock(); + private final Object createFutureLock = new Object(); + private AtomicBoolean hasBeenCancelled = new AtomicBoolean(); + + private final ExecutorService executor = Executors.newCachedThreadPool (Executors.defaultThreadFactory()); + Future streamFuture; } public static final HTTPStream createHTTPStream (String address, boolean isPost, byte[] postData, diff --git a/extras/AudioPerformanceTest/Builds/Android/app/src/release/res/values/string.xml b/extras/AudioPerformanceTest/Builds/Android/app/src/release/res/values/string.xml new file mode 100644 index 0000000000..251c59cb81 --- /dev/null +++ b/extras/AudioPerformanceTest/Builds/Android/app/src/release/res/values/string.xml @@ -0,0 +1,5 @@ + + + + AudioPerformanceTest + diff --git a/extras/AudioPerformanceTest/Builds/Android/build.gradle b/extras/AudioPerformanceTest/Builds/Android/build.gradle index e1c0c91bb7..0109eaa02a 100644 --- a/extras/AudioPerformanceTest/Builds/Android/build.gradle +++ b/extras/AudioPerformanceTest/Builds/Android/build.gradle @@ -3,7 +3,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.1' + classpath 'com.android.tools.build:gradle:2.3.3' } } diff --git a/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile b/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile index eab9277d02..f99373ae15 100644 --- a/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile +++ b/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile @@ -81,6 +81,8 @@ OBJECTS_APP := \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) @echo Linking "AudioPerformanceTest - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) diff --git a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj index 0f98621a56..4af85a2476 100644 --- a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj +++ b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj @@ -124,7 +124,7 @@ 02A7F817D49F2BC1D70F4242, 1DFEAF972822E305E013CC06, ); name = Source; sourceTree = ""; }; 19B7C16D592FB25D09022191 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -145,8 +145,9 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -154,7 +155,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; B7A6988E30C0A68B01EDC53B = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -176,8 +177,9 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -186,16 +188,37 @@ USE_HEADERMAP = NO; }; name = Release; }; B907CDF95622107F20CD7617 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "AudioPerformanceTest"; @@ -203,15 +226,36 @@ ZERO_LINK = NO; }; name = Debug; }; BF82CBDF63CC37CADC61A511 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "AudioPerformanceTest"; WARNING_CFLAGS = -Wreorder; @@ -253,7 +297,7 @@ C86DD529EC94922C2AB61742, 6C2BE2DE2ECC96615ED827AB, 409D569C572B6EF7F4F1702D, ); buildRules = ( ); dependencies = ( ); name = "AudioPerformanceTest - App"; productName = AudioPerformanceTest; productReference = 614F2084407B35D62101F69F; productType = "com.apple.product-type.application"; }; - 9CE2A44801B5B4BE7A9667DA = {isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { E9FD2656EC625C9C8DE30219 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3BA1BA0CAFE969E99950C06B; projectDirPath = ""; projectRoot = ""; targets = (E9FD2656EC625C9C8DE30219); }; + 9CE2A44801B5B4BE7A9667DA = {isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { E9FD2656EC625C9C8DE30219 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3BA1BA0CAFE969E99950C06B; projectDirPath = ""; projectRoot = ""; targets = (E9FD2656EC625C9C8DE30219); }; }; rootObject = 9CE2A44801B5B4BE7A9667DA; } diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.sln b/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.sln index 779f679507..b436f9b486 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.sln +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.sln @@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Debug|Win32.Build.0 = Debug|Win32 {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Debug|Win32.ActiveCfg = Debug|Win32 - {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Release|Win32.Build.0 = Release|Win32 + {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Debug|Win32.Build.0 = Debug|Win32 {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Release|Win32.ActiveCfg = Release|Win32 + {78607AE9-F43B-3DDB-0FE1-D745771AF527}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj b/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj index 3105fad17b..cac50e194c 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj @@ -16,6 +16,7 @@ {78607AE9-F43B-3DDB-0FE1-D745771AF527} v140 + 8.1 Application false v140 + 8.1 @@ -30,6 +32,7 @@ false true v140 + 8.1 @@ -40,6 +43,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -53,6 +57,7 @@ AudioPerformanceTest true v140 + 8.1 @@ -76,6 +81,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -152,9 +159,6 @@ true - - true - true @@ -215,6 +219,9 @@ true + + true + true @@ -431,9 +438,6 @@ true - - true - true @@ -569,6 +573,9 @@ true + + true + true @@ -1688,7 +1695,6 @@ - @@ -1708,10 +1714,12 @@ + + @@ -1817,7 +1825,6 @@ - @@ -2089,6 +2096,7 @@ + diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj.filters b/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj.filters index 8b265f7589..cb30733b13 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj.filters +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest_App.vcxproj.filters @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -349,9 +352,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -412,6 +412,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -634,9 +637,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -796,6 +796,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2031,9 +2034,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2091,6 +2091,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2103,6 +2106,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2418,9 +2424,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3234,6 +3237,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj index 9a5d0a3fc8..d8159c74d7 100644 --- a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj +++ b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj @@ -132,7 +132,7 @@ 19B7C16D592FB25D09022191 = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -153,15 +153,16 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.AudioPerformanceTest; USE_HEADERMAP = NO; }; name = Debug; }; B7A6988E30C0A68B01EDC53B = {isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -183,24 +184,46 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.AudioPerformanceTest; USE_HEADERMAP = NO; }; name = Release; }; B907CDF95622107F20CD7617 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; ONLY_ACTIVE_ARCH = YES; @@ -212,15 +235,36 @@ BF82CBDF63CC37CADC61A511 = {isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; PRODUCT_NAME = "AudioPerformanceTest"; @@ -267,7 +311,7 @@ C86DD529EC94922C2AB61742, 6C2BE2DE2ECC96615ED827AB, 409D569C572B6EF7F4F1702D, ); buildRules = ( ); dependencies = ( ); name = "AudioPerformanceTest - App"; productName = AudioPerformanceTest; productReference = 614F2084407B35D62101F69F; productType = "com.apple.product-type.application"; }; - 9CE2A44801B5B4BE7A9667DA = {isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { E9FD2656EC625C9C8DE30219 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3BA1BA0CAFE969E99950C06B; projectDirPath = ""; projectRoot = ""; targets = (E9FD2656EC625C9C8DE30219); }; + 9CE2A44801B5B4BE7A9667DA = {isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { E9FD2656EC625C9C8DE30219 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3BA1BA0CAFE969E99950C06B; projectDirPath = ""; projectRoot = ""; targets = (E9FD2656EC625C9C8DE30219); }; }; rootObject = 9CE2A44801B5B4BE7A9667DA; } diff --git a/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h b/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h index 0c0ae04d52..3297659b93 100644 --- a/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h +++ b/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -54,6 +60,174 @@ #define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 #define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -62,172 +236,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_audio_utils flags: - -#ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER -#endif - -#ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif diff --git a/extras/BLOCKS/doxygen/Doxyfile b/extras/BLOCKS/doxygen/Doxyfile index 9729e672ef..08e613d670 100644 --- a/extras/BLOCKS/doxygen/Doxyfile +++ b/extras/BLOCKS/doxygen/Doxyfile @@ -2069,7 +2069,6 @@ PREDEFINED = WIN32=1 \ JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS=1 \ JUCE_COMPILER_SUPPORTS_VARIADIC_TEMPLATES=1 \ JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL=1 \ - JUCE_COMPILER_SUPPORTS_LAMBDAS=1 \ JUCE_MODAL_LOOPS_PERMITTED=1 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this diff --git a/extras/Projucer/Builds/LinuxMakefile/Makefile b/extras/Projucer/Builds/LinuxMakefile/Makefile index a282a48029..e343589f08 100644 --- a/extras/Projucer/Builds/LinuxMakefile/Makefile +++ b/extras/Projucer/Builds/LinuxMakefile/Makefile @@ -33,7 +33,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.0.2 -DJUCE_APP_VERSION_HEX=0x50002 $(shell pkg-config --cflags freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.1.0 -DJUCE_APP_VERSION_HEX=0x50100 $(shell pkg-config --cflags freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -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_TARGET_APP := Projucer @@ -54,7 +54,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := -march=native endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.0.2 -DJUCE_APP_VERSION_HEX=0x50002 $(shell pkg-config --cflags freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.1.0 -DJUCE_APP_VERSION_HEX=0x50100 $(shell pkg-config --cflags freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -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_TARGET_APP := Projucer @@ -71,7 +71,6 @@ OBJECTS_APP := \ $(JUCE_OBJDIR)/jucer_CommandLine_f35de107.o \ $(JUCE_OBJDIR)/jucer_DocumentEditorComponent_695dff1d.o \ $(JUCE_OBJDIR)/jucer_DownloadCompileEngineThread_8a38703f.o \ - $(JUCE_OBJDIR)/jucer_GlobalPreferences_b0f1bd3d.o \ $(JUCE_OBJDIR)/jucer_Main_f8488f5b.o \ $(JUCE_OBJDIR)/jucer_MainWindow_1e163aeb.o \ $(JUCE_OBJDIR)/jucer_OpenDocumentManager_4c72d210.o \ @@ -126,6 +125,8 @@ OBJECTS_APP := \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES) @echo Linking "Projucer - App" -$(V_AT)mkdir -p $(JUCE_BINDIR) @@ -158,11 +159,6 @@ $(JUCE_OBJDIR)/jucer_DownloadCompileEngineThread_8a38703f.o: ../../Source/Applic @echo "Compiling jucer_DownloadCompileEngineThread.cpp" $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" -$(JUCE_OBJDIR)/jucer_GlobalPreferences_b0f1bd3d.o: ../../Source/Application/jucer_GlobalPreferences.cpp - -$(V_AT)mkdir -p $(JUCE_OBJDIR) - @echo "Compiling jucer_GlobalPreferences.cpp" - $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" - $(JUCE_OBJDIR)/jucer_Main_f8488f5b.o: ../../Source/Application/jucer_Main.cpp -$(V_AT)mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_Main.cpp" diff --git a/extras/Projucer/Builds/MacOSX/Info-App.plist b/extras/Projucer/Builds/MacOSX/Info-App.plist index ab9f07f801..e99bed4372 100644 --- a/extras/Projucer/Builds/MacOSX/Info-App.plist +++ b/extras/Projucer/Builds/MacOSX/Info-App.plist @@ -33,9 +33,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 5.0.2 + 5.1.0 CFBundleVersion - 5.0.2 + 5.1.0 NSHumanReadableCopyright ROLI Ltd. NSHighResolutionCapable diff --git a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj index e8970d656f..d6050f4b25 100644 --- a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj +++ b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj @@ -29,7 +29,6 @@ 954A036F5DDB375DB23FFB3E = {isa = PBXBuildFile; fileRef = 0400CB0E056A1D840304D2DE; }; 3EB3D569250C4BA4CA9AF578 = {isa = PBXBuildFile; fileRef = C7608A3967D9AB9481848F2B; }; 636D21BF846031A6A1A7476A = {isa = PBXBuildFile; fileRef = 11EB44786085029106099D01; }; - 3C3B0ED6C43FDA3AF76DEE2E = {isa = PBXBuildFile; fileRef = 84DE44680C9D37CDDCD127FF; }; 95B44E6C74B1DED31DBE37EB = {isa = PBXBuildFile; fileRef = 8C52A3DDA62A746AA7A68535; }; AA9D0B8E23F3D87A23DE9F8A = {isa = PBXBuildFile; fileRef = 9069981E414A631B036CC9AC; }; 244BA1BDA5FAA465EA3F9C6D = {isa = PBXBuildFile; fileRef = 2247EE920DF0610CAF9F4513; }; @@ -115,7 +114,6 @@ 1B9B5A37F079FE3B3CF8FAB6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; }; 1C216FE9B7A5209C5CCF2517 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_PaintElement.cpp"; path = "../../Source/ComponentEditor/paintelements/jucer_PaintElement.cpp"; sourceTree = "SOURCE_ROOT"; }; 1C73D7591E63E8018E279716 = {isa = PBXFileReference; lastKnownFileType = file.svg; name = "export_android.svg"; path = "../../Source/BinaryData/export_android.svg"; sourceTree = "SOURCE_ROOT"; }; - 1C81C5501BE7F2C912250711 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_GlobalPreferences.h"; path = "../../Source/Application/jucer_GlobalPreferences.h"; sourceTree = "SOURCE_ROOT"; }; 1D3D6A19A60F0B03DE2F1C14 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_PaintElementPath.h"; path = "../../Source/ComponentEditor/paintelements/jucer_PaintElementPath.h"; sourceTree = "SOURCE_ROOT"; }; 1D99EA99F946D665FE583414 = {isa = PBXFileReference; lastKnownFileType = file.svg; name = "wizard_Highlight.svg"; path = "../../Source/BinaryData/wizard_Highlight.svg"; sourceTree = "SOURCE_ROOT"; }; 1DE5BBC777FB64798D823002 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_data_structures.mm"; path = "../../JuceLibraryCode/include_juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; }; @@ -165,6 +163,7 @@ 472F9A90F685220D730EBF6C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = BinaryData.cpp; path = ../../JuceLibraryCode/BinaryData.cpp; sourceTree = "SOURCE_ROOT"; }; 47B49049B85EED74D29C9906 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectTree_File.h"; path = "../../Source/Project/jucer_ProjectTree_File.h"; sourceTree = "SOURCE_ROOT"; }; 47DD50A5A9091F9900E0EAD9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_JucerTreeViewBase.cpp"; path = "../../Source/Utility/jucer_JucerTreeViewBase.cpp"; sourceTree = "SOURCE_ROOT"; }; + 4856DA6706D794E2D89DAB63 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_GlobalSearchPathsWindowComponent.h"; path = "../../Source/Utility/jucer_GlobalSearchPathsWindowComponent.h"; sourceTree = "SOURCE_ROOT"; }; 4A035FB6A8D93BF154C08C3F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "projucer_BuildTabStatusComp.h"; path = "../../Source/LiveBuildEngine/projucer_BuildTabStatusComp.h"; sourceTree = "SOURCE_ROOT"; }; 4A41FD3066D0979DB48691E5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_MiscUtilities.h"; path = "../../Source/Utility/jucer_MiscUtilities.h"; sourceTree = "SOURCE_ROOT"; }; 4A4EBDAD8D098F72CE053235 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectWizard_AudioPlugin.h"; path = "../../Source/Wizards/jucer_ProjectWizard_AudioPlugin.h"; sourceTree = "SOURCE_ROOT"; }; @@ -233,7 +232,6 @@ 8138A55052E9FC27284B74DD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_FontPropertyComponent.h"; path = "../../Source/ComponentEditor/properties/jucer_FontPropertyComponent.h"; sourceTree = "SOURCE_ROOT"; }; 820291543BF93243B718F0EE = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_JucerTreeViewBase.h"; path = "../../Source/Utility/jucer_JucerTreeViewBase.h"; sourceTree = "SOURCE_ROOT"; }; 842427CFE565F3FCE5B99174 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = System/Library/Frameworks/DiscRecording.framework; sourceTree = SDKROOT; }; - 84DE44680C9D37CDDCD127FF = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_GlobalPreferences.cpp"; path = "../../Source/Application/jucer_GlobalPreferences.cpp"; sourceTree = "SOURCE_ROOT"; }; 86E468DE6556BB2AD76A3D80 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjectContentComponent.cpp"; path = "../../Source/Project/jucer_ProjectContentComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; 86E8A40E5A83781A8478454D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_MainTemplate_Window.cpp"; path = "../../Source/BinaryData/jucer_MainTemplate_Window.cpp"; sourceTree = "SOURCE_ROOT"; }; 8702F43110E4CCA5E5F827F5 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; }; @@ -314,6 +312,7 @@ C00793A0D4A59BDADC62EEF7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "projucer_CompileEngineClient.h"; path = "../../Source/LiveBuildEngine/projucer_CompileEngineClient.h"; sourceTree = "SOURCE_ROOT"; }; C094F3B6A65A79A6DF87C9C2 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_PaintElementGroup.h"; path = "../../Source/ComponentEditor/paintelements/jucer_PaintElementGroup.h"; sourceTree = "SOURCE_ROOT"; }; C09BBB58CA45B66D693E8C31 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_TemplateThumbnailsComponent.h"; path = "../../Source/Wizards/jucer_TemplateThumbnailsComponent.h"; sourceTree = "SOURCE_ROOT"; }; + C15220EDA1A8315DA3255E87 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_EditorColourSchemeWindowComponent.h"; path = "../../Source/Utility/jucer_EditorColourSchemeWindowComponent.h"; sourceTree = "SOURCE_ROOT"; }; C187718F7B9EBA88584B43F3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_PaintRoutine.cpp"; path = "../../Source/ComponentEditor/jucer_PaintRoutine.cpp"; sourceTree = "SOURCE_ROOT"; }; C22791DB75870C4F102AA8A3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_SlidingPanelComponent.h"; path = "../../Source/Utility/jucer_SlidingPanelComponent.h"; sourceTree = "SOURCE_ROOT"; }; C2990A8D054BC230E7C637C3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_NewProjectWizardClasses.h"; path = "../../Source/Wizards/jucer_NewProjectWizardClasses.h"; sourceTree = "SOURCE_ROOT"; }; @@ -396,8 +395,6 @@ 11EB44786085029106099D01, B7307A82D9EB1EDBA91EE43D, D526C38D581425949BA0E4AC, - 84DE44680C9D37CDDCD127FF, - 1C81C5501BE7F2C912250711, F03E2BDD36E6F4F53AB767A8, 8C52A3DDA62A746AA7A68535, 9069981E414A631B036CC9AC, @@ -569,10 +566,12 @@ 914ADDB50ED7365F08BA91F9, DF78EF6242D82F912534A277, 188D03A4247F4BC0539F5C49, + C15220EDA1A8315DA3255E87, 1729AEDC34001C31B8CC357C, 553725A0E3A391651ED1731E, 35A36102EAD2D2620EE99E7E, E382C78A1D837DD98916E86A, + 4856DA6706D794E2D89DAB63, CF21D9DB3AEC0A4DCAB36A99, 515FF6E74826E3E3F7273621, 47DD50A5A9091F9900E0EAD9, @@ -727,7 +726,7 @@ 0FFEF043CA89142B18C79ABE, 92ABB8016546F41128399E9D, ); name = Source; sourceTree = ""; }; 0CC6C439D038EDA0D7F10DF0 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_CXX_LIBRARY = "libc++"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; @@ -739,8 +738,8 @@ "_DEBUG=1", "DEBUG=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=5.0.2", - "JUCE_APP_VERSION_HEX=0x50002", + "JUCE_APP_VERSION=5.1.0", + "JUCE_APP_VERSION_HEX=0x50100", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -749,17 +748,18 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.9; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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 -Wextra-semi"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.theprojucer; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 0BC15DC2E5FE5ECFFB398D49 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_CXX_LIBRARY = "libc++"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; @@ -771,8 +771,8 @@ "_NDEBUG=1", "NDEBUG=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=5.0.2", - "JUCE_APP_VERSION_HEX=0x50002", + "JUCE_APP_VERSION=5.1.0", + "JUCE_APP_VERSION_HEX=0x50100", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -782,27 +782,49 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INFOPLIST_FILE = Info-App.plist; + INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.7; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - 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 -Wextra-semi"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.theprojucer; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Release; }; C42924A24AB55E6A940423EA = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "Projucer"; @@ -810,15 +832,36 @@ ZERO_LINK = NO; }; name = Debug; }; 70135D15D7E0D8410C42BBA3 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "Projucer"; WARNING_CFLAGS = -Wreorder; @@ -839,7 +882,6 @@ 954A036F5DDB375DB23FFB3E, 3EB3D569250C4BA4CA9AF578, 636D21BF846031A6A1A7476A, - 3C3B0ED6C43FDA3AF76DEE2E, 95B44E6C74B1DED31DBE37EB, AA9D0B8E23F3D87A23DE9F8A, 244BA1BDA5FAA465EA3F9C6D, @@ -911,7 +953,7 @@ C262D0F297DDE25326F5AC81, 5CB869A8DA78BE6FA2757034, D150288A32EE596408C2B99F, ); buildRules = ( ); dependencies = ( ); name = "Projucer - App"; productName = Projucer; productReference = 09DE066936CF037E9709ADB1; productType = "com.apple.product-type.application"; }; - 74EA481348A24104E6ACE009 = {isa = PBXProject; buildConfigurationList = F90407F24422C589DA251604; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 0039FE1A254FE518518BF8B8 = { SystemCapabilities = {com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3CC531922CC2D398E283A845; projectDirPath = ""; projectRoot = ""; targets = (0039FE1A254FE518518BF8B8); }; + 74EA481348A24104E6ACE009 = {isa = PBXProject; buildConfigurationList = F90407F24422C589DA251604; attributes = { LastUpgradeCheck = 0830; TargetAttributes = { 0039FE1A254FE518518BF8B8 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3CC531922CC2D398E283A845; projectDirPath = ""; projectRoot = ""; targets = (0039FE1A254FE518518BF8B8); }; }; rootObject = 74EA481348A24104E6ACE009; } diff --git a/extras/Projucer/Builds/VisualStudio2013/Projucer.sln b/extras/Projucer/Builds/VisualStudio2013/Projucer.sln index 2e56c45692..8c3cf0cb3a 100644 --- a/extras/Projucer/Builds/VisualStudio2013/Projucer.sln +++ b/extras/Projucer/Builds/VisualStudio2013/Projucer.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Debug|x64.Build.0 = Debug|x64 {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Debug|x64.ActiveCfg = Debug|x64 - {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Release|x64.Build.0 = Release|x64 + {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Debug|x64.Build.0 = Debug|x64 {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Release|x64.ActiveCfg = Release|x64 + {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj index a483f0f93d..1a65757e93 100644 --- a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj @@ -16,6 +16,7 @@ {E4CFCE31-1AF5-C360-751D-9682E333BE4D} v120 + 8.1 false v120 v120 + 8.1 @@ -32,6 +34,7 @@ true v120 v120 + 8.1 @@ -42,6 +45,7 @@ v120 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ Projucer true v120 + 8.1 @@ -68,7 +73,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.0.2;JUCE_APP_VERSION_HEX=0x50002;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;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.1.0;JUCE_APP_VERSION_HEX=0x50100;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;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -107,7 +113,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.0.2;JUCE_APP_VERSION_HEX=0x50002;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;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=5.1.0;JUCE_APP_VERSION_HEX=0x50100;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;%(PreprocessorDefinitions) MultiThreaded true @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -146,7 +153,6 @@ - @@ -238,6 +244,9 @@ true + + true + true @@ -1376,7 +1385,6 @@ - @@ -1496,9 +1504,11 @@ + + @@ -1759,6 +1769,7 @@ + diff --git a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters index 93c1efae21..3c1db26bf7 100644 --- a/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters @@ -286,9 +286,6 @@ Projucer\Application - - Projucer\Application - Projucer\Application @@ -466,6 +463,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -1719,9 +1719,6 @@ Projucer\Application - - Projucer\Application - Projucer\Application @@ -2079,6 +2076,9 @@ Projucer\Utility + + Projucer\Utility + Projucer\Utility @@ -2088,6 +2088,9 @@ Projucer\Utility + + Projucer\Utility + Projucer\Utility @@ -2868,6 +2871,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/extras/Projucer/Builds/VisualStudio2013/resources.rc b/extras/Projucer/Builds/VisualStudio2013/resources.rc index c6c0009b43..3f61b6bc58 100644 --- a/extras/Projucer/Builds/VisualStudio2013/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2013/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,0,2,0 +FILEVERSION 5,1,0,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -15,9 +15,9 @@ BEGIN BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "5.0.2\0" + VALUE "FileVersion", "5.1.0\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "5.0.2\0" + VALUE "ProductVersion", "5.1.0\0" END END diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer.sln b/extras/Projucer/Builds/VisualStudio2015/Projucer.sln index f74fd162c4..b1d6d7a89c 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer.sln +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Debug|x64.Build.0 = Debug|x64 {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Debug|x64.ActiveCfg = Debug|x64 - {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Release|x64.Build.0 = Release|x64 + {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Debug|x64.Build.0 = Debug|x64 {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Release|x64.ActiveCfg = Release|x64 + {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj index 27eeee228e..9b8d5630a8 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj @@ -16,6 +16,7 @@ {E4CFCE31-1AF5-C360-751D-9682E333BE4D} v140 + 8.1 false v140 v140 + 8.1 @@ -32,6 +34,7 @@ true v140 v140 + 8.1 @@ -42,6 +45,7 @@ v140 + 8.1 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ Projucer true v140 + 8.1 @@ -68,7 +73,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.0.2;JUCE_APP_VERSION_HEX=0x50002;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;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.1.0;JUCE_APP_VERSION_HEX=0x50100;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;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -107,7 +113,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.0.2;JUCE_APP_VERSION_HEX=0x50002;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;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.1.0;JUCE_APP_VERSION_HEX=0x50100;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;%(PreprocessorDefinitions) MultiThreaded true @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -146,7 +153,6 @@ - @@ -238,6 +244,9 @@ true + + true + true @@ -1376,7 +1385,6 @@ - @@ -1496,9 +1504,11 @@ + + @@ -1759,6 +1769,7 @@ + diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters index 3dc4f36a97..f3b5639510 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters @@ -286,9 +286,6 @@ Projucer\Application - - Projucer\Application - Projucer\Application @@ -466,6 +463,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -1719,9 +1719,6 @@ Projucer\Application - - Projucer\Application - Projucer\Application @@ -2079,6 +2076,9 @@ Projucer\Utility + + Projucer\Utility + Projucer\Utility @@ -2088,6 +2088,9 @@ Projucer\Utility + + Projucer\Utility + Projucer\Utility @@ -2868,6 +2871,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/extras/Projucer/Builds/VisualStudio2015/resources.rc b/extras/Projucer/Builds/VisualStudio2015/resources.rc index c6c0009b43..3f61b6bc58 100644 --- a/extras/Projucer/Builds/VisualStudio2015/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2015/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,0,2,0 +FILEVERSION 5,1,0,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -15,9 +15,9 @@ BEGIN BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "5.0.2\0" + VALUE "FileVersion", "5.1.0\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "5.0.2\0" + VALUE "ProductVersion", "5.1.0\0" END END diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer.sln b/extras/Projucer/Builds/VisualStudio2017/Projucer.sln index 8f0d1f4bf2..bec537385b 100644 --- a/extras/Projucer/Builds/VisualStudio2017/Projucer.sln +++ b/extras/Projucer/Builds/VisualStudio2017/Projucer.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Debug|x64.Build.0 = Debug|x64 {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Debug|x64.ActiveCfg = Debug|x64 - {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Release|x64.Build.0 = Release|x64 + {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Debug|x64.Build.0 = Debug|x64 {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Release|x64.ActiveCfg = Release|x64 + {E4CFCE31-1AF5-C360-751D-9682E333BE4D}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj index a375503921..db0e142894 100644 --- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj @@ -16,6 +16,7 @@ {E4CFCE31-1AF5-C360-751D-9682E333BE4D} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ Projucer true v141 + 10.0.15063.0 @@ -68,7 +73,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.0.2;JUCE_APP_VERSION_HEX=0x50002;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;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.1.0;JUCE_APP_VERSION_HEX=0x50100;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;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -107,7 +113,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.0.2;JUCE_APP_VERSION_HEX=0x50002;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;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.1.0;JUCE_APP_VERSION_HEX=0x50100;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;%(PreprocessorDefinitions) MultiThreaded true @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -146,7 +153,6 @@ - @@ -238,6 +244,9 @@ true + + true + true @@ -1376,7 +1385,6 @@ - @@ -1496,9 +1504,11 @@ + + @@ -1759,6 +1769,7 @@ + diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters index 3f85ff3d3e..6b3134ee6d 100644 --- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters @@ -286,9 +286,6 @@ Projucer\Application - - Projucer\Application - Projucer\Application @@ -466,6 +463,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -1719,9 +1719,6 @@ Projucer\Application - - Projucer\Application - Projucer\Application @@ -2079,6 +2076,9 @@ Projucer\Utility + + Projucer\Utility + Projucer\Utility @@ -2088,6 +2088,9 @@ Projucer\Utility + + Projucer\Utility + Projucer\Utility @@ -2868,6 +2871,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement diff --git a/extras/Projucer/Builds/VisualStudio2017/resources.rc b/extras/Projucer/Builds/VisualStudio2017/resources.rc index c6c0009b43..3f61b6bc58 100644 --- a/extras/Projucer/Builds/VisualStudio2017/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2017/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,0,2,0 +FILEVERSION 5,1,0,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -15,9 +15,9 @@ BEGIN BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "5.0.2\0" + VALUE "FileVersion", "5.1.0\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "5.0.2\0" + VALUE "ProductVersion", "5.1.0\0" END END diff --git a/extras/Projucer/JuceLibraryCode/AppConfig.h b/extras/Projucer/JuceLibraryCode/AppConfig.h index 6cb927d0f3..47ff481180 100644 --- a/extras/Projucer/JuceLibraryCode/AppConfig.h +++ b/extras/Projucer/JuceLibraryCode/AppConfig.h @@ -52,8 +52,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -68,6 +74,90 @@ #define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 #define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + #define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + #define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -76,88 +166,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - #define JUCE_LOG_ASSERTIONS 1 -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - #define JUCE_USE_CURL 1 -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif diff --git a/extras/Projucer/JuceLibraryCode/JuceHeader.h b/extras/Projucer/JuceLibraryCode/JuceHeader.h index 9cfe22ab40..e991297465 100644 --- a/extras/Projucer/JuceLibraryCode/JuceHeader.h +++ b/extras/Projucer/JuceLibraryCode/JuceHeader.h @@ -34,7 +34,7 @@ namespace ProjectInfo { const char* const projectName = "Projucer"; - const char* const versionString = "5.0.2"; - const int versionNumber = 0x50002; + const char* const versionString = "5.1.0"; + const int versionNumber = 0x50100; } #endif diff --git a/extras/Projucer/Projucer.jucer b/extras/Projucer/Projucer.jucer index 4db0c29131..3a0b3683a6 100644 --- a/extras/Projucer/Projucer.jucer +++ b/extras/Projucer/Projucer.jucer @@ -1,13 +1,14 @@ + displaySplashScreen="0" reportAppUsage="0" companyName="ROLI Ltd." + cppLanguageStandard="11"> @@ -136,10 +137,6 @@ resource="0" file="Source/Application/jucer_DownloadCompileEngineThread.h"/> - - + + & ownerPointer, - bool showCodeEditorTab = false); - static const char* getSchemeFileSuffix() { return ".scheme"; } static const char* getSchemeFileWildCard() { return "*.scheme"; } diff --git a/extras/Projucer/Source/Application/jucer_Application.cpp b/extras/Projucer/Source/Application/jucer_Application.cpp index 75b195c78d..f4874dad8b 100644 --- a/extras/Projucer/Source/Application/jucer_Application.cpp +++ b/extras/Projucer/Source/Application/jucer_Application.cpp @@ -196,11 +196,11 @@ void ProjucerApplication::shutdown() } versionChecker = nullptr; - appearanceEditorWindow = nullptr; - globalPreferencesWindow = nullptr; utf8Window = nullptr; svgPathWindow = nullptr; aboutWindow = nullptr; + pathsWindow = nullptr; + editorColourSchemeWindow = nullptr; if (licenseController != nullptr) { @@ -386,7 +386,7 @@ void ProjucerApplication::createFileMenu (PopupMenu& menu) #if ! JUCE_MAC menu.addCommandItem (commandManager, CommandIDs::showAboutWindow); menu.addCommandItem (commandManager, CommandIDs::showAppUsageWindow); - menu.addCommandItem (commandManager, CommandIDs::showGlobalPreferences); + menu.addCommandItem (commandManager, CommandIDs::showGlobalPathsWindow); menu.addSeparator(); menu.addCommandItem (commandManager, StandardApplicationCommandIDs::quit); #endif @@ -463,7 +463,7 @@ void ProjucerApplication::createColourSchemeItems (PopupMenu& menu) for (auto s : schemes) { editorColourSchemes.addItem (codeEditorColourSchemeBaseID + i, s, - globalPreferencesWindow == nullptr, + editorColourSchemeWindow == nullptr, selectedEditorColourSchemeIndex == i); ++i; } @@ -472,7 +472,7 @@ void ProjucerApplication::createColourSchemeItems (PopupMenu& menu) editorColourSchemes.addSeparator(); editorColourSchemes.addItem (codeEditorColourSchemeBaseID + numEditorColourSchemes, - "Create...", globalPreferencesWindow == nullptr); + "Create...", editorColourSchemeWindow == nullptr); menu.addSubMenu ("Editor Colour Scheme", editorColourSchemes); } @@ -511,7 +511,7 @@ void ProjucerApplication::createExtraAppleMenuItems (PopupMenu& menu) menu.addCommandItem (commandManager, CommandIDs::showAboutWindow); menu.addCommandItem (commandManager, CommandIDs::showAppUsageWindow); menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::showGlobalPreferences); + menu.addCommandItem (commandManager, CommandIDs::showGlobalPathsWindow); } void ProjucerApplication::handleMainMenuCommand (int menuItemID) @@ -539,7 +539,7 @@ void ProjucerApplication::handleMainMenuCommand (int menuItemID) } else if (menuItemID == (codeEditorColourSchemeBaseID + numEditorColourSchemes)) { - AppearanceSettings::showGlobalPreferences (globalPreferencesWindow, true); + showEditorColourSchemeWindow(); } else { @@ -556,7 +556,7 @@ void ProjucerApplication::getAllCommands (Array & commands) CommandIDs::open, CommandIDs::closeAllDocuments, CommandIDs::saveAll, - CommandIDs::showGlobalPreferences, + CommandIDs::showGlobalPathsWindow, CommandIDs::showUTF8Tool, CommandIDs::showSVGPathTool, CommandIDs::showAboutWindow, @@ -580,9 +580,10 @@ void ProjucerApplication::getCommandInfo (CommandID commandID, ApplicationComman result.defaultKeypresses.add (KeyPress ('o', ModifierKeys::commandModifier, 0)); break; - case CommandIDs::showGlobalPreferences: - result.setInfo ("Preferences...", "Shows the preferences window.", CommandCategories::general, 0); - result.defaultKeypresses.add (KeyPress (',', ModifierKeys::commandModifier, 0)); + case CommandIDs::showGlobalPathsWindow: + result.setInfo ("Global Search Paths...", + "Shows the window to change the global search paths.", + CommandCategories::general, 0); break; case CommandIDs::closeAllDocuments: @@ -646,7 +647,7 @@ bool ProjucerApplication::perform (const InvocationInfo& info) case CommandIDs::closeAllDocuments: closeAllDocuments (true); break; case CommandIDs::showUTF8Tool: showUTF8ToolWindow(); break; case CommandIDs::showSVGPathTool: showSVGPathDataToolWindow(); break; - case CommandIDs::showGlobalPreferences: AppearanceSettings::showGlobalPreferences (globalPreferencesWindow); break; + case CommandIDs::showGlobalPathsWindow: showPathsWindow(); break; case CommandIDs::showAboutWindow: showAboutWindow(); break; case CommandIDs::showAppUsageWindow: showApplicationUsageDataAgreementPopup(); break; case CommandIDs::loginLogout: doLogout(); break; @@ -742,6 +743,32 @@ void ProjucerApplication::dismissApplicationUsageDataAgreementPopup() applicationUsageDataWindow = nullptr; } +void ProjucerApplication::showPathsWindow() +{ + if (pathsWindow != nullptr) + pathsWindow->toFront (true); + else + new FloatingToolWindow ("Global Search Paths", + "pathsWindowPos", + new GlobalSearchPathsWindowComponent(), pathsWindow, false, + 600, 500, 600, 500, 600, 500); +} + +void ProjucerApplication::showEditorColourSchemeWindow() +{ + if (editorColourSchemeWindow != nullptr) + editorColourSchemeWindow->toFront (true); + else + { + new FloatingToolWindow ("Editor Colour Scheme", + "editorColourSchemeWindowPos", + new EditorColourSchemeWindowComponent(), + editorColourSchemeWindow, + false, + 500, 500, 500, 500, 500, 500); + } +} + //============================================================================== struct FileWithTime { @@ -846,9 +873,10 @@ void ProjucerApplication::setColourScheme (int index, bool saveSetting) if (utf8Window != nullptr) utf8Window->sendLookAndFeelChange(); if (svgPathWindow != nullptr) svgPathWindow->sendLookAndFeelChange(); - if (globalPreferencesWindow != nullptr) globalPreferencesWindow->sendLookAndFeelChange(); if (aboutWindow != nullptr) aboutWindow->sendLookAndFeelChange(); if (applicationUsageDataWindow != nullptr) applicationUsageDataWindow->sendLookAndFeelChange(); + if (pathsWindow != nullptr) pathsWindow->sendLookAndFeelChange(); + if (editorColourSchemeWindow != nullptr) editorColourSchemeWindow->sendLookAndFeelChange(); auto* mcm = ModalComponentManager::getInstance(); for (auto i = 0; i < mcm->getNumModalComponents(); ++i) diff --git a/extras/Projucer/Source/Application/jucer_Application.h b/extras/Projucer/Source/Application/jucer_Application.h index 6559c88279..559edaf85a 100644 --- a/extras/Projucer/Source/Application/jucer_Application.h +++ b/extras/Projucer/Source/Application/jucer_Application.h @@ -102,6 +102,9 @@ public: void showApplicationUsageDataAgreementPopup(); void dismissApplicationUsageDataAgreementPopup(); + void showPathsWindow(); + void showEditorColourSchemeWindow(); + void updateAllBuildTabs(); LatestVersionChecker* createVersionChecker() const; @@ -129,8 +132,8 @@ public: OpenDocumentManager openDocumentManager; ScopedPointer commandManager; - ScopedPointer appearanceEditorWindow, globalPreferencesWindow, utf8Window, - svgPathWindow, aboutWindow, applicationUsageDataWindow; + ScopedPointer utf8Window, svgPathWindow, aboutWindow, applicationUsageDataWindow, + pathsWindow, editorColourSchemeWindow; ScopedPointer logger; diff --git a/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp b/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp index 1b4e9e4076..6e55fb0174 100644 --- a/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp +++ b/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp @@ -745,7 +745,7 @@ void LatestVersionChecker::modalStateFinished (int result, void LatestVersionChecker::askUserForLocationToDownload (URL& newVersionToDownload, const String& extraHeaders) { - File targetFolder (findDefaultModulesFolder()); + File targetFolder (EnabledModuleList::findGlobalModulesFolder()); if (isJuceModulesFolder (targetFolder)) targetFolder = targetFolder.getParentDirectory(); diff --git a/extras/Projucer/Source/Application/jucer_CommandIDs.h b/extras/Projucer/Source/Application/jucer_CommandIDs.h index 3046977511..175ac31701 100644 --- a/extras/Projucer/Source/Application/jucer_CommandIDs.h +++ b/extras/Projucer/Source/Application/jucer_CommandIDs.h @@ -45,7 +45,7 @@ namespace CommandIDs createNewExporter = 0x300015, showUTF8Tool = 0x300020, - showGlobalPreferences = 0x300021, + showGlobalPathsWindow = 0x300021, showTranslationTool = 0x300022, showSVGPathTool = 0x300023, showAboutWindow = 0x300024, diff --git a/extras/Projucer/Source/Application/jucer_GlobalPreferences.cpp b/extras/Projucer/Source/Application/jucer_GlobalPreferences.cpp deleted file mode 100644 index f7adcf1c76..0000000000 --- a/extras/Projucer/Source/Application/jucer_GlobalPreferences.cpp +++ /dev/null @@ -1,465 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 5 End-User License - Agreement and JUCE 5 Privacy Policy (both updated and effective as of the - 27th April 2017). - - End User License Agreement: www.juce.com/juce-5-licence - Privacy Policy: www.juce.com/juce-5-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#include "../jucer_Headers.h" -#include "jucer_GlobalPreferences.h" -#include "../Utility/jucer_FloatingToolWindow.h" -#include "../Utility/jucer_ColourPropertyComponent.h" -#include "jucer_Application.h" - -//============================================================================== -PathSettingsTab::PathSettingsTab (DependencyPathOS os) -{ - const int maxChars = 1024; - - auto& settings = getAppSettings(); - - vst3PathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::vst3Path, os), "VST3 SDK", maxChars, false)); - - #if ! JUCE_LINUX - rtasPathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::rtasPath, os), "RTAS SDK", maxChars, false)); - aaxPathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::aaxPath, os), "AAX SDK", maxChars, false)); - #endif - - androidSdkPathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::androidSDKPath, os), "Android SDK", maxChars, false)); - androidNdkPathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::androidNDKPath, os), "Android NDK", maxChars, false)); - - for (auto component : pathComponents) - { - addAndMakeVisible (component); - component->addListener (this); - textPropertyComponentChanged (component); - } -} - -PathSettingsTab::~PathSettingsTab() -{ -} - -void PathSettingsTab::textPropertyComponentChanged (TextPropertyComponent* textPropertyComponent) -{ - auto keyName = getKeyForPropertyComponent (textPropertyComponent); - - auto textColour = getAppSettings().isGlobalPathValid (File::getCurrentWorkingDirectory(), keyName, textPropertyComponent->getText()) - ? findColour (widgetTextColourId) - : Colours::red; - - textPropertyComponent->setColour (TextPropertyComponent::textColourId, textColour); -} - -Identifier PathSettingsTab::getKeyForPropertyComponent (TextPropertyComponent* component) const -{ - if (component == vst3PathComponent) return Ids::vst3Path; - if (component == rtasPathComponent) return Ids::rtasPath; - if (component == aaxPathComponent) return Ids::aaxPath; - if (component == androidSdkPathComponent) return Ids::androidSDKPath; - if (component == androidNdkPathComponent) return Ids::androidNDKPath; - - // this property component does not have a key associated to it! - jassertfalse; - return {}; -} - -Component* PathSettingsTab::getContent() -{ - return this; -} - -String PathSettingsTab::getName() const noexcept -{ - return "Paths"; -} - -void PathSettingsTab::resized() -{ - const int componentHeight = 25; - - for (auto component : pathComponents) - { - const auto elementNumber = pathComponents.indexOf (component); - component->setBounds (10, componentHeight * elementNumber, getWidth() - 20, componentHeight); - } -} - -void PathSettingsTab::lookAndFeelChanged() -{ - for (auto* comp : pathComponents) - textPropertyComponentChanged (comp); -} - -//============================================================================== -struct AppearanceEditor -{ - struct FontScanPanel : public Component, - private Timer - { - FontScanPanel() - { - fontsToScan = Font::findAllTypefaceNames(); - startTimer (1); - } - - void paint (Graphics& g) override - { - g.fillAll (findColour (backgroundColourId)); - - g.setFont (14.0f); - g.setColour (findColour (defaultTextColourId)); - g.drawFittedText ("Scanning for fonts..", getLocalBounds(), Justification::centred, 2); - - const auto size = 30; - getLookAndFeel().drawSpinningWaitAnimation (g, Colours::white, (getWidth() - size) / 2, getHeight() / 2 - 50, size, size); - } - - void timerCallback() override - { - repaint(); - - if (fontsToScan.size() == 0) - { - getAppSettings().monospacedFontNames = fontsFound; - - if (auto* tab = findParentComponentOfClass()) - tab->changeContent (new EditorPanel()); - } - else - { - if (isMonospacedTypeface (fontsToScan[0])) - fontsFound.add (fontsToScan[0]); - - fontsToScan.remove (0); - } - } - - // A rather hacky trick to select only the fixed-pitch fonts.. - // This is unfortunately a bit slow, but will work on all platforms. - static bool isMonospacedTypeface (const String& name) - { - const Font font (name, 20.0f, Font::plain); - - const auto width = font.getStringWidth ("...."); - - return width == font.getStringWidth ("WWWW") - && width == font.getStringWidth ("0000") - && width == font.getStringWidth ("1111") - && width == font.getStringWidth ("iiii"); - } - - StringArray fontsToScan, fontsFound; - }; - - //============================================================================== - struct EditorPanel : public Component, - private ButtonListener - { - EditorPanel() - : loadButton ("Load Scheme..."), - saveButton ("Save Scheme...") - { - rebuildProperties(); - addAndMakeVisible (panel); - - addAndMakeVisible (loadButton); - addAndMakeVisible (saveButton); - - loadButton.addListener (this); - saveButton.addListener (this); - - lookAndFeelChanged(); - - saveSchemeState(); - } - - ~EditorPanel() - { - if (hasSchemeBeenModifiedSinceSave()) - saveScheme (true); - } - - void rebuildProperties() - { - auto& scheme = getAppSettings().appearance; - - Array props; - auto fontValue = scheme.getCodeFontValue(); - props.add (FontNameValueSource::createProperty ("Code Editor Font", fontValue)); - props.add (FontSizeValueSource::createProperty ("Font Size", fontValue)); - - const auto colourNames = scheme.getColourNames(); - - for (int i = 0; i < colourNames.size(); ++i) - props.add (new ColourPropertyComponent (nullptr, colourNames[i], - scheme.getColourValue (colourNames[i]), - Colours::white, false)); - - panel.clear(); - panel.addProperties (props); - } - - void resized() override - { - auto r = getLocalBounds(); - panel.setBounds (r.removeFromTop (getHeight() - 28).reduced (10, 2)); - loadButton.setBounds (r.removeFromLeft (getWidth() / 2).reduced (10, 1)); - saveButton.setBounds (r.reduced (10, 1)); - } - - private: - PropertyPanel panel; - TextButton loadButton, saveButton; - - Font codeFont; - Array colourValues; - - void buttonClicked (Button* b) override - { - if (b == &loadButton) - loadScheme(); - else - saveScheme (false); - } - - void saveScheme (bool isExit) - { - FileChooser fc ("Select a file in which to save this colour-scheme...", - getAppSettings().appearance.getSchemesFolder() - .getNonexistentChildFile ("Scheme", AppearanceSettings::getSchemeFileSuffix()), - AppearanceSettings::getSchemeFileWildCard()); - - if (fc.browseForFileToSave (true)) - { - File file (fc.getResult().withFileExtension (AppearanceSettings::getSchemeFileSuffix())); - getAppSettings().appearance.writeToFile (file); - getAppSettings().appearance.refreshPresetSchemeList(); - - saveSchemeState(); - ProjucerApplication::getApp().selectEditorColourSchemeWithName (file.getFileNameWithoutExtension()); - } - else if (isExit) - { - restorePreviousScheme(); - } - } - - void loadScheme() - { - FileChooser fc ("Please select a colour-scheme file to load...", - getAppSettings().appearance.getSchemesFolder(), - AppearanceSettings::getSchemeFileWildCard()); - - if (fc.browseForFileToOpen()) - { - if (getAppSettings().appearance.readFromFile (fc.getResult())) - { - rebuildProperties(); - saveSchemeState(); - } - } - } - - void lookAndFeelChanged() override - { - loadButton.setColour (TextButton::buttonColourId, - findColour (secondaryButtonBackgroundColourId)); - } - - void saveSchemeState() - { - auto& appearance = getAppSettings().appearance; - const auto colourNames = appearance.getColourNames(); - - codeFont = appearance.getCodeFont(); - - colourValues.clear(); - for (int i = 0; i < colourNames.size(); ++i) - colourValues.add (appearance.getColourValue (colourNames[i]).getValue()); - } - - bool hasSchemeBeenModifiedSinceSave() - { - auto& appearance = getAppSettings().appearance; - const auto colourNames = appearance.getColourNames(); - - if (codeFont != appearance.getCodeFont()) - return true; - - for (int i = 0; i < colourNames.size(); ++i) - if (colourValues[i] != appearance.getColourValue (colourNames[i]).getValue()) - return true; - - return false; - } - - void restorePreviousScheme() - { - auto& appearance = getAppSettings().appearance; - const auto colourNames = appearance.getColourNames(); - - appearance.getCodeFontValue().setValue (codeFont.toString()); - - for (int i = 0; i < colourNames.size(); ++i) - appearance.getColourValue (colourNames[i]).setValue (colourValues[i]); - } - - - JUCE_DECLARE_NON_COPYABLE (EditorPanel) - }; - - //============================================================================== - struct FontNameValueSource : public ValueSourceFilter - { - FontNameValueSource (const Value& source) : ValueSourceFilter (source) {} - - var getValue() const override - { - return Font::fromString (sourceValue.toString()).getTypefaceName(); - } - - void setValue (const var& newValue) override - { - auto font = Font::fromString (sourceValue.toString()); - font.setTypefaceName (newValue.toString().isEmpty() ? Font::getDefaultMonospacedFontName() - : newValue.toString()); - sourceValue = font.toString(); - } - - static ChoicePropertyComponent* createProperty (const String& title, const Value& value) - { - auto fontNames = getAppSettings().monospacedFontNames; - - Array values; - values.add (Font::getDefaultMonospacedFontName()); - values.add (var()); - - for (int i = 0; i < fontNames.size(); ++i) - values.add (fontNames[i]); - - StringArray names; - names.add (""); - names.add (String()); - names.addArray (getAppSettings().monospacedFontNames); - - return new ChoicePropertyComponent (Value (new FontNameValueSource (value)), - title, names, values); - } - }; - - //============================================================================== - struct FontSizeValueSource : public ValueSourceFilter - { - FontSizeValueSource (const Value& source) : ValueSourceFilter (source) {} - - var getValue() const override - { - return Font::fromString (sourceValue.toString()).getHeight(); - } - - void setValue (const var& newValue) override - { - sourceValue = Font::fromString (sourceValue.toString()).withHeight (newValue).toString(); - } - - static PropertyComponent* createProperty (const String& title, const Value& value) - { - return new SliderPropertyComponent (Value (new FontSizeValueSource (value)), - title, 5.0, 40.0, 0.1, 0.5); - } - }; -}; - -void AppearanceSettings::showGlobalPreferences (ScopedPointer& ownerPointer, bool showCodeEditorTab) -{ - if (ownerPointer != nullptr) - ownerPointer->toFront (true); - else - { - auto* prefs = new GlobalPreferencesComponent(); - - new FloatingToolWindow ("Preferences", - "globalPreferencesEditorPos", - prefs, - ownerPointer, false, - 500, 500, 500, 500, 500, 500); - - if (showCodeEditorTab) - prefs->setCurrentTabIndex (1); - } -} - -//============================================================================== -AppearanceSettingsTab::AppearanceSettingsTab() -{ - if (getAppSettings().monospacedFontNames.size() == 0) - content = new AppearanceEditor::FontScanPanel(); - else - content = new AppearanceEditor::EditorPanel(); - - changeContent (content); -} - -Component* AppearanceSettingsTab::getContent() -{ - return this; -} - -void AppearanceSettingsTab::changeContent (Component* newContent) -{ - content = newContent; - addAndMakeVisible (content); - content->setBounds (getLocalBounds()); -} - -String AppearanceSettingsTab::getName() const noexcept -{ - return "Code Editor"; -} - -void AppearanceSettingsTab::resized() -{ - content->setBounds (getLocalBounds()); -} - -//============================================================================== -GlobalPreferencesComponent::GlobalPreferencesComponent() - : TabbedComponent (TabbedButtonBar::TabsAtTop) -{ - preferenceTabs.add (new PathSettingsTab (TargetOS::getThisOS())); - preferenceTabs.add (new AppearanceSettingsTab); - - for (GlobalPreferencesTab** tab = preferenceTabs.begin(); tab != preferenceTabs.end(); ++tab) - addTab ((*tab)->getName(), findColour (backgroundColourId, true), (*tab)->getContent(), true); -} - -void GlobalPreferencesComponent::paint (Graphics& g) -{ - g.fillAll (findColour (backgroundColourId)); -} - -void GlobalPreferencesComponent::lookAndFeelChanged() -{ - for (auto* tab : preferenceTabs) - tab->getContent()->sendLookAndFeelChange(); -} diff --git a/extras/Projucer/Source/Application/jucer_GlobalPreferences.h b/extras/Projucer/Source/Application/jucer_GlobalPreferences.h deleted file mode 100644 index 4689936a09..0000000000 --- a/extras/Projucer/Source/Application/jucer_GlobalPreferences.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 5 End-User License - Agreement and JUCE 5 Privacy Policy (both updated and effective as of the - 27th April 2017). - - End User License Agreement: www.juce.com/juce-5-licence - Privacy Policy: www.juce.com/juce-5-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - -//============================================================================== - -#include "../Project/jucer_DependencyPathPropertyComponent.h" - - -class GlobalPreferencesTab -{ -public: - virtual ~GlobalPreferencesTab() {} - - virtual Component* getContent() = 0; - virtual String getName() const noexcept = 0; -}; - -//============================================================================== -/** This component implements the "Paths" tab in the global preferences window, - which defines the default paths for dependencies like third-party SDKs - for this machine. -*/ -class PathSettingsTab : public GlobalPreferencesTab, - public Component, - private TextPropertyComponent::Listener -{ -public: - PathSettingsTab (DependencyPathOS); - ~PathSettingsTab(); - - Component* getContent() override; - String getName() const noexcept override; - - void resized() override; - -private: - void textPropertyComponentChanged (TextPropertyComponent*) override; - - Identifier getKeyForPropertyComponent (TextPropertyComponent*) const; - - void lookAndFeelChanged() override; - - OwnedArray pathComponents; - - TextPropertyComponent* vst3PathComponent; - TextPropertyComponent* rtasPathComponent; - TextPropertyComponent* aaxPathComponent; - TextPropertyComponent* androidSdkPathComponent; - TextPropertyComponent* androidNdkPathComponent; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PathSettingsTab) -}; - -//============================================================================== -/** This component implements the "Code Editor" tab in the global preferences window, - which sets font sizes and colours for the Projucer's code editor. - The content is either an EditorPanel (the actual settings tab) or a FontScanPanel - (shown if the tab is scanning for available fonts before showing the EditorPanel). -*/ -class AppearanceSettingsTab : public GlobalPreferencesTab, - public Component -{ -public: - AppearanceSettingsTab(); - - Component* getContent() override; - void changeContent (Component* newContent); - String getName() const noexcept override; - - void resized() override; - -private: - ScopedPointer content; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AppearanceSettingsTab) -}; - -//============================================================================== -class GlobalPreferencesComponent : public TabbedComponent -{ -public: - GlobalPreferencesComponent(); - void paint (Graphics&) override; - -private: - void lookAndFeelChanged() override; - - OwnedArray preferenceTabs; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GlobalPreferencesComponent) -}; diff --git a/extras/Projucer/Source/Application/jucer_Main.cpp b/extras/Projucer/Source/Application/jucer_Main.cpp index 1f68447cd2..d858fed6c7 100644 --- a/extras/Projucer/Source/Application/jucer_Main.cpp +++ b/extras/Projucer/Source/Application/jucer_Main.cpp @@ -35,6 +35,8 @@ #include "../Utility/jucer_SVGPathDataComponent.h" #include "../Utility/jucer_AboutWindowComponent.h" #include "../Utility/jucer_ApplicationUsageDataWindowComponent.h" +#include "../Utility/jucer_EditorColourSchemeWindowComponent.h" +#include "../Utility/jucer_GlobalSearchPathsWindowComponent.h" #include "../Utility/jucer_FloatingToolWindow.h" #include "../LiveBuildEngine/projucer_MessageIDs.h" diff --git a/extras/Projucer/Source/Application/jucer_MainWindow.cpp b/extras/Projucer/Source/Application/jucer_MainWindow.cpp index e0be5970d9..5adcde5fe0 100644 --- a/extras/Projucer/Source/Application/jucer_MainWindow.cpp +++ b/extras/Projucer/Source/Application/jucer_MainWindow.cpp @@ -580,39 +580,3 @@ Project* MainWindowList::getFrontmostProject() return nullptr; } - -File findDefaultModulesFolder (bool mustContainJuceCoreModule) -{ - auto& windows = ProjucerApplication::getApp().mainWindowList; - - for (int i = windows.windows.size(); --i >= 0;) - { - if (auto* p = windows.windows.getUnchecked (i)->getProject()) - { - const File f (EnabledModuleList::findDefaultModulesFolder (*p)); - - if (isJuceModulesFolder (f) || (f.isDirectory() && ! mustContainJuceCoreModule)) - return f; - } - } - - if (mustContainJuceCoreModule) - return findDefaultModulesFolder (false); - - auto f = File::getSpecialLocation (File::currentApplicationFile); - - for (;;) - { - auto parent = f.getParentDirectory(); - - if (parent == f || ! parent.isDirectory()) - break; - - if (isJuceFolder (parent)) - return parent.getChildFile ("modules"); - - f = parent; - } - - return {}; -} diff --git a/extras/Projucer/Source/ComponentEditor/components/jucer_HyperlinkButtonHandler.h b/extras/Projucer/Source/ComponentEditor/components/jucer_HyperlinkButtonHandler.h index 916e893dd4..cacf0391a9 100644 --- a/extras/Projucer/Source/ComponentEditor/components/jucer_HyperlinkButtonHandler.h +++ b/extras/Projucer/Source/ComponentEditor/components/jucer_HyperlinkButtonHandler.h @@ -98,7 +98,7 @@ private: void setText (const String& newText) override { - document.perform (new HyperlinkURLChangeAction (component, *document.getComponentLayout(), URL (newText)), + document.perform (new HyperlinkURLChangeAction (component, *document.getComponentLayout(), URL::createWithoutParsing (newText)), "Change hyperlink URL"); } diff --git a/extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp b/extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp index 261691d608..5540ad09ea 100644 --- a/extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp +++ b/extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp @@ -171,7 +171,7 @@ void JucerDocument::setParentClasses (const String& classes) type = s = String(); } - s = type + CodeHelpers::makeValidIdentifier (s.trim(), false, false, true); + s = type + CodeHelpers::makeValidIdentifier (s.trim(), false, false, true, true); parentClassLines.set (i, s); } diff --git a/extras/Projucer/Source/ComponentEditor/jucer_PaintRoutine.cpp b/extras/Projucer/Source/ComponentEditor/jucer_PaintRoutine.cpp index 0466503d86..6f182bd15c 100644 --- a/extras/Projucer/Source/ComponentEditor/jucer_PaintRoutine.cpp +++ b/extras/Projucer/Source/ComponentEditor/jucer_PaintRoutine.cpp @@ -33,12 +33,12 @@ #include "paintelements/jucer_PaintElementImage.h" #include "paintelements/jucer_PaintElementGroup.h" #include "ui/jucer_JucerDocumentEditor.h" - +#include "../Application/jucer_Application.h" //============================================================================== PaintRoutine::PaintRoutine() : document (nullptr), - backgroundColour (Colours::white) + backgroundColour (ProjucerApplication::getApp().lookAndFeel.findColour (backgroundColourId)) { clear(); } diff --git a/extras/Projucer/Source/ComponentEditor/ui/jucer_ComponentLayoutEditor.cpp b/extras/Projucer/Source/ComponentEditor/ui/jucer_ComponentLayoutEditor.cpp index 14bbb791fb..d51013f19a 100644 --- a/extras/Projucer/Source/ComponentEditor/ui/jucer_ComponentLayoutEditor.cpp +++ b/extras/Projucer/Source/ComponentEditor/ui/jucer_ComponentLayoutEditor.cpp @@ -43,11 +43,6 @@ public: setInterceptsMouseClicks (false, false); setWantsKeyboardFocus (false); setFocusContainer (true); - - lfBackground = findColour (backgroundColourId); - - if (auto* pr = doc.getPaintRoutine (0)) - pr->setBackgroundColour (lfBackground); } void paint (Graphics& g) override @@ -106,23 +101,9 @@ public: ((ComponentLayoutEditor*) getParentComponent())->updateOverlayPositions(); } - void lookAndFeelChanged() override - { - auto currentLfBackground = findColour (backgroundColourId); - - if (lfBackground == currentLfBackground) - return; - - if (auto* pr = document.getPaintRoutine (0)) - pr->setBackgroundColour (currentLfBackground); - - lfBackground = findColour (backgroundColourId); - } - JucerDocument& document; SnapGridPainter& grid; - Colour lfBackground; bool dontFillBackground; }; diff --git a/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp b/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp index 010fb0be7e..f638ecda18 100644 --- a/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp +++ b/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp @@ -26,7 +26,6 @@ #include "../../jucer_Headers.h" #include "../../Application/jucer_AppearanceSettings.h" -#include "../../Application/jucer_GlobalPreferences.h" #include "../../Application/jucer_Application.h" #include "jucer_JucerDocumentEditor.h" #include "jucer_TestComponent.h" diff --git a/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp b/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp index 252143f327..9390115dce 100644 --- a/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp +++ b/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp @@ -434,7 +434,10 @@ private: scanProjectItem (proj.getMainGroup(), compileUnits, userFiles); { - const bool isPluginProject = proj.getProjectType().isAudioPlugin(); + auto isVST3Host = project.getModules().isModuleEnabled ("juce_audio_processors") + && project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3"); + + auto isPluginProject = proj.getProjectType().isAudioPlugin(); OwnedArray modules; proj.getModules().createRequiredModules (modules); @@ -451,10 +454,10 @@ private: m->findAndAddCompiledUnits (*exporter, nullptr, compileUnits, - isPluginProject ? ProjectType::Target::SharedCodeTarget - : ProjectType::Target::unspecified); + isPluginProject || isVST3Host ? ProjectType::Target::SharedCodeTarget + : ProjectType::Target::unspecified); - if (isPluginProject) + if (isPluginProject || isVST3Host) m->findAndAddCompiledUnits (*exporter, nullptr, compileUnits, ProjectType::Target::StandalonePlugIn); } @@ -518,10 +521,11 @@ private: StringArray paths; paths.addArray (getSearchPathsFromString (ProjectProperties::getSystemHeaderPathString (project))); - if (project.getProjectType().isAudioPlugin()) - { - paths.add (getAppSettings().getGlobalPath (Ids::vst3Path, TargetOS::getThisOS()).toString()); - } + auto isVST3Host = project.getModules().isModuleEnabled ("juce_audio_processors") + && project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3"); + + if (project.getProjectType().isAudioPlugin() || isVST3Host) + paths.add (getAppSettings().getStoredPath (Ids::vst3Path).toString()); OwnedArray modules; project.getModules().createRequiredModules (modules); diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h index 1015513ea8..1674de90da 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h @@ -88,11 +88,13 @@ public: } //============================================================================== - CachedValue androidScreenOrientation, androidActivityClass, androidActivitySubClassName, - androidVersionCode, androidMinimumSDK, androidTheme, + CachedValue androidRepositories, androidDependencies, + androidScreenOrientation, androidActivityClass, androidActivitySubClassName, + androidManifestCustomXmlElements, androidVersionCode, androidMinimumSDK, androidTheme, androidSharedLibraries, androidStaticLibraries, androidExtraAssetsFolder; - CachedValue androidInternetNeeded, androidMicNeeded, androidBluetoothNeeded; + CachedValue androidInternetNeeded, androidMicNeeded, androidBluetoothNeeded, + androidExternalReadPermission, androidExternalWritePermission; CachedValue androidOtherPermissions; CachedValue androidKeyStore, androidKeyStorePass, androidKeyAlias, androidKeyAliasPass; @@ -102,9 +104,12 @@ public: //============================================================================== AndroidProjectExporter (Project& p, const ValueTree& t) : ProjectExporter (p, t), + androidRepositories (settings, Ids::androidRepositories, nullptr, ""), + androidDependencies (settings, Ids::androidDependencies, nullptr, ""), androidScreenOrientation (settings, Ids::androidScreenOrientation, nullptr, "unspecified"), androidActivityClass (settings, Ids::androidActivityClass, nullptr, createDefaultClassName()), androidActivitySubClassName (settings, Ids::androidActivitySubClassName, nullptr), + androidManifestCustomXmlElements (settings, Ids::androidManifestCustomXmlElements, nullptr, ""), androidVersionCode (settings, Ids::androidVersionCode, nullptr, "1"), androidMinimumSDK (settings, Ids::androidMinimumSDK, nullptr, "10"), androidTheme (settings, Ids::androidTheme, nullptr), @@ -114,15 +119,17 @@ public: androidInternetNeeded (settings, Ids::androidInternetNeeded, nullptr, true), androidMicNeeded (settings, Ids::microphonePermissionNeeded, nullptr, false), androidBluetoothNeeded (settings, Ids::androidBluetoothNeeded, nullptr, true), + androidExternalReadPermission (settings, Ids::androidExternalReadNeeded, nullptr, true), + androidExternalWritePermission (settings, Ids::androidExternalWriteNeeded, nullptr, true), androidOtherPermissions (settings, Ids::androidOtherPermissions, nullptr), androidKeyStore (settings, Ids::androidKeyStore, nullptr, "${user.home}/.android/debug.keystore"), androidKeyStorePass (settings, Ids::androidKeyStorePass, nullptr, "android"), androidKeyAlias (settings, Ids::androidKeyAlias, nullptr, "androiddebugkey"), androidKeyAliasPass (settings, Ids::androidKeyAliasPass, nullptr, "android"), gradleVersion (settings, Ids::gradleVersion, nullptr, "3.3"), - androidPluginVersion (settings, Ids::androidPluginVersion, nullptr, "2.3.1"), + androidPluginVersion (settings, Ids::androidPluginVersion, nullptr, "2.3.3"), gradleToolchain (settings, Ids::gradleToolchain, nullptr, "clang"), - buildToolsVersion (settings, Ids::buildToolsVersion, nullptr, "25.0.2"), + buildToolsVersion (settings, Ids::buildToolsVersion, nullptr, "26.0.0"), AndroidExecutable (findAndroidExecutable()) { initialiseDependencyPathValues(); @@ -197,6 +204,8 @@ public: copyActivityJavaFiles (modules, javaTarget, package); } + copyExtraResourceFiles(); + writeFile (targetFolder, "settings.gradle", isLibrary() ? "include ':lib'" : "include ':app'"); writeFile (targetFolder, "build.gradle", getProjectBuildGradleFileContent()); writeFile (appFolder, "build.gradle", getAppBuildGradleFileContent()); @@ -309,6 +318,12 @@ protected: Value getArchitecturesValue() { return getValue (Ids::androidArchitectures); } String getArchitectures() const { return config [Ids::androidArchitectures]; } + Value getAdditionalXmlResourcesValue() { return getValue (Ids::androidAdditionalXmlValueResources); } + String getAdditionalXmlResources() const { return config [Ids::androidAdditionalXmlValueResources]; } + + Value getCustomStringsXmlValue() { return getValue (Ids::androidCustomStringXmlElements); } + String getCustomStringsXml() const { return config [Ids::androidCustomStringXmlElements]; } + var getDefaultOptimisationLevel() const override { return var ((int) (isDebug() ? gccO0 : gccO3)); } void createConfigProperties (PropertyListBuilder& props) override @@ -317,6 +332,13 @@ protected: props.add (new TextPropertyComponent (getArchitecturesValue(), "Architectures", 256, false), "A list of the ARM architectures to build (for a fat binary). Leave empty to build for all possible android archiftectures."); + + props.add (new TextPropertyComponent (getAdditionalXmlResourcesValue(), "Extra Android XML Value Resources", 2048, true), + "Paths to additional \"value resource\" files in XML format that should be included in the app (one per line). " + "If you have additional XML resources that should be treated as value resources, add them here."); + + props.add (new TextPropertyComponent (getCustomStringsXmlValue(), "Custom string.xml elements", 8192, true), + "You can specify custom XML elements that will be added to string.xml as children of element."); } String getProductFlavourNameIdentifier() const @@ -328,6 +350,11 @@ protected: { return getName().toUpperCase().replaceCharacter (L' ', L'_'); } + + String getModuleLibraryArchName() const override + { + return "${ANDROID_ABI}"; + } }; BuildConfiguration::Ptr createBuildConfig (const ValueTree& v) const override @@ -349,7 +376,9 @@ private: if (! isLibrary()) mo << "SET(BINARY_NAME \"juce_jni\")" << newLine << newLine; - mo << "add_library(\"cpufeatures\" STATIC \"${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c\")" << newLine << newLine; + String cpufeaturesPath ("${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c"); + mo << "add_library(\"cpufeatures\" STATIC \"" << cpufeaturesPath << "\")" << newLine + << "set_source_files_properties(\"" << cpufeaturesPath << "\" PROPERTIES COMPILE_FLAGS \"-Wno-sign-conversion -Wno-gnu-statement-expression\")" << newLine << newLine; { StringArray projectDefines (getEscapedPreprocessorDefs (getProjectPreprocessorDefs())); @@ -374,7 +403,9 @@ private: mo << "SET( CMAKE_SHARED_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS} ${JUCE_LDFLAGS}\")" << newLine << newLine; } - const StringArray userLibraries = StringArray::fromTokens(getExternalLibrariesString(), ";", ""); + StringArray userLibraries = StringArray::fromTokens(getExternalLibrariesString(), ";", ""); + userLibraries.addArray (androidLibs); + if (getNumConfigurations() > 0) { bool first = true; @@ -522,8 +553,10 @@ private: mo << getAndroidProductFlavours() << newLine; mo << getAndroidVariantFilter() << newLine; + mo << getAndroidRepositories() << newLine; + mo << getAndroidDependencies() << newLine; - mo << "}" << newLine; + mo << "}" << newLine << newLine; return mo.toString(); } @@ -553,9 +586,11 @@ private: if (getProject().getProjectType().isStaticLibrary()) mo << " targets \"" << getNativeModuleBinaryName (cfg) << "\"" << newLine; - mo << " arguments \"-DJUCE_BUILD_CONFIGFURATION=" << cfg.getProductFlavourCMakeIdentifier() << "\"" << newLine; - mo << " cFlags \"-O" << cfg.getGCCOptimisationFlag() << "\"" << newLine; - mo << " cppFlags \"-O" << cfg.getGCCOptimisationFlag() << "\"" << newLine; + mo << " arguments \"-DJUCE_BUILD_CONFIGFURATION=" << cfg.getProductFlavourCMakeIdentifier() << "\"" + << ", \"-DCMAKE_CXX_FLAGS_" << (cfg.isDebug() ? "DEBUG" : "RELEASE") + << "=-O" << cfg.getGCCOptimisationFlag() << "\"" + << ", \"-DCMAKE_C_FLAGS_" << (cfg.isDebug() ? "DEBUG" : "RELEASE") + << "=-O" << cfg.getGCCOptimisationFlag() << "\"" << newLine; mo << " }" << newLine; mo << " }" << newLine; mo << " }" << newLine; @@ -676,6 +711,40 @@ private: return mo.toString(); } + String getAndroidRepositories() const + { + MemoryOutputStream mo; + + juce::StringArray repositories; + repositories.addLines (androidRepositories.get()); + + mo << "repositories {" << newLine; + + for (const auto& r : repositories) + mo << " " << r << newLine; + + mo << "}" << newLine; + + return mo.toString(); + } + + String getAndroidDependencies() const + { + MemoryOutputStream mo; + + juce::StringArray dependencies; + dependencies.addLines (androidDependencies.get()); + + mo << "dependencies {" << newLine; + + for (const auto& d : dependencies) + mo << " " << d << newLine; + + mo << "}" << newLine; + + return mo.toString(); + } + //============================================================================== String getLocalPropertiesFileContent() const { @@ -703,6 +772,12 @@ private: static const char* orientations[] = { "Portrait and Landscape", "Portrait", "Landscape", nullptr }; static const char* orientationValues[] = { "unspecified", "portrait", "landscape", nullptr }; + props.add (new TextPropertyComponent (androidRepositories.getPropertyAsValue(), "Module repositories", 32768, true), + "Module repositories (one per line). These will be added to module-level gradle file repositories section. "); + + props.add (new TextPropertyComponent (androidDependencies.getPropertyAsValue(), "Module dependencies", 32768, true), + "Module dependencies (one per line). These will be added to module-level gradle file dependencies section. "); + props.add (new ChoicePropertyComponent (androidScreenOrientation.getPropertyAsValue(), "Screen orientation", StringArray (orientations), Array (orientationValues)), "The screen orientations that this app should support"); @@ -741,8 +816,17 @@ private: props.add (new BooleanPropertyComponent (androidBluetoothNeeded.getPropertyAsValue(), "Bluetooth permissions Required", "Specify bluetooth permission (required for Bluetooth MIDI)"), "If enabled, this will set the android.permission.BLUETOOTH and android.permission.BLUETOOTH_ADMIN flag in the manifest. This is required for Bluetooth MIDI on Android."); + props.add (new BooleanPropertyComponent (androidExternalReadPermission.getPropertyAsValue(), "Read from external storage", "Specify permissions to read from external storage"), + "If enabled, this will set the android.permission.READ_EXTERNAL_STORAGE flag in the manifest."); + + props.add (new BooleanPropertyComponent (androidExternalWritePermission.getPropertyAsValue(), "Write to external storage", "Specify permissions to write to external storage"), + "If enabled, this will set the android.permission.WRITE_EXTERNAL_STORAGE flag in the manifest."); + props.add (new TextPropertyComponent (androidOtherPermissions.getPropertyAsValue(), "Custom permissions", 2048, false), "A space-separated list of other permission flags that should be added to the manifest."); + + props.add (new TextPropertyComponent (androidManifestCustomXmlElements.getPropertyAsValue(), "Custom manifest xml elements", 8192, true), + "You can specify custom XML elements that will be added to AndroidManifest.xml as children of element."); } //============================================================================== @@ -766,19 +850,8 @@ private: { props.add (new TextPropertyComponent (androidTheme.getPropertyAsValue(), "Android Theme", 256, false), "E.g. @android:style/Theme.NoTitleBar or leave blank for default"); - - static const char* cppStandardNames[] = { "C++03", "C++11", "C++14", nullptr }; - static const char* cppStandardValues[] = { "-std=c++03", "-std=c++11", "-std=c++14", nullptr }; - - props.add (new ChoicePropertyComponent (getCppStandardValue(), "C++ standard to use", - StringArray (cppStandardNames), Array (cppStandardValues)), - "The C++ standard to specify in the makefile"); } - //============================================================================== - Value getCppStandardValue() { return getSetting (Ids::cppLanguageStandard); } - String getCppStandardString() const { return settings[Ids::cppLanguageStandard]; } - //============================================================================== String createDefaultClassName() const { @@ -881,6 +954,37 @@ private: } } + void copyExtraResourceFiles() const + { + for (ConstConfigIterator config (*this); config.next();) + { + const auto& cfg = dynamic_cast (*config); + const juce::String path = cfg.isDebug() ? "app/src/debug/res/values" : "app/src/release/res/values"; + + copyExtraResourceFiles (cfg.getAdditionalXmlResources(), path); + } + } + + void copyExtraResourceFiles (const juce::String& xmlResources, const juce::String& dstRelativePath) const + { + juce::StringArray resourcePaths; + resourcePaths.addTokens (xmlResources, true); + + const File parentFolder (getTargetFolder().getChildFile (dstRelativePath)); + + parentFolder.createDirectory(); + + for (const auto& path : resourcePaths) + { + juce::File file (getProject().getFile().getChildFile(path)); + + jassert (file.existsAsFile()); + + if (file.existsAsFile()) + file.copyFileTo (parentFolder.getChildFile (file.getFileName())); + } + } + String getActivityName() const { return androidActivityClass.get().fromLastOccurrenceOf (".", false, false); @@ -930,13 +1034,24 @@ private: //============================================================================== void writeStringsXML (const File& folder) const { - XmlElement strings ("resources"); - XmlElement* resourceName = strings.createNewChildElement ("string"); + for (ConstConfigIterator config (*this); config.next();) + { + XmlElement strings ("resources"); + XmlElement* resourceName = strings.createNewChildElement ("string"); - resourceName->setAttribute ("name", "app_name"); - resourceName->addTextElement (projectName); + resourceName->setAttribute ("name", "app_name"); + resourceName->addTextElement (projectName); - writeXmlOrThrow (strings, folder.getChildFile ("app/src/main/res/values/string.xml"), "utf-8", 100, true); + const auto& cfg = dynamic_cast (*config); + + for (XmlElement* e = XmlDocument::parse (cfg.getCustomStringsXml()); e != nullptr; e = e->getNextElement()) + strings.addChildElement (e); + + const juce::String dir = cfg.isDebug() ? "debug" : "release"; + const juce::String subPath = "app/src/" + dir + "/res/values/string.xml"; + + writeXmlOrThrow (strings, folder.getChildFile (subPath), "utf-8", 100, true); + } } void writeAndroidManifest (const File& folder) const @@ -1057,13 +1172,16 @@ private: StringArray getAndroidCxxCompilerFlags() const { - StringArray cxxFlags (getAndroidCompilerFlags()); - String cppStandardToUse (getCppStandardString()); + auto cxxFlags = getAndroidCompilerFlags(); - if (cppStandardToUse.isEmpty()) - cppStandardToUse = "-std=c++11"; + auto cppStandard = project.getCppStandardValue().toString(); - cxxFlags.add ("\"" + cppStandardToUse + "\""); + if (cppStandard == "latest") + cppStandard = "1z"; + + cppStandard = "-std=" + String (shouldUseGNUExtensions() ? "gnu++" : "c++") + cppStandard; + + cxxFlags.add (cppStandard.quoted()); return cxxFlags; } @@ -1104,7 +1222,7 @@ private: { StringPairArray defines (getAndroidPreprocessorDefs()); - return mergePreprocessorDefs (defines, getProject().getPreprocessorDefs()); + return mergePreprocessorDefs (defines, getAllPreprocessorDefs()); } StringPairArray getConfigPreprocessorDefs (const BuildConfiguration& config) const @@ -1185,10 +1303,10 @@ private: if (value.containsChar (L' ')) value = "\\\"" + value + "\\\""; - escaped += ("=" + value + "\""); + escaped += ("=" + value); } - escapedDefs.add (escaped); + escapedDefs.add (escaped + "\""); } return escapedDefs; @@ -1273,6 +1391,9 @@ private: XmlElement* intent = act->createNewChildElement ("intent-filter"); intent->createNewChildElement ("action")->setAttribute ("android:name", "android.intent.action.MAIN"); intent->createNewChildElement ("category")->setAttribute ("android:name", "android.intent.category.LAUNCHER"); + + for (XmlElement* e = XmlDocument::parse (androidManifestCustomXmlElements.get()); e != nullptr; e = e->getNextElement()) + app->addChildElement (e); } return manifest; @@ -1296,6 +1417,12 @@ private: s.add ("android.permission.ACCESS_COARSE_LOCATION"); } + if (androidExternalReadPermission.get()) + s.add ("android.permission.READ_EXTERNAL_STORAGE"); + + if (androidExternalWritePermission.get()) + s.add ("android.permission.WRITE_EXTERNAL_STORAGE"); + return getCleanedStringArray (s); } diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_CodeBlocks.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_CodeBlocks.h index 449604a720..b219cc7756 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_CodeBlocks.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_CodeBlocks.h @@ -216,7 +216,7 @@ private: Array (archFlags, numElementsInArray (archFlags)))); } - String getLibrarySubdirPath() const override + String getModuleLibraryArchName() const override { const String archFlag = getArchitectureTypeVar(); @@ -343,7 +343,18 @@ private: flags.add (codeBlocksConfig->getArchitectureTypeVar()); flags.add ("-O" + config.getGCCOptimisationFlag()); - flags.add ("-std=c++11"); + + { + auto cppStandard = config.project.getCppStandardValue().toString(); + + if (cppStandard == "latest") + cppStandard = "1z"; + + cppStandard = "-std=" + String (shouldUseGNUExtensions() ? "gnu++" : "c++") + cppStandard; + + flags.add (cppStandard); + } + flags.add ("-mstackrealign"); if (config.isDebug()) diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h index f422a8f073..fd81ccf0bc 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h @@ -38,6 +38,100 @@ public: initialiseDependencyPathValues(); } + virtual int getVisualStudioVersion() const = 0; + + virtual String getSolutionComment() const = 0; + virtual String getToolsVersion() const = 0; + virtual String getDefaultToolset() const = 0; + virtual String getDefaultWindowsTargetPlatformVersion() const = 0; + + //============================================================================== + Value getIPPLibraryValue() { return getSetting (Ids::IPPLibrary); } + String getIPPLibrary() const { return settings [Ids::IPPLibrary]; } + + Value getPlatformToolsetValue() { return getSetting (Ids::toolset); } + String getPlatformToolset() const + { + const String s (settings [Ids::toolset].toString()); + return s.isNotEmpty() ? s : getDefaultToolset(); + } + + Value getWindowsTargetPlatformVersionValue() { return getSetting (Ids::windowsTargetPlatformVersion); } + String getWindowsTargetPlatformVersion() const + { + String targetPlatform = settings [Ids::windowsTargetPlatformVersion]; + return (targetPlatform.isNotEmpty() ? targetPlatform : getDefaultWindowsTargetPlatformVersion()); + } + + //============================================================================== + void addToolsetProperty (PropertyListBuilder& props, const char** names, const var* values, int num) + { + props.add (new ChoicePropertyComponent (getPlatformToolsetValue(), "Platform Toolset", + StringArray (names, num), Array (values, num))); + } + + void addIPPLibraryProperty (PropertyListBuilder& props) + { + static const char* ippOptions[] = { "No", "Yes (Default Mode)", "Multi-Threaded Static Library", "Single-Threaded Static Library", "Multi-Threaded DLL", "Single-Threaded DLL" }; + static const var ippValues[] = { var(), "true", "Parallel_Static", "Sequential", "Parallel_Dynamic", "Sequential_Dynamic" }; + + props.add (new ChoicePropertyComponent (getIPPLibraryValue(), "Use IPP Library", + StringArray (ippOptions, numElementsInArray (ippValues)), + Array (ippValues, numElementsInArray (ippValues)))); + } + + void addWindowsTargetPlatformProperties (PropertyListBuilder& props) + { + static const char* targetPlatformNames[] = { "(default)", "8.1", "10.0.10240.0", "10.0.10586.0", "10.0.14393.0", "10.0.15063.0" }; + static const var targetPlatforms[] = { var(), "8.1", "10.0.10240.0", "10.0.10586.0", "10.0.14393.0", "10.0.15063.0" }; + + props.add (new ChoicePropertyComponent (getWindowsTargetPlatformVersionValue(), "Windows Target Platform", + StringArray (targetPlatformNames, numElementsInArray (targetPlatformNames)), + Array (targetPlatforms, numElementsInArray (targetPlatforms))), + "Specifies the version of the Windows SDK that will be used when building this project. " + "The default value for this exporter is " + getDefaultWindowsTargetPlatformVersion()); + } + + void addPlatformToolsetToPropertyGroup (XmlElement& p) const + { + forEachXmlChildElementWithTagName (p, e, "PropertyGroup") + e->createNewChildElement ("PlatformToolset")->addTextElement (getPlatformToolset()); + } + + void addWindowsTargetPlatformVersionToPropertyGroup (XmlElement& p) const + { + const String& targetVersion = getWindowsTargetPlatformVersion(); + + if (targetVersion.isNotEmpty()) + forEachXmlChildElementWithTagName (p, e, "PropertyGroup") + e->createNewChildElement ("WindowsTargetPlatformVersion")->addTextElement (getWindowsTargetPlatformVersion()); + } + + void addIPPSettingToPropertyGroup (XmlElement& p) const + { + String ippLibrary = getIPPLibrary(); + + if (ippLibrary.isNotEmpty()) + forEachXmlChildElementWithTagName (p, e, "PropertyGroup") + e->createNewChildElement ("UseIntelIPP")->addTextElement (ippLibrary); + } + + void create (const OwnedArray&) const override + { + createResourcesAndIcon(); + + for (int i = 0; i < targets.size(); ++i) + if (MSVCTargetBase* target = targets[i]) + target->writeProjectFile(); + + { + MemoryOutputStream mo; + writeSolutionFile (mo, "11.00", getSolutionComment()); + + overwriteFileIfDifferentOrThrow (getSLNFile(), mo); + } + } + //============================================================================== class MSVCBuildConfiguration : public BuildConfiguration { @@ -49,6 +143,7 @@ public: getWarningLevelValue() = 4; setValueIfVoid (shouldGenerateManifestValue(), true); + setValueIfVoid (getArchitectureType(), get64BitArchName()); } Value getWarningLevelValue() { return getValue (Ids::winWarningLevel); } @@ -83,9 +178,18 @@ public: String getCharacterSet() const { return config [Ids::characterSet].toString(); } Value getCharacterSetValue() { return getValue (Ids::characterSet); } + Value getArchitectureType() { return getValue (Ids::winArchitecture); } + bool is64Bit() const { return config [Ids::winArchitecture].toString() == get64BitArchName(); } + + Value getFastMathValue() { return getValue (Ids::fastMath); } + bool isFastMathEnabled() const { return config [Ids::fastMath]; } + + String get64BitArchName() const { return "x64"; } + String get32BitArchName() const { return "Win32"; } + String createMSVCConfigName() const { - return getName() + "|" + (config [Ids::winArchitecture] == "x64" ? "x64" : "Win32"); + return getName() + "|" + (config [Ids::winArchitecture] == get64BitArchName() ? "x64" : "Win32"); } String getOutputFilename (const String& suffix, bool forceSuffix) const @@ -102,6 +206,15 @@ public: void createConfigProperties (PropertyListBuilder& props) override { + const String archTypes[] = { get32BitArchName(), get64BitArchName() }; + props.add (new ChoicePropertyComponent (getArchitectureType(), "Architecture", + StringArray (archTypes, numElementsInArray (archTypes)), + Array (archTypes, numElementsInArray (archTypes)))); + + props.add (new BooleanPropertyComponent (getFastMathValue(), "Relax IEEE compliance", "Enabled"), + "Enable this to use FAST_MATH non-IEEE mode. (Warning: this can have unexpected results!)"); + + static const char* optimisationLevels[] = { "No optimisation", "Minimise size", "Maximise speed", 0 }; const int optimisationLevelValues[] = { optimisationOff, optimiseMinSize, optimiseMaxSpeed, 0 }; @@ -165,7 +278,7 @@ public: } } - String getLibrarySubdirPath() const override + String getModuleLibraryArchName() const override { String result ("$(Platform)\\"); result += isUsingRuntimeLibDLL() ? "MD" : "MT"; @@ -189,8 +302,530 @@ public: virtual ~MSVCTargetBase() {} + String getProjectVersionString() const { return "10.00"; } + String getProjectFileSuffix() const { return ".vcxproj"; } + String getFiltersFileSuffix() const { return ".vcxproj.filters"; } + String getTopLevelXmlEntity() const { return "Project"; } + + //============================================================================== + void fillInProjectXml (XmlElement& projectXml) const + { + projectXml.setAttribute ("DefaultTargets", "Build"); + projectXml.setAttribute ("ToolsVersion", getOwner().getToolsVersion()); + projectXml.setAttribute ("xmlns", "http://schemas.microsoft.com/developer/msbuild/2003"); + + { + XmlElement* configsGroup = projectXml.createNewChildElement ("ItemGroup"); + configsGroup->setAttribute ("Label", "ProjectConfigurations"); + + for (ConstConfigIterator i (owner); i.next();) + { + const MSVCBuildConfiguration& config = dynamic_cast (*i); + XmlElement* e = configsGroup->createNewChildElement ("ProjectConfiguration"); + e->setAttribute ("Include", config.createMSVCConfigName()); + e->createNewChildElement ("Configuration")->addTextElement (config.getName()); + e->createNewChildElement ("Platform")->addTextElement (config.is64Bit() ? config.get64BitArchName() + : config.get32BitArchName()); + } + } + + { + XmlElement* globals = projectXml.createNewChildElement ("PropertyGroup"); + globals->setAttribute ("Label", "Globals"); + globals->createNewChildElement ("ProjectGuid")->addTextElement (getProjectGuid()); + } + + { + XmlElement* imports = projectXml.createNewChildElement ("Import"); + imports->setAttribute ("Project", "$(VCTargetsPath)\\Microsoft.Cpp.Default.props"); + } + + for (ConstConfigIterator i (owner); i.next();) + { + const MSVCBuildConfiguration& config = dynamic_cast (*i); + + XmlElement* e = projectXml.createNewChildElement ("PropertyGroup"); + setConditionAttribute (*e, config); + e->setAttribute ("Label", "Configuration"); + e->createNewChildElement ("ConfigurationType")->addTextElement (getProjectType()); + e->createNewChildElement ("UseOfMfc")->addTextElement ("false"); + + const String charSet (config.getCharacterSet()); + + if (charSet.isNotEmpty()) + e->createNewChildElement ("CharacterSet")->addTextElement (charSet); + + if (! (config.isDebug() || config.shouldDisableWholeProgramOpt())) + e->createNewChildElement ("WholeProgramOptimization")->addTextElement ("true"); + + if (config.shouldLinkIncremental()) + e->createNewChildElement ("LinkIncremental")->addTextElement ("true"); + + if (config.is64Bit()) + e->createNewChildElement ("PlatformToolset")->addTextElement (getOwner().getPlatformToolset()); + } + + { + XmlElement* e = projectXml.createNewChildElement ("Import"); + e->setAttribute ("Project", "$(VCTargetsPath)\\Microsoft.Cpp.props"); + } + + { + XmlElement* e = projectXml.createNewChildElement ("ImportGroup"); + e->setAttribute ("Label", "ExtensionSettings"); + } + + { + XmlElement* e = projectXml.createNewChildElement ("ImportGroup"); + e->setAttribute ("Label", "PropertySheets"); + XmlElement* p = e->createNewChildElement ("Import"); + p->setAttribute ("Project", "$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props"); + p->setAttribute ("Condition", "exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')"); + p->setAttribute ("Label", "LocalAppDataPlatform"); + } + + { + XmlElement* e = projectXml.createNewChildElement ("PropertyGroup"); + e->setAttribute ("Label", "UserMacros"); + } + + { + XmlElement* props = projectXml.createNewChildElement ("PropertyGroup"); + props->createNewChildElement ("_ProjectFileVersion")->addTextElement ("10.0.30319.1"); + props->createNewChildElement ("TargetExt")->addTextElement (getTargetSuffix()); + + for (ConstConfigIterator i (owner); i.next();) + { + const MSVCBuildConfiguration& config = dynamic_cast (*i); + + if (getConfigTargetPath (config).isNotEmpty()) + { + XmlElement* outdir = props->createNewChildElement ("OutDir"); + setConditionAttribute (*outdir, config); + outdir->addTextElement (FileHelpers::windowsStylePath (getConfigTargetPath (config)) + "\\"); + } + + { + XmlElement* intdir = props->createNewChildElement("IntDir"); + setConditionAttribute (*intdir, config); + + String intermediatesPath = getIntermediatesPath (config); + if (! intermediatesPath.endsWithChar (L'\\')) + intermediatesPath += L'\\'; + + intdir->addTextElement (FileHelpers::windowsStylePath (intermediatesPath)); + } + + + { + XmlElement* targetName = props->createNewChildElement ("TargetName"); + setConditionAttribute (*targetName, config); + targetName->addTextElement (config.getOutputFilename ("", false)); + } + + { + XmlElement* manifest = props->createNewChildElement ("GenerateManifest"); + setConditionAttribute (*manifest, config); + manifest->addTextElement (config.shouldGenerateManifest() ? "true" : "false"); + } + + const StringArray librarySearchPaths (getLibrarySearchPaths (config)); + if (librarySearchPaths.size() > 0) + { + XmlElement* libPath = props->createNewChildElement ("LibraryPath"); + setConditionAttribute (*libPath, config); + libPath->addTextElement ("$(LibraryPath);" + librarySearchPaths.joinIntoString (";")); + } + } + } + + for (ConstConfigIterator i (owner); i.next();) + { + const MSVCBuildConfiguration& config = dynamic_cast (*i); + + const bool isDebug = config.isDebug(); + + XmlElement* group = projectXml.createNewChildElement ("ItemDefinitionGroup"); + setConditionAttribute (*group, config); + + { + XmlElement* midl = group->createNewChildElement ("Midl"); + midl->createNewChildElement ("PreprocessorDefinitions")->addTextElement (isDebug ? "_DEBUG;%(PreprocessorDefinitions)" + : "NDEBUG;%(PreprocessorDefinitions)"); + midl->createNewChildElement ("MkTypLibCompatible")->addTextElement ("true"); + midl->createNewChildElement ("SuppressStartupBanner")->addTextElement ("true"); + midl->createNewChildElement ("TargetEnvironment")->addTextElement ("Win32"); + midl->createNewChildElement ("HeaderFileName"); + } + + bool isUsingEditAndContinue = false; + + { + XmlElement* cl = group->createNewChildElement ("ClCompile"); + + cl->createNewChildElement ("Optimization")->addTextElement (getOptimisationLevelString (config.getOptimisationLevelInt())); + + if (isDebug && config.getOptimisationLevelInt() <= optimisationOff) + { + isUsingEditAndContinue = ! config.is64Bit(); + + cl->createNewChildElement ("DebugInformationFormat") + ->addTextElement (isUsingEditAndContinue ? "EditAndContinue" + : "ProgramDatabase"); + } + + StringArray includePaths (getOwner().getHeaderSearchPaths (config)); + includePaths.addArray (getExtraSearchPaths()); + includePaths.add ("%(AdditionalIncludeDirectories)"); + + cl->createNewChildElement ("AdditionalIncludeDirectories")->addTextElement (includePaths.joinIntoString (";")); + cl->createNewChildElement ("PreprocessorDefinitions")->addTextElement (getPreprocessorDefs (config, ";") + ";%(PreprocessorDefinitions)"); + + const bool runtimeDLL = shouldUseRuntimeDLL (config); + cl->createNewChildElement ("RuntimeLibrary")->addTextElement (runtimeDLL ? (isDebug ? "MultiThreadedDebugDLL" : "MultiThreadedDLL") + : (isDebug ? "MultiThreadedDebug" : "MultiThreaded")); + cl->createNewChildElement ("RuntimeTypeInfo")->addTextElement ("true"); + cl->createNewChildElement ("PrecompiledHeader"); + cl->createNewChildElement ("AssemblerListingLocation")->addTextElement ("$(IntDir)\\"); + cl->createNewChildElement ("ObjectFileName")->addTextElement ("$(IntDir)\\"); + cl->createNewChildElement ("ProgramDataBaseFileName")->addTextElement ("$(IntDir)\\"); + cl->createNewChildElement ("WarningLevel")->addTextElement ("Level" + String (config.getWarningLevel())); + cl->createNewChildElement ("SuppressStartupBanner")->addTextElement ("true"); + cl->createNewChildElement ("MultiProcessorCompilation")->addTextElement ("true"); + + if (config.isFastMathEnabled()) + cl->createNewChildElement ("FloatingPointModel")->addTextElement ("Fast"); + + const String extraFlags (getOwner().replacePreprocessorTokens (config, getOwner().getExtraCompilerFlagsString()).trim()); + if (extraFlags.isNotEmpty()) + cl->createNewChildElement ("AdditionalOptions")->addTextElement (extraFlags + " %(AdditionalOptions)"); + + if (config.areWarningsTreatedAsErrors()) + cl->createNewChildElement ("TreatWarningAsError")->addTextElement ("true"); + + auto cppStandard = owner.project.getCppStandardValue().toString(); + + if (cppStandard == "11") // unfortunaly VS doesn't support the C++11 flag so we have to bump it to C++14 + cppStandard = "14"; + + cl->createNewChildElement ("LanguageStandard")->addTextElement ("stdcpp" + cppStandard); + } + + { + XmlElement* res = group->createNewChildElement ("ResourceCompile"); + res->createNewChildElement ("PreprocessorDefinitions")->addTextElement (isDebug ? "_DEBUG;%(PreprocessorDefinitions)" + : "NDEBUG;%(PreprocessorDefinitions)"); + } + + { + XmlElement* link = group->createNewChildElement ("Link"); + link->createNewChildElement ("OutputFile")->addTextElement (getOutputFilePath (config)); + link->createNewChildElement ("SuppressStartupBanner")->addTextElement ("true"); + link->createNewChildElement ("IgnoreSpecificDefaultLibraries")->addTextElement (isDebug ? "libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries)" + : "%(IgnoreSpecificDefaultLibraries)"); + link->createNewChildElement ("GenerateDebugInformation")->addTextElement ((isDebug || config.shouldGenerateDebugSymbols()) ? "true" : "false"); + link->createNewChildElement ("ProgramDatabaseFile")->addTextElement (getOwner().getIntDirFile (config, config.getOutputFilename (".pdb", true))); + link->createNewChildElement ("SubSystem")->addTextElement (type == ConsoleApp ? "Console" : "Windows"); + + if (! config.is64Bit()) + link->createNewChildElement ("TargetMachine")->addTextElement ("MachineX86"); + + if (isUsingEditAndContinue) + link->createNewChildElement ("ImageHasSafeExceptionHandlers")->addTextElement ("false"); + + if (! isDebug) + { + link->createNewChildElement ("OptimizeReferences")->addTextElement ("true"); + link->createNewChildElement ("EnableCOMDATFolding")->addTextElement ("true"); + } + + const StringArray librarySearchPaths (config.getLibrarySearchPaths()); + if (librarySearchPaths.size() > 0) + link->createNewChildElement ("AdditionalLibraryDirectories")->addTextElement (getOwner().replacePreprocessorTokens (config, librarySearchPaths.joinIntoString (";")) + + ";%(AdditionalLibraryDirectories)"); + + link->createNewChildElement ("LargeAddressAware")->addTextElement ("true"); + + const String externalLibraries (getExternalLibraries (config, getOwner().getExternalLibrariesString())); + if (externalLibraries.isNotEmpty()) + link->createNewChildElement ("AdditionalDependencies")->addTextElement (getOwner().replacePreprocessorTokens (config, externalLibraries).trim() + + ";%(AdditionalDependencies)"); + + String extraLinkerOptions (getOwner().getExtraLinkerFlagsString()); + if (extraLinkerOptions.isNotEmpty()) + link->createNewChildElement ("AdditionalOptions")->addTextElement (getOwner().replacePreprocessorTokens (config, extraLinkerOptions).trim() + + " %(AdditionalOptions)"); + + const String delayLoadedDLLs (getDelayLoadedDLLs()); + if (delayLoadedDLLs.isNotEmpty()) + link->createNewChildElement ("DelayLoadDLLs")->addTextElement (delayLoadedDLLs); + + const String moduleDefinitionsFile (getModuleDefinitions (config)); + if (moduleDefinitionsFile.isNotEmpty()) + link->createNewChildElement ("ModuleDefinitionFile") + ->addTextElement (moduleDefinitionsFile); + } + + { + XmlElement* bsc = group->createNewChildElement ("Bscmake"); + bsc->createNewChildElement ("SuppressStartupBanner")->addTextElement ("true"); + bsc->createNewChildElement ("OutputFile")->addTextElement (getOwner().getIntDirFile (config, config.getOutputFilename (".bsc", true))); + } + + const RelativePath& manifestFile = getOwner().getManifestPath(); + if (manifestFile.getRoot() != RelativePath::unknown) + { + XmlElement* bsc = group->createNewChildElement ("Manifest"); + bsc->createNewChildElement ("AdditionalManifestFiles") + ->addTextElement (manifestFile.rebased (getOwner().getProject().getFile().getParentDirectory(), + getOwner().getTargetFolder(), + RelativePath::buildTargetFolder).toWindowsStyle()); + } + + if (getTargetFileType() == staticLibrary && ! config.is64Bit()) + { + XmlElement* lib = group->createNewChildElement ("Lib"); + lib->createNewChildElement ("TargetMachine")->addTextElement ("MachineX86"); + } + + const String preBuild = getPreBuildSteps (config); + if (preBuild.isNotEmpty()) + group->createNewChildElement ("PreBuildEvent") + ->createNewChildElement ("Command") + ->addTextElement (preBuild); + + const String postBuild = getPostBuildSteps (config); + if (postBuild.isNotEmpty()) + group->createNewChildElement ("PostBuildEvent") + ->createNewChildElement ("Command") + ->addTextElement (postBuild); + } + + ScopedPointer otherFilesGroup (new XmlElement ("ItemGroup")); + + { + XmlElement* cppFiles = projectXml.createNewChildElement ("ItemGroup"); + XmlElement* headerFiles = projectXml.createNewChildElement ("ItemGroup"); + + for (int i = 0; i < getOwner().getAllGroups().size(); ++i) + { + const Project::Item& group = getOwner().getAllGroups().getReference (i); + + if (group.getNumChildren() > 0) + addFilesToCompile (group, *cppFiles, *headerFiles, *otherFilesGroup); + } + } + + if (getOwner().iconFile != File()) + { + XmlElement* e = otherFilesGroup->createNewChildElement ("None"); + e->setAttribute ("Include", prependDot (getOwner().iconFile.getFileName())); + } + + if (otherFilesGroup->getFirstChildElement() != nullptr) + projectXml.addChildElement (otherFilesGroup.release()); + + if (getOwner().hasResourceFile()) + { + XmlElement* rcGroup = projectXml.createNewChildElement ("ItemGroup"); + XmlElement* e = rcGroup->createNewChildElement ("ResourceCompile"); + e->setAttribute ("Include", prependDot (getOwner().rcFile.getFileName())); + } + + { + XmlElement* e = projectXml.createNewChildElement ("Import"); + e->setAttribute ("Project", "$(VCTargetsPath)\\Microsoft.Cpp.targets"); + } + + { + XmlElement* e = projectXml.createNewChildElement ("ImportGroup"); + e->setAttribute ("Label", "ExtensionTargets"); + } + + getOwner().addPlatformToolsetToPropertyGroup (projectXml); + getOwner().addWindowsTargetPlatformVersionToPropertyGroup (projectXml); + getOwner().addIPPSettingToPropertyGroup (projectXml); + } + + String getProjectType() const + { + switch (getTargetFileType()) + { + case executable: + return "Application"; + case staticLibrary: + return "StaticLibrary"; + default: + break; + } + + return "DynamicLibrary"; + } + + //============================================================================== + void addFilesToCompile (const Project::Item& projectItem, XmlElement& cpps, XmlElement& headers, XmlElement& otherFiles) const + { + const Type targetType = (getOwner().getProject().getProjectType().isAudioPlugin() ? type : SharedCodeTarget); + + if (projectItem.isGroup()) + { + for (int i = 0; i < projectItem.getNumChildren(); ++i) + addFilesToCompile (projectItem.getChild (i), cpps, headers, otherFiles); + } + else if (projectItem.shouldBeAddedToTargetProject() + && getOwner().getProject().getTargetTypeFromFilePath (projectItem.getFile(), true) == targetType) + { + const RelativePath path (projectItem.getFile(), getOwner().getTargetFolder(), RelativePath::buildTargetFolder); + + jassert (path.getRoot() == RelativePath::buildTargetFolder); + + if (path.hasFileExtension (cOrCppFileExtensions) || path.hasFileExtension (asmFileExtensions)) + { + if (targetType == SharedCodeTarget || projectItem.shouldBeCompiled()) + { + auto* e = cpps.createNewChildElement ("ClCompile"); + e->setAttribute ("Include", path.toWindowsStyle()); + + if (shouldUseStdCall (path)) + e->createNewChildElement ("CallingConvention")->addTextElement ("StdCall"); + + if (! projectItem.shouldBeCompiled()) + e->createNewChildElement ("ExcludedFromBuild")->addTextElement ("true"); + } + } + else if (path.hasFileExtension (headerFileExtensions)) + { + headers.createNewChildElement ("ClInclude")->setAttribute ("Include", path.toWindowsStyle()); + } + else if (! path.hasFileExtension (objCFileExtensions)) + { + otherFiles.createNewChildElement ("None")->setAttribute ("Include", path.toWindowsStyle()); + } + } + } + + void setConditionAttribute (XmlElement& xml, const BuildConfiguration& config) const + { + const MSVCBuildConfiguration& msvcConfig = dynamic_cast (config); + xml.setAttribute ("Condition", "'$(Configuration)|$(Platform)'=='" + msvcConfig.createMSVCConfigName() + "'"); + } + + //============================================================================== + void addFilterGroup (XmlElement& groups, const String& path) const + { + XmlElement* e = groups.createNewChildElement ("Filter"); + e->setAttribute ("Include", path); + e->createNewChildElement ("UniqueIdentifier")->addTextElement (createGUID (path + "_guidpathsaltxhsdf")); + } + + void addFileToFilter (const RelativePath& file, const String& groupPath, + XmlElement& cpps, XmlElement& headers, XmlElement& otherFiles) const + { + XmlElement* e; + + if (file.hasFileExtension (headerFileExtensions)) + e = headers.createNewChildElement ("ClInclude"); + else if (file.hasFileExtension (sourceFileExtensions)) + e = cpps.createNewChildElement ("ClCompile"); + else + e = otherFiles.createNewChildElement ("None"); + + jassert (file.getRoot() == RelativePath::buildTargetFolder); + e->setAttribute ("Include", file.toWindowsStyle()); + e->createNewChildElement ("Filter")->addTextElement (groupPath); + } + + bool addFilesToFilter (const Project::Item& projectItem, const String& path, + XmlElement& cpps, XmlElement& headers, XmlElement& otherFiles, XmlElement& groups) const + { + const Type targetType = (getOwner().getProject().getProjectType().isAudioPlugin() ? type : SharedCodeTarget); + + if (projectItem.isGroup()) + { + bool filesWereAdded = false; + + for (int i = 0; i < projectItem.getNumChildren(); ++i) + if (addFilesToFilter (projectItem.getChild(i), + (path.isEmpty() ? String() : (path + "\\")) + projectItem.getChild(i).getName(), + cpps, headers, otherFiles, groups)) + filesWereAdded = true; + + if (filesWereAdded) + addFilterGroup (groups, path); + + return filesWereAdded; + } + else if (projectItem.shouldBeAddedToTargetProject()) + { + const RelativePath relativePath (projectItem.getFile(), getOwner().getTargetFolder(), RelativePath::buildTargetFolder); + + jassert (relativePath.getRoot() == RelativePath::buildTargetFolder); + + if (getOwner().getProject().getTargetTypeFromFilePath (projectItem.getFile(), true) == targetType + && (targetType == SharedCodeTarget || projectItem.shouldBeCompiled())) + { + addFileToFilter (relativePath, path.upToLastOccurrenceOf ("\\", false, false), cpps, headers, otherFiles); + return true; + } + } + + return false; + } + + bool addFilesToFilter (const Array& files, const String& path, + XmlElement& cpps, XmlElement& headers, XmlElement& otherFiles, XmlElement& groups) + { + if (files.size() > 0) + { + addFilterGroup (groups, path); + + for (int i = 0; i < files.size(); ++i) + addFileToFilter (files.getReference(i), path, cpps, headers, otherFiles); + + return true; + } + + return false; + } + + void fillInFiltersXml (XmlElement& filterXml) const + { + filterXml.setAttribute ("ToolsVersion", getOwner().getToolsVersion()); + filterXml.setAttribute ("xmlns", "http://schemas.microsoft.com/developer/msbuild/2003"); + + XmlElement* groupsXml = filterXml.createNewChildElement ("ItemGroup"); + XmlElement* cpps = filterXml.createNewChildElement ("ItemGroup"); + XmlElement* headers = filterXml.createNewChildElement ("ItemGroup"); + ScopedPointer otherFilesGroup (new XmlElement ("ItemGroup")); + + for (int i = 0; i < getOwner().getAllGroups().size(); ++i) + { + const Project::Item& group = getOwner().getAllGroups().getReference(i); + + if (group.getNumChildren() > 0) + addFilesToFilter (group, group.getName(), *cpps, *headers, *otherFilesGroup, *groupsXml); + } + + if (getOwner().iconFile.exists()) + { + XmlElement* e = otherFilesGroup->createNewChildElement ("None"); + e->setAttribute ("Include", prependDot (getOwner().iconFile.getFileName())); + e->createNewChildElement ("Filter")->addTextElement (ProjectSaver::getJuceCodeGroupName()); + } + + if (otherFilesGroup->getFirstChildElement() != nullptr) + filterXml.addChildElement (otherFilesGroup.release()); + + if (getOwner().hasResourceFile()) + { + XmlElement* rcGroup = filterXml.createNewChildElement ("ItemGroup"); + XmlElement* e = rcGroup->createNewChildElement ("ResourceCompile"); + e->setAttribute ("Include", prependDot (getOwner().rcFile.getFileName())); + e->createNewChildElement ("Filter")->addTextElement (ProjectSaver::getJuceCodeGroupName()); + } + } + const MSVCProjectExporterBase& getOwner() const { return owner; } - virtual String getTopLevelXmlEntity() const = 0; const String& getProjectGuid() const { return projectGuid; } //============================================================================== @@ -209,9 +844,6 @@ public: } } - virtual void fillInProjectXml (XmlElement& projectXml) const = 0; - virtual void fillInFiltersXml (XmlElement& filtersXml) const = 0; - String getSolutionTargetPath (const BuildConfiguration& config) const { const String binaryPath (config.getTargetBinaryRelativePathString().trim()); @@ -246,9 +878,9 @@ public: { switch (level) { - case optimiseMaxSpeed: return "Full"; - case optimiseMinSize: return "MinSpace"; - default: return "Disabled"; + case optimiseMaxSpeed: return "Full"; + case optimiseMinSize: return "MinSpace"; + default: return "Disabled"; } } @@ -547,19 +1179,14 @@ public: bool shouldUseRuntimeDLL (const MSVCBuildConfiguration& config) const { return (config.config [Ids::useRuntimeLibDLL].isVoid() ? (getOwner().hasTarget (AAXPlugIn) || getOwner().hasTarget (RTASPlugIn)) - : config.isUsingRuntimeLibDLL()); + : config.isUsingRuntimeLibDLL()); } - virtual String getProjectFileSuffix() const = 0; - virtual String getFiltersFileSuffix() const = 0; - File getVCProjFile() const { return getOwner().getProjectFile (getProjectFileSuffix(), getName()); } File getVCProjFiltersFile() const { return getOwner().getProjectFile (getFiltersFileSuffix(), getName()); } String createRebasedPath (const RelativePath& path) const { return getOwner().createRebasedPath (path); } - //============================================================================== - virtual String getProjectVersionString() const = 0; protected: const MSVCProjectExporterBase& owner; String projectGuid; @@ -616,8 +1243,6 @@ public: //============================================================================== const String& getProjectName() const { return projectName; } - virtual int getVisualStudioVersion() const = 0; - bool launchProject() override { #if JUCE_WINDOWS @@ -656,6 +1281,19 @@ public: if (type.isCommandLineApp()) msvcExtraPreprocessorDefs.set("_CONSOLE", ""); + + callForAllSupportedTargets ([this] (ProjectType::Target::Type targetType) + { + if (MSVCTargetBase* target = new MSVCTargetBase (targetType, *this)) + { + if (targetType != ProjectType::Target::AggregateTarget) + targets.add (target); + } + }); + + // If you hit this assert, you tried to generate a project for an exporter + // that does not support any of your targets! + jassert (targets.size() > 0); } const MSVCTargetBase* getSharedCodeTarget() const @@ -828,8 +1466,9 @@ protected: { const MSVCBuildConfiguration& config = dynamic_cast (*i); const String configName = config.createMSVCConfigName(); - for (auto& suffix : { ".Build.0", ".ActiveCfg" }) - out << "\t\t" << target->getProjectGuid() << "." << configName << suffix << " = " << configName << newLine; + + for (auto& suffix : { "ActiveCfg", "Build.0" }) + out << "\t\t" << target->getProjectGuid() << "." << configName << "." << suffix << " = " << configName << newLine; } out << "\tEndGlobalSection" << newLine @@ -1093,782 +1732,23 @@ protected: }; //============================================================================== -class MSVCProjectExporterVC2010 : public MSVCProjectExporterBase -{ -public: - MSVCProjectExporterVC2010 (Project& p, const ValueTree& t, const char* folderName = "VisualStudio2010") - : MSVCProjectExporterBase (p, t, folderName) - { - name = getName(); - } - - //============================================================================== - class MSVC2010Target : public MSVCTargetBase - { - public: - MSVC2010Target (ProjectType::Target::Type targetType, const MSVCProjectExporterVC2010& exporter) - : MSVCTargetBase (targetType, exporter) - {} - - const MSVCProjectExporterVC2010& getOwner() const { return dynamic_cast (owner); } - String getProjectVersionString() const override { return "10.00"; } - String getProjectFileSuffix() const override { return ".vcxproj"; } - String getFiltersFileSuffix() const override { return ".vcxproj.filters"; } - String getTopLevelXmlEntity() const override { return "Project"; } - - //============================================================================== - void fillInProjectXml (XmlElement& projectXml) const override - { - projectXml.setAttribute ("DefaultTargets", "Build"); - projectXml.setAttribute ("ToolsVersion", getOwner().getToolsVersion()); - projectXml.setAttribute ("xmlns", "http://schemas.microsoft.com/developer/msbuild/2003"); - - { - XmlElement* configsGroup = projectXml.createNewChildElement ("ItemGroup"); - configsGroup->setAttribute ("Label", "ProjectConfigurations"); - - for (ConstConfigIterator i (owner); i.next();) - { - const MSVCBuildConfiguration& config = dynamic_cast (*i); - XmlElement* e = configsGroup->createNewChildElement ("ProjectConfiguration"); - e->setAttribute ("Include", config.createMSVCConfigName()); - e->createNewChildElement ("Configuration")->addTextElement (config.getName()); - e->createNewChildElement ("Platform")->addTextElement (is64Bit (config) ? "x64" : "Win32"); - } - } - - { - XmlElement* globals = projectXml.createNewChildElement ("PropertyGroup"); - globals->setAttribute ("Label", "Globals"); - globals->createNewChildElement ("ProjectGuid")->addTextElement (getProjectGuid()); - } - - { - XmlElement* imports = projectXml.createNewChildElement ("Import"); - imports->setAttribute ("Project", "$(VCTargetsPath)\\Microsoft.Cpp.Default.props"); - } - - for (ConstConfigIterator i (owner); i.next();) - { - const VC2010BuildConfiguration& config = dynamic_cast (*i); - - XmlElement* e = projectXml.createNewChildElement ("PropertyGroup"); - setConditionAttribute (*e, config); - e->setAttribute ("Label", "Configuration"); - e->createNewChildElement ("ConfigurationType")->addTextElement (getProjectType()); - e->createNewChildElement ("UseOfMfc")->addTextElement ("false"); - - const String charSet (config.getCharacterSet()); - - if (charSet.isNotEmpty()) - e->createNewChildElement ("CharacterSet")->addTextElement (charSet); - - if (! (config.isDebug() || config.shouldDisableWholeProgramOpt())) - e->createNewChildElement ("WholeProgramOptimization")->addTextElement ("true"); - - if (config.shouldLinkIncremental()) - e->createNewChildElement ("LinkIncremental")->addTextElement ("true"); - - if (config.is64Bit()) - e->createNewChildElement ("PlatformToolset")->addTextElement (getOwner().getPlatformToolset()); - } - - { - XmlElement* e = projectXml.createNewChildElement ("Import"); - e->setAttribute ("Project", "$(VCTargetsPath)\\Microsoft.Cpp.props"); - } - - { - XmlElement* e = projectXml.createNewChildElement ("ImportGroup"); - e->setAttribute ("Label", "ExtensionSettings"); - } - - { - XmlElement* e = projectXml.createNewChildElement ("ImportGroup"); - e->setAttribute ("Label", "PropertySheets"); - XmlElement* p = e->createNewChildElement ("Import"); - p->setAttribute ("Project", "$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props"); - p->setAttribute ("Condition", "exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')"); - p->setAttribute ("Label", "LocalAppDataPlatform"); - } - - { - XmlElement* e = projectXml.createNewChildElement ("PropertyGroup"); - e->setAttribute ("Label", "UserMacros"); - } - - { - XmlElement* props = projectXml.createNewChildElement ("PropertyGroup"); - props->createNewChildElement ("_ProjectFileVersion")->addTextElement ("10.0.30319.1"); - props->createNewChildElement ("TargetExt")->addTextElement (getTargetSuffix()); - - for (ConstConfigIterator i (owner); i.next();) - { - const VC2010BuildConfiguration& config = dynamic_cast (*i); - - if (getConfigTargetPath (config).isNotEmpty()) - { - XmlElement* outdir = props->createNewChildElement ("OutDir"); - setConditionAttribute (*outdir, config); - outdir->addTextElement (FileHelpers::windowsStylePath (getConfigTargetPath (config)) + "\\"); - } - - { - XmlElement* intdir = props->createNewChildElement("IntDir"); - setConditionAttribute (*intdir, config); - - String intermediatesPath = getIntermediatesPath (config); - if (! intermediatesPath.endsWithChar (L'\\')) - intermediatesPath += L'\\'; - - intdir->addTextElement (FileHelpers::windowsStylePath (intermediatesPath)); - } - - - { - XmlElement* targetName = props->createNewChildElement ("TargetName"); - setConditionAttribute (*targetName, config); - targetName->addTextElement (config.getOutputFilename ("", false)); - } - - { - XmlElement* manifest = props->createNewChildElement ("GenerateManifest"); - setConditionAttribute (*manifest, config); - manifest->addTextElement (config.shouldGenerateManifest() ? "true" : "false"); - } - - const StringArray librarySearchPaths (getLibrarySearchPaths (config)); - if (librarySearchPaths.size() > 0) - { - XmlElement* libPath = props->createNewChildElement ("LibraryPath"); - setConditionAttribute (*libPath, config); - libPath->addTextElement ("$(LibraryPath);" + librarySearchPaths.joinIntoString (";")); - } - } - } - - for (ConstConfigIterator i (owner); i.next();) - { - const VC2010BuildConfiguration& config = dynamic_cast (*i); - - const bool isDebug = config.isDebug(); - - XmlElement* group = projectXml.createNewChildElement ("ItemDefinitionGroup"); - setConditionAttribute (*group, config); - - { - XmlElement* midl = group->createNewChildElement ("Midl"); - midl->createNewChildElement ("PreprocessorDefinitions")->addTextElement (isDebug ? "_DEBUG;%(PreprocessorDefinitions)" - : "NDEBUG;%(PreprocessorDefinitions)"); - midl->createNewChildElement ("MkTypLibCompatible")->addTextElement ("true"); - midl->createNewChildElement ("SuppressStartupBanner")->addTextElement ("true"); - midl->createNewChildElement ("TargetEnvironment")->addTextElement ("Win32"); - midl->createNewChildElement ("HeaderFileName"); - } - - bool isUsingEditAndContinue = false; - - { - XmlElement* cl = group->createNewChildElement ("ClCompile"); - - cl->createNewChildElement ("Optimization")->addTextElement (getOptimisationLevelString (config.getOptimisationLevelInt())); - - if (isDebug && config.getOptimisationLevelInt() <= optimisationOff) - { - isUsingEditAndContinue = ! config.is64Bit(); - - cl->createNewChildElement ("DebugInformationFormat") - ->addTextElement (isUsingEditAndContinue ? "EditAndContinue" - : "ProgramDatabase"); - } - - StringArray includePaths (getOwner().getHeaderSearchPaths (config)); - includePaths.addArray (getExtraSearchPaths()); - includePaths.add ("%(AdditionalIncludeDirectories)"); - - cl->createNewChildElement ("AdditionalIncludeDirectories")->addTextElement (includePaths.joinIntoString (";")); - cl->createNewChildElement ("PreprocessorDefinitions")->addTextElement (getPreprocessorDefs (config, ";") + ";%(PreprocessorDefinitions)"); - - const bool runtimeDLL = shouldUseRuntimeDLL (config); - cl->createNewChildElement ("RuntimeLibrary")->addTextElement (runtimeDLL ? (isDebug ? "MultiThreadedDebugDLL" : "MultiThreadedDLL") - : (isDebug ? "MultiThreadedDebug" : "MultiThreaded")); - cl->createNewChildElement ("RuntimeTypeInfo")->addTextElement ("true"); - cl->createNewChildElement ("PrecompiledHeader"); - cl->createNewChildElement ("AssemblerListingLocation")->addTextElement ("$(IntDir)\\"); - cl->createNewChildElement ("ObjectFileName")->addTextElement ("$(IntDir)\\"); - cl->createNewChildElement ("ProgramDataBaseFileName")->addTextElement ("$(IntDir)\\"); - cl->createNewChildElement ("WarningLevel")->addTextElement ("Level" + String (config.getWarningLevel())); - cl->createNewChildElement ("SuppressStartupBanner")->addTextElement ("true"); - cl->createNewChildElement ("MultiProcessorCompilation")->addTextElement ("true"); - - if (config.isFastMathEnabled()) - cl->createNewChildElement ("FloatingPointModel")->addTextElement ("Fast"); - - const String extraFlags (getOwner().replacePreprocessorTokens (config, getOwner().getExtraCompilerFlagsString()).trim()); - if (extraFlags.isNotEmpty()) - cl->createNewChildElement ("AdditionalOptions")->addTextElement (extraFlags + " %(AdditionalOptions)"); - - if (config.areWarningsTreatedAsErrors()) - cl->createNewChildElement ("TreatWarningAsError")->addTextElement ("true"); - - String cppLanguageStandard = getOwner().getCppLanguageStandard(); - if (cppLanguageStandard.isNotEmpty()) - cl->createNewChildElement ("LanguageStandard")->addTextElement (cppLanguageStandard); - } - - { - XmlElement* res = group->createNewChildElement ("ResourceCompile"); - res->createNewChildElement ("PreprocessorDefinitions")->addTextElement (isDebug ? "_DEBUG;%(PreprocessorDefinitions)" - : "NDEBUG;%(PreprocessorDefinitions)"); - } - - { - XmlElement* link = group->createNewChildElement ("Link"); - link->createNewChildElement ("OutputFile")->addTextElement (getOutputFilePath (config)); - link->createNewChildElement ("SuppressStartupBanner")->addTextElement ("true"); - link->createNewChildElement ("IgnoreSpecificDefaultLibraries")->addTextElement (isDebug ? "libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries)" - : "%(IgnoreSpecificDefaultLibraries)"); - link->createNewChildElement ("GenerateDebugInformation")->addTextElement ((isDebug || config.shouldGenerateDebugSymbols()) ? "true" : "false"); - link->createNewChildElement ("ProgramDatabaseFile")->addTextElement (getOwner().getIntDirFile (config, config.getOutputFilename (".pdb", true))); - link->createNewChildElement ("SubSystem")->addTextElement (type == ConsoleApp ? "Console" : "Windows"); - - if (! config.is64Bit()) - link->createNewChildElement ("TargetMachine")->addTextElement ("MachineX86"); - - if (isUsingEditAndContinue) - link->createNewChildElement ("ImageHasSafeExceptionHandlers")->addTextElement ("false"); - - if (! isDebug) - { - link->createNewChildElement ("OptimizeReferences")->addTextElement ("true"); - link->createNewChildElement ("EnableCOMDATFolding")->addTextElement ("true"); - } - - const StringArray librarySearchPaths (config.getLibrarySearchPaths()); - if (librarySearchPaths.size() > 0) - link->createNewChildElement ("AdditionalLibraryDirectories")->addTextElement (getOwner().replacePreprocessorTokens (config, librarySearchPaths.joinIntoString (";")) - + ";%(AdditionalLibraryDirectories)"); - - link->createNewChildElement ("LargeAddressAware")->addTextElement ("true"); - - const String externalLibraries (getExternalLibraries (config, getOwner().getExternalLibrariesString())); - if (externalLibraries.isNotEmpty()) - link->createNewChildElement ("AdditionalDependencies")->addTextElement (getOwner().replacePreprocessorTokens (config, externalLibraries).trim() - + ";%(AdditionalDependencies)"); - - String extraLinkerOptions (getOwner().getExtraLinkerFlagsString()); - if (extraLinkerOptions.isNotEmpty()) - link->createNewChildElement ("AdditionalOptions")->addTextElement (getOwner().replacePreprocessorTokens (config, extraLinkerOptions).trim() - + " %(AdditionalOptions)"); - - const String delayLoadedDLLs (getDelayLoadedDLLs()); - if (delayLoadedDLLs.isNotEmpty()) - link->createNewChildElement ("DelayLoadDLLs")->addTextElement (delayLoadedDLLs); - - const String moduleDefinitionsFile (getModuleDefinitions (config)); - if (moduleDefinitionsFile.isNotEmpty()) - link->createNewChildElement ("ModuleDefinitionFile") - ->addTextElement (moduleDefinitionsFile); - } - - { - XmlElement* bsc = group->createNewChildElement ("Bscmake"); - bsc->createNewChildElement ("SuppressStartupBanner")->addTextElement ("true"); - bsc->createNewChildElement ("OutputFile")->addTextElement (getOwner().getIntDirFile (config, config.getOutputFilename (".bsc", true))); - } - - const RelativePath& manifestFile = getOwner().getManifestPath(); - if (manifestFile.getRoot() != RelativePath::unknown) - { - XmlElement* bsc = group->createNewChildElement ("Manifest"); - bsc->createNewChildElement ("AdditionalManifestFiles") - ->addTextElement (manifestFile.rebased (getOwner().getProject().getFile().getParentDirectory(), - getOwner().getTargetFolder(), - RelativePath::buildTargetFolder).toWindowsStyle()); - } - - if (getTargetFileType() == staticLibrary && ! config.is64Bit()) - { - XmlElement* lib = group->createNewChildElement ("Lib"); - lib->createNewChildElement ("TargetMachine")->addTextElement ("MachineX86"); - } - - const String preBuild = getPreBuildSteps (config); - if (preBuild.isNotEmpty()) - group->createNewChildElement ("PreBuildEvent") - ->createNewChildElement ("Command") - ->addTextElement (preBuild); - - const String postBuild = getPostBuildSteps (config); - if (postBuild.isNotEmpty()) - group->createNewChildElement ("PostBuildEvent") - ->createNewChildElement ("Command") - ->addTextElement (postBuild); - } - - ScopedPointer otherFilesGroup (new XmlElement ("ItemGroup")); - - { - XmlElement* cppFiles = projectXml.createNewChildElement ("ItemGroup"); - XmlElement* headerFiles = projectXml.createNewChildElement ("ItemGroup"); - - for (int i = 0; i < getOwner().getAllGroups().size(); ++i) - { - const Project::Item& group = getOwner().getAllGroups().getReference (i); - - if (group.getNumChildren() > 0) - addFilesToCompile (group, *cppFiles, *headerFiles, *otherFilesGroup); - } - } - - if (getOwner().iconFile != File()) - { - XmlElement* e = otherFilesGroup->createNewChildElement ("None"); - e->setAttribute ("Include", prependDot (getOwner().iconFile.getFileName())); - } - - if (otherFilesGroup->getFirstChildElement() != nullptr) - projectXml.addChildElement (otherFilesGroup.release()); - - if (getOwner().hasResourceFile()) - { - XmlElement* rcGroup = projectXml.createNewChildElement ("ItemGroup"); - XmlElement* e = rcGroup->createNewChildElement ("ResourceCompile"); - e->setAttribute ("Include", prependDot (getOwner().rcFile.getFileName())); - } - - { - XmlElement* e = projectXml.createNewChildElement ("Import"); - e->setAttribute ("Project", "$(VCTargetsPath)\\Microsoft.Cpp.targets"); - } - - { - XmlElement* e = projectXml.createNewChildElement ("ImportGroup"); - e->setAttribute ("Label", "ExtensionTargets"); - } - - getOwner().addPlatformToolsetToPropertyGroup (projectXml); - getOwner().addWindowsTargetPlatformVersionToPropertyGroup (projectXml); - getOwner().addIPPSettingToPropertyGroup (projectXml); - } - - String getProjectType() const - { - switch (getTargetFileType()) - { - case executable: - return "Application"; - case staticLibrary: - return "StaticLibrary"; - default: - break; - } - - return "DynamicLibrary"; - } - - //============================================================================== - void addFilesToCompile (const Project::Item& projectItem, XmlElement& cpps, XmlElement& headers, XmlElement& otherFiles) const - { - const Type targetType = (getOwner().getProject().getProjectType().isAudioPlugin() ? type : SharedCodeTarget); - - if (projectItem.isGroup()) - { - for (int i = 0; i < projectItem.getNumChildren(); ++i) - addFilesToCompile (projectItem.getChild (i), cpps, headers, otherFiles); - } - else if (projectItem.shouldBeAddedToTargetProject() - && getOwner().getProject().getTargetTypeFromFilePath (projectItem.getFile(), true) == targetType) - { - const RelativePath path (projectItem.getFile(), getOwner().getTargetFolder(), RelativePath::buildTargetFolder); - - jassert (path.getRoot() == RelativePath::buildTargetFolder); - - if (path.hasFileExtension (cOrCppFileExtensions) || path.hasFileExtension (asmFileExtensions)) - { - if (targetType == SharedCodeTarget || projectItem.shouldBeCompiled()) - { - auto* e = cpps.createNewChildElement ("ClCompile"); - e->setAttribute ("Include", path.toWindowsStyle()); - - if (shouldUseStdCall (path)) - e->createNewChildElement ("CallingConvention")->addTextElement ("StdCall"); - - if (! projectItem.shouldBeCompiled()) - e->createNewChildElement ("ExcludedFromBuild")->addTextElement ("true"); - } - } - else if (path.hasFileExtension (headerFileExtensions)) - { - headers.createNewChildElement ("ClInclude")->setAttribute ("Include", path.toWindowsStyle()); - } - else if (! path.hasFileExtension (objCFileExtensions)) - { - otherFiles.createNewChildElement ("None")->setAttribute ("Include", path.toWindowsStyle()); - } - } - } - - void setConditionAttribute (XmlElement& xml, const BuildConfiguration& config) const - { - const MSVCBuildConfiguration& msvcConfig = dynamic_cast (config); - xml.setAttribute ("Condition", "'$(Configuration)|$(Platform)'=='" + msvcConfig.createMSVCConfigName() + "'"); - } - - //============================================================================== - void addFilterGroup (XmlElement& groups, const String& path) const - { - XmlElement* e = groups.createNewChildElement ("Filter"); - e->setAttribute ("Include", path); - e->createNewChildElement ("UniqueIdentifier")->addTextElement (createGUID (path + "_guidpathsaltxhsdf")); - } - - void addFileToFilter (const RelativePath& file, const String& groupPath, - XmlElement& cpps, XmlElement& headers, XmlElement& otherFiles) const - { - XmlElement* e; - - if (file.hasFileExtension (headerFileExtensions)) - e = headers.createNewChildElement ("ClInclude"); - else if (file.hasFileExtension (sourceFileExtensions)) - e = cpps.createNewChildElement ("ClCompile"); - else - e = otherFiles.createNewChildElement ("None"); - - jassert (file.getRoot() == RelativePath::buildTargetFolder); - e->setAttribute ("Include", file.toWindowsStyle()); - e->createNewChildElement ("Filter")->addTextElement (groupPath); - } - - bool addFilesToFilter (const Project::Item& projectItem, const String& path, - XmlElement& cpps, XmlElement& headers, XmlElement& otherFiles, XmlElement& groups) const - { - const Type targetType = (getOwner().getProject().getProjectType().isAudioPlugin() ? type : SharedCodeTarget); - - if (projectItem.isGroup()) - { - bool filesWereAdded = false; - - for (int i = 0; i < projectItem.getNumChildren(); ++i) - if (addFilesToFilter (projectItem.getChild(i), - (path.isEmpty() ? String() : (path + "\\")) + projectItem.getChild(i).getName(), - cpps, headers, otherFiles, groups)) - filesWereAdded = true; - - if (filesWereAdded) - addFilterGroup (groups, path); - - return filesWereAdded; - } - else if (projectItem.shouldBeAddedToTargetProject()) - { - const RelativePath relativePath (projectItem.getFile(), getOwner().getTargetFolder(), RelativePath::buildTargetFolder); - - jassert (relativePath.getRoot() == RelativePath::buildTargetFolder); - - if (getOwner().getProject().getTargetTypeFromFilePath (projectItem.getFile(), true) == targetType - && (targetType == SharedCodeTarget || projectItem.shouldBeCompiled())) - { - addFileToFilter (relativePath, path.upToLastOccurrenceOf ("\\", false, false), cpps, headers, otherFiles); - return true; - } - } - - return false; - } - - bool addFilesToFilter (const Array& files, const String& path, - XmlElement& cpps, XmlElement& headers, XmlElement& otherFiles, XmlElement& groups) - { - if (files.size() > 0) - { - addFilterGroup (groups, path); - - for (int i = 0; i < files.size(); ++i) - addFileToFilter (files.getReference(i), path, cpps, headers, otherFiles); - - return true; - } - - return false; - } - - void fillInFiltersXml (XmlElement& filterXml) const override - { - filterXml.setAttribute ("ToolsVersion", getOwner().getToolsVersion()); - filterXml.setAttribute ("xmlns", "http://schemas.microsoft.com/developer/msbuild/2003"); - - XmlElement* groupsXml = filterXml.createNewChildElement ("ItemGroup"); - XmlElement* cpps = filterXml.createNewChildElement ("ItemGroup"); - XmlElement* headers = filterXml.createNewChildElement ("ItemGroup"); - ScopedPointer otherFilesGroup (new XmlElement ("ItemGroup")); - - for (int i = 0; i < getOwner().getAllGroups().size(); ++i) - { - const Project::Item& group = getOwner().getAllGroups().getReference(i); - - if (group.getNumChildren() > 0) - addFilesToFilter (group, group.getName(), *cpps, *headers, *otherFilesGroup, *groupsXml); - } - - if (getOwner().iconFile.exists()) - { - XmlElement* e = otherFilesGroup->createNewChildElement ("None"); - e->setAttribute ("Include", prependDot (getOwner().iconFile.getFileName())); - e->createNewChildElement ("Filter")->addTextElement (ProjectSaver::getJuceCodeGroupName()); - } - - if (otherFilesGroup->getFirstChildElement() != nullptr) - filterXml.addChildElement (otherFilesGroup.release()); - - if (getOwner().hasResourceFile()) - { - XmlElement* rcGroup = filterXml.createNewChildElement ("ItemGroup"); - XmlElement* e = rcGroup->createNewChildElement ("ResourceCompile"); - e->setAttribute ("Include", prependDot (getOwner().rcFile.getFileName())); - e->createNewChildElement ("Filter")->addTextElement (ProjectSaver::getJuceCodeGroupName()); - } - } - - }; - - static const char* getName() { return "Visual Studio 2010"; } - static const char* getValueTreeTypeName() { return "VS2010"; } - int getVisualStudioVersion() const override { return 10; } - virtual String getSolutionComment() const { return "# Visual Studio 2010"; } - virtual String getToolsVersion() const { return "4.0"; } - virtual String getDefaultToolset() const { return "Windows7.1SDK"; } - Value getPlatformToolsetValue() { return getSetting (Ids::toolset); } - Value getIPPLibraryValue() { return getSetting (Ids::IPPLibrary); } - String getIPPLibrary() const { return settings [Ids::IPPLibrary]; } - virtual String getCppLanguageStandard() const { return {}; } - - String getPlatformToolset() const - { - const String s (settings [Ids::toolset].toString()); - return s.isNotEmpty() ? s : getDefaultToolset(); - } - - static MSVCProjectExporterVC2010* createForSettings (Project& project, const ValueTree& settings) - { - if (settings.hasType (getValueTreeTypeName())) - return new MSVCProjectExporterVC2010 (project, settings); - - return nullptr; - } - - void addToolsetProperty (PropertyListBuilder& props, const char** names, const var* values, int num) - { - props.add (new ChoicePropertyComponent (getPlatformToolsetValue(), "Platform Toolset", - StringArray (names, num), Array (values, num))); - } - - void addIPPLibraryProperty (PropertyListBuilder& props) - { - static const char* ippOptions[] = { "No", "Yes (Default Mode)", "Multi-Threaded Static Library", "Single-Threaded Static Library", "Multi-Threaded DLL", "Single-Threaded DLL" }; - static const var ippValues[] = { var(), "true", "Parallel_Static", "Sequential", "Parallel_Dynamic", "Sequential_Dynamic" }; - - props.add (new ChoicePropertyComponent (getIPPLibraryValue(), "Use IPP Library", - StringArray (ippOptions, numElementsInArray (ippValues)), - Array (ippValues, numElementsInArray (ippValues)))); - } - - void createExporterProperties (PropertyListBuilder& props) override - { - MSVCProjectExporterBase::createExporterProperties (props); - - static const char* toolsetNames[] = { "(default)", "v100", "v100_xp", "Windows7.1SDK", "CTP_Nov2013" }; - const var toolsets[] = { var(), "v100", "v100_xp", "Windows7.1SDK", "CTP_Nov2013" }; - - addToolsetProperty (props, toolsetNames, toolsets, numElementsInArray (toolsets)); - addIPPLibraryProperty (props); - } - - //============================================================================== - void addPlatformSpecificSettingsForProjectType (const ProjectType& type) override - { - MSVCProjectExporterBase::addPlatformSpecificSettingsForProjectType (type); - - callForAllSupportedTargets ([this] (ProjectType::Target::Type targetType) - { - if (MSVCTargetBase* target = new MSVC2010Target (targetType, *this)) - { - if (targetType != ProjectType::Target::AggregateTarget) - targets.add (target); - } - }); - - // If you hit this assert, you tried to generate a project for an exporter - // that does not support any of your targets! - jassert (targets.size() > 0); - } - - void create (const OwnedArray&) const override - { - createResourcesAndIcon(); - - for (int i = 0; i < targets.size(); ++i) - if (MSVCTargetBase* target = targets[i]) - target->writeProjectFile(); - - { - MemoryOutputStream mo; - writeSolutionFile (mo, "11.00", getSolutionComment()); - - overwriteFileIfDifferentOrThrow (getSLNFile(), mo); - } - } - -protected: - //============================================================================== - class VC2010BuildConfiguration : public MSVCBuildConfiguration - { - public: - VC2010BuildConfiguration (Project& p, const ValueTree& settings, const ProjectExporter& e) - : MSVCBuildConfiguration (p, settings, e) - { - if (getArchitectureType().toString().isEmpty()) - getArchitectureType() = get64BitArchName(); - } - - //============================================================================== - static const char* get32BitArchName() { return "32-bit"; } - static const char* get64BitArchName() { return "x64"; } - - Value getArchitectureType() { return getValue (Ids::winArchitecture); } - bool is64Bit() const { return config [Ids::winArchitecture].toString() == get64BitArchName(); } - - Value getFastMathValue() { return getValue (Ids::fastMath); } - bool isFastMathEnabled() const { return config [Ids::fastMath]; } - - //============================================================================== - void createConfigProperties (PropertyListBuilder& props) override - { - MSVCBuildConfiguration::createConfigProperties (props); - - const char* const archTypes[] = { get32BitArchName(), get64BitArchName() }; - - props.add (new ChoicePropertyComponent (getArchitectureType(), "Architecture", - StringArray (archTypes, numElementsInArray (archTypes)), - Array (archTypes, numElementsInArray (archTypes)))); - - props.add (new BooleanPropertyComponent (getFastMathValue(), "Relax IEEE compliance", "Enabled"), - "Enable this to use FAST_MATH non-IEEE mode. (Warning: this can have unexpected results!)"); - } - }; - - virtual void addPlatformToolsetToPropertyGroup (XmlElement&) const {} - virtual void addWindowsTargetPlatformVersionToPropertyGroup (XmlElement&) const {} - - void addIPPSettingToPropertyGroup (XmlElement& p) const - { - String ippLibrary = getIPPLibrary(); - - if (ippLibrary.isNotEmpty()) - forEachXmlChildElementWithTagName (p, e, "PropertyGroup") - e->createNewChildElement ("UseIntelIPP")->addTextElement (ippLibrary); - } - - BuildConfiguration::Ptr createBuildConfig (const ValueTree& v) const override - { - return new VC2010BuildConfiguration (project, v, *this); - } - - static bool is64Bit (const BuildConfiguration& config) - { - return dynamic_cast (config).is64Bit(); - } - - //============================================================================== - File getVCProjFile() const { return getProjectFile (".vcxproj", "App"); } - File getVCProjFiltersFile() const { return getProjectFile (".vcxproj.filters", String()); } - - JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2010) -}; - -//============================================================================== -class MSVCProjectExporterVC2012 : public MSVCProjectExporterVC2010 -{ -public: - MSVCProjectExporterVC2012 (Project& p, const ValueTree& t, - const char* folderName = "VisualStudio2012") - : MSVCProjectExporterVC2010 (p, t, folderName) - { - name = getName(); - } - - static const char* getName() { return "Visual Studio 2012"; } - static const char* getValueTreeTypeName() { return "VS2012"; } - int getVisualStudioVersion() const override { return 11; } - String getSolutionComment() const override { return "# Visual Studio 2012"; } - String getDefaultToolset() const override { return "v110"; } - Value getWindowsTargetPlatformVersionValue() { return getSetting (Ids::windowsTargetPlatformVersion); } - String getWindowsTargetPlatformVersion() const { return settings [Ids::windowsTargetPlatformVersion]; } - - static MSVCProjectExporterVC2012* createForSettings (Project& project, const ValueTree& settings) - { - if (settings.hasType (getValueTreeTypeName())) - return new MSVCProjectExporterVC2012 (project, settings); - - return nullptr; - } - - void createExporterProperties (PropertyListBuilder& props) override - { - MSVCProjectExporterBase::createExporterProperties (props); - - static const char* toolsetNames[] = { "(default)", "v110", "v110_xp", "Windows7.1SDK", "CTP_Nov2013" }; - const var toolsets[] = { var(), "v110", "v110_xp", "Windows7.1SDK", "CTP_Nov2013" }; - - addToolsetProperty (props, toolsetNames, toolsets, numElementsInArray (toolsets)); - addIPPLibraryProperty (props); - } - - void addWindowsTargetPlatformProperties (PropertyListBuilder& props) - { - static const char* targetPlatformNames[] = { "(default)", "8.1", "10.0.10240.0", "10.0.10586.0", "10.0.14393.0", "10.0.15063.0", nullptr }; - const var targetPlatforms[] = { var(), "8.1", "10.0.10240.0", "10.0.10586.0", "10.0.14393.0", "10.0.15063.0" }; - - props.add (new ChoicePropertyComponent (getWindowsTargetPlatformVersionValue(), "Windows Target Platform", - StringArray (targetPlatformNames), Array (targetPlatforms, numElementsInArray (targetPlatforms))), - "The Windows target platform version to use"); - } - -private: - void addPlatformToolsetToPropertyGroup (XmlElement& p) const override - { - forEachXmlChildElementWithTagName (p, e, "PropertyGroup") - e->createNewChildElement ("PlatformToolset")->addTextElement (getPlatformToolset()); - } - - void addWindowsTargetPlatformVersionToPropertyGroup (XmlElement& p) const override - { - const String& targetVersion = getWindowsTargetPlatformVersion(); - - if (targetVersion.isNotEmpty()) - forEachXmlChildElementWithTagName (p, e, "PropertyGroup") - e->createNewChildElement ("WindowsTargetPlatformVersion")->addTextElement (getWindowsTargetPlatformVersion()); - } - - JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2012) -}; - -//============================================================================== -class MSVCProjectExporterVC2013 : public MSVCProjectExporterVC2012 +class MSVCProjectExporterVC2013 : public MSVCProjectExporterBase { public: MSVCProjectExporterVC2013 (Project& p, const ValueTree& t) - : MSVCProjectExporterVC2012 (p, t, "VisualStudio2013") + : MSVCProjectExporterBase (p, t, "VisualStudio2013") { name = getName(); } - static const char* getName() { return "Visual Studio 2013"; } - static const char* getValueTreeTypeName() { return "VS2013"; } - int getVisualStudioVersion() const override { return 12; } - String getSolutionComment() const override { return "# Visual Studio 2013"; } - String getToolsVersion() const override { return "12.0"; } - String getDefaultToolset() const override { return "v120"; } + static const char* getName() { return "Visual Studio 2013"; } + static const char* getValueTreeTypeName() { return "VS2013"; } + int getVisualStudioVersion() const override { return 12; } + String getSolutionComment() const override { return "# Visual Studio 2013"; } + String getToolsVersion() const override { return "12.0"; } + String getDefaultToolset() const override { return "v120"; } + String getDefaultWindowsTargetPlatformVersion() const override { return "8.1"; } + static MSVCProjectExporterVC2013* createForSettings (Project& project, const ValueTree& settings) { @@ -1884,9 +1764,10 @@ public: static const char* toolsetNames[] = { "(default)", "v120", "v120_xp", "Windows7.1SDK", "CTP_Nov2013" }; const var toolsets[] = { var(), "v120", "v120_xp", "Windows7.1SDK", "CTP_Nov2013" }; - addToolsetProperty (props, toolsetNames, toolsets, numElementsInArray (toolsets)); + addIPPLibraryProperty (props); + addWindowsTargetPlatformProperties (props); } @@ -1894,21 +1775,22 @@ public: }; //============================================================================== -class MSVCProjectExporterVC2015 : public MSVCProjectExporterVC2012 +class MSVCProjectExporterVC2015 : public MSVCProjectExporterBase { public: MSVCProjectExporterVC2015 (Project& p, const ValueTree& t) - : MSVCProjectExporterVC2012 (p, t, "VisualStudio2015") + : MSVCProjectExporterBase (p, t, "VisualStudio2015") { name = getName(); } - static const char* getName() { return "Visual Studio 2015"; } - static const char* getValueTreeTypeName() { return "VS2015"; } - int getVisualStudioVersion() const override { return 14; } - String getSolutionComment() const override { return "# Visual Studio 2015"; } - String getToolsVersion() const override { return "14.0"; } - String getDefaultToolset() const override { return "v140"; } + static const char* getName() { return "Visual Studio 2015"; } + static const char* getValueTreeTypeName() { return "VS2015"; } + int getVisualStudioVersion() const override { return 14; } + String getSolutionComment() const override { return "# Visual Studio 2015"; } + String getToolsVersion() const override { return "14.0"; } + String getDefaultToolset() const override { return "v140"; } + String getDefaultWindowsTargetPlatformVersion() const override { return "8.1"; } static MSVCProjectExporterVC2015* createForSettings (Project& project, const ValueTree& settings) { @@ -1924,9 +1806,10 @@ public: static const char* toolsetNames[] = { "(default)", "v140", "v140_xp", "CTP_Nov2013" }; const var toolsets[] = { var(), "v140", "v140_xp", "CTP_Nov2013" }; - addToolsetProperty (props, toolsetNames, toolsets, numElementsInArray (toolsets)); + addIPPLibraryProperty (props); + addWindowsTargetPlatformProperties (props); } @@ -1934,21 +1817,22 @@ public: }; //============================================================================== -class MSVCProjectExporterVC2017 : public MSVCProjectExporterVC2012 +class MSVCProjectExporterVC2017 : public MSVCProjectExporterBase { public: MSVCProjectExporterVC2017 (Project& p, const ValueTree& t) - : MSVCProjectExporterVC2012 (p, t, "VisualStudio2017") + : MSVCProjectExporterBase (p, t, "VisualStudio2017") { name = getName(); } - static const char* getName() { return "Visual Studio 2017"; } - static const char* getValueTreeTypeName() { return "VS2017"; } - int getVisualStudioVersion() const override { return 15; } - String getSolutionComment() const override { return "# Visual Studio 2017"; } - String getToolsVersion() const override { return "15.0"; } - String getDefaultToolset() const override { return "v141"; } + static const char* getName() { return "Visual Studio 2017"; } + static const char* getValueTreeTypeName() { return "VS2017"; } + int getVisualStudioVersion() const override { return 15; } + String getSolutionComment() const override { return "# Visual Studio 2017"; } + String getToolsVersion() const override { return "15.0"; } + String getDefaultToolset() const override { return "v141"; } + String getDefaultWindowsTargetPlatformVersion() const override { return "10.0.15063.0"; } static MSVCProjectExporterVC2017* createForSettings (Project& project, const ValueTree& settings) { @@ -1958,30 +1842,17 @@ public: return nullptr; } - Value getCppStandardValue() { return getSetting (Ids::cppLanguageStandard); } - String getCppLanguageStandard() const override { return settings [Ids::cppLanguageStandard]; } - void createExporterProperties (PropertyListBuilder& props) override { MSVCProjectExporterBase::createExporterProperties (props); static const char* toolsetNames[] = { "(default)", "v140", "v140_xp", "v141", "v141_xp" }; const var toolsets[] = { var(), "v140", "v140_xp", "v141", "v141_xp" }; - addToolsetProperty (props, toolsetNames, toolsets, numElementsInArray (toolsets)); + addIPPLibraryProperty (props); + addWindowsTargetPlatformProperties (props); - - static const char* cppStandardNames[] = { "(default)", "C++14", "Latest C++ Standard", nullptr }; - - Array cppStandardValues; - cppStandardValues.add (var()); - cppStandardValues.add ("stdcpp14"); - cppStandardValues.add ("stdcpplatest"); - - props.add (new ChoicePropertyComponent (getCppStandardValue(), "C++ standard to use", - StringArray (cppStandardNames), cppStandardValues), - "The C++ language standard to use"); } JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2017) diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Make.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Make.h index 071eefbb67..67c2d7e35b 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Make.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Make.h @@ -53,7 +53,7 @@ protected: Array (archFlags, numElementsInArray (archFlags)))); } - String getLibrarySubdirPath() const override + String getModuleLibraryArchName() const override { String archFlag = getArchitectureTypeVar(); String prefix ("-march="); @@ -222,6 +222,11 @@ public: return String ("$(JUCE_OUTDIR)/$(JUCE_TARGET_") + getTargetVarName() + String (")"); } + String getPhonyName() const + { + return String (getName()).upToFirstOccurrenceOf (" ", false, false); + } + void writeTargetLine (OutputStream& out, const bool useLinuxPackages) { jassert (type != AggregateTarget); @@ -348,20 +353,8 @@ public: return false; } - Value getCppStandardValue() { return getSetting (Ids::cppLanguageStandard); } - String getCppStandardString() const { return settings[Ids::cppLanguageStandard]; } - void createExporterProperties (PropertyListBuilder& properties) override { - static const char* cppStandardNames[] = { "C++03", "C++11", "C++14", nullptr }; - static const char* cppStandardValues[] = { "-std=c++03", "-std=c++11", "-std=c++14", nullptr }; - - properties.add (new ChoicePropertyComponent (getCppStandardValue(), - "C++ standard to use", - StringArray (cppStandardNames), - Array (cppStandardValues)), - "The C++ standard to specify in the makefile"); - properties.add (new TextPropertyComponent (getExtraPkgConfig(), "pkg-config libraries", 8192, false), "Extra pkg-config libraries for you application. Each package should be space separated."); } @@ -522,6 +515,8 @@ private: if (target->type == ProjectType::Target::AggregateTarget) { StringArray dependencies; + MemoryOutputStream subTargetLines; + for (int j = 0; j < n; ++j) { if (i == j) continue; @@ -529,14 +524,25 @@ private: if (MakefileTarget* dependency = targets.getUnchecked (j)) { if (dependency->type != ProjectType::Target::SharedCodeTarget) - dependencies.add (dependency->getBuildProduct()); + { + auto phonyName = dependency->getPhonyName(); + + subTargetLines << phonyName << " : " << dependency->getBuildProduct() << newLine; + dependencies.add (phonyName); + } } } out << "all : " << dependencies.joinIntoString (" ") << newLine << newLine; + out << subTargetLines.toString() << newLine << newLine; } else + { + if (! getProject().getProjectType().isAudioPlugin()) + out << "all : " << target->getBuildProduct() << newLine << newLine; + target->writeTargetLine (out, useLinuxPackages); + } } } } @@ -588,13 +594,17 @@ private: << (" " + replacePreprocessorTokens (config, getExtraCompilerFlagsString())).trimEnd() << " $(CFLAGS)" << newLine; - String cppStandardToUse (getCppStandardString()); + { + auto cppStandard = config.project.getCppStandardValue().toString(); - if (cppStandardToUse.isEmpty()) - cppStandardToUse = "-std=c++11"; + if (cppStandard == "latest") + cppStandard = "1z"; - out << " JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) " - << cppStandardToUse << " $(CXXFLAGS)" << newLine; + cppStandard = "-std=" + String (shouldUseGNUExtensions() ? "gnu++" : "c++") + cppStandard; + + out << " JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) " + << cppStandard << " $(CXXFLAGS)" << newLine; + } writeLinkerFlags (out, config); @@ -661,8 +671,7 @@ private: for (auto target : targets) target->writeObjects (out); - out << ".PHONY: clean all" << newLine - << newLine; + out << getPhonyTargetLine() << newLine << newLine; StringArray packages; packages.addTokens (getExtraPkgConfigString(), " ", "\"'"); @@ -720,6 +729,23 @@ private: + "_" + String::toHexString (file.toUnixStyle().hashCode()) + ".o"; } + String getPhonyTargetLine() const + { + MemoryOutputStream phonyTargetLine; + + phonyTargetLine << ".PHONY: clean all"; + + if (! getProject().getProjectType().isAudioPlugin()) + return phonyTargetLine.toString(); + + for (auto target : targets) + if (target->type != ProjectType::Target::SharedCodeTarget + && target->type != ProjectType::Target::AggregateTarget) + phonyTargetLine << " " << target->getPhonyName(); + + return phonyTargetLine.toString(); + } + void initialiseDependencyPathValues() { vst3Path.referTo (Value (new DependencyPathValueSource (getSetting (Ids::vst3Folder), diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h index 163e1aaaf3..b584334df2 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h @@ -79,17 +79,26 @@ public: } //============================================================================== - Value getPListToMergeValue() { return getSetting ("customPList"); } - String getPListToMergeString() const { return settings ["customPList"]; } + Value getPListToMergeValue() { return getSetting ("customPList"); } + String getPListToMergeString() const { return settings ["customPList"]; } - Value getExtraFrameworksValue() { return getSetting (Ids::extraFrameworks); } - String getExtraFrameworksString() const { return settings [Ids::extraFrameworks]; } + Value getPListPrefixHeaderValue() { return getSetting ("PListPrefixHeader"); } + String getPListPrefixHeaderString() const { return settings ["PListPrefixHeader"]; } - Value getPostBuildScriptValue() { return getSetting (Ids::postbuildCommand); } - String getPostBuildScript() const { return settings [Ids::postbuildCommand]; } + Value getPListPreprocessValue() { return getSetting ("PListPreprocess"); } + bool isPListPreprocessEnabled() const { return settings ["PListPreprocess"]; } - Value getPreBuildScriptValue() { return getSetting (Ids::prebuildCommand); } - String getPreBuildScript() const { return settings [Ids::prebuildCommand]; } + Value getExtraFrameworksValue() { return getSetting (Ids::extraFrameworks); } + String getExtraFrameworksString() const { return settings [Ids::extraFrameworks]; } + + Value getPostBuildScriptValue() { return getSetting (Ids::postbuildCommand); } + String getPostBuildScript() const { return settings [Ids::postbuildCommand]; } + + Value getPreBuildScriptValue() { return getSetting (Ids::prebuildCommand); } + String getPreBuildScript() const { return settings [Ids::prebuildCommand]; } + + Value getDuplicateResourcesFolderForAppExtensionValue() { return getSetting (Ids::iosAppExtensionDuplicateResourcesFolder); } + bool shouldDuplicateResourcesFolderForAppExtension() const { return settings [Ids::iosAppExtensionDuplicateResourcesFolder]; } Value getScreenOrientationValue() { return getSetting (Ids::iosScreenOrientation); } String getScreenOrientationString() const { return settings [Ids::iosScreenOrientation]; } @@ -108,9 +117,15 @@ public: bool isBackgroundAudioEnabled() const { return settings [Ids::iosBackgroundAudio]; } Value getBackgroundBleValue() { return getSetting (Ids::iosBackgroundBle); } bool isBackgroundBleEnabled() const { return settings [Ids::iosBackgroundBle]; } + Value getPushNotificationsValue() { return getSetting (Ids::iosPushNotifications); } + bool isPushNotificationsEnabled() const { return settings [Ids::iosPushNotifications]; } + Value getAppGroupsEnabledValue() { return getSetting (Ids::iosAppGroups); } + bool isAppGroupsEnabled() const { return settings [Ids::iosAppGroups]; } Value getIosDevelopmentTeamIDValue() { return getSetting (Ids::iosDevelopmentTeamID); } String getIosDevelopmentTeamIDString() const { return settings [Ids::iosDevelopmentTeamID]; } + Value getAppGroupIdValue() { return getSetting (Ids::iosAppGroupsId); } + String getAppGroupIdString() const { return settings [Ids::iosAppGroupsId]; } bool usesMMFiles() const override { return true; } bool canCopeWithDuplicateFiles() override { return true; } @@ -171,6 +186,11 @@ public: if (iOS) { + if (getProject().getProjectType().isAudioPlugin()) + props.add (new BooleanPropertyComponent (getDuplicateResourcesFolderForAppExtensionValue(), + "Don't add resources folder to app extension", "Enabled"), + "Enable this to prevent the Projucer from creating a resources folder for AUv3 app extensions."); + static const char* orientations[] = { "Portrait and Landscape", "Portrait", "Landscape", nullptr }; static const char* orientationValues[] = { "portraitlandscape", "portrait", "landscape", nullptr }; @@ -196,6 +216,12 @@ public: props.add (new BooleanPropertyComponent (getBackgroundBleValue(), "Bluetooth MIDI background capability", "Enabled"), "Enable this to grant your app the capability to connect to Bluetooth LE devices when in background mode."); + + props.add (new BooleanPropertyComponent (getPushNotificationsValue(), "Push Notifications capability", "Enabled"), + "Enable this to grant your app the capability to receive push notifications."); + + props.add (new BooleanPropertyComponent (getAppGroupsEnabledValue(), "App groups capability", "Enabled"), + "Enable this to grant your app the capability to share resources between apps using the same app group ID."); } else if (projectType.isGUIApplication()) { @@ -209,6 +235,14 @@ public: "settings that the Projucer creates. BEWARE! When doing this, be careful to remove from the XML any " "values that you DO want the Projucer to change!"); + props.add (new BooleanPropertyComponent (getPListPreprocessValue(), "PList Preprocess", "Enabled"), + "Enable this to preprocess PList file. This will allow you to set values to preprocessor defines," + " for instance if you define: #define MY_FLAG 1 in a prefix header file (see PList prefix header), you can have" + " a key with MY_FLAG value and it will be replaced with 1."); + + props.add (new TextPropertyComponent (getPListPrefixHeaderValue(), "PList Prefix Header", 512, false), + "Header file containing definitions used in plist file (see PList Preprocess)."); + props.add (new TextPropertyComponent (getExtraFrameworksValue(), "Extra Frameworks", 2048, false), "A comma-separated list of extra frameworks that should be added to the build. " "(Don't include the .framework extension in the name)"); @@ -224,6 +258,11 @@ public: "string (for example, \"S7B6T5XJ2Q\") that describes the distribution certificate Apple issued to you. " "You can find this string in the OS X app Keychain Access under \"Certificates\"."); + if (iOS) + props.add (new TextPropertyComponentWithEnablement (getAppGroupIdValue(), getAppGroupsEnabledValue(), "App Group ID", 256, false), + "The App Group ID to be used for allowing multiple apps to access a shared resource folder. Multiple IDs can be " + "added seperated by a semicolon."); + props.add (new BooleanPropertyComponent (getSetting ("keepCustomXcodeSchemes"), "Keep custom Xcode schemes", "Enabled"), "Enable this to keep any Xcode schemes you have created for debugging or running, e.g. to launch a plug-in in" "various hosts. If disabled, all schemes are replaced by a default set."); @@ -331,22 +370,22 @@ protected: XcodeBuildConfiguration (Project& p, const ValueTree& t, const bool isIOS, const ProjectExporter& e) : BuildConfiguration (p, t, e), iOS (isIOS), - osxSDKVersion (config, Ids::osxSDK, nullptr, "default"), - osxDeploymentTarget (config, Ids::osxCompatibility, nullptr, "default"), - iosDeploymentTarget (config, Ids::iosCompatibility, nullptr, "default"), - osxArchitecture (config, Ids::osxArchitecture, nullptr, "default"), - customXcodeFlags (config, Ids::customXcodeFlags, nullptr), - cppLanguageStandard (config, Ids::cppLanguageStandard, nullptr), - cppStandardLibrary (config, Ids::cppLibType, nullptr), - codeSignIdentity (config, Ids::codeSigningIdentity, nullptr, iOS ? "iPhone Developer" : "Mac Developer"), - fastMathEnabled (config, Ids::fastMath, nullptr), - linkTimeOptimisationEnabled (config, Ids::linkTimeOptimisation, nullptr), - stripLocalSymbolsEnabled (config, Ids::stripLocalSymbols, nullptr), - vstBinaryLocation (config, Ids::xcodeVstBinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/VST/"), - vst3BinaryLocation (config, Ids::xcodeVst3BinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/VST3/"), - auBinaryLocation (config, Ids::xcodeAudioUnitBinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/Components/"), - rtasBinaryLocation (config, Ids::xcodeRtasBinaryLocation, nullptr, "/Library/Application Support/Digidesign/Plug-Ins/"), - aaxBinaryLocation (config, Ids::xcodeAaxBinaryLocation, nullptr, "/Library/Application Support/Avid/Audio/Plug-Ins/") + osxSDKVersion (config, Ids::osxSDK, nullptr, "default"), + osxDeploymentTarget (config, Ids::osxCompatibility, nullptr, "default"), + iosDeploymentTarget (config, Ids::iosCompatibility, nullptr, "default"), + osxArchitecture (config, Ids::osxArchitecture, nullptr, "default"), + customXcodeFlags (config, Ids::customXcodeFlags, nullptr), + plistPreprocessorDefinitions (config, Ids::plistPreprocessorDefinitions, nullptr), + cppStandardLibrary (config, Ids::cppLibType, nullptr), + codeSignIdentity (config, Ids::codeSigningIdentity, nullptr, iOS ? "iPhone Developer" : "Mac Developer"), + fastMathEnabled (config, Ids::fastMath, nullptr), + linkTimeOptimisationEnabled (config, Ids::linkTimeOptimisation, nullptr), + stripLocalSymbolsEnabled (config, Ids::stripLocalSymbols, nullptr), + vstBinaryLocation (config, Ids::xcodeVstBinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/VST/"), + vst3BinaryLocation (config, Ids::xcodeVst3BinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/VST3/"), + auBinaryLocation (config, Ids::xcodeAudioUnitBinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/Components/"), + rtasBinaryLocation (config, Ids::xcodeRtasBinaryLocation, nullptr, "/Library/Application Support/Digidesign/Plug-Ins/"), + aaxBinaryLocation (config, Ids::xcodeAaxBinaryLocation, nullptr, "/Library/Application Support/Avid/Audio/Plug-Ins/") { } @@ -354,7 +393,7 @@ protected: bool iOS; CachedValue osxSDKVersion, osxDeploymentTarget, iosDeploymentTarget, osxArchitecture, - customXcodeFlags, cppLanguageStandard, cppStandardLibrary, codeSignIdentity; + customXcodeFlags, plistPreprocessorDefinitions, cppStandardLibrary, codeSignIdentity; CachedValue fastMathEnabled, linkTimeOptimisationEnabled, stripLocalSymbolsEnabled; CachedValue vstBinaryLocation, vst3BinaryLocation, auBinaryLocation, rtasBinaryLocation, aaxBinaryLocation; @@ -411,26 +450,18 @@ protected: "A comma-separated list of custom Xcode setting flags which will be appended to the list of generated flags, " "e.g. MACOSX_DEPLOYMENT_TARGET_i386 = 10.5, VALID_ARCHS = \"ppc i386 x86_64\""); - const char* cppLanguageStandardNames[] = { "Use Default", "C++11", "GNU++11", "C++14", "GNU++14", nullptr }; - Array cppLanguageStandardValues; - cppLanguageStandardValues.add (var()); - cppLanguageStandardValues.add ("c++11"); - cppLanguageStandardValues.add ("gnu++11"); - cppLanguageStandardValues.add ("c++14"); - cppLanguageStandardValues.add ("gnu++14"); + props.add (new TextPropertyComponent (plistPreprocessorDefinitions.getPropertyAsValue(), "PList Preprocessor Definitions", 2048, true), + "Preprocessor definitions used during PList preprocessing (see PList Preprocess)."); - props.add (new ChoicePropertyComponent (cppLanguageStandard.getPropertyAsValue(), "C++ Language Standard", - StringArray (cppLanguageStandardNames), cppLanguageStandardValues), - "The standard of the C++ language that will be used for compilation."); + { + static const char* cppLibNames[] = { "Use Default", "LLVM libc++", "GNU libstdc++", nullptr }; + static const var cppLibValues[] = { var(), "libc++", "libstdc++" }; - const char* cppLibNames[] = { "Use Default", "LLVM libc++", "GNU libstdc++", nullptr }; - Array cppLibValues; - cppLibValues.add (var()); - cppLibValues.add ("libc++"); - cppLibValues.add ("libstdc++"); - - props.add (new ChoicePropertyComponent (cppStandardLibrary.getPropertyAsValue(), "C++ Library", StringArray (cppLibNames), cppLibValues), - "The type of C++ std lib that will be linked."); + props.add (new ChoicePropertyComponent (cppStandardLibrary.getPropertyAsValue(), "C++ Library", + StringArray (cppLibNames), + Array (cppLibValues, numElementsInArray (cppLibValues))), + "The type of C++ std lib that will be linked."); + } props.add (new TextWithDefaultPropertyComponent (codeSignIdentity, "Code-signing Identity", 1024), "The name of a code-signing identity for Xcode to apply."); @@ -446,7 +477,7 @@ protected: "will also remove any function names from crash logs. Must be disabled for static library projects."); } - String getLibrarySubdirPath() const override + String getModuleLibraryArchName() const override { return "${CURRENT_ARCH}"; } @@ -720,23 +751,26 @@ public: //============================================================================== String getTargetAttributes() const { - String attributes; + auto attributes = getID() + " = { "; - attributes << getID() << " = { "; - - String developmentTeamID = owner.getIosDevelopmentTeamIDString(); + auto developmentTeamID = owner.getIosDevelopmentTeamIDString(); if (developmentTeamID.isNotEmpty()) attributes << "DevelopmentTeam = " << developmentTeamID << "; "; - const int inAppPurchasesEnabled = (owner.iOS && owner.isInAppPurchasesEnabled()) ? 1 : 0; - const int interAppAudioEnabled = (owner.iOS - && type == Target::StandalonePlugIn - && owner.getProject().shouldEnableIAA()) ? 1 : 0; - const int sandboxEnabled = (type == Target::AudioUnitv3PlugIn ? 1 : 0); + auto appGroupsEnabled = (owner.iOS && owner.isAppGroupsEnabled() ? 1 : 0); + auto inAppPurchasesEnabled = (owner.iOS && owner.isInAppPurchasesEnabled()) ? 1 : 0; + auto interAppAudioEnabled = (owner.iOS + && type == Target::StandalonePlugIn + && owner.getProject().shouldEnableIAA()) ? 1 : 0; + + auto pushNotificationsEnabled = (owner.iOS && owner.isPushNotificationsEnabled()) ? 1 : 0; + auto sandboxEnabled = (type == Target::AudioUnitv3PlugIn ? 1 : 0); attributes << "SystemCapabilities = {"; + attributes << "com.apple.ApplicationGroups.iOS = { enabled = " << appGroupsEnabled << "; }; "; attributes << "com.apple.InAppPurchase = { enabled = " << inAppPurchasesEnabled << "; }; "; attributes << "com.apple.InterAppAudio = { enabled = " << interAppAudioEnabled << "; }; "; + attributes << "com.apple.Push = { enabled = " << pushNotificationsEnabled << "; }; "; attributes << "com.apple.Sandbox = { enabled = " << sandboxEnabled << "; }; "; attributes << "}; };"; @@ -807,8 +841,32 @@ public: s.add ("GCC_OPTIMIZATION_LEVEL = " + config.getGCCOptimisationFlag()); if (shouldCreatePList()) + { s.add ("INFOPLIST_FILE = " + infoPlistFile.getFileName()); + if (owner.getPListPrefixHeaderString().isNotEmpty()) + s.add ("INFOPLIST_PREFIX_HEADER = " + owner.getPListPrefixHeaderString()); + + s.add ("INFOPLIST_PREPROCESS = " + (owner.isPListPreprocessEnabled() ? String ("YES") : String ("NO"))); + + auto plistDefs = parsePreprocessorDefs (config.plistPreprocessorDefinitions.get()); + StringArray defsList; + + for (int i = 0; i < plistDefs.size(); ++i) + { + String def (plistDefs.getAllKeys()[i]); + const String value (plistDefs.getAllValues()[i]); + + if (value.isNotEmpty()) + def << "=" << value.replace ("\"", "\\\\\\\""); + + defsList.add ("\"" + def + "\""); + } + + if (defsList.size() > 0) + s.add ("INFOPLIST_PREPROCESSOR_DEFINITIONS = " + indentParenthesisedList (defsList)); + } + if (config.linkTimeOptimisationEnabled.get()) s.add ("LLVM_LTO = YES"); @@ -883,14 +941,23 @@ public: } s.add ("GCC_VERSION = " + gccVersion); - s.add ("CLANG_CXX_LANGUAGE_STANDARD = \"c++0x\""); s.add ("CLANG_LINK_OBJC_RUNTIME = NO"); if (! config.codeSignIdentity.isUsingDefault()) s.add ("CODE_SIGN_IDENTITY = " + config.codeSignIdentity.get().quoted()); - if (config.cppLanguageStandard.get().isNotEmpty()) - s.add ("CLANG_CXX_LANGUAGE_STANDARD = " + config.cppLanguageStandard.get().quoted()); + if (owner.isPushNotificationsEnabled()) + s.add ("CODE_SIGN_ENTITLEMENTS = " + owner.getProject().getTitle() + ".entitlements"); + + { + auto cppStandard = owner.project.getCppStandardValue().toString(); + + if (cppStandard == "latest") + cppStandard = "1z"; + + s.add ("CLANG_CXX_LANGUAGE_STANDARD = " + (String (owner.shouldUseGNUExtensions() ? "gnu++" + : "c++") + cppStandard).quoted()); + } if (config.cppStandardLibrary.get().isNotEmpty()) s.add ("CLANG_CXX_LIBRARY = " + config.cppStandardLibrary.get().quoted()); @@ -1167,6 +1234,7 @@ public: StringArray iosBackgroundModes; if (owner.isBackgroundAudioEnabled()) iosBackgroundModes.add ("audio"); if (owner.isBackgroundBleEnabled()) iosBackgroundModes.add ("bluetooth-central"); + if (owner.isPushNotificationsEnabled()) iosBackgroundModes.add ("remote-notification"); addArrayToPlist (dict, "UIBackgroundModes", iosBackgroundModes); } @@ -1210,10 +1278,13 @@ public: paths.addArray (config.getHeaderSearchPaths()); paths.addArray (getTargetExtraHeaderSearchPaths()); - // Always needed to compile .r files - paths.add (owner.getModuleFolderRelativeToProject ("juce_audio_plugin_client") - .rebased (owner.projectFolder, owner.getTargetFolder(), RelativePath::buildTargetFolder) - .toUnixStyle()); + if (owner.project.getModules().isModuleEnabled ("juce_audio_plugin_client")) + { + // Needed to compile .r files + paths.add (owner.getModuleFolderRelativeToProject ("juce_audio_plugin_client") + .rebased (owner.projectFolder, owner.getTargetFolder(), RelativePath::buildTargetFolder) + .toUnixStyle()); + } paths.add ("$(inherited)"); @@ -1388,13 +1459,14 @@ public: { if (auto xcodeConfig = dynamic_cast (&config)) { - const String& configValue = xcodeConfig->cppStandardLibrary.get(); + const auto& configValue = xcodeConfig->cppStandardLibrary.get(); if (configValue.isNotEmpty()) return (configValue == "libc++"); - const int minorOSXDeploymentTarget - = getOSXDeploymentTarget (*xcodeConfig).fromLastOccurrenceOf (".", false, false).getIntValue(); + auto minorOSXDeploymentTarget = getOSXDeploymentTarget (*xcodeConfig) + .fromLastOccurrenceOf (".", false, false) + .getIntValue(); return (minorOSXDeploymentTarget > 8); } @@ -1568,8 +1640,8 @@ private: void addFilesAndGroupsToProject (StringArray& topLevelGroupIDs) const { - StringArray entitlements = getEntitlements(); - if (! entitlements.isEmpty()) + StringPairArray entitlements = getEntitlements(); + if (entitlements.size() > 0) topLevelGroupIDs.add (addEntitlementsFile (entitlements)); for (auto& group : getAllGroups()) @@ -1618,9 +1690,10 @@ private: if (target->type != XCodeTarget::AggregateTarget) { - // TODO: ideally resources wouldn't be copied into the AUv3 bundle as well. - // However, fixing this requires supporting App groups -> TODO: add app groups - if (! projectType.isStaticLibrary() && target->type != XCodeTarget::SharedCodeTarget) + auto skipAUv3 = (target->type == XCodeTarget::AudioUnitv3PlugIn + && ! shouldDuplicateResourcesFolderForAppExtension()); + + if (! projectType.isStaticLibrary() && target->type != XCodeTarget::SharedCodeTarget && ! skipAUv3) target->addBuildPhase ("PBXResourcesBuildPhase", resourceIDs); StringArray rezFiles (rezFileIDs); @@ -1941,15 +2014,36 @@ private: { StringArray s; s.add ("ALWAYS_SEARCH_USER_PATHS = NO"); + s.add ("ENABLE_STRICT_OBJC_MSGSEND = YES"); s.add ("GCC_C_LANGUAGE_STANDARD = c11"); + s.add ("GCC_NO_COMMON_BLOCKS = YES"); + s.add ("GCC_MODEL_TUNING = G5"); s.add ("GCC_WARN_ABOUT_RETURN_TYPE = YES"); s.add ("GCC_WARN_CHECK_SWITCH_STATEMENTS = YES"); s.add ("GCC_WARN_UNUSED_VARIABLE = YES"); s.add ("GCC_WARN_MISSING_PARENTHESES = YES"); s.add ("GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES"); s.add ("GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES"); + s.add ("GCC_WARN_64_TO_32_BIT_CONVERSION = YES"); + s.add ("GCC_WARN_UNDECLARED_SELECTOR = YES"); + s.add ("GCC_WARN_UNINITIALIZED_AUTOS = YES"); + s.add ("GCC_WARN_UNUSED_FUNCTION = YES"); + s.add ("CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES"); + s.add ("CLANG_WARN_BOOL_CONVERSION = YES"); + s.add ("CLANG_WARN_COMMA = YES"); + s.add ("CLANG_WARN_CONSTANT_CONVERSION = YES"); + s.add ("CLANG_WARN_EMPTY_BODY = YES"); + s.add ("CLANG_WARN_ENUM_CONVERSION = YES"); + s.add ("CLANG_WARN_INFINITE_RECURSION = YES"); + s.add ("CLANG_WARN_INT_CONVERSION = YES"); + s.add ("CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES"); + s.add ("CLANG_WARN_OBJC_LITERAL_CONVERSION = YES"); + s.add ("CLANG_WARN_RANGE_LOOP_ANALYSIS = YES"); + s.add ("CLANG_WARN_STRICT_PROTOTYPES = YES"); + s.add ("CLANG_WARN_SUSPICIOUS_MOVE = YES"); + s.add ("CLANG_WARN_UNREACHABLE_CODE = YES"); + s.add ("CLANG_WARN__DUPLICATE_METHOD_MATCH = YES"); s.add ("WARNING_CFLAGS = -Wreorder"); - s.add ("GCC_MODEL_TUNING = G5"); if (projectType.isStaticLibrary()) { @@ -2257,35 +2351,57 @@ private: return project.getProjectFilenameRoot() + String (".entitlements"); } - StringArray getEntitlements() const + StringPairArray getEntitlements() const { - StringArray keys; + StringPairArray entitlements; if (project.getProjectType().isAudioPlugin()) { if (isiOS()) { if (project.shouldEnableIAA()) - keys.add ("inter-app-audio"); + entitlements.set ("inter-app-audio", ""); } else { - keys.add ("com.apple.security.app-sandbox"); + entitlements.set ("com.apple.security.app-sandbox", ""); } } - return keys; + else + { + if (isiOS() && isPushNotificationsEnabled()) + entitlements.set ("aps-environment", "development"); + } + + if (isAppGroupsEnabled()) + { + auto appGroups = StringArray::fromTokens (getAppGroupIdString(), ";", { }); + auto groups = String (""); + + for (auto group : appGroups) + groups += "\n\t\t" + group.trim() + ""; + + groups += "\n\t"; + + entitlements.set ("com.apple.security.application-groups", groups); + } + + return entitlements; } - String addEntitlementsFile (StringArray keys) const + String addEntitlementsFile (StringPairArray entitlements) const { String content = "\n" "\n" "\n" "\n"; + + const auto keys = entitlements.getAllKeys(); + for (auto& key : keys) { content += "\t" + key + "\n" - "\t\n"; + "\t" + entitlements[key] + "\n"; } content += "\n" "\n"; diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp b/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp index 0d0f2a99f4..d74df52a12 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp @@ -269,6 +269,10 @@ void ProjectExporter::createPropertyEditors (PropertyListBuilder& props) "Additional libraries to link (one per line). You should not add any platform specific decoration to these names. " "This string can contain references to preprocessor definitions in the form ${NAME_OF_VALUE}, which will be replaced with their values."); + if (! isVisualStudio()) + props.add (new BooleanPropertyComponent (getShouldUseGNUExtensionsValue(), "GNU Compiler Extensions", "Enabled"), + "Enabling this will use the GNU C++ language standard variant for compilation."); + createIconProperties (props); createExporterProperties (props); @@ -493,8 +497,24 @@ Value ProjectExporter::getPathForModuleValue (const String& moduleID) String ProjectExporter::getPathForModuleString (const String& moduleID) const { - return settings.getChildWithName (Ids::MODULEPATHS) - .getChildWithProperty (Ids::ID, moduleID) [Ids::path].toString(); + auto exporterPath = settings.getChildWithName (Ids::MODULEPATHS) + .getChildWithProperty (Ids::ID, moduleID) [Ids::path].toString(); + + if (exporterPath.isEmpty() || project.getModules().shouldUseGlobalPath (moduleID).getValue()) + { + auto id = EnabledModuleList::isJuceModule (moduleID) ? Ids::defaultJuceModulePath + : Ids::defaultUserModulePath; + + if (TargetOS::getThisOS() != getTargetOSForExporter()) + return getAppSettings().getFallbackPathForOS (id, getTargetOSForExporter()).toString(); + + if (id == Ids::defaultJuceModulePath) + return getAppSettings().getStoredPath (Ids::defaultJuceModulePath).toString(); + + return getAppSettings().getStoredPath (Ids::defaultUserModulePath).toString(); + } + + return exporterPath; } void ProjectExporter::removePathForModule (const String& moduleID) @@ -504,6 +524,18 @@ void ProjectExporter::removePathForModule (const String& moduleID) paths.removeChild (m, project.getUndoManagerFor (settings)); } +TargetOS::OS ProjectExporter::getTargetOSForExporter() const +{ + auto targetOS = TargetOS::unknown; + + if (isWindows()) targetOS = TargetOS::windows; + else if (isOSX() || isiOS()) targetOS = TargetOS::osx; + else if (isLinux()) targetOS = TargetOS::linux; + else if (isAndroid()) targetOS = TargetOS::getThisOS(); + + return targetOS; +} + RelativePath ProjectExporter::getModuleFolderRelativeToProject (const String& moduleID) const { if (project.getModules().shouldCopyModuleFilesLocally (moduleID).getValue()) @@ -515,6 +547,11 @@ RelativePath ProjectExporter::getModuleFolderRelativeToProject (const String& mo if (path.isEmpty()) return getLegacyModulePath (moduleID).getChildFile (moduleID); + #if ! JUCE_WINDOWS + if (path.startsWith ("~")) + path = File::getSpecialLocation (File::userHomeDirectory).getChildFile (path.trimCharactersAtStart ("~/")).getFullPathName(); + #endif + return RelativePath (path, RelativePath::projectFolder).getChildFile (moduleID); } @@ -905,8 +942,9 @@ StringArray ProjectExporter::BuildConfiguration::getLibrarySearchPaths() const { auto separator = exporter.isVisualStudio() ? "\\" : "/"; auto s = getSearchPathsFromString (getLibrarySearchPathString()); + for (auto path : exporter.moduleLibSearchPaths) - s.add (path + separator + getLibrarySubdirPath()); + s.add (path + separator + getModuleLibraryArchName()); return s; } @@ -920,7 +958,7 @@ String ProjectExporter::BuildConfiguration::getGCCLibraryPathFlags() const s << " -L" << escapeSpaces (path).replace ("~", "$(HOME)"); for (auto path : exporter.moduleLibSearchPaths) - s << " -L" << escapeSpaces (path).replace ("~", "$(HOME)") << "/" << getLibrarySubdirPath(); + s << " -L" << escapeSpaces (path).replace ("~", "$(HOME)") << "/" << getModuleLibraryArchName(); return s; } diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.h index 8d249b6773..746ce2f079 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.h @@ -28,7 +28,7 @@ #include "../Project/jucer_Project.h" #include "../Project/jucer_ProjectType.h" -#include "../Application/jucer_GlobalPreferences.h" +#include "../Project/jucer_DependencyPathPropertyComponent.h" class ProjectSaver; @@ -154,12 +154,17 @@ public: Value getRTASPathValue() const { return rtasPath; } Value getAAXPathValue() const { return aaxPath; } + Value getShouldUseGNUExtensionsValue() { return getSetting (Ids::enableGNUExtensions); } + bool shouldUseGNUExtensions() const { return (getSettingString (Ids::enableGNUExtensions) == "1");} + // NB: this is the path to the parent "modules" folder that contains the named module, not the // module folder itself. Value getPathForModuleValue (const String& moduleID); String getPathForModuleString (const String& moduleID) const; void removePathForModule (const String& moduleID); + TargetOS::OS getTargetOSForExporter() const; + RelativePath getLegacyModulePath (const String& moduleID) const; String getLegacyModulePath() const; @@ -216,6 +221,9 @@ public: String msvcDelayLoadedDLLs; StringArray mingwLibs, windowsLibs; + //============================================================================== + StringArray androidLibs; + //============================================================================== StringArray extraSearchPaths; StringArray moduleLibSearchPaths; @@ -232,7 +240,7 @@ public: //============================================================================== virtual void createConfigProperties (PropertyListBuilder&) = 0; virtual var getDefaultOptimisationLevel() const = 0; - virtual String getLibrarySubdirPath() const { return {}; } + virtual String getModuleLibraryArchName() const = 0; //============================================================================== diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectSaver.cpp b/extras/Projucer/Source/Project Saving/jucer_ProjectSaver.cpp index fe3bef7b6b..76cc05c4d5 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectSaver.cpp +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectSaver.cpp @@ -81,7 +81,7 @@ void ProjectSaver::writePluginCharacteristicsFile() flags.set ("JucePlugin_Build_AUv3", valueToBool (project.getShouldBuildAUv3AsValue())); flags.set ("JucePlugin_Build_RTAS", valueToBool (project.getShouldBuildRTASAsValue())); flags.set ("JucePlugin_Build_AAX", valueToBool (project.getShouldBuildAAXAsValue())); - flags.set ("JucePlugin_Build_STANDALONE", valueToBool (project.getShouldBuildStandalonePluginAsValue())); + flags.set ("JucePlugin_Build_Standalone", valueToBool (project.getShouldBuildStandalonePluginAsValue())); flags.set ("JucePlugin_Enable_IAA", valueToBool (project.getShouldEnableIAAAsValue())); flags.set ("JucePlugin_Name", valueToStringLiteral (project.getPluginName())); flags.set ("JucePlugin_Desc", valueToStringLiteral (project.getPluginDesc())); diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectSaver.h b/extras/Projucer/Source/Project Saving/jucer_ProjectSaver.h index f8513234ea..20cf92cc40 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectSaver.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectSaver.h @@ -363,6 +363,13 @@ private: "Please go to the Modules settings page and ensure each path points to the correct JUCE modules folder."); return; } + + if (project.getModules().getExtraDependenciesNeeded (module->getID()).size() > 0) + { + addError ("At least one of your modules has missing dependencies!\n" + "Please go to the settings page of the highlighted modules and add the required dependencies."); + return; + } } else { @@ -406,8 +413,13 @@ private: << newLine << "// BEGIN SECTION A" << newLine << newLine - << "#define JUCE_DISPLAY_SPLASH_SCREEN " << (project.shouldDisplaySplashScreen().getValue() ? "1" : "0") << newLine - << "#define JUCE_REPORT_APP_USAGE " << (project.shouldReportAppUsage().getValue() ? "1" : "0") << newLine + << "#ifndef JUCE_DISPLAY_SPLASH_SCREEN" << newLine + << " #define JUCE_DISPLAY_SPLASH_SCREEN " << (project.shouldDisplaySplashScreen().getValue() ? "1" : "0") << newLine + << "#endif" << newLine << newLine + + << "#ifndef JUCE_REPORT_APP_USAGE" << newLine + << " #define JUCE_REPORT_APP_USAGE " << (project.shouldReportAppUsage().getValue() ? "1" : "0") << newLine + << "#endif" << newLine << newLine << newLine << "// END SECTION A" << newLine << newLine @@ -425,27 +437,7 @@ private: << String::repeatedString (" ", longestName + 5 - m->getID().length()) << " 1" << newLine; } - out << newLine; - - { - int isStandaloneApplication = 1; - const ProjectType& type = project.getProjectType(); - - if (type.isAudioPlugin() || type.isDynamicLibrary()) - isStandaloneApplication = 0; - - // Fabian TODO - out << "//==============================================================================" << newLine - << "#ifndef JUCE_STANDALONE_APPLICATION" << newLine - << " #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone)" << newLine - << " #define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone" << newLine - << " #else" << newLine - << " #define JUCE_STANDALONE_APPLICATION " << isStandaloneApplication << newLine - << " #endif" << newLine - << "#endif" << newLine - << newLine - << "#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1" << newLine; - } + out << newLine << "#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1" << newLine; for (int j = 0; j < modules.size(); ++j) { @@ -474,7 +466,7 @@ private: else if (value == Project::configFlagDisabled) out << " #define " << f->symbol << " 0"; else if (f->defaultValue.isEmpty()) - out << " //#define " << f->symbol; + out << " //#define " << f->symbol << " 1"; else out << " #define " << f->symbol << " " << f->defaultValue; @@ -485,6 +477,23 @@ private: } } + { + int isStandaloneApplication = 1; + const ProjectType& type = project.getProjectType(); + + if (type.isAudioPlugin() || type.isDynamicLibrary()) + isStandaloneApplication = 0; + + out << "//==============================================================================" << newLine + << "#ifndef JUCE_STANDALONE_APPLICATION" << newLine + << " #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone)" << newLine + << " #define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone" << newLine + << " #else" << newLine + << " #define JUCE_STANDALONE_APPLICATION " << isStandaloneApplication << newLine + << " #endif" << newLine + << "#endif" << newLine; + } + if (extraAppConfigContent.isNotEmpty()) out << newLine << extraAppConfigContent.trimEnd() << newLine; } diff --git a/extras/Projucer/Source/Project/jucer_ConfigTree_Base.h b/extras/Projucer/Source/Project/jucer_ConfigTree_Base.h index 512010188d..cc9cb29728 100644 --- a/extras/Projucer/Source/Project/jucer_ConfigTree_Base.h +++ b/extras/Projucer/Source/Project/jucer_ConfigTree_Base.h @@ -28,24 +28,11 @@ class InfoButton : public Button { public: - InfoButton (PropertyComponent& comp) - : Button (String()), - associatedComponent (comp) + InfoButton (const String& infoToDisplay = String()) + : Button (String()) { - tooltip = associatedComponent.getTooltip(); - auto stringWidth = Font (14.0f).getStringWidthFloat (tooltip); - - int maxWidth = 300; - - if (stringWidth > maxWidth) - { - width = maxWidth; - numLines += static_cast (stringWidth / width); - } - else - { - width = roundToInt (stringWidth); - } + if (infoToDisplay.isNotEmpty()) + setInfoToDisplay (infoToDisplay); } void paintButton (Graphics& g, bool isMouseOverButton, bool isButtonDown) override @@ -64,23 +51,38 @@ public: void clicked() override { - auto* w = new InfoWindow (tooltip); + auto* w = new InfoWindow (info); w->setSize (width, w->getHeight() * numLines + 10); CallOutBox::launchAsynchronously (w, getScreenBounds(), nullptr); } - PropertyComponent& associatedComponent; + void setInfoToDisplay (const String& infoToDisplay) + { + if (infoToDisplay.isNotEmpty()) + { + info = infoToDisplay; + + auto stringWidth = roundToInt (Font (14.0f).getStringWidthFloat (info)); + width = jmin (300, stringWidth); + + numLines += static_cast (stringWidth / width); + } + } + + void setAssociatedComponent (Component* comp) { associatedComponent = comp; } + Component* getAssociatedComponent() { return associatedComponent; } private: - String tooltip; + String info; + Component* associatedComponent = nullptr; int width; int numLines = 1; //============================================================================== struct InfoWindow : public Component { - InfoWindow (String s) + InfoWindow (const String& s) : stringToDisplay (s) { setSize (150, 14); @@ -125,7 +127,8 @@ public: if (! prop->getTooltip().isEmpty()) { - addAndMakeVisible (infoButtons.add (new InfoButton (*prop))); + addAndMakeVisible (infoButtons.add (new InfoButton (prop->getTooltip()))); + infoButtons.getLast()->setAssociatedComponent (prop); prop->setTooltip (String()); // set the tooltip to empty so it only displays when its button is clicked } } @@ -145,7 +148,7 @@ public: InfoButton* buttonToUse = nullptr; for (auto* b : infoButtons) - if (&b->associatedComponent == pp) + if (b->getAssociatedComponent() == pp) buttonToUse = b; if (buttonToUse != nullptr) @@ -189,11 +192,12 @@ public: if (pp->getName() == "Dependencies") return; - if (auto* propertyChild = pp->getChildComponent (0)) + for (int i = pp->getNumChildComponents() - 1; i >= 0; --i) { - auto bounds = propertyChild->getBounds(); + auto* child = pp->getChildComponent (i); - propertyChild->setBounds (bounds.withSizeKeepingCentre (propertyChild->getWidth(), pp->getPreferredHeight())); + auto bounds = child->getBounds(); + child->setBounds (bounds.withSizeKeepingCentre (child->getWidth(), pp->getPreferredHeight())); } } diff --git a/extras/Projucer/Source/Project/jucer_ConfigTree_Modules.h b/extras/Projucer/Source/Project/jucer_ConfigTree_Modules.h index e4d08513a8..bd57571de6 100644 --- a/extras/Projucer/Source/Project/jucer_ConfigTree_Modules.h +++ b/extras/Projucer/Source/Project/jucer_ConfigTree_Modules.h @@ -39,10 +39,11 @@ public: String getRenamingName() const override { return getDisplayName(); } void setName (const String&) override {} bool isMissing() const override { return hasMissingDependencies(); } + bool hasWarnings() const override { return hasHigherCppStandardThanProject(); } void showDocument() override { - showSettingsPage (new ModuleSettingsPanel (project, moduleID)); + showSettingsPage (new ModuleSettingsPanel (project, moduleID, getOwnerView())); } void deleteItem() override @@ -93,46 +94,93 @@ private: return project.getModules().getExtraDependenciesNeeded (moduleID).size() > 0; } + bool hasHigherCppStandardThanProject() const + { + return project.getModules().doesModuleHaveHigherCppStandardThanProject (moduleID); + } + //============================================================================== - class ModuleSettingsPanel : public Component + class ModuleSettingsPanel : public Component, + private Value::Listener { public: - ModuleSettingsPanel (Project& p, const String& modID) - : group (p.getModules().getModuleInfo (modID).getID(), Icon (getIcons().singleModule, Colours::transparentBlack)), + ModuleSettingsPanel (Project& p, const String& modID, TreeView* tree) + : group (p.getModules().getModuleInfo (modID).getID(), + Icon (getIcons().singleModule, Colours::transparentBlack)), project (p), + modulesTree (tree), moduleID (modID) { + defaultJuceModulePathValue.referTo (getAppSettings().getStoredPath (Ids::defaultJuceModulePath)); + defaultUserModulePathValue.referTo (getAppSettings().getStoredPath (Ids::defaultUserModulePath)); + + defaultJuceModulePathValue.addListener (this); + defaultUserModulePathValue.addListener (this); + addAndMakeVisible (group); refresh(); } void refresh() { - setEnabled (project.getModules().isModuleEnabled (moduleID)); + auto& modules = project.getModules(); + const auto& isUsingGlobalPathValue = modules.shouldUseGlobalPath (moduleID); + + setEnabled (modules.isModuleEnabled (moduleID)); PropertyListBuilder props; props.add (new ModuleInfoComponent (project, moduleID)); - if (project.getModules().getExtraDependenciesNeeded (moduleID).size() > 0) + if (modules.getExtraDependenciesNeeded (moduleID).size() > 0) props.add (new MissingDependenciesComponent (project, moduleID)); - for (Project::ExporterIterator exporter (project); exporter.next();) - props.add (new FilePathPropertyComponent (exporter->getPathForModuleValue (moduleID), - "Path for " + exporter->getName().quoted(), - true, "*", project.getProjectFolder()), - "A path to the folder that contains the " + moduleID + " module when compiling the " - + exporter->getName().quoted() + " target. " - "This can be an absolute path, or relative to the jucer project folder, but it " - "must be valid on the filesystem of the target machine that will be performing this build."); + if (modules.doesModuleHaveHigherCppStandardThanProject (moduleID)) + props.add (new CppStandardWarningComponent()); - props.add (new BooleanPropertyComponent (project.getModules().shouldCopyModuleFilesLocally (moduleID), + modulePathValueSources.clear(); + + for (Project::ExporterIterator exporter (project); exporter.next();) + { + auto key = modules.isJuceModule (moduleID) ? Ids::defaultJuceModulePath + : Ids::defaultUserModulePath; + + Value src (modulePathValueSources.add (new DependencyPathValueSource (exporter->getPathForModuleValue (moduleID), + key, exporter->getTargetOSForExporter()))); + + auto* pathComponent = new DependencyFilePathPropertyComponent (src, "Path for " + exporter->getName().quoted(), + true, "*", project.getProjectFolder()); + + props.add (pathComponent, + "A path to the folder that contains the " + moduleID + " module when compiling the " + + exporter->getName().quoted() + " target. " + "This can be an absolute path, or relative to the jucer project folder, but it " + "must be valid on the filesystem of the target machine that will be performing this build. If this " + "is empty then the global path will be used."); + + pathComponent->setEnabled (! isUsingGlobalPathValue.getValue()); + pathComponent->getValue().addListener (this); + } + + globalPathValue.referTo (isUsingGlobalPathValue); + + auto menuItemString = (TargetOS::getThisOS() == TargetOS::osx ? "\"Projucer->Global Search Paths...\"" + : "\"File->Global Search Paths...\""); + + props.add (new BooleanPropertyComponent (globalPathValue, + "Use global path", "Use global path for this module"), + String ("If this is enabled, then the locally-stored global path (set in the ") + menuItemString + " menu item) " + "will be used as the path to this module. " + "This means that if this Projucer project is opened on another machine it will use that machine's global path as the path to this module."); + globalPathValue.addListener (this); + + props.add (new BooleanPropertyComponent (modules.shouldCopyModuleFilesLocally (moduleID), "Create local copy", "Copy the module into the project folder"), "If this is enabled, then a local copy of the entire module will be made inside your project (in the auto-generated JuceLibraryFiles folder), " "so that your project will be self-contained, and won't need to contain any references to files in other folders. " "This also means that you can check the module into your source-control system to make sure it is always in sync with your own code."); - props.add (new BooleanPropertyComponent (project.getModules().shouldShowAllModuleFilesInProject (moduleID), + props.add (new BooleanPropertyComponent (modules.shouldShowAllModuleFilesInProject (moduleID), "Add source to project", "Make module files browsable in projects"), "If this is enabled, then the entire source tree from this module will be shown inside your project, " "making it easy to browse/edit the module's classes. If disabled, then only the minimum number of files " @@ -148,7 +196,7 @@ private: mappings.add (Project::configFlagEnabled); mappings.add (Project::configFlagDisabled); - ModuleDescription info (project.getModules().getModuleInfo (moduleID)); + ModuleDescription info (modules.getModuleInfo (moduleID)); if (info.isValid()) { @@ -176,7 +224,30 @@ private: private: PropertyGroupComponent group; Project& project; + SafePointer modulesTree; String moduleID; + Value globalPathValue; + Value defaultJuceModulePathValue, defaultUserModulePathValue; + + ReferenceCountedArray modulePathValueSources; + + //============================================================================== + void valueChanged (Value& v) override + { + if (v == globalPathValue) + { + auto useGlobalPath = globalPathValue.getValue(); + + for (auto prop : group.properties) + { + if (auto* pathPropertyComponent = dynamic_cast (prop)) + pathPropertyComponent->setEnabled (! useGlobalPath); + } + } + + if (auto* moduleInfo = dynamic_cast (group.properties.getUnchecked (0))) + moduleInfo->refresh(); + } //============================================================================== class ModuleInfoComponent : public PropertyComponent, @@ -193,13 +264,13 @@ private: refresh(); } - private: void refresh() override { info = project.getModules().getModuleInfo (moduleID); repaint(); } + private: void paint (Graphics& g) override { auto bounds = getLocalBounds().reduced (10); @@ -207,15 +278,17 @@ private: if (info.isValid()) { - auto topSlice = bounds.removeFromTop (bounds.getHeight() / 3); + auto topSlice = bounds.removeFromTop (bounds.getHeight() / 2); bounds.removeFromTop (bounds.getHeight() / 6); auto bottomSlice = bounds; g.setColour (findColour (defaultTextColourId)); - g.drawFittedText (info.getName(), topSlice.removeFromTop (topSlice.getHeight() / 3), Justification::centredLeft, 1); - g.drawFittedText ("Version: " + info.getVersion(), topSlice.removeFromTop (topSlice.getHeight() / 2), Justification::centredLeft, 1); - g.drawFittedText ("License: " + info.getLicense(), topSlice.removeFromTop (topSlice.getHeight()), Justification::centredLeft, 1); + g.drawFittedText (info.getName(), topSlice.removeFromTop (topSlice.getHeight() / 4), Justification::centredLeft, 1); + g.drawFittedText ("Version: " + info.getVersion(), topSlice.removeFromTop (topSlice.getHeight() / 3), Justification::centredLeft, 1); + g.drawFittedText ("License: " + info.getLicense(), topSlice.removeFromTop (topSlice.getHeight() / 2), Justification::centredLeft, 1); + g.drawFittedText ("Location: " + info.getFolder().getParentDirectory().getFullPathName(), + topSlice.removeFromTop (topSlice.getHeight()), Justification::centredLeft, 1); g.drawFittedText (info.getDescription(), bottomSlice, Justification::topLeft, 3, 1.0f); } @@ -265,32 +338,36 @@ private: text << missingDependencies.joinIntoString (", "); g.setColour (Colours::red); - g.drawFittedText (text, getLocalBounds().reduced (4, 16), Justification::topLeft, 3); + g.drawFittedText (text, getLocalBounds().reduced (10), Justification::topLeft, 3); } void buttonClicked (Button*) override { - bool anyFailed = false; - ModuleList list; - list.scanAllKnownFolders (project); - for (int i = missingDependencies.size(); --i >= 0;) + list.scanGlobalJuceModulePath(); + + if (! tryToFix (list)) { - if (const ModuleDescription* info = list.getModuleWithID (missingDependencies[i])) - project.getModules().addModule (info->moduleFolder, project.getModules().areMostModulesCopiedLocally()); - else - anyFailed = true; + list.scanGlobalUserModulePath(); + + if (! tryToFix (list)) + { + list.scanProjectExporterModulePaths (project); + + if (! tryToFix (list)) + { + AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, + "Adding Missing Dependencies", + "Couldn't locate some of these modules - you'll need to find their " + "folders manually and add them to the list."); + + return; + } + } } - if (ModuleSettingsPanel* p = findParentComponentOfClass()) - p->refresh(); - - if (anyFailed) - AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, - "Adding Missing Dependencies", - "Couldn't locate some of these modules - you'll need to find their " - "folders manually and add them to the list."); + refreshAndReselectItem(); } void resized() override @@ -304,8 +381,78 @@ private: StringArray missingDependencies; TextButton fixButton; + bool tryToFix (ModuleList& list) + { + auto& modules = project.getModules(); + auto copyLocally = modules.areMostModulesCopiedLocally(); + auto useGlobalPath = modules.areMostModulesUsingGlobalPath(); + + StringArray missing; + + for (auto missingModule : missingDependencies) + { + if (auto* info = list.getModuleWithID (missingModule)) + modules.addModule (info->moduleFolder, copyLocally, useGlobalPath); + else + missing.add (missingModule); + } + + missingDependencies.swapWith (missing); + return (missingDependencies.size() == 0); + } + + void refreshAndReselectItem() + { + if (auto* settingsPanel = findParentComponentOfClass()) + { + if (settingsPanel->modulesTree == nullptr) + return; + + auto* rootItem = settingsPanel->modulesTree->getRootItem(); + + if (rootItem == nullptr) + return; + + for (auto i = 0; i < rootItem->getNumSubItems(); ++i) + { + if (auto* subItem = dynamic_cast (rootItem->getSubItem (i))) + { + if (subItem->getDisplayName() == moduleID) + { + subItem->setSelected (true, true); + return; + } + } + } + } + } + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MissingDependenciesComponent) }; + + //============================================================================== + struct CppStandardWarningComponent : public PropertyComponent + { + CppStandardWarningComponent() + : PropertyComponent ("CppStandard", 100) + { + } + + void refresh() override {} + + void paint (Graphics& g) override + { + auto text = String ("This module has a higher C++ language standard requirement than your project!\n\n" + "To use this module you need to increase the C++ standard of the project.\n"); + + g.setColour (findColour (defaultHighlightColourId)); + g.drawFittedText (text, getLocalBounds().reduced (10), Justification::topLeft, 3); + } + + StringArray configsToWarnAbout; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CppStandardWarningComponent) + }; }; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ModuleItem) @@ -370,7 +517,8 @@ public: for (int i = 0; i < modules.size(); ++i) project.getModules().addModule (modules.getReference(i).moduleFolder, - project.getModules().areMostModulesCopiedLocally()); + project.getModules().areMostModulesCopiedLocally(), + project.getModules().areMostModulesUsingGlobalPath()); } void addSubItems() override @@ -381,12 +529,28 @@ public: void showPopupMenu() override { - PopupMenu menu, knownModules, copyModeMenu; + auto& modules = project.getModules(); + PopupMenu knownModules, jucePathModules, userPathModules, exporterPathsModules; - const StringArray modules (getAvailableModules()); - for (int i = 0; i < modules.size(); ++i) - knownModules.addItem (1 + i, modules[i], ! project.getModules().isModuleEnabled (modules[i])); + auto index = 100; + for (auto m : getAvailableModulesInGlobalJucePath()) + jucePathModules.addItem (index++, m, ! modules.isModuleEnabled (m)); + knownModules.addSubMenu ("Global JUCE modules path", jucePathModules); + + index = 200; + for (auto m : getAvailableModulesInGlobalUserPath()) + userPathModules.addItem (index++, m, ! modules.isModuleEnabled (m)); + + knownModules.addSubMenu ("Global user modules path", userPathModules); + + index = 300; + for (auto m : getAvailableModulesInExporterPaths()) + exporterPathsModules.addItem (index++, m, ! modules.isModuleEnabled (m)); + + knownModules.addSubMenu ("Exporter paths", exporterPathsModules); + + PopupMenu menu; menu.addSubMenu ("Add a module", knownModules); menu.addSeparator(); menu.addItem (1001, "Add a module from a specified folder..."); @@ -396,19 +560,67 @@ public: void handlePopupMenuResult (int resultCode) override { + auto& modules = project.getModules(); + if (resultCode == 1001) - project.getModules().addModuleFromUserSelectedFile(); + { + modules.addModuleFromUserSelectedFile(); + } else if (resultCode > 0) - project.getModules().addModuleInteractive (getAvailableModules() [resultCode - 1]); + { + if (resultCode < 200) + modules.addModuleInteractive (getAvailableModulesInGlobalJucePath() [resultCode - 100]); + else if (resultCode < 300) + modules.addModuleInteractive (getAvailableModulesInGlobalUserPath() [resultCode - 200]); + else if (resultCode < 400) + modules.addModuleInteractive (getAvailableModulesInExporterPaths() [resultCode - 300]); + } } - StringArray getAvailableModules() + StringArray getAvailableModulesInGlobalJucePath() { ModuleList list; - list.scanAllKnownFolders (project); + list.addAllModulesInFolder ({ getAppSettings().getStoredPath (Ids::defaultJuceModulePath).toString() }); + return list.getIDs(); } + StringArray getAvailableModulesInGlobalUserPath() + { + ModuleList list; + auto paths = StringArray::fromTokens (getAppSettings().getStoredPath (Ids::defaultUserModulePath).toString(), ";", {}); + + for (auto p : paths) + { + auto f = File::createFileWithoutCheckingPath (p.trim()); + if (f.exists()) + list.addAllModulesInFolder (f); + } + + auto ids = list.getIDs(); + + for (auto m : getAvailableModulesInGlobalJucePath()) + ids.removeString (m); + + return ids; + } + + StringArray getAvailableModulesInExporterPaths() + { + ModuleList list; + list.scanProjectExporterModulePaths (project); + + auto ids = list.getIDs(); + + for (auto m : getAvailableModulesInGlobalJucePath()) + ids.removeString (m); + + for (auto m : getAvailableModulesInGlobalUserPath()) + ids.removeString (m); + + return ids; + } + //============================================================================== void valueTreeChildAdded (ValueTree& parentTree, ValueTree&) override { refreshIfNeeded (parentTree); } void valueTreeChildRemoved (ValueTree& parentTree, ValueTree&, int) override { refreshIfNeeded (parentTree); } diff --git a/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp b/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp index 5dc2f9a675..e5e4433502 100644 --- a/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp +++ b/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp @@ -26,8 +26,6 @@ #include "../jucer_Headers.h" #include "jucer_DependencyPathPropertyComponent.h" -#include "../Application/jucer_GlobalPreferences.h" - //============================================================================== DependencyPathValueSource::DependencyPathValueSource (const Value& projectSettingsPath, @@ -36,10 +34,11 @@ DependencyPathValueSource::DependencyPathValueSource (const Value& projectSettin : projectSettingsValue (projectSettingsPath), globalKey (globalSettingsKey), os (osThisSettingAppliesTo), - globalSettingsValue (getAppSettings().getGlobalPath (globalKey, os)), - fallbackValue (getAppSettings().getFallbackPath (globalKey, os)) + globalSettingsValue (getAppSettings().getStoredPath (globalKey)), + fallbackValue (getAppSettings().getFallbackPathForOS (globalKey, os)) { globalSettingsValue.addListener (this); + fallbackValue.addListener (this); } bool DependencyPathValueSource::isValidPath (const File& relativeTo) const @@ -135,3 +134,153 @@ void DependencyPathPropertyComponent::lookAndFeelChanged() { textWasEdited(); } + +//============================================================================== +DependencyFilePathPropertyComponent::DependencyFilePathPropertyComponent (Value& value, + const String& propertyDescription, + bool isDir, + const String& wc, + const File& rootToUseForRelativePaths) +try : TextPropertyComponent (propertyDescription, 1024, false), + pathRelativeTo (rootToUseForRelativePaths), + pathValue (value), + pathValueSource (dynamic_cast (pathValue.getValueSource())), + browseButton ("..."), + isDirectory (isDir), + wildcards (wc) +{ + auto initialValueIsEmpty = ! pathValueSource.isUsingProjectSettings(); + + getValue().referTo (pathValue); + + if (initialValueIsEmpty) + getValue().setValue (String()); + + getValue().addListener (this); + + if (auto* label = dynamic_cast (getChildComponent (0))) + label->addListener (this); + else + jassertfalse; + + setInterestedInFileDrag (false); + + addAndMakeVisible (browseButton); + browseButton.addListener (this); + + lookAndFeelChanged(); +} +catch (const std::bad_cast&) +{ + // a DependencyPathPropertyComponent must be initialised with a Value + // that is referring to a DependencyPathValueSource! + jassertfalse; + throw; +} + +void DependencyFilePathPropertyComponent::resized() +{ + auto bounds = getLookAndFeel().getPropertyComponentContentPosition (*this); + + browseButton.setBounds (bounds.removeFromRight (30)); + getChildComponent (0)->setBounds (bounds); +} + +void DependencyFilePathPropertyComponent::paintOverChildren (Graphics& g) +{ + if (highlightForDragAndDrop) + { + g.setColour (findColour (defaultHighlightColourId).withAlpha (0.5f)); + g.fillRect (getChildComponent (0)->getBounds()); + } +} + +void DependencyFilePathPropertyComponent::filesDropped (const StringArray& files, int, int) +{ + const File firstFile (files[0]); + + if (isDirectory) + setTo (firstFile.isDirectory() ? firstFile + : firstFile.getParentDirectory()); + else + setTo (firstFile); + + highlightForDragAndDrop = false; +} + +void DependencyFilePathPropertyComponent::setTo (const File& f) +{ + pathValue = (pathRelativeTo == File()) ? f.getFullPathName() + : f.getRelativePathFrom (pathRelativeTo); + + textWasEdited(); +} + +void DependencyFilePathPropertyComponent::enablementChanged() +{ + getValue().referTo (isEnabled() ? pathValue + : pathValueSource.appliesToThisOS() ? pathValueSource.getGlobalSettingsValue() + : pathValueSource.getFallbackSettingsValue()); + textWasEdited(); + repaint(); +} + +void DependencyFilePathPropertyComponent::textWasEdited() +{ + setColour (textColourId, getTextColourToDisplay()); + TextPropertyComponent::textWasEdited(); +} + +void DependencyFilePathPropertyComponent::valueChanged (Value& value) +{ + if ((value.refersToSameSourceAs (pathValue) && pathValueSource.isUsingGlobalSettings()) + || value.refersToSameSourceAs (pathValueSource.getGlobalSettingsValue())) + textWasEdited(); +} + +void DependencyFilePathPropertyComponent::editorShown (Label*, TextEditor& editor) +{ + if (! pathValueSource.isUsingProjectSettings()) + editor.setText (String(), dontSendNotification); +} + +void DependencyFilePathPropertyComponent::buttonClicked (Button*) +{ + auto currentFile = pathRelativeTo.getChildFile (pathValue.toString()); + + if (isDirectory) + { + FileChooser chooser ("Select directory", currentFile); + + if (chooser.browseForDirectory()) + setTo (chooser.getResult()); + } + else + { + FileChooser chooser ("Select file", currentFile, wildcards); + + if (chooser.browseForFileToOpen()) + setTo (chooser.getResult()); + } +} + +Colour DependencyFilePathPropertyComponent::getTextColourToDisplay() const +{ + auto alpha = 1.0f; + auto key = pathValueSource.getKey(); + const auto& globalSettingsValue = pathValueSource.getGlobalSettingsValue(); + + if (! pathValueSource.isUsingProjectSettings() && isEnabled()) + alpha = 0.5f; + + if ((key == Ids::defaultUserModulePath && getValue().toString().contains (";")) || ! pathValueSource.appliesToThisOS()) + return findColour (widgetTextColourId).withMultipliedAlpha (alpha); + + auto usingGlobalPath = (getValue().refersToSameSourceAs (globalSettingsValue)); + + auto isValidPath = getAppSettings().isGlobalPathValid (pathRelativeTo, key, + (usingGlobalPath ? globalSettingsValue : pathValue).toString()); + + return isValidPath ? findColour (widgetTextColourId).withMultipliedAlpha (alpha) + : Colours::red.withMultipliedAlpha (alpha); +} diff --git a/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.h b/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.h index dfbba807ea..91273e4071 100644 --- a/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.h +++ b/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.h @@ -52,7 +52,7 @@ public: if (isUsingGlobalSettings()) return globalSettingsValue.getValue(); - return fallbackValue; + return fallbackValue.getValue(); } void setValue (const var& newValue) override @@ -75,7 +75,7 @@ public: bool isUsingFallbackValue() const { - return ! projectSettingsValueIsValid() && !globalSettingsValueIsValid(); + return ! projectSettingsValueIsValid() && ! globalSettingsValueIsValid(); } bool appliesToThisOS() const @@ -87,10 +87,16 @@ public: bool isValidPath() const; + Identifier getKey() { return globalKey; } + + Value getGlobalSettingsValue() { return globalSettingsValue; } + Value getFallbackSettingsValue() { return fallbackValue; } + private: void valueChanged (Value& value) override { - if ((value.refersToSameSourceAs (globalSettingsValue) && isUsingGlobalSettings())) + if ((value.refersToSameSourceAs (globalSettingsValue) && isUsingGlobalSettings()) + || (value.refersToSameSourceAs (fallbackValue) && isUsingFallbackValue())) { sendChangeMessage (true); setValue (String()); // make sure that the project-specific value is still blank @@ -136,7 +142,7 @@ private: /** the dependency path fallback setting. used instead of the global setting whenever the latter doesn't apply, e.g. the setting is for another OS than the ome this machine is running. */ - String fallbackValue; + Value fallbackValue; }; @@ -181,3 +187,84 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DependencyPathPropertyComponent) }; + +//============================================================================== +class DependencyFilePathPropertyComponent : public TextPropertyComponent, + public FileDragAndDropTarget, + private Value::Listener, + private Label::Listener, + private Button::Listener +{ +public: + DependencyFilePathPropertyComponent (Value& value, + const String& propertyDescription, + bool isDirectory, + const String& wildcards = "*", + const File& rootToUseForRelativePaths = File()); + + void resized() override; + void paintOverChildren (Graphics& g) override; + + bool isInterestedInFileDrag (const StringArray&) override { return isEnabled(); } + void fileDragEnter (const StringArray&, int, int) override { highlightForDragAndDrop = true; repaint(); } + void fileDragExit (const StringArray&) override { highlightForDragAndDrop = false; repaint(); } + void filesDropped (const StringArray&, int, int) override; + + void setTo (const File& f); + + void enablementChanged() override; + +private: + void textWasEdited() override; + + void valueChanged (Value&) override; + + void labelTextChanged (Label*) override {} + void editorHidden (Label*, TextEditor&) override {} + void editorShown (Label*, TextEditor&) override; + + void buttonClicked (Button*) override; + + void lookAndFeelChanged() override + { + browseButton.setColour (TextButton::buttonColourId, + findColour (secondaryButtonBackgroundColourId)); + textWasEdited(); + } + + Colour getTextColourToDisplay() const; + + //========================================================================== + File pathRelativeTo; + Value pathValue; + DependencyPathValueSource& pathValueSource; + + TextButton browseButton; + bool isDirectory, highlightForDragAndDrop = false; + String wildcards; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DependencyFilePathPropertyComponent) +}; + +//============================================================================== +class TextPropertyComponentWithEnablement : public TextPropertyComponent, + private Value::Listener +{ +public: + TextPropertyComponentWithEnablement (const Value& valueToControl, const Value& valueToListenTo, + const String& propertyName, int maxNumChars, bool isMultiLine) + : TextPropertyComponent (valueToControl, propertyName, maxNumChars, isMultiLine), + value (valueToListenTo) + { + value.addListener (this); + setEnabled (value.getValue()); + } + +private: + Value value; + + void valueChanged (Value& v) override + { + setEnabled (v.getValue()); + } +}; diff --git a/extras/Projucer/Source/Project/jucer_Module.cpp b/extras/Projucer/Source/Project/jucer_Module.cpp index 777ecab675..2930771777 100644 --- a/extras/Projucer/Source/Project/jucer_Module.cpp +++ b/extras/Projucer/Source/Project/jucer_Module.cpp @@ -209,15 +209,23 @@ Result ModuleList::addAllModulesInSubfoldersRecursively (const File& path, int d return Result::ok(); } -static Array getAllPossibleModulePaths (Project& project) +static Array getAllPossibleModulePathsFromExporters (Project& project) { StringArray paths; for (Project::ExporterIterator exporter (project); exporter.next();) { - for (int i = 0; i < project.getModules().getNumModules(); ++i) + auto& modules = project.getModules(); + auto n = modules.getNumModules(); + + for (int i = 0; i < n; ++i) { - const String path (exporter->getPathForModuleString (project.getModules().getModuleID (i))); + auto id = modules.getModuleID (i); + + if (modules.shouldUseGlobalPath (id).getValue()) + continue; + + const auto path = exporter->getPathForModuleString (id); if (path.isNotEmpty()) paths.addIfNotAlreadyThere (path); @@ -237,7 +245,7 @@ static Array getAllPossibleModulePaths (Project& project) if (f.isDirectory()) { - files.add (f); + files.addIfNotAlreadyThere (f); if (f.getChildFile ("modules").isDirectory()) files.addIfNotAlreadyThere (f.getChildFile ("modules")); @@ -247,12 +255,12 @@ static Array getAllPossibleModulePaths (Project& project) return files; } -Result ModuleList::scanAllKnownFolders (Project& project) +Result ModuleList::scanProjectExporterModulePaths (Project& project) { modules.clear(); Result result (Result::ok()); - for (auto& m : getAllPossibleModulePaths (project)) + for (auto& m : getAllPossibleModulePathsFromExporters (project)) { result = addAllModulesInFolder (m); @@ -264,6 +272,36 @@ Result ModuleList::scanAllKnownFolders (Project& project) return result; } +void ModuleList::scanGlobalJuceModulePath() +{ + modules.clear(); + + auto& settings = getAppSettings(); + + auto path = settings.getStoredPath (Ids::defaultJuceModulePath).toString(); + + if (path.isNotEmpty()) + addAllModulesInFolder ({ path }); + + sort(); +} + +void ModuleList::scanGlobalUserModulePath() +{ + modules.clear(); + + auto paths = StringArray::fromTokens (getAppSettings().getStoredPath (Ids::defaultUserModulePath).toString(), ";", {}); + + for (auto p : paths) + { + auto f = File::createFileWithoutCheckingPath (p.trim()); + if (f.exists()) + addAllModulesInFolder (f); + } + + sort(); +} + //============================================================================== LibraryModule::LibraryModule (const ModuleDescription& d) : moduleInfo (d) @@ -318,12 +356,13 @@ void LibraryModule::addSettingsForModuleToExporter (ProjectExporter& exporter, P libDirPlatform = exporter.getTargetFolder().getFileName(); const auto libSubdirPath = String (moduleRelativePath.toUnixStyle() + "/libs/") + libDirPlatform; - const auto moduleLibDir = File (project.getProjectFolder().getFullPathName() + "/" + libSubdirPath); + if (moduleLibDir.exists()) exporter.addToModuleLibPaths (RelativePath (libSubdirPath, moduleRelativePath.getRoot())); const auto extraInternalSearchPaths = moduleInfo.getExtraSearchPaths().trim(); + if (extraInternalSearchPaths.isNotEmpty()) { StringArray paths; @@ -342,14 +381,16 @@ void LibraryModule::addSettingsForModuleToExporter (ProjectExporter& exporter, P { Array compiled; + auto& modules = project.getModules(); + auto id = getID(); - const File localModuleFolder = project.getModules().shouldCopyModuleFilesLocally (getID()).getValue() - ? project.getLocalModuleFolder (getID()) + const File localModuleFolder = modules.shouldCopyModuleFilesLocally (id).getValue() + ? project.getLocalModuleFolder (id) : moduleInfo.getFolder(); findAndAddCompiledUnits (exporter, &projectSaver, compiled); - if (project.getModules().shouldShowAllModuleFilesInProject (getID()).getValue()) + if (modules.shouldShowAllModuleFilesInProject (id).getValue()) addBrowseableCode (exporter, compiled, localModuleFolder); } @@ -377,6 +418,10 @@ void LibraryModule::addSettingsForModuleToExporter (ProjectExporter& exporter, P else parseAndAddLibs (exporter.windowsLibs, moduleInfo.moduleInfo ["windowsLibs"].toString()); } + else if (exporter.isAndroid()) + { + parseAndAddLibs (exporter.androidLibs, moduleInfo.moduleInfo ["androidLibs"].toString()); + } } void LibraryModule::getConfigFlags (Project& project, OwnedArray& flags) const @@ -606,35 +651,51 @@ bool EnabledModuleList::isAudioPluginModuleMissing() const && ! isModuleEnabled ("juce_audio_plugin_client"); } +Value EnabledModuleList::shouldUseGlobalPath (const String& moduleID) const +{ + return state.getChildWithProperty (Ids::ID, moduleID) + .getPropertyAsValue (Ids::useGlobalPath, getUndoManager()); +} + Value EnabledModuleList::shouldShowAllModuleFilesInProject (const String& moduleID) { return state.getChildWithProperty (Ids::ID, moduleID) .getPropertyAsValue (Ids::showAllCode, getUndoManager()); } -File EnabledModuleList::findLocalModuleFolder (const String& moduleID, bool useExportersForOtherOSes) +File EnabledModuleList::getModuleFolderFromPathIfItExists (const String& path, const String& moduleID, const Project& project) { - for (Project::ExporterIterator exporter (project); exporter.next();) + if (path.isNotEmpty()) { - if (useExportersForOtherOSes || exporter->mayCompileOnCurrentOS()) + auto moduleFolder = project.resolveFilename (path); + + if (moduleFolder.exists()) { - auto path = exporter->getPathForModuleString (moduleID); + if (ModuleDescription (moduleFolder).isValid()) + return moduleFolder; - if (path.isNotEmpty()) - { - auto moduleFolder = project.resolveFilename (path); + auto f = moduleFolder.getChildFile (moduleID); - if (moduleFolder.exists()) - { - if (ModuleDescription (moduleFolder).isValid()) - return moduleFolder; + if (ModuleDescription (f).isValid()) + return f; + } + } - auto f = moduleFolder.getChildFile (moduleID); + return {}; +} - if (ModuleDescription (f).isValid()) - return f; - } - } +File EnabledModuleList::findUserModuleFolder (const String& possiblePaths, const String& moduleID) +{ + auto paths = StringArray::fromTokens (possiblePaths, ";", {}); + + for (auto p : paths) + { + auto f = File::createFileWithoutCheckingPath (p.trim()); + if (f.exists()) + { + auto moduleFolder = getModuleFolderFromPathIfItExists (f.getFullPathName(), moduleID, project); + if (moduleFolder != File()) + return moduleFolder; } } @@ -643,12 +704,23 @@ File EnabledModuleList::findLocalModuleFolder (const String& moduleID, bool useE File EnabledModuleList::getModuleFolder (const String& moduleID) { - File f = findLocalModuleFolder (moduleID, false); + if (shouldUseGlobalPath (moduleID).getValue()) + { + if (isJuceModule (moduleID)) + return getModuleFolderFromPathIfItExists (getAppSettings().getStoredPath (Ids::defaultJuceModulePath).toString(), moduleID, project); - if (f == File()) - f = findLocalModuleFolder (moduleID, true); + return findUserModuleFolder (moduleID, getAppSettings().getStoredPath (Ids::defaultUserModulePath).toString()); + } - return f; + auto paths = getAllPossibleModulePathsFromExporters (project); + for (auto p : paths) + { + auto f = getModuleFolderFromPathIfItExists (p.getFullPathName(), moduleID, project); + if (f != File()) + return f; + } + + return {}; } struct ModuleTreeSorter @@ -671,7 +743,7 @@ Value EnabledModuleList::shouldCopyModuleFilesLocally (const String& moduleID) c .getPropertyAsValue (Ids::useLocalCopy, getUndoManager()); } -void EnabledModuleList::addModule (const File& moduleFolder, bool copyLocally) +void EnabledModuleList::addModule (const File& moduleFolder, bool copyLocally, bool useGlobalPath) { ModuleDescription info (moduleFolder); @@ -689,6 +761,7 @@ void EnabledModuleList::addModule (const File& moduleFolder, bool copyLocally) shouldShowAllModuleFilesInProject (moduleID) = true; shouldCopyModuleFilesLocally (moduleID) = copyLocally; + shouldUseGlobalPath (moduleID) = useGlobalPath; RelativePath path (moduleFolder.getParentDirectory(), project.getProjectFolder(), RelativePath::projectFolder); @@ -720,7 +793,7 @@ StringArray EnabledModuleList::getAllModules() const StringArray moduleIDs; for (int i = 0; i < getNumModules(); ++i) - moduleIDs.add (getModuleID(i)); + moduleIDs.add (getModuleID (i)); return moduleIDs; } @@ -751,11 +824,38 @@ StringArray EnabledModuleList::getExtraDependenciesNeeded (const String& moduleI return extraDepsNeeded; } +bool EnabledModuleList::doesModuleHaveHigherCppStandardThanProject (const String& moduleID) +{ + auto projectCppStandard = project.getCppStandardValue().toString(); + + if (projectCppStandard == "latest") + return false; + + auto moduleCppStandard = getModuleInfo (moduleID).getMinimumCppStandard(); + + return (moduleCppStandard.getIntValue() > projectCppStandard.getIntValue()); +} + +bool EnabledModuleList::areMostModulesUsingGlobalPath() const +{ + auto numYes = 0, numNo = 0; + + for (auto i = getNumModules(); --i >= 0;) + { + if (shouldUseGlobalPath (getModuleID (i)).getValue()) + ++numYes; + else + ++numNo; + } + + return numYes > numNo; +} + bool EnabledModuleList::areMostModulesCopiedLocally() const { - int numYes = 0, numNo = 0; + auto numYes = 0, numNo = 0; - for (int i = getNumModules(); --i >= 0;) + for (auto i = getNumModules(); --i >= 0;) { if (shouldCopyModuleFilesLocally (getModuleID (i)).getValue()) ++numYes; @@ -772,10 +872,26 @@ void EnabledModuleList::setLocalCopyModeForAllModules (bool copyLocally) shouldCopyModuleFilesLocally (project.getModules().getModuleID (i)) = copyLocally; } +File EnabledModuleList::findGlobalModulesFolder() +{ + auto& settings = getAppSettings(); + auto path = settings.getStoredPath (Ids::defaultJuceModulePath).toString(); + + if (settings.isGlobalPathValid (File(), Ids::defaultJuceModulePath, path)) + return { path }; + + return {}; +} + File EnabledModuleList::findDefaultModulesFolder (Project& project) { + auto globalPath = findGlobalModulesFolder(); + + if (globalPath != File()) + return globalPath; + ModuleList available; - available.scanAllKnownFolders (project); + available.scanProjectExporterModulePaths (project); for (int i = available.modules.size(); --i >= 0;) { @@ -788,6 +904,34 @@ File EnabledModuleList::findDefaultModulesFolder (Project& project) return File::getCurrentWorkingDirectory(); } +bool EnabledModuleList::isJuceModule (const String& moduleID) +{ + static StringArray juceModuleIds = + { + "juce_audio_basics", + "juce_audio_devices", + "juce_audio_formats", + "juce_audio_plugin_client", + "juce_audio_processors", + "juce_audio_utils", + "juce_blocks_basics", + "juce_box2d", + "juce_core", + "juce_cryptography", + "juce_data_structures", + "juce_events", + "juce_graphics", + "juce_gui_basics", + "juce_gui_extra", + "juce_opengl", + "juce_osc", + "juce_product_unlocking", + "juce_video" + }; + + return juceModuleIds.contains (moduleID); +} + void EnabledModuleList::addModuleFromUserSelectedFile() { static File lastLocation (findDefaultModulesFolder (project)); @@ -797,22 +941,36 @@ void EnabledModuleList::addModuleFromUserSelectedFile() if (fc.browseForDirectory()) { lastLocation = fc.getResult(); - addModuleOfferingToCopy (lastLocation); + addModuleOfferingToCopy (lastLocation, true); } } void EnabledModuleList::addModuleInteractive (const String& moduleID) { ModuleList list; - list.scanAllKnownFolders (project); + list.scanGlobalJuceModulePath(); if (auto* info = list.getModuleWithID (moduleID)) - addModule (info->moduleFolder, areMostModulesCopiedLocally()); + { + addModule (info->moduleFolder, areMostModulesCopiedLocally(), areMostModulesUsingGlobalPath()); + return; + } + + list.scanGlobalUserModulePath(); + if (auto* info = list.getModuleWithID (moduleID)) + { + addModule (info->moduleFolder, areMostModulesCopiedLocally(), areMostModulesUsingGlobalPath()); + return; + } + + list.scanProjectExporterModulePaths (project); + if (auto* info = list.getModuleWithID (moduleID)) + addModule (info->moduleFolder, areMostModulesCopiedLocally(), false); else addModuleFromUserSelectedFile(); } -void EnabledModuleList::addModuleOfferingToCopy (const File& f) +void EnabledModuleList::addModuleOfferingToCopy (const File& f, bool isFromUserSpecifiedFolder) { ModuleDescription m (f); @@ -830,7 +988,8 @@ void EnabledModuleList::addModuleOfferingToCopy (const File& f) return; } - addModule (m.moduleFolder, areMostModulesCopiedLocally()); + addModule (m.moduleFolder, areMostModulesCopiedLocally(), isFromUserSpecifiedFolder ? false + : areMostModulesUsingGlobalPath()); } bool isJuceFolder (const File& f) diff --git a/extras/Projucer/Source/Project/jucer_Module.h b/extras/Projucer/Source/Project/jucer_Module.h index da40406aae..a523d24a87 100644 --- a/extras/Projucer/Source/Project/jucer_Module.h +++ b/extras/Projucer/Source/Project/jucer_Module.h @@ -31,7 +31,6 @@ class ProjectExporter; class ProjectSaver; //============================================================================== -File findDefaultModulesFolder (bool mustContainJuceCoreModule = true); bool isJuceModulesFolder (const File&); bool isJuceFolder (const File&); @@ -42,22 +41,23 @@ struct ModuleDescription ModuleDescription (const File& folder); ModuleDescription (const var& info) : moduleInfo (info) {} - bool isValid() const { return getID().isNotEmpty(); } + bool isValid() const { return getID().isNotEmpty(); } - String getID() const { return moduleInfo [Ids::ID_uppercase].toString(); } - String getVendor() const { return moduleInfo [Ids::vendor].toString(); } - String getVersion() const { return moduleInfo [Ids::version].toString(); } - String getName() const { return moduleInfo [Ids::name].toString(); } - String getDescription() const { return moduleInfo [Ids::description].toString(); } - String getLicense() const { return moduleInfo [Ids::license].toString(); } - String getPreprocessorDefs() const { return moduleInfo [Ids::defines].toString(); } - String getExtraSearchPaths() const { return moduleInfo [Ids::searchpaths].toString(); } + String getID() const { return moduleInfo [Ids::ID_uppercase].toString(); } + String getVendor() const { return moduleInfo [Ids::vendor].toString(); } + String getVersion() const { return moduleInfo [Ids::version].toString(); } + String getName() const { return moduleInfo [Ids::name].toString(); } + String getDescription() const { return moduleInfo [Ids::description].toString(); } + String getLicense() const { return moduleInfo [Ids::license].toString(); } + String getMinimumCppStandard() const { return moduleInfo [Ids::minimumCppStandard].toString(); } + String getPreprocessorDefs() const { return moduleInfo [Ids::defines].toString(); } + String getExtraSearchPaths() const { return moduleInfo [Ids::searchpaths].toString(); } StringArray getDependencies() const; - File getFolder() const { jassert (moduleFolder != File()); return moduleFolder; } + File getFolder() const { jassert (moduleFolder != File()); return moduleFolder; } File getHeader() const; - bool isPluginClient() const { return getID() == "juce_audio_plugin_client"; } + bool isPluginClient() const { return getID() == "juce_audio_plugin_client"; } File moduleFolder; var moduleInfo; @@ -79,7 +79,9 @@ struct ModuleList Result addAllModulesInFolder (const File&); Result addAllModulesInSubfoldersRecursively (const File&, int depth); - Result scanAllKnownFolders (Project&); + Result scanProjectExporterModulePaths (Project&); + void scanGlobalJuceModulePath(); + void scanGlobalUserModulePath(); OwnedArray modules; }; @@ -90,15 +92,16 @@ class LibraryModule public: LibraryModule (const ModuleDescription&); - bool isValid() const { return moduleInfo.isValid(); } - String getID() const { return moduleInfo.getID(); } - String getVendor() const { return moduleInfo.getVendor(); } - String getVersion() const { return moduleInfo.getVersion(); } - String getName() const { return moduleInfo.getName(); } - String getDescription() const { return moduleInfo.getDescription(); } - String getLicense() const { return moduleInfo.getLicense(); } + bool isValid() const { return moduleInfo.isValid(); } + String getID() const { return moduleInfo.getID(); } + String getVendor() const { return moduleInfo.getVendor(); } + String getVersion() const { return moduleInfo.getVersion(); } + String getName() const { return moduleInfo.getName(); } + String getDescription() const { return moduleInfo.getDescription(); } + String getLicense() const { return moduleInfo.getLicense(); } + String getMinimumCppStandard() const { return moduleInfo.getMinimumCppStandard(); } - File getFolder() const { return moduleInfo.getFolder(); } + File getFolder() const { return moduleInfo.getFolder(); } void writeIncludes (ProjectSaver&, OutputStream&); void addSettingsForModuleToExporter (ProjectExporter&, ProjectSaver&) const; @@ -135,33 +138,41 @@ class EnabledModuleList public: EnabledModuleList (Project&, const ValueTree&); + static File findGlobalModulesFolder(); + static File findDefaultModulesFolder (Project&); + static bool isJuceModule (const String& moduleID); + bool isModuleEnabled (const String& moduleID) const; + + Value shouldUseGlobalPath (const String& moduleID) const; Value shouldShowAllModuleFilesInProject (const String& moduleID); Value shouldCopyModuleFilesLocally (const String& moduleID) const; + void removeModule (String moduleID); bool isAudioPluginModuleMissing() const; ModuleDescription getModuleInfo (const String& moduleID); - File getModuleFolder (const String& moduleID); - void addModule (const File& moduleManifestFile, bool copyLocally); + void addModule (const File& moduleManifestFile, bool copyLocally, bool useGlobalPath); void addModuleInteractive (const String& moduleID); void addModuleFromUserSelectedFile(); - void addModuleOfferingToCopy (const File&); + void addModuleOfferingToCopy (const File&, bool isFromUserSpecifiedFolder); StringArray getAllModules() const; StringArray getExtraDependenciesNeeded (const String& moduleID) const; + bool doesModuleHaveHigherCppStandardThanProject (const String& moduleID); void createRequiredModules (OwnedArray& modules); int getNumModules() const { return state.getNumChildren(); } String getModuleID (int index) const { return state.getChild (index) [Ids::ID].toString(); } + bool areMostModulesUsingGlobalPath() const; bool areMostModulesCopiedLocally() const; - void setLocalCopyModeForAllModules (bool copyLocally); - void sortAlphabetically(); - static File findDefaultModulesFolder (Project&); + void setLocalCopyModeForAllModules (bool copyLocally); + + void sortAlphabetically(); Project& project; ValueTree state; @@ -169,7 +180,8 @@ public: private: UndoManager* getUndoManager() const { return project.getUndoManagerFor (state); } - File findLocalModuleFolder (const String& moduleID, bool useExportersForOtherOSes); + static File getModuleFolderFromPathIfItExists (const String& path, const String& moduleID, const Project&); + File findUserModuleFolder (const String& possiblePaths, const String& moduleID); JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EnabledModuleList) }; diff --git a/extras/Projucer/Source/Project/jucer_ModulesPanel.h b/extras/Projucer/Source/Project/jucer_ModulesPanel.h index 066e2e224d..297540456c 100644 --- a/extras/Projucer/Source/Project/jucer_ModulesPanel.h +++ b/extras/Projucer/Source/Project/jucer_ModulesPanel.h @@ -35,7 +35,8 @@ public: modulesValueTree (p.getModules().state), header ("Modules", Icon (getIcons().modules, Colours::transparentBlack)), setCopyModeButton ("Set copy-mode for all modules..."), - copyPathButton ("Set paths for all modules...") + copyPathButton ("Set paths for all modules..."), + globalPathsButton ("Enable/disable global path for modules...") { listHeader = new ListBoxHeader ( { "Module", "Version", "Make Local Copy", "Paths" }, { 0.25f, 0.2f, 0.2f, 0.35f } ); @@ -51,10 +52,12 @@ public: addAndMakeVisible (setCopyModeButton); addAndMakeVisible (copyPathButton); + addAndMakeVisible (globalPathsButton); setCopyModeButton.addListener (this); setCopyModeButton.setTriggeredOnMouseDown (true); copyPathButton.addListener (this); copyPathButton.setTriggeredOnMouseDown (true); + globalPathsButton.addListener (this); modulesValueTree.addListener (this); lookAndFeelChanged(); @@ -85,13 +88,15 @@ public: setCopyModeButton.setBounds (buttonRow.removeFromLeft (jmin (200, bounds.getWidth() / 3))); buttonRow.removeFromLeft (8); copyPathButton.setBounds (buttonRow.removeFromLeft (jmin (200, bounds.getWidth() / 3))); + buttonRow.removeFromLeft (8); + globalPathsButton.setBounds (buttonRow.removeFromLeft (jmin (200, bounds.getWidth() / 3))); } } void parentSizeChanged() override { const auto width = jmax (550, getParentWidth()); - auto y = list.getRowPosition (getNumRows() - 1, true).getBottom() + 100; + auto y = list.getRowPosition (getNumRows() - 1, true).getBottom() + 200; y = jmax (getParentHeight(), y); @@ -135,12 +140,21 @@ public: g.drawFittedText (copyLocally, bounds.removeFromLeft (roundToInt (listHeader->getProportionAtIndex (2) * width)), Justification::centredLeft, 1); //====================================================================== - StringArray paths; + String pathText; - for (Project::ExporterIterator exporter (project); exporter.next();) - paths.addIfNotAlreadyThere (exporter->getPathForModuleString (moduleID).trim()); + if (project.getModules().shouldUseGlobalPath (moduleID).getValue()) + { + pathText = "Global"; + } + else + { + StringArray paths; - const auto pathText = paths.joinIntoString (", "); + for (Project::ExporterIterator exporter (project); exporter.next();) + paths.addIfNotAlreadyThere (exporter->getPathForModuleString (moduleID).trim()); + + pathText = paths.joinIntoString (", "); + } g.drawFittedText (pathText, bounds.removeFromLeft (roundToInt (listHeader->getProportionAtIndex (3) * width)), Justification::centredLeft, 1); } @@ -163,12 +177,14 @@ public: { if (b == &setCopyModeButton) showCopyModeMenu(); if (b == ©PathButton) showSetPathsMenu(); + if (b == &globalPathsButton) showGlobalPathsMenu(); } void lookAndFeelChanged() override { setCopyModeButton.setColour (TextButton::buttonColourId, findColour (secondaryButtonBackgroundColourId)); copyPathButton.setColour (TextButton::buttonColourId, findColour (defaultButtonBackgroundColourId)); + globalPathsButton.setColour (TextButton::buttonColourId, findColour (defaultButtonBackgroundColourId)); } private: @@ -185,7 +201,7 @@ private: ContentViewHeader header; ListBox list; ListBoxHeader* listHeader; - TextButton setCopyModeButton, copyPathButton; + TextButton setCopyModeButton, copyPathButton, globalPathsButton; std::map modulePathClipboard; void valueTreePropertyChanged (ValueTree&, const Identifier&) override { itemChanged(); } @@ -207,12 +223,45 @@ private: m.addItem (1, "Set all modules to copy locally"); m.addItem (2, "Set all modules to not copy locally"); - int res = m.showAt (&setCopyModeButton); + auto res = m.showAt (&setCopyModeButton); if (res != 0) project.getModules().setLocalCopyModeForAllModules (res == 1); } + void showGlobalPathsMenu() + { + PopupMenu m; + m.addItem (1, "Set all modules to use global paths"); + m.addItem (2, "Set all modules to not use global paths"); + m.addItem (3, "Set selected modules to use global paths"); + m.addItem (4, "Set selected modules to not use global paths"); + + auto res = m.showAt (&globalPathsButton); + + if (res != 0) + { + auto enableGlobalPaths = (res % 2 == 1); + + auto& moduleList = project.getModules(); + + if (res < 3) + { + auto moduleIDs = moduleList.getAllModules(); + + for (auto id : moduleIDs) + moduleList.shouldUseGlobalPath (id).setValue (enableGlobalPaths); + } + else + { + auto selected = list.getSelectedRows(); + + for (auto i = 0; i < selected.size(); ++i) + moduleList.shouldUseGlobalPath (moduleList.getModuleID (selected[i])).setValue (enableGlobalPaths); + } + } + } + void showSetPathsMenu() { enum diff --git a/extras/Projucer/Source/Project/jucer_Project.cpp b/extras/Projucer/Source/Project/jucer_Project.cpp index 3576c02921..010ff2d3e3 100644 --- a/extras/Projucer/Source/Project/jucer_Project.cpp +++ b/extras/Projucer/Source/Project/jucer_Project.cpp @@ -152,9 +152,62 @@ void Project::setMissingDefaultValues() if (shouldIncludeBinaryInAppConfig() == var()) shouldIncludeBinaryInAppConfig() = true; + if (! projectRoot.hasProperty (Ids::cppLanguageStandard) && ! setCppVersionFromOldExporterSettings()) + getCppStandardValue() = "11"; + ProjucerApplication::getApp().updateNewlyOpenedProject (*this); } +bool Project::setCppVersionFromOldExporterSettings() +{ + auto highestLanguageStandard = -1; + + for (Project::ExporterIterator exporter (*this); exporter.next();) + { + if (exporter->isXcode()) // cpp version was per-build configuration for xcode exporters + { + for (ProjectExporter::ConfigIterator config (*exporter); config.next();) + { + auto cppLanguageStandard = config->getValue (Ids::cppLanguageStandard).getValue(); + + if (cppLanguageStandard != var()) + { + auto versionNum = cppLanguageStandard.toString().getLastCharacters (2).getIntValue(); + + if (versionNum > highestLanguageStandard) + highestLanguageStandard = versionNum; + } + } + } + else + { + auto cppLanguageStandard = exporter->getSetting (Ids::cppLanguageStandard).getValue(); + + if (cppLanguageStandard != var()) + { + if (cppLanguageStandard.toString().containsIgnoreCase ("latest")) + { + getCppStandardValue() = "latest"; + return true; + } + + auto versionNum = cppLanguageStandard.toString().getLastCharacters (2).getIntValue(); + + if (versionNum > highestLanguageStandard) + highestLanguageStandard = versionNum; + } + } + } + + if (highestLanguageStandard != -1 && highestLanguageStandard >= 11) + { + getCppStandardValue() = highestLanguageStandard; + return true; + } + + return false; +} + void Project::updateDeprecatedProjectSettingsInteractively() { jassert (! ProjucerApplication::getApp().isRunningCommandLine); @@ -307,20 +360,28 @@ static bool isAnyModuleNewerThanProjucer (const OwnedArray& m void Project::warnAboutOldProjucerVersion() { ModuleList available; - available.scanAllKnownFolders (*this); - if (isAnyModuleNewerThanProjucer (available.modules)) - { - if (ProjucerApplication::getApp().isRunningCommandLine) - std::cout << "WARNING! This version of the Projucer is out-of-date!" << std::endl; - else - AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, - "Projucer", - "This version of the Projucer is out-of-date!" - "\n\n" - "Always make sure that you're running the very latest version, " - "preferably compiled directly from the JUCE repository that you're working with!"); - } + available.scanGlobalJuceModulePath(); + + if (! isAnyModuleNewerThanProjucer (available.modules)) + available.scanGlobalUserModulePath(); + + if (! isAnyModuleNewerThanProjucer (available.modules)) + available.scanProjectExporterModulePaths (*this); + + if (! isAnyModuleNewerThanProjucer (available.modules)) + return; + + // Projucer is out of date! + if (ProjucerApplication::getApp().isRunningCommandLine) + std::cout << "WARNING! This version of the Projucer is out-of-date!" << std::endl; + else + AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, + "Projucer", + "This version of the Projucer is out-of-date!" + "\n\n" + "Always make sure that you're running the very latest version, " + "preferably compiled directly from the JUCE repository that you're working with!"); } //============================================================================== @@ -423,6 +484,11 @@ File Project::resolveFilename (String filename) const filename = replacePreprocessorDefs (getPreprocessorDefs(), filename); + #if ! JUCE_WINDOWS + if (filename.startsWith ("~")) + return File::getSpecialLocation (File::userHomeDirectory).getChildFile (filename.trimCharactersAtStart ("~/")); + #endif + if (FileHelpers::isAbsolutePath (filename)) return File::createFileWithoutCheckingPath (FileHelpers::currentOSStylePath (filename)); // (avoid assertions for windows-style paths) @@ -674,6 +740,16 @@ void Project::createPropertyEditors (PropertyListBuilder& props) props.add (new TextPropertyComponent (binaryDataNamespace(), "BinaryData Namespace", 256, false), "The namespace containing the binary assests. If left empty this defaults to \"BinaryData\"."); + { + static const char* cppLanguageStandardNames[] = { "C++11", "C++14", "Use Latest", nullptr }; + static const var cppLanguageStandardValues[] = { "11", "14", "latest" }; + + props.add (new ChoicePropertyComponent (getCppStandardValue(), "C++ Language Standard", + StringArray (cppLanguageStandardNames), + Array (cppLanguageStandardValues, numElementsInArray (cppLanguageStandardValues))), + "The standard of the C++ language that will be used for compilation."); + } + props.add (new TextPropertyComponent (getProjectPreprocessorDefs(), "Preprocessor definitions", 32768, true), "Global preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace, commas, or " "new-lines to separate the items - to include a space or comma in a definition, precede it with a backslash."); @@ -718,7 +794,7 @@ void Project::createAudioPluginPropertyEditors (PropertyListBuilder& props) "This list is a comma-separated set list in the form {numIns, numOuts} and each pair indicates a valid plug-in " "configuration. For example {1, 1}, {2, 2} means that the plugin can be used either with 1 input and 1 output, " "or with 2 inputs and 2 outputs. If your plug-in requires side-chains, aux output buses etc., then you must leave " - "this field empty and override the setPreferredBusArrangement method in your AudioProcessor."); + "this field empty and override the isBusesLayoutSupported callback in your AudioProcessor."); props.add (new BooleanPropertyComponent (getPluginIsSynth(), "Plugin is a Synth", "Is a Synth"), "Enable this if you want your plugin to be treated as a synth or generator. It doesn't make much difference to the plugin itself, but some hosts treat synths differently to other plugins."); diff --git a/extras/Projucer/Source/Project/jucer_Project.h b/extras/Projucer/Source/Project/jucer_Project.h index ed03f4056e..a8ecd63feb 100644 --- a/extras/Projucer/Source/Project/jucer_Project.h +++ b/extras/Projucer/Source/Project/jucer_Project.h @@ -100,14 +100,16 @@ public: Value shouldReportAppUsage() { return getProjectValue (Ids::reportAppUsage); } Value splashScreenColour() { return getProjectValue (Ids::splashScreenColour); } + Value getCppStandardValue() { return getProjectValue (Ids::cppLanguageStandard); } + //============================================================================== Value getProjectValue (const Identifier& name) { return projectRoot.getPropertyAsValue (name, getUndoManagerFor (projectRoot)); } var getProjectVar (const Identifier& name) const { return projectRoot.getProperty (name); } - Value getProjectPreprocessorDefs() { return getProjectValue (Ids::defines); } + Value getProjectPreprocessorDefs() { return getProjectValue (Ids::defines); } StringPairArray getPreprocessorDefs() const; - Value getProjectUserNotes() { return getProjectValue (Ids::userNotes); } + Value getProjectUserNotes() { return getProjectValue (Ids::userNotes); } //============================================================================== File getGeneratedCodeFolder() const { return getFile().getSiblingFile ("JuceLibraryCode"); } @@ -352,6 +354,7 @@ private: //============================================================================== void setMissingAudioPluginDefaultValues(); void createAudioPluginPropertyEditors (PropertyListBuilder& props); + bool setCppVersionFromOldExporterSettings(); //============================================================================== friend class Item; diff --git a/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp b/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp index b84064dda0..fc8b9d9d75 100644 --- a/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp +++ b/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp @@ -746,8 +746,8 @@ void ProjectContentComponent::openInSelectedIDE (bool saveFirst) { if (exporter->canLaunchProject() && exporter->getName() == selectedIDE) { - if (saveFirst) - saveProject (exporter->isXcode()); + if (saveFirst && ! saveProject (exporter->isXcode())) + return; exporter->launchProject(); break; @@ -982,7 +982,7 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica "Shows the main project options page", CommandCategories::general, 0); result.setActive (project != nullptr); - result.defaultKeypresses.add (KeyPress ('p', ModifierKeys::commandModifier | ModifierKeys::shiftModifier, 0)); + result.defaultKeypresses.add (KeyPress ('s', ModifierKeys::commandModifier | ModifierKeys::ctrlModifier, 0)); break; case CommandIDs::showProjectTab: @@ -990,7 +990,7 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica "Shows the tab containing the project information", CommandCategories::general, 0); result.setActive (project != nullptr); - result.defaultKeypresses.add (KeyPress ('p', ModifierKeys::commandModifier, 0)); + result.defaultKeypresses.add (KeyPress ('p', ModifierKeys::commandModifier | ModifierKeys::ctrlModifier, 0)); break; case CommandIDs::showBuildTab: @@ -998,6 +998,7 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica "Shows the tab containing the build panel", CommandCategories::general, 0); result.setActive (project != nullptr); + result.defaultKeypresses.add (KeyPress ('b', ModifierKeys::commandModifier | ModifierKeys::ctrlModifier, 0)); break; case CommandIDs::showFileExplorerPanel: @@ -1005,7 +1006,7 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica "Shows the panel containing the tree of files for this project", CommandCategories::general, 0); result.setActive (project != nullptr); - result.defaultKeypresses.add (KeyPress ('f', ModifierKeys::commandModifier, 0)); + result.defaultKeypresses.add (KeyPress ('f', ModifierKeys::commandModifier | ModifierKeys::ctrlModifier, 0)); break; case CommandIDs::showModulesPanel: @@ -1013,7 +1014,7 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica "Shows the panel containing the project's list of modules", CommandCategories::general, 0); result.setActive (project != nullptr); - result.defaultKeypresses.add (KeyPress ('m', ModifierKeys::commandModifier, 0)); + result.defaultKeypresses.add (KeyPress ('m', ModifierKeys::commandModifier | ModifierKeys::ctrlModifier, 0)); break; case CommandIDs::showExportersPanel: @@ -1021,7 +1022,7 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica "Shows the panel containing the project's list of exporters", CommandCategories::general, 0); result.setActive (project != nullptr); - result.defaultKeypresses.add (KeyPress ('e', ModifierKeys::commandModifier, 0)); + result.defaultKeypresses.add (KeyPress ('e', ModifierKeys::commandModifier | ModifierKeys::ctrlModifier, 0)); break; case CommandIDs::showExporterSettings: diff --git a/extras/Projucer/Source/Project/jucer_ProjectTab.h b/extras/Projucer/Source/Project/jucer_ProjectTab.h index f3e1b1578e..1b664891ed 100644 --- a/extras/Projucer/Source/Project/jucer_ProjectTab.h +++ b/extras/Projucer/Source/Project/jucer_ProjectTab.h @@ -182,6 +182,12 @@ struct FileTreePanel : public TreePanelBase if (auto* p = dynamic_cast (rootItem.get())) p->checkFileStatus(); } + + void setSearchFilter (const String& filter) + { + if (auto* p = dynamic_cast (rootItem.get())) + p->setSearchFilter (filter); + } }; struct ModuleTreePanel : public TreePanelBase @@ -216,12 +222,12 @@ struct ExportersTreePanel : public TreePanelBase //============================================================================== class ConcertinaTreeComponent : public Component, - private Button::Listener + private Button::Listener, + private ChangeListener { public: - ConcertinaTreeComponent (TreePanelBase* tree, bool showSettings = false) - : treeToDisplay (tree), - showSettingsButton (showSettings) + ConcertinaTreeComponent (TreePanelBase* tree, bool showSettingsButton = false, bool showFindPanel = false) + : treeToDisplay (tree) { addAndMakeVisible (popupMenuButton = new IconButton ("Add", &getIcons().plus)); popupMenuButton->addListener (this); @@ -232,6 +238,12 @@ public: settingsButton->addListener (this); } + if (showFindPanel) + { + addAndMakeVisible (findPanel = new FindPanel()); + findPanel->addChangeListener (this); + } + addAndMakeVisible (treeToDisplay); } @@ -239,6 +251,8 @@ public: { treeToDisplay = nullptr; popupMenuButton = nullptr; + findPanel = nullptr; + settingsButton = nullptr; } void resized() override @@ -249,18 +263,26 @@ public: bottomSlice.removeFromRight (5); popupMenuButton->setBounds (bottomSlice.removeFromRight (25).reduced (2)); - if (showSettingsButton) - settingsButton->setBounds (bottomSlice.removeFromRight(25).reduced (2)); + if (settingsButton != nullptr) + settingsButton->setBounds (bottomSlice.removeFromRight (25).reduced (2)); + + if (findPanel != nullptr) + findPanel->setBounds (bottomSlice.reduced (2)); treeToDisplay->setBounds (bounds); } TreePanelBase* getTree() const noexcept { return treeToDisplay.get(); } + void grabFindFocus() + { + if (findPanel != nullptr) + findPanel->grabKeyboardFocus(); + } + private: ScopedPointer treeToDisplay; ScopedPointer popupMenuButton, settingsButton; - bool showSettingsButton; void buttonClicked (Button* b) override { @@ -296,6 +318,92 @@ private: } } + void changeListenerCallback (ChangeBroadcaster* source) override + { + if (source == findPanel) + if (auto* fileTree = dynamic_cast (treeToDisplay.get())) + fileTree->setSearchFilter (findPanel->editor.getText()); + } + + class FindPanel : public Component, + public ChangeBroadcaster, + private TextEditor::Listener, + private Timer, + private FocusChangeListener + { + public: + FindPanel() + { + addAndMakeVisible (editor); + editor.addListener (this); + + Desktop::getInstance().addFocusChangeListener (this); + + lookAndFeelChanged(); + } + + ~FindPanel() + { + Desktop::getInstance().removeFocusChangeListener (this); + } + + void paintOverChildren (Graphics& g) override + { + if (! isFocused) + return; + + g.setColour (findColour (defaultHighlightColourId)); + + Path p; + p.addRoundedRectangle (getLocalBounds().reduced (2), 3.0f); + g.strokePath (p, PathStrokeType (2.0f)); + } + + + void resized() override + { + editor.setBounds (getLocalBounds().reduced (2)); + } + + TextEditor editor; + + private: + + void lookAndFeelChanged() override + { + editor.setTextToShowWhenEmpty ("Filter...", findColour (widgetTextColourId).withAlpha (0.3f)); + } + + void textEditorTextChanged (TextEditor&) override + { + startTimer (250); + } + + void textEditorFocusLost (TextEditor&) override + { + isFocused = false; + repaint(); + } + + void globalFocusChanged (Component* focusedComponent) override + { + if (focusedComponent == &editor) + { + isFocused = true; + repaint(); + } + } + + void timerCallback() override + { + stopTimer(); + sendChangeMessage(); + } + + bool isFocused = false; + }; + ScopedPointer findPanel; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ConcertinaTreeComponent) }; @@ -389,7 +497,6 @@ public: return ((float) (concertinaPanel.getPanel (panelIndex)->getHeight()) / (concertinaPanel.getHeight() - 90)); } - private: ConcertinaPanel concertinaPanel; OwnedArray headers; @@ -414,7 +521,7 @@ private: if (project != nullptr) { - concertinaPanel.addPanel (0, new ConcertinaTreeComponent (new FileTreePanel (*project)), true); + concertinaPanel.addPanel (0, new ConcertinaTreeComponent (new FileTreePanel (*project), false, true), true); concertinaPanel.addPanel (1, new ConcertinaTreeComponent (new ModuleTreePanel (*project), true), true); concertinaPanel.addPanel (2, new ConcertinaTreeComponent (new ExportersTreePanel (*project)), true); } diff --git a/extras/Projucer/Source/Project/jucer_ProjectTree_Group.h b/extras/Projucer/Source/Project/jucer_ProjectTree_Group.h index 18beb92356..f95410ca55 100644 --- a/extras/Projucer/Source/Project/jucer_ProjectTree_Group.h +++ b/extras/Projucer/Source/Project/jucer_ProjectTree_Group.h @@ -27,8 +27,9 @@ class GroupItem : public ProjectTreeItemBase { public: - GroupItem (const Project::Item& projectItem) - : ProjectTreeItemBase (projectItem) + GroupItem (const Project::Item& projectItem, const String& filter = String()) + : ProjectTreeItemBase (projectItem), + searchFilter (filter) { } @@ -79,10 +80,37 @@ public: p->checkFileStatus(); } + bool isGroupEmpty (const Project::Item& group) // recursive + { + for (auto i = 0; i < group.getNumChildren(); ++i) + { + auto child = group.getChild (i); + + if ((child.isGroup() && ! isGroupEmpty (child)) + || (child.isFile() && child.getName().containsIgnoreCase (searchFilter))) + return false; + } + + return true; + } + ProjectTreeItemBase* createSubItem (const Project::Item& child) override { - if (child.isGroup()) return new GroupItem (child); - if (child.isFile()) return new SourceFileItem (child); + if (child.isGroup()) + { + if (searchFilter.isNotEmpty() && isGroupEmpty (child)) + return nullptr; + + return new GroupItem (child, searchFilter); + } + + if (child.isFile()) + { + if (child.getName().containsIgnoreCase (searchFilter)) + return new SourceFileItem (child); + + return nullptr; + } jassertfalse; return nullptr; @@ -94,12 +122,26 @@ public: pcc->setEditorComponent (new GroupInformationComponent (item), nullptr); } + static void openAllGroups (TreeViewItem* root) + { + for (auto i = 0; i < root->getNumSubItems(); ++i) + if (auto* sub = root->getSubItem (i)) + openOrCloseAllSubGroups (*sub, true); + } + + static void closeAllGroups (TreeViewItem* root) + { + for (auto i = 0; i < root->getNumSubItems(); ++i) + if (auto* sub = root->getSubItem (i)) + openOrCloseAllSubGroups (*sub, false); + } + static void openOrCloseAllSubGroups (TreeViewItem& item, bool shouldOpen) { item.setOpen (shouldOpen); for (int i = item.getNumSubItems(); --i >= 0;) - if (TreeViewItem* sub = item.getSubItem(i)) + if (auto* sub = item.getSubItem (i)) openOrCloseAllSubGroups (*sub, shouldOpen); } @@ -119,27 +161,30 @@ public: m.addSeparator(); + m.addItem (1, "Collapse all Groups"); + m.addItem (2, "Expand all Groups"); + if (! isRoot()) { if (isOpen()) - m.addItem (1, "Collapse all Sub-groups"); + m.addItem (3, "Collapse all Sub-groups"); else - m.addItem (2, "Expand all Sub-groups"); + m.addItem (4, "Expand all Sub-groups"); } m.addSeparator(); - m.addItem (3, "Enable compiling of all enclosed files"); - m.addItem (4, "Disable compiling of all enclosed files"); + m.addItem (5, "Enable compiling of all enclosed files"); + m.addItem (6, "Disable compiling of all enclosed files"); m.addSeparator(); - m.addItem (5, "Sort Items Alphabetically"); - m.addItem (6, "Sort Items Alphabetically (Groups first)"); + m.addItem (7, "Sort Items Alphabetically"); + m.addItem (8, "Sort Items Alphabetically (Groups first)"); m.addSeparator(); if (! isRoot()) { - m.addItem (7, "Rename..."); - m.addItem (8, "Delete"); + m.addItem (9, "Rename..."); + m.addItem (10, "Delete"); } launchPopupMenu (m); @@ -157,14 +202,16 @@ public: { switch (resultCode) { - case 1: openOrCloseAllSubGroups (*this, false); break; - case 2: openOrCloseAllSubGroups (*this, true); break; - case 3: setFilesToCompile (item, true); break; - case 4: setFilesToCompile (item, false); break; - case 5: item.sortAlphabetically (false, false); break; - case 6: item.sortAlphabetically (true, false); break; - case 7: triggerAsyncRename (item); break; - case 8: deleteAllSelectedItems(); break; + case 1: closeAllGroups (getOwnerView()->getRootItem()); break; + case 2: openAllGroups (getOwnerView()->getRootItem()); break; + case 3: openOrCloseAllSubGroups (*this, false); break; + case 4: openOrCloseAllSubGroups (*this, true); break; + case 5: setFilesToCompile (item, true); break; + case 6: setFilesToCompile (item, false); break; + case 7: item.sortAlphabetically (false, false); break; + case 8: item.sortAlphabetically (true, false); break; + case 9: triggerAsyncRename (item); break; + case 10: deleteAllSelectedItems(); break; default: processCreateFileMenuItem (resultCode); break; } } @@ -200,4 +247,12 @@ public: return nullptr; } + + void setSearchFilter (const String& filter) + { + searchFilter = filter; + refreshSubItems(); + } + + String searchFilter; }; diff --git a/extras/Projucer/Source/Project/jucer_TreeItemTypes.h b/extras/Projucer/Source/Project/jucer_TreeItemTypes.h index 735c666efa..662c2f682c 100644 --- a/extras/Projucer/Source/Project/jucer_TreeItemTypes.h +++ b/extras/Projucer/Source/Project/jucer_TreeItemTypes.h @@ -32,6 +32,7 @@ #include "../Wizards/jucer_NewFileWizard.h" #include "jucer_GroupInformationComponent.h" #include "jucer_ModulesPanel.h" +#include "jucer_DependencyPathPropertyComponent.h" struct FileTreeItemTypes diff --git a/extras/Projucer/Source/Utility/jucer_AboutWindowComponent.h b/extras/Projucer/Source/Utility/jucer_AboutWindowComponent.h index bce96d69f6..510f576a03 100644 --- a/extras/Projucer/Source/Utility/jucer_AboutWindowComponent.h +++ b/extras/Projucer/Source/Utility/jucer_AboutWindowComponent.h @@ -32,7 +32,7 @@ class AboutWindowComponent : public Component, public: AboutWindowComponent() : titleLabel ("title", "PROJUCER"), - versionLabel ("version", "JUCE v" + ProjucerApplication::getApp().getApplicationVersion()), + versionLabel ("version"), copyrightLabel ("copyright", String (CharPointer_UTF8 ("\xc2\xa9")) + String (" 2017 ROLI Ltd.")), aboutButton ("About Us", URL ("https://juce.com")) { @@ -48,7 +48,13 @@ public: titleLabel.setJustificationType (Justification::centred); titleLabel.setFont (Font (35.0f, Font::FontStyleFlags::bold)); + auto buildDate = Time::getCompilationDate(); addAndMakeVisible (versionLabel); + versionLabel.setText ("JUCE v" + ProjucerApplication::getApp().getApplicationVersion() + + "\nBuild date: " + String (buildDate.getDayOfMonth()) + + " " + Time::getMonthName (buildDate.getMonth(), true) + + " " + String (buildDate.getYear()), + dontSendNotification); versionLabel.setJustificationType (Justification::centred); addAndMakeVisible (copyrightLabel); @@ -93,7 +99,7 @@ public: titleLabel.setBounds (centreSlice.removeFromTop (titleHeight)); centreSlice.removeFromTop (10); - versionLabel.setBounds (centreSlice.removeFromTop (25)); + versionLabel.setBounds (centreSlice.removeFromTop (40)); centreSlice.removeFromTop (10); diff --git a/extras/Projucer/Source/Utility/jucer_CodeHelpers.cpp b/extras/Projucer/Source/Utility/jucer_CodeHelpers.cpp index a465a9e004..a540b291f3 100644 --- a/extras/Projucer/Source/Utility/jucer_CodeHelpers.cpp +++ b/extras/Projucer/Source/Utility/jucer_CodeHelpers.cpp @@ -69,7 +69,7 @@ namespace CodeHelpers return lines.joinIntoString (newLine); } - String makeValidIdentifier (String s, bool capitalise, bool removeColons, bool allowTemplates) + String makeValidIdentifier (String s, bool capitalise, bool removeColons, bool allowTemplates, bool allowAsterisks) { if (s.isEmpty()) return "unknown"; @@ -93,6 +93,9 @@ namespace CodeHelpers if (! removeColons) allowedChars += ":"; + if (allowAsterisks) + allowedChars += "*"; + StringArray words; words.addTokens (s.retainCharacters (allowedChars), false); words.trim(); diff --git a/extras/Projucer/Source/Utility/jucer_CodeHelpers.h b/extras/Projucer/Source/Utility/jucer_CodeHelpers.h index 5efa7aa737..537c336f05 100644 --- a/extras/Projucer/Source/Utility/jucer_CodeHelpers.h +++ b/extras/Projucer/Source/Utility/jucer_CodeHelpers.h @@ -32,7 +32,8 @@ namespace CodeHelpers { String indent (const String& code, int numSpaces, bool indentFirstLine); String unindent (const String& code, int numSpaces); - String makeValidIdentifier (String s, bool capitalise, bool removeColons, bool allowTemplates); + String makeValidIdentifier (String s, bool capitalise, bool removeColons, + bool allowTemplates, bool allowAsterisks = false); String createIncludeStatement (const File& includedFile, const File& targetFile); String createIncludeStatement (const String& includePath); String makeHeaderGuardName (const File& file); diff --git a/extras/Projucer/Source/Utility/jucer_EditorColourSchemeWindowComponent.h b/extras/Projucer/Source/Utility/jucer_EditorColourSchemeWindowComponent.h new file mode 100644 index 0000000000..0a159a84b3 --- /dev/null +++ b/extras/Projucer/Source/Utility/jucer_EditorColourSchemeWindowComponent.h @@ -0,0 +1,344 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#pragma once + +#include "../Utility/jucer_ColourPropertyComponent.h" + +class EditorColourSchemeWindowComponent : public Component +{ +public: + EditorColourSchemeWindowComponent() + { + if (getAppSettings().monospacedFontNames.size() == 0) + content = new AppearanceEditor::FontScanPanel(); + else + content = new AppearanceEditor::EditorPanel(); + + changeContent (content); + } + + void paint (Graphics& g) override + { + g.fillAll (findColour (backgroundColourId)); + } + + void resized() override + { + content->setBounds (getLocalBounds()); + } + + void changeContent (Component* newContent) + { + content = newContent; + addAndMakeVisible (content); + content->setBounds (getLocalBounds().reduced (10)); + } +private: + ScopedPointer content; + + //============================================================================== + struct AppearanceEditor + { + struct FontScanPanel : public Component, + private Timer + { + FontScanPanel() + { + fontsToScan = Font::findAllTypefaceNames(); + startTimer (1); + } + + void paint (Graphics& g) override + { + g.fillAll (findColour (backgroundColourId)); + + g.setFont (14.0f); + g.setColour (findColour (defaultTextColourId)); + g.drawFittedText ("Scanning for fonts..", getLocalBounds(), Justification::centred, 2); + + const auto size = 30; + getLookAndFeel().drawSpinningWaitAnimation (g, Colours::white, (getWidth() - size) / 2, getHeight() / 2 - 50, size, size); + } + + void timerCallback() override + { + repaint(); + + if (fontsToScan.size() == 0) + { + getAppSettings().monospacedFontNames = fontsFound; + + if (auto* owner = findParentComponentOfClass()) + owner->changeContent (new EditorPanel()); + } + else + { + if (isMonospacedTypeface (fontsToScan[0])) + fontsFound.add (fontsToScan[0]); + + fontsToScan.remove (0); + } + } + + // A rather hacky trick to select only the fixed-pitch fonts.. + // This is unfortunately a bit slow, but will work on all platforms. + static bool isMonospacedTypeface (const String& name) + { + const Font font (name, 20.0f, Font::plain); + + const auto width = font.getStringWidth ("...."); + + return width == font.getStringWidth ("WWWW") + && width == font.getStringWidth ("0000") + && width == font.getStringWidth ("1111") + && width == font.getStringWidth ("iiii"); + } + + StringArray fontsToScan, fontsFound; + }; + + //============================================================================== + struct EditorPanel : public Component, + private ButtonListener + { + EditorPanel() + : loadButton ("Load Scheme..."), + saveButton ("Save Scheme...") + { + rebuildProperties(); + addAndMakeVisible (panel); + + addAndMakeVisible (loadButton); + addAndMakeVisible (saveButton); + + loadButton.addListener (this); + saveButton.addListener (this); + + lookAndFeelChanged(); + + saveSchemeState(); + } + + ~EditorPanel() + { + if (hasSchemeBeenModifiedSinceSave()) + saveScheme (true); + } + + void rebuildProperties() + { + auto& scheme = getAppSettings().appearance; + + Array props; + auto fontValue = scheme.getCodeFontValue(); + props.add (FontNameValueSource::createProperty ("Code Editor Font", fontValue)); + props.add (FontSizeValueSource::createProperty ("Font Size", fontValue)); + + const auto colourNames = scheme.getColourNames(); + + for (int i = 0; i < colourNames.size(); ++i) + props.add (new ColourPropertyComponent (nullptr, colourNames[i], + scheme.getColourValue (colourNames[i]), + Colours::white, false)); + + panel.clear(); + panel.addProperties (props); + } + + void resized() override + { + auto r = getLocalBounds(); + panel.setBounds (r.removeFromTop (getHeight() - 28).reduced (10, 2)); + loadButton.setBounds (r.removeFromLeft (getWidth() / 2).reduced (10, 1)); + saveButton.setBounds (r.reduced (10, 1)); + } + + private: + PropertyPanel panel; + TextButton loadButton, saveButton; + + Font codeFont; + Array colourValues; + + void buttonClicked (Button* b) override + { + if (b == &loadButton) + loadScheme(); + else + saveScheme (false); + } + + void saveScheme (bool isExit) + { + FileChooser fc ("Select a file in which to save this colour-scheme...", + getAppSettings().appearance.getSchemesFolder() + .getNonexistentChildFile ("Scheme", AppearanceSettings::getSchemeFileSuffix()), + AppearanceSettings::getSchemeFileWildCard()); + + if (fc.browseForFileToSave (true)) + { + File file (fc.getResult().withFileExtension (AppearanceSettings::getSchemeFileSuffix())); + getAppSettings().appearance.writeToFile (file); + getAppSettings().appearance.refreshPresetSchemeList(); + + saveSchemeState(); + ProjucerApplication::getApp().selectEditorColourSchemeWithName (file.getFileNameWithoutExtension()); + } + else if (isExit) + { + restorePreviousScheme(); + } + } + + void loadScheme() + { + FileChooser fc ("Please select a colour-scheme file to load...", + getAppSettings().appearance.getSchemesFolder(), + AppearanceSettings::getSchemeFileWildCard()); + + if (fc.browseForFileToOpen()) + { + if (getAppSettings().appearance.readFromFile (fc.getResult())) + { + rebuildProperties(); + saveSchemeState(); + } + } + } + + void lookAndFeelChanged() override + { + loadButton.setColour (TextButton::buttonColourId, + findColour (secondaryButtonBackgroundColourId)); + } + + void saveSchemeState() + { + auto& appearance = getAppSettings().appearance; + const auto colourNames = appearance.getColourNames(); + + codeFont = appearance.getCodeFont(); + + colourValues.clear(); + for (int i = 0; i < colourNames.size(); ++i) + colourValues.add (appearance.getColourValue (colourNames[i]).getValue()); + } + + bool hasSchemeBeenModifiedSinceSave() + { + auto& appearance = getAppSettings().appearance; + const auto colourNames = appearance.getColourNames(); + + if (codeFont != appearance.getCodeFont()) + return true; + + for (int i = 0; i < colourNames.size(); ++i) + if (colourValues[i] != appearance.getColourValue (colourNames[i]).getValue()) + return true; + + return false; + } + + void restorePreviousScheme() + { + auto& appearance = getAppSettings().appearance; + const auto colourNames = appearance.getColourNames(); + + appearance.getCodeFontValue().setValue (codeFont.toString()); + + for (int i = 0; i < colourNames.size(); ++i) + appearance.getColourValue (colourNames[i]).setValue (colourValues[i]); + } + + + JUCE_DECLARE_NON_COPYABLE (EditorPanel) + }; + + //============================================================================== + struct FontNameValueSource : public ValueSourceFilter + { + FontNameValueSource (const Value& source) : ValueSourceFilter (source) {} + + var getValue() const override + { + return Font::fromString (sourceValue.toString()).getTypefaceName(); + } + + void setValue (const var& newValue) override + { + auto font = Font::fromString (sourceValue.toString()); + font.setTypefaceName (newValue.toString().isEmpty() ? Font::getDefaultMonospacedFontName() + : newValue.toString()); + sourceValue = font.toString(); + } + + static ChoicePropertyComponent* createProperty (const String& title, const Value& value) + { + auto fontNames = getAppSettings().monospacedFontNames; + + Array values; + values.add (Font::getDefaultMonospacedFontName()); + values.add (var()); + + for (int i = 0; i < fontNames.size(); ++i) + values.add (fontNames[i]); + + StringArray names; + names.add (""); + names.add (String()); + names.addArray (getAppSettings().monospacedFontNames); + + return new ChoicePropertyComponent (Value (new FontNameValueSource (value)), + title, names, values); + } + }; + + //============================================================================== + struct FontSizeValueSource : public ValueSourceFilter + { + FontSizeValueSource (const Value& source) : ValueSourceFilter (source) {} + + var getValue() const override + { + return Font::fromString (sourceValue.toString()).getHeight(); + } + + void setValue (const var& newValue) override + { + sourceValue = Font::fromString (sourceValue.toString()).withHeight (newValue).toString(); + } + + static PropertyComponent* createProperty (const String& title, const Value& value) + { + return new SliderPropertyComponent (Value (new FontSizeValueSource (value)), + title, 5.0, 40.0, 0.1, 0.5); + } + }; + }; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EditorColourSchemeWindowComponent) +}; diff --git a/extras/Projucer/Source/Utility/jucer_FilePathPropertyComponent.h b/extras/Projucer/Source/Utility/jucer_FilePathPropertyComponent.h index 9d48337aa8..4f102d1d36 100644 --- a/extras/Projucer/Source/Utility/jucer_FilePathPropertyComponent.h +++ b/extras/Projucer/Source/Utility/jucer_FilePathPropertyComponent.h @@ -40,9 +40,10 @@ public: const String& propertyDescription, bool isDirectory, const String& wildcards = "*", - const File& rootToUseForRelativePaths = File()) + const File& rootToUseForRelativePaths = File(), + const bool supportsMultiplePaths = false) : PropertyComponent (propertyDescription), - innerComp (valueToControl, isDirectory, wildcards, rootToUseForRelativePaths) + innerComp (valueToControl, isDirectory, wildcards, rootToUseForRelativePaths, supportsMultiplePaths) { addAndMakeVisible (innerComp); } @@ -52,18 +53,21 @@ public: private: struct InnerComponent : public Component, public FileDragAndDropTarget, - private Button::Listener + private Button::Listener, + private TextEditor::Listener { - InnerComponent (Value v, bool isDir, const String& wc, const File& rt) + InnerComponent (Value v, bool isDir, const String& wc, const File& rt, const bool multiplePaths) : value (v), isDirectory (isDir), highlightForDragAndDrop (false), wildcards (wc), root (rt), - button ("...") + button ("..."), + supportsMultiplePaths (multiplePaths) { addAndMakeVisible (textbox); textbox.getTextValue().referTo (value); + textbox.addListener (this); addAndMakeVisible (button); button.addListener (this); @@ -75,8 +79,8 @@ private: { if (highlightForDragAndDrop) { - g.setColour (Colours::green.withAlpha (0.1f)); - g.fillRect (getLocalBounds()); + g.setColour (findColour (defaultHighlightColourId).withAlpha (0.5f)); + g.fillRect (textbox.getBounds()); } } @@ -101,6 +105,9 @@ private: : firstFile.getParentDirectory()); else setTo (firstFile); + + highlightForDragAndDrop = false; + repaint(); } void buttonClicked (Button*) override @@ -123,18 +130,74 @@ private: } } + void textEditorReturnKeyPressed (TextEditor& editor) override { updateEditorColour (editor); } + void textEditorFocusLost (TextEditor& editor) override { updateEditorColour (editor); } + + void updateEditorColour (TextEditor& editor) + { + if (supportsMultiplePaths) + { + auto paths = StringArray::fromTokens (editor.getTextValue().toString(), ";", {}); + + editor.clear(); + + AttributedString str; + for (auto p : paths) + { + if (root.getChildFile (p.trim()).exists()) editor.setColour (TextEditor::textColourId, findColour (widgetTextColourId)); + else editor.setColour (TextEditor::textColourId, Colours::red); + + editor.insertTextAtCaret (p); + + if (paths.indexOf (p) < paths.size() - 1) + { + editor.setColour (TextEditor::textColourId, findColour (widgetTextColourId)); + editor.insertTextAtCaret (";"); + } + } + + editor.setColour (TextEditor::textColourId, findColour (widgetTextColourId)); + } + else + { + auto pathToCheck = editor.getTextValue().toString(); + + //android SDK/NDK paths + if (pathToCheck.contains ("${user.home}")) + pathToCheck = pathToCheck.replace ("${user.home}", File::getSpecialLocation (File::userHomeDirectory).getFullPathName()); + + #if JUCE_WINDOWS + if (pathToCheck.startsWith ("~")) + pathToCheck = pathToCheck.replace ("~", File::getSpecialLocation (File::userHomeDirectory).getFullPathName()); + #endif + + const auto currentFile = root.getChildFile (pathToCheck); + + if (currentFile.exists()) + editor.applyColourToAllText (findColour (widgetTextColourId)); + else + editor.applyColourToAllText (Colours::red); + } + } + void setTo (const File& f) { - value = (root == File()) ? f.getFullPathName() - : f.getRelativePathFrom (root); + auto pathName = (root == File()) ? f.getFullPathName() + : f.getRelativePathFrom (root); + + if (supportsMultiplePaths && value.toString().isNotEmpty()) + value = value.toString().trimCharactersAtEnd (" ;") + "; " + pathName; + else + value = pathName; + + updateEditorColour (textbox); } void lookAndFeelChanged() override { textbox.setColour (TextEditor::backgroundColourId, findColour (widgetBackgroundColourId)); textbox.setColour (TextEditor::outlineColourId, Colours::transparentBlack); - textbox.setColour (TextEditor::textColourId, findColour (widgetTextColourId)); - textbox.applyFontToAllText (textbox.getFont()); + updateEditorColour (textbox); button.setColour (TextButton::buttonColourId, findColour (secondaryButtonBackgroundColourId)); button.setColour (TextButton::textColourOffId, Colours::white); @@ -146,6 +209,7 @@ private: File root; TextEditor textbox; TextButton button; + bool supportsMultiplePaths; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InnerComponent) }; diff --git a/extras/Projucer/Source/Utility/jucer_GlobalSearchPathsWindowComponent.h b/extras/Projucer/Source/Utility/jucer_GlobalSearchPathsWindowComponent.h new file mode 100644 index 0000000000..573926d591 --- /dev/null +++ b/extras/Projucer/Source/Utility/jucer_GlobalSearchPathsWindowComponent.h @@ -0,0 +1,200 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#pragma once + +class GlobalSearchPathsWindowComponent : public Component, + private ComboBox::Listener +{ +public: + GlobalSearchPathsWindowComponent() + : modulesLabel ("modulesLabel", "Modules"), + sdksLabel ("sdksLabel", "SDKs") + { + addAndMakeVisible (modulesLabel); + addAndMakeVisible (sdksLabel); + + modulesLabel.setFont (Font (18.0f, Font::FontStyleFlags::bold)); + sdksLabel.setFont (Font (18.0f, Font::FontStyleFlags::bold)); + + modulesLabel.setJustificationType (Justification::centredLeft); + sdksLabel.setJustificationType (Justification::centredLeft); + + addAndMakeVisible (info); + info.setInfoToDisplay ("Use this dropdown to set the global paths for different OSes. " + "\nN.B. These paths are stored locally and will only be used when " + "saving a project on this machine. Other machines will have their own " + "locally stored paths."); + + addAndMakeVisible (osSelector); + osSelector.addItem ("OSX", 1); + osSelector.addItem ("Windows", 2); + osSelector.addItem ("Linux", 3); + + osSelector.addListener (this); + + auto os = TargetOS::getThisOS(); + + if (os == TargetOS::osx) osSelector.setSelectedId (1); + else if (os == TargetOS::windows) osSelector.setSelectedId (2); + else if (os == TargetOS::linux) osSelector.setSelectedId (3); + + updateFilePathPropertyComponents(); + } + + void paint (Graphics& g) override + { + g.fillAll (findColour (backgroundColourId)); + } + + void resized() override + { + auto b = getLocalBounds().reduced (10); + + auto topSlice = b.removeFromTop (25); + osSelector.setSize (200, 25); + osSelector.setCentrePosition (topSlice.getCentre()); + + info.setBounds (osSelector.getBounds().withWidth (osSelector.getHeight()).translated ((osSelector.getWidth() + 5), 0).reduced (2)); + + modulesLabel.setBounds (b.removeFromTop (20)); + b.removeFromTop (20); + + auto i = 0; + for (auto propertyComponent : pathPropertyComponents) + { + propertyComponent->setBounds (b.removeFromTop (propertyComponent->getPreferredHeight())); + b.removeFromTop (5); + + if (i == 1) + { + b.removeFromTop (15); + sdksLabel.setBounds (b.removeFromTop (20)); + b.removeFromTop (20); + } + + ++i; + } + } + +private: + Label modulesLabel, sdksLabel; + OwnedArray pathPropertyComponents; + ComboBox osSelector; + ConfigTreeItemTypes::InfoButton info; + + void comboBoxChanged (ComboBox*) override + { + updateFilePathPropertyComponents(); + } + + void updateFilePathPropertyComponents() + { + pathPropertyComponents.clear(); + + auto thisOS = TargetOS::getThisOS(); + auto selectedOS = TargetOS::unknown; + + switch (osSelector.getSelectedId()) + { + case 1: selectedOS = TargetOS::osx; break; + case 2: selectedOS = TargetOS::windows; break; + case 3: selectedOS = TargetOS::linux; break; + default: break; + } + + auto& settings = getAppSettings(); + + if (selectedOS == thisOS) + { + addAndMakeVisible (pathPropertyComponents.add (new FilePathPropertyComponent (settings.getStoredPath (Ids::defaultJuceModulePath), + "JUCE Modules", true))); + addAndMakeVisible (pathPropertyComponents.add (new FilePathPropertyComponent (settings.getStoredPath (Ids::defaultUserModulePath), + "User Modules", true, {}, {}, true))); + + addAndMakeVisible (pathPropertyComponents.add (new FilePathPropertyComponent (settings.getStoredPath (Ids::vst3Path), + "VST3 SDK", true))); + + if (selectedOS == TargetOS::linux) + { + addAndMakeVisible (pathPropertyComponents.add (new FilePathPropertyComponent (Value(), "RTAS SDK", true))); + pathPropertyComponents.getLast()->setEnabled (false); + + addAndMakeVisible (pathPropertyComponents.add (new FilePathPropertyComponent (Value(), "AAX SDK", true))); + pathPropertyComponents.getLast()->setEnabled (false); + } + else + { + addAndMakeVisible (pathPropertyComponents.add (new FilePathPropertyComponent (settings.getStoredPath (Ids::rtasPath), + "RTAS SDK", true))); + addAndMakeVisible (pathPropertyComponents.add (new FilePathPropertyComponent (settings.getStoredPath (Ids::aaxPath), + "AAX SDK", true))); + } + + addAndMakeVisible (pathPropertyComponents.add (new FilePathPropertyComponent (settings.getStoredPath (Ids::androidSDKPath), + "Android SDK", true))); + addAndMakeVisible (pathPropertyComponents.add (new FilePathPropertyComponent (settings.getStoredPath (Ids::androidNDKPath), + "Android NDK", true))); + } + else + { + auto maxChars = 1024; + + addAndMakeVisible (pathPropertyComponents.add (new TextPropertyComponent (settings.getFallbackPathForOS (Ids::defaultJuceModulePath, selectedOS), + "JUCE Modules", maxChars, false))); + addAndMakeVisible (pathPropertyComponents.add (new TextPropertyComponent (settings.getFallbackPathForOS (Ids::defaultUserModulePath, selectedOS), + "User Modules", maxChars, false))); + + addAndMakeVisible (pathPropertyComponents.add (new TextPropertyComponent (settings.getFallbackPathForOS (Ids::vst3Path, selectedOS), + "VST3 SDK", maxChars, false))); + + if (selectedOS == TargetOS::linux) + { + addAndMakeVisible (pathPropertyComponents.add (new TextPropertyComponent (Value(), "RTAS SDK", maxChars, false))); + pathPropertyComponents.getLast()->setEnabled (false); + + addAndMakeVisible (pathPropertyComponents.add (new TextPropertyComponent (Value(), "AAX SDK", maxChars, false))); + pathPropertyComponents.getLast()->setEnabled (false); + } + else + { + addAndMakeVisible (pathPropertyComponents.add (new TextPropertyComponent (settings.getFallbackPathForOS (Ids::rtasPath, selectedOS), + "RTAS SDK", maxChars, false))); + addAndMakeVisible (pathPropertyComponents.add (new TextPropertyComponent (settings.getFallbackPathForOS (Ids::aaxPath, selectedOS), + "AAX SDK", maxChars, false))); + } + + addAndMakeVisible (pathPropertyComponents.add (new TextPropertyComponent (settings.getFallbackPathForOS (Ids::androidSDKPath, selectedOS), + "Android SDK", maxChars, false))); + addAndMakeVisible (pathPropertyComponents.add (new TextPropertyComponent (settings.getFallbackPathForOS (Ids::androidNDKPath, selectedOS), + "Android NDK", maxChars, false))); + } + + resized(); + } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GlobalSearchPathsWindowComponent) +}; diff --git a/extras/Projucer/Source/Utility/jucer_JucerTreeViewBase.cpp b/extras/Projucer/Source/Utility/jucer_JucerTreeViewBase.cpp index 9b3127feb1..0163cd5ea1 100644 --- a/extras/Projucer/Source/Utility/jucer_JucerTreeViewBase.cpp +++ b/extras/Projucer/Source/Utility/jucer_JucerTreeViewBase.cpp @@ -97,6 +97,7 @@ void JucerTreeViewBase::paintIcon (Graphics &g, Rectangle area) { g.setColour (getContentColour (true)); getIcon().draw (g, area, isIconCrossedOut()); + textX = roundToInt (area.getRight()); } void JucerTreeViewBase::paintItem (Graphics& g, int width, int height) @@ -111,11 +112,9 @@ void JucerTreeViewBase::paintItem (Graphics& g, int width, int height) Colour JucerTreeViewBase::getContentColour (bool isIcon) const { - if (isMissing()) - return Colours::red; - - if (isSelected()) - return getOwnerView()->findColour (defaultHighlightedTextColourId); + if (isMissing()) return Colours::red; + if (isSelected()) return getOwnerView()->findColour (defaultHighlightedTextColourId); + if (hasWarnings()) return getOwnerView()->findColour (defaultHighlightColourId); return getOwnerView()->findColour (isIcon ? treeIconColourId : defaultTextColourId); } diff --git a/extras/Projucer/Source/Utility/jucer_JucerTreeViewBase.h b/extras/Projucer/Source/Utility/jucer_JucerTreeViewBase.h index 3e1b1329b8..754a23360b 100644 --- a/extras/Projucer/Source/Utility/jucer_JucerTreeViewBase.h +++ b/extras/Projucer/Source/Utility/jucer_JucerTreeViewBase.h @@ -49,20 +49,21 @@ public: void cancelDelayedSelectionTimer(); //============================================================================== - virtual bool isRoot() const { return false; } + virtual bool isRoot() const { return false; } virtual Font getFont() const; virtual String getRenamingName() const = 0; virtual String getDisplayName() const = 0; virtual void setName (const String& newName) = 0; virtual bool isMissing() const = 0; + virtual bool hasWarnings() const { return false; } virtual Icon getIcon() const = 0; virtual bool isIconCrossedOut() const { return false; } virtual void paintIcon (Graphics& g, Rectangle area); virtual void paintContent (Graphics& g, const Rectangle& area); virtual int getRightHandButtonSpace() { return 0; } virtual Colour getContentColour (bool isIcon) const; - virtual int getMillisecsAllowedForDragGesture() { return 120; } - virtual File getDraggableFile() const { return {}; } + virtual int getMillisecsAllowedForDragGesture() { return 120; } + virtual File getDraggableFile() const { return {}; } virtual Component* createItemComponent() override; void refreshSubItems(); diff --git a/extras/Projucer/Source/Utility/jucer_MiscUtilities.cpp b/extras/Projucer/Source/Utility/jucer_MiscUtilities.cpp index 3025283e43..d61e0e7f1e 100644 --- a/extras/Projucer/Source/Utility/jucer_MiscUtilities.cpp +++ b/extras/Projucer/Source/Utility/jucer_MiscUtilities.cpp @@ -97,7 +97,8 @@ StringPairArray parsePreprocessorDefs (const String& text) { ++s; - s = s.findEndOfWhitespace(); + while ((! s.isEmpty()) && *s == ' ') + ++s; while ((! s.isEmpty()) && ! s.isWhitespace()) { diff --git a/extras/Projucer/Source/Utility/jucer_PresetIDs.h b/extras/Projucer/Source/Utility/jucer_PresetIDs.h index ea92d98b4f..ba76993b29 100644 --- a/extras/Projucer/Source/Utility/jucer_PresetIDs.h +++ b/extras/Projucer/Source/Utility/jucer_PresetIDs.h @@ -39,6 +39,7 @@ namespace Ids DECLARE_ID (vendor); DECLARE_ID (version); DECLARE_ID (license); + DECLARE_ID (minimumCppStandard); DECLARE_ID (include); DECLARE_ID (info); DECLARE_ID (description); @@ -59,6 +60,11 @@ namespace Ids DECLARE_ID (intermediatesPath); DECLARE_ID (modulePaths); DECLARE_ID (searchpaths); + DECLARE_ID (osxFallback); + DECLARE_ID (windowsFallback); + DECLARE_ID (linuxFallback); + DECLARE_ID (defaultJuceModulePath); + DECLARE_ID (defaultUserModulePath); DECLARE_ID (vst3Folder); DECLARE_ID (rtasFolder); DECLARE_ID (auFolder); @@ -88,7 +94,9 @@ namespace Ids DECLARE_ID (customXcodeFlags); DECLARE_ID (customXcassetsFolder); DECLARE_ID (customXcodeResourceFolders); + DECLARE_ID (plistPreprocessorDefinitions); DECLARE_ID (cppLanguageStandard); + DECLARE_ID (enableGNUExtensions); DECLARE_ID (cppLibType); DECLARE_ID (codeSigningIdentity); DECLARE_ID (fastMath); @@ -152,10 +160,14 @@ namespace Ids DECLARE_ID (focusOrder); DECLARE_ID (hidden); DECLARE_ID (useStdCall); + DECLARE_ID (useGlobalPath); DECLARE_ID (showAllCode); DECLARE_ID (useLocalCopy); DECLARE_ID (overwriteOnSave); DECLARE_ID (microphonePermissionNeeded); + DECLARE_ID (androidRepositories); + DECLARE_ID (androidDependencies); + DECLARE_ID (androidAdditionalXmlValueResources); DECLARE_ID (androidActivityClass); DECLARE_ID (androidActivitySubClassName); DECLARE_ID (androidVersionCode); @@ -163,7 +175,11 @@ namespace Ids DECLARE_ID (androidNDKPath); DECLARE_ID (androidInternetNeeded); DECLARE_ID (androidArchitectures); + DECLARE_ID (androidManifestCustomXmlElements); + DECLARE_ID (androidCustomStringXmlElements); DECLARE_ID (androidBluetoothNeeded); + DECLARE_ID (androidExternalReadNeeded); + DECLARE_ID (androidExternalWriteNeeded); DECLARE_ID (androidMinimumSDK); DECLARE_ID (androidOtherPermissions); DECLARE_ID (androidKeyStore); @@ -179,7 +195,11 @@ namespace Ids DECLARE_ID (iosInAppPurchases); DECLARE_ID (iosBackgroundAudio); DECLARE_ID (iosBackgroundBle); + DECLARE_ID (iosPushNotifications); + DECLARE_ID (iosAppGroups); DECLARE_ID (iosDevelopmentTeamID); + DECLARE_ID (iosAppGroupsId); + DECLARE_ID (iosAppExtensionDuplicateResourcesFolder); DECLARE_ID (buildToolsVersion); DECLARE_ID (gradleVersion); const Identifier androidPluginVersion ("gradleWrapperVersion"); // old name is very confusing, but we need to remain backward compatible diff --git a/extras/Projucer/Source/Utility/jucer_ProjucerLookAndFeel.cpp b/extras/Projucer/Source/Utility/jucer_ProjucerLookAndFeel.cpp index 9d2909eed3..58351b9642 100644 --- a/extras/Projucer/Source/Utility/jucer_ProjucerLookAndFeel.cpp +++ b/extras/Projucer/Source/Utility/jucer_ProjucerLookAndFeel.cpp @@ -231,7 +231,7 @@ void ProjucerLookAndFeel::layoutFileBrowserComponent (FileBrowserComponent& brow topSlice.removeFromLeft (6); goUpButton->setBounds (topSlice); - bottomSlice.removeFromLeft (20); + bottomSlice.removeFromLeft (50); filenameBox->setBounds (bottomSlice); filenameBox->setColour (TextEditor::backgroundColourId, findColour (backgroundColourId)); filenameBox->setColour (TextEditor::textColourId, findColour (defaultTextColourId)); @@ -246,11 +246,11 @@ void ProjucerLookAndFeel::layoutFileBrowserComponent (FileBrowserComponent& brow } void ProjucerLookAndFeel::drawFileBrowserRow (Graphics& g, int width, int height, - const String& filename, Image* icon, + const File& file, const String& filename, Image* icon, const String& fileSizeDescription, const String& fileTimeDescription, - const bool isDirectory, const bool isItemSelected, - const int itemIndex, DirectoryContentsDisplayComponent& dcc) + bool isDirectory, bool isItemSelected, + int itemIndex, DirectoryContentsDisplayComponent& dcc) { if (auto fileListComp = dynamic_cast (&dcc)) { @@ -258,11 +258,11 @@ void ProjucerLookAndFeel::drawFileBrowserRow (Graphics& g, int width, int height findColour (isItemSelected ? defaultHighlightedTextColourId : defaultTextColourId)); fileListComp->setColour (DirectoryContentsDisplayComponent::highlightColourId, - findColour (defaultHighlightColourId)); + findColour (defaultHighlightColourId).withAlpha (0.75f)); } - LookAndFeel_V2::drawFileBrowserRow (g, width, height, filename, icon, + LookAndFeel_V2::drawFileBrowserRow (g, width, height, file, filename, icon, fileSizeDescription, fileTimeDescription, isDirectory, isItemSelected, itemIndex, dcc); } @@ -303,7 +303,7 @@ void ProjucerLookAndFeel::drawMenuBarItem (Graphics& g, int width, int height, } else if (isMenuOpen || isMouseOverItem) { - g.fillAll (menuBar.findColour (defaultHighlightColourId)); + g.fillAll (menuBar.findColour (defaultHighlightColourId).withAlpha (0.75f)); g.setColour (menuBar.findColour (defaultHighlightedTextColourId)); } else @@ -532,7 +532,7 @@ void ProjucerLookAndFeel::setupColours() setColour (widgetTextColourId, Colours::black); setColour (defaultButtonBackgroundColourId, Colour (0xff42a2c8)); setColour (secondaryButtonBackgroundColourId, Colour (0xffa1c677)); - setColour (userButtonBackgroundColourId, Colour (0xffff5b5b)); + setColour (userButtonBackgroundColourId, Colour (0xff42a2c8)); setColour (defaultIconColourId, Colours::white); setColour (treeIconColourId, Colour (0xffa9a9a9)); setColour (defaultHighlightColourId, Colour (0xffffd05b)); @@ -548,7 +548,7 @@ void ProjucerLookAndFeel::setupColours() setColour (Label::textColourId, findColour (defaultTextColourId)); setColour (Label::textWhenEditingColourId, findColour (widgetTextColourId)); - setColour (TextEditor::highlightColourId, findColour (defaultHighlightColourId)); + setColour (TextEditor::highlightColourId, findColour (defaultHighlightColourId).withAlpha (0.75f)); setColour (TextEditor::highlightedTextColourId, findColour (defaultHighlightedTextColourId)); setColour (TextEditor::outlineColourId, Colours::transparentBlack); setColour (TextEditor::focusedOutlineColourId, Colours::transparentBlack); @@ -569,4 +569,6 @@ void ProjucerLookAndFeel::setupColours() setColour (CodeEditorComponent::highlightColourId, findColour (defaultHighlightColourId).withAlpha (0.5f)); setColour (CaretComponent::caretColourId, findColour (defaultButtonBackgroundColourId)); setColour (TreeView::selectedItemBackgroundColourId, findColour (defaultHighlightColourId)); + setColour (PopupMenu::highlightedBackgroundColourId, findColour (defaultHighlightColourId).withAlpha (0.75f)); + setColour (PopupMenu::highlightedTextColourId, findColour (defaultHighlightedTextColourId)); } diff --git a/extras/Projucer/Source/Utility/jucer_ProjucerLookAndFeel.h b/extras/Projucer/Source/Utility/jucer_ProjucerLookAndFeel.h index 093284cc48..4922afbba0 100644 --- a/extras/Projucer/Source/Utility/jucer_ProjucerLookAndFeel.h +++ b/extras/Projucer/Source/Utility/jucer_ProjucerLookAndFeel.h @@ -53,7 +53,7 @@ public: void layoutFileBrowserComponent (FileBrowserComponent&, DirectoryContentsDisplayComponent*, FilePreviewComponent*, ComboBox* currentPathBox, TextEditor* filenameBox,Button* goUpButton) override; - void drawFileBrowserRow (Graphics&, int width, int height, const String& filename, Image* icon, + void drawFileBrowserRow (Graphics&, int width, int height, const File&, const String& filename, Image* icon, const String& fileSizeDescription, const String& fileTimeDescription, bool isDirectory, bool isItemSelected, int itemIndex, DirectoryContentsDisplayComponent&) override; diff --git a/extras/Projucer/Source/Utility/jucer_StoredSettings.cpp b/extras/Projucer/Source/Utility/jucer_StoredSettings.cpp index ef4b6cc09a..9d5c651d67 100644 --- a/extras/Projucer/Source/Utility/jucer_StoredSettings.cpp +++ b/extras/Projucer/Source/Utility/jucer_StoredSettings.cpp @@ -27,7 +27,6 @@ #include "../jucer_Headers.h" #include "jucer_StoredSettings.h" #include "../Application/jucer_Application.h" -#include "../Application/jucer_GlobalPreferences.h" //============================================================================== StoredSettings& getAppSettings() @@ -42,16 +41,20 @@ PropertiesFile& getGlobalProperties() //============================================================================== StoredSettings::StoredSettings() - : appearance (true), projectDefaults ("PROJECT_DEFAULT_SETTINGS") + : appearance (true), + projectDefaults ("PROJECT_DEFAULT_SETTINGS"), + fallbackPaths ("FALLBACK_PATHS") { updateOldProjectSettingsFiles(); reload(); projectDefaults.addListener (this); + fallbackPaths.addListener (this); } StoredSettings::~StoredSettings() { projectDefaults.removeListener (this); + fallbackPaths.removeListener (this); flush(); } @@ -122,10 +125,13 @@ void StoredSettings::reload() propertyFiles.add (createPropsFile ("Projucer", false)); ScopedPointer projectDefaultsXml (propertyFiles.getFirst()->getXmlValue ("PROJECT_DEFAULT_SETTINGS")); - if (projectDefaultsXml != nullptr) projectDefaults = ValueTree::fromXml (*projectDefaultsXml); + ScopedPointer fallbackPathsXml (propertyFiles.getFirst()->getXmlValue ("FALLBACK_PATHS")); + if (fallbackPathsXml != nullptr) + fallbackPaths = ValueTree::fromXml (*fallbackPathsXml); + // recent files... recentFiles.restoreFromString (getGlobalProperties().getValue ("recentFiles")); recentFiles.removeNonExistentFiles(); @@ -228,61 +234,76 @@ void StoredSettings::ColourSelectorWithSwatches::setSwatchColour (int index, con } //============================================================================== -static bool doesSDKPathContainFile (const File& relativeTo, const String& path, const String& fileToCheckFor) -{ - auto actualPath = path.replace ("${user.home}", File::getSpecialLocation (File::userHomeDirectory).getFullPathName()); - return relativeTo.getChildFile (actualPath + "/" + fileToCheckFor).existsAsFile(); -} - -Value StoredSettings::getGlobalPath (const Identifier& key, DependencyPathOS os) +Value StoredSettings::getStoredPath (const Identifier& key) { auto v = projectDefaults.getPropertyAsValue (key, nullptr); + if (v.toString().isEmpty()) + v = getFallbackPathForOS (key, TargetOS::getThisOS()).toString(); + + return v; +} + +Value StoredSettings::getFallbackPathForOS (const Identifier& key, DependencyPathOS os) +{ + auto id = Identifier(); + + if (os == TargetOS::osx) id = Ids::osxFallback; + else if (os == TargetOS::windows) id = Ids::windowsFallback; + else if (os == TargetOS::linux) id = Ids::linuxFallback; + + if (id == Identifier()) + jassertfalse; + + auto v = fallbackPaths.getOrCreateChildWithName (id, nullptr) + .getPropertyAsValue (key, nullptr); + if (v.toString().isEmpty()) { - auto defaultPath = getFallbackPath (key, os); - if (os == TargetOS::getThisOS()) - v = defaultPath; + if (key == Ids::defaultJuceModulePath) + { + v = (os == TargetOS::windows ? "C:\\JUCE\\modules" + : "~/JUCE/modules"); + } + else if (key == Ids::defaultUserModulePath) + { + v = (os == TargetOS::windows ? "C:\\modules" + : "~/modules"); + } + else if (key == Ids::vst3Path) + { + v = (os == TargetOS::windows ? "C:\\SDKs\\VST_SDK\\VST3_SDK" + : "~/SDKs/VST_SDK/VST3_SDK"); + } + else if (key == Ids::rtasPath) + { + if (os == TargetOS::windows) v = "C:\\SDKs\\PT_90_SDK"; + else if (os == TargetOS::osx) v = "~/SDKs/PT_90_SDK"; + else jassertfalse; // no RTAS on this OS! + } + else if (key == Ids::aaxPath) + { + if (os == TargetOS::windows) v = "C:\\SDKs\\AAX"; + else if (os == TargetOS::osx) v = "~/SDKs/AAX" ; + else jassertfalse; // no AAX on this OS! + } + else if (key == Ids::androidSDKPath) + { + v = "${user.home}/Library/Android/sdk"; + } + else if (key == Ids::androidNDKPath) + { + v = "${user.home}/Library/Android/sdk/ndk-bundle"; + } } return v; } -String StoredSettings::getFallbackPath (const Identifier& key, DependencyPathOS os) +static bool doesSDKPathContainFile (const File& relativeTo, const String& path, const String& fileToCheckFor) { - if (key == Ids::vst3Path) - return os == TargetOS::windows ? "c:\\SDKs\\VST_SDK\\VST3_SDK" - : "~/SDKs/VST_SDK/VST3_SDK"; - - if (key == Ids::rtasPath) - { - if (os == TargetOS::windows) return "c:\\SDKs\\PT_90_SDK"; - if (os == TargetOS::osx) return "~/SDKs/PT_90_SDK"; - - // no RTAS on this OS! - jassertfalse; - return {}; - } - - if (key == Ids::aaxPath) - { - if (os == TargetOS::windows) return "c:\\SDKs\\AAX"; - if (os == TargetOS::osx) return "~/SDKs/AAX" ; - - // no AAX on this OS! - jassertfalse; - return {}; - } - - if (key == Ids::androidSDKPath) - return "${user.home}/Library/Android/sdk"; - - if (key == Ids::androidNDKPath) - return "${user.home}/Library/Android/sdk/ndk-bundle"; - - // didn't recognise the key provided! - jassertfalse; - return {}; + auto actualPath = path.replace ("${user.home}", File::getSpecialLocation (File::userHomeDirectory).getFullPathName()); + return relativeTo.getChildFile (actualPath + "/" + fileToCheckFor).exists(); } bool StoredSettings::isGlobalPathValid (const File& relativeTo, const Identifier& key, const String& path) @@ -317,6 +338,14 @@ bool StoredSettings::isGlobalPathValid (const File& relativeTo, const Identifier fileToCheckFor = "ndk-depends"; #endif } + else if (key == Ids::defaultJuceModulePath) + { + fileToCheckFor = "juce_core"; + } + else if (key == Ids::defaultUserModulePath) + { + fileToCheckFor = {}; + } else { // didn't recognise the key provided! diff --git a/extras/Projucer/Source/Utility/jucer_StoredSettings.h b/extras/Projucer/Source/Utility/jucer_StoredSettings.h index ba0efa8a51..183b7f7483 100644 --- a/extras/Projucer/Source/Utility/jucer_StoredSettings.h +++ b/extras/Projucer/Source/Utility/jucer_StoredSettings.h @@ -62,23 +62,27 @@ public: //============================================================================== AppearanceSettings appearance; - StringArray monospacedFontNames; //============================================================================== - Value getGlobalPath (const Identifier& key, DependencyPathOS); - String getFallbackPath (const Identifier& key, DependencyPathOS); + Value getStoredPath (const Identifier& key); + Value getFallbackPathForOS (const Identifier& key, DependencyPathOS); bool isGlobalPathValid (const File& relativeTo, const Identifier& key, const String& path); private: OwnedArray propertyFiles; ValueTree projectDefaults; + ValueTree fallbackPaths; - void changed() + void changed (bool isProjectDefaults) { - ScopedPointer data (projectDefaults.createXml()); - propertyFiles.getUnchecked (0)->setValue ("PROJECT_DEFAULT_SETTINGS", data); + ScopedPointer data (isProjectDefaults ? projectDefaults.createXml() + : fallbackPaths.createXml()); + + propertyFiles.getUnchecked (0)->setValue (isProjectDefaults ? "PROJECT_DEFAULT_SETTINGS" + : "FALLBACK_PATHS", + data); } void updateGlobalPreferences(); @@ -91,11 +95,11 @@ private: void updateOldProjectSettingsFiles(); //============================================================================== - void valueTreePropertyChanged (ValueTree&, const Identifier&) override { changed(); } - void valueTreeChildAdded (ValueTree&, ValueTree&) override { changed(); } - void valueTreeChildRemoved (ValueTree&, ValueTree&, int) override { changed(); } - void valueTreeChildOrderChanged (ValueTree&, int, int) override { changed(); } - void valueTreeParentChanged (ValueTree&) override { changed(); } + void valueTreePropertyChanged (ValueTree& vt, const Identifier&) override { changed (vt == projectDefaults); } + void valueTreeChildAdded (ValueTree& vt, ValueTree&) override { changed (vt == projectDefaults); } + void valueTreeChildRemoved (ValueTree& vt, ValueTree&, int) override { changed (vt == projectDefaults); } + void valueTreeChildOrderChanged (ValueTree& vt, int, int) override { changed (vt == projectDefaults); } + void valueTreeParentChanged (ValueTree& vt) override { changed (vt == projectDefaults); } JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (StoredSettings) }; diff --git a/extras/Projucer/Source/Wizards/jucer_NewProjectWizard.h b/extras/Projucer/Source/Wizards/jucer_NewProjectWizard.h index ca2d578abc..ab7b26e2c9 100644 --- a/extras/Projucer/Source/Wizards/jucer_NewProjectWizard.h +++ b/extras/Projucer/Source/Wizards/jucer_NewProjectWizard.h @@ -103,7 +103,8 @@ struct NewProjectWizard //============================================================================== Project* runWizard (WizardComp& wc, const String& projectName, - const File& target) + const File& target, + bool useGlobalPath) { ownerWizardComp = &wc; appTitle = projectName; @@ -140,7 +141,7 @@ struct NewProjectWizard return nullptr; addExporters (*project, wc); - addDefaultModules (*project, false); + addDefaultModules (*project, useGlobalPath); if (project->save (false, true) != FileBasedDocument::savedOk) return nullptr; @@ -173,7 +174,7 @@ struct NewProjectWizard failedFiles.add (getSourceFilesFolder().getFullPathName()); } - void addDefaultModules (Project& project, bool areModulesCopiedLocally) + void addDefaultModules (Project& project, bool useGlobalPath) { StringArray mods (getDefaultModules()); @@ -182,7 +183,7 @@ struct NewProjectWizard for (int i = 0; i < mods.size(); ++i) if (const ModuleDescription* info = list.getModuleWithID (mods[i])) - project.getModules().addModule (info->moduleFolder, areModulesCopiedLocally); + project.getModules().addModule (info->moduleFolder, false, useGlobalPath); } void addExporters (Project& project, WizardComp& wizardComp) diff --git a/extras/Projucer/Source/Wizards/jucer_NewProjectWizardComponent.h b/extras/Projucer/Source/Wizards/jucer_NewProjectWizardComponent.h index 5667c57e24..acc01bd3fd 100644 --- a/extras/Projucer/Source/Wizards/jucer_NewProjectWizardComponent.h +++ b/extras/Projucer/Source/Wizards/jucer_NewProjectWizardComponent.h @@ -35,10 +35,11 @@ public: ModulesFolderPathBox (File initialFileOrDirectory) : currentPathBox ("currentPathBox"), openFolderButton (TRANS("...")), - modulesLabel (String(), TRANS("Modules Folder") + ":") + modulesLabel (String(), TRANS("Modules Folder") + ":"), + useGlobalPathsToggle ("Use global module path") { if (initialFileOrDirectory == File()) - initialFileOrDirectory = findDefaultModulesFolder(); + initialFileOrDirectory = EnabledModuleList::findGlobalModulesFolder(); setModulesFolder (initialFileOrDirectory); @@ -52,15 +53,24 @@ public: addAndMakeVisible (modulesLabel); modulesLabel.attachToComponent (¤tPathBox, true); + + addAndMakeVisible (useGlobalPathsToggle); + useGlobalPathsToggle.addListener (this); + useGlobalPathsToggle.setToggleState (true, sendNotification); } void resized() override { - auto r = getLocalBounds(); + auto b = getLocalBounds(); - openFolderButton.setBounds (r.removeFromRight (30)); - modulesLabel.setBounds (r.removeFromLeft (110)); - currentPathBox.setBounds (r); + auto topSlice = b.removeFromTop (b.getHeight() / 2); + + openFolderButton.setBounds (topSlice.removeFromRight (30)); + modulesLabel.setBounds (topSlice.removeFromLeft (110)); + currentPathBox.setBounds (topSlice); + + b.removeFromTop (5); + useGlobalPathsToggle.setBounds (b.translated (20, 0)); } static bool selectJuceFolder (File& result) @@ -68,7 +78,7 @@ public: for (;;) { FileChooser fc ("Select your JUCE modules folder...", - findDefaultModulesFolder(), + EnabledModuleList::findGlobalModulesFolder(), "*"); if (! fc.browseForDirectory()) @@ -104,9 +114,21 @@ public: } } - void buttonClicked (Button*) override + void buttonClicked (Button* b) override { - selectJuceFolder(); + if (b == &openFolderButton) + { + selectJuceFolder(); + } + else if (b == &useGlobalPathsToggle) + { + isUsingGlobalPaths = useGlobalPathsToggle.getToggleState(); + + currentPathBox.setEnabled (! isUsingGlobalPaths); + openFolderButton.setEnabled (! isUsingGlobalPaths); + modulesLabel.setEnabled (! isUsingGlobalPaths); + } + } void comboBoxChanged (ComboBox*) override @@ -115,11 +137,13 @@ public: } File modulesFolder; + bool isUsingGlobalPaths; private: ComboBox currentPathBox; TextButton openFolderButton; Label modulesLabel; + ToggleButton useGlobalPathsToggle; }; @@ -280,7 +304,7 @@ public: WizardComp() : platformTargets(), projectName (TRANS("Project name")), - modulesPathBox (findDefaultModulesFolder()) + modulesPathBox (EnabledModuleList::findGlobalModulesFolder()) { setOpaque (false); @@ -355,7 +379,7 @@ public: filesToCreate.setBounds (right.removeFromTop (22).withTrimmedLeft (150)); right.removeFromTop (20); - modulesPathBox.setBounds (right.removeFromTop (22)); + modulesPathBox.setBounds (right.removeFromTop (50)); right.removeFromTop (20); targetsOutline.setBounds (right); @@ -404,14 +428,27 @@ public: return; } - wizard->modulesFolder = modulesPathBox.modulesFolder; + + wizard->modulesFolder = modulesPathBox.isUsingGlobalPaths ? File (getAppSettings().getStoredPath (Ids::defaultJuceModulePath).toString()) + : modulesPathBox.modulesFolder; if (! isJuceModulesFolder (wizard->modulesFolder)) + { + if (modulesPathBox.isUsingGlobalPaths) + AlertWindow::showMessageBox (AlertWindow::AlertIconType::WarningIcon, "Invalid Global Path", + "Your global JUCE module search path is invalid. Please select the folder containing your JUCE modules " + "to set as the default path."); + if (! wizard->selectJuceFolder()) return; + if (modulesPathBox.isUsingGlobalPaths) + getAppSettings().getStoredPath (Ids::defaultJuceModulePath).setValue (wizard->modulesFolder.getFullPathName()); + } + if (ScopedPointer project = wizard->runWizard (*this, projectName.getText(), - fileBrowser.getSelectedFile (0))) + fileBrowser.getSelectedFile (0), + modulesPathBox.isUsingGlobalPaths)) mw->setProject (project.release()); } } diff --git a/extras/Projucer/Source/Wizards/jucer_ProjectWizard_AudioPlugin.h b/extras/Projucer/Source/Wizards/jucer_ProjectWizard_AudioPlugin.h index eefc8df72d..0454af0ac7 100644 --- a/extras/Projucer/Source/Wizards/jucer_ProjectWizard_AudioPlugin.h +++ b/extras/Projucer/Source/Wizards/jucer_ProjectWizard_AudioPlugin.h @@ -36,6 +36,8 @@ struct AudioPluginAppWizard : public NewProjectWizard { StringArray s (NewProjectWizard::getDefaultModules()); s.add ("juce_audio_plugin_client"); + s.add ("juce_audio_utils"); + return s; } @@ -53,6 +55,7 @@ struct AudioPluginAppWizard : public NewProjectWizard File editorHFile = editorCppFile.withFileExtension (".h"); project.getProjectTypeValue() = ProjectType_AudioPlugin::getTypeName(); + project.getShouldBuildStandalonePluginAsValue().setValue (true); Project::Item sourceGroup (createSourceGroup (project)); project.getConfigFlag ("JUCE_QUICKTIME") = Project::configFlagDisabled; // disabled because it interferes with RTAS build on PC diff --git a/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile b/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile index 23659c8646..429583776f 100644 --- a/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile +++ b/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile @@ -38,7 +38,7 @@ ifeq ($(CONFIG),Debug) JUCE_TARGET_CONSOLEAPP := UnitTestRunner JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) - JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) -std=c++11 $(CXXFLAGS) + JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -lGL -ldl -lpthread -lrt $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) @@ -59,7 +59,7 @@ ifeq ($(CONFIG),Release) JUCE_TARGET_CONSOLEAPP := UnitTestRunner JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 $(CFLAGS) - JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) -std=c++11 $(CXXFLAGS) + JUCE_CXXFLAGS += $(CXXFLAGS) $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ $(shell pkg-config --libs alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -lGL -ldl -lpthread -lrt $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) @@ -71,19 +71,25 @@ OBJECTS_CONSOLEAPP := \ $(JUCE_OBJDIR)/include_juce_audio_devices_63111d02.o \ $(JUCE_OBJDIR)/include_juce_audio_formats_15f82001.o \ $(JUCE_OBJDIR)/include_juce_audio_processors_10c03666.o \ + $(JUCE_OBJDIR)/include_juce_audio_utils_9f9fb2d6.o \ + $(JUCE_OBJDIR)/include_juce_blocks_basics_90805d6c.o \ $(JUCE_OBJDIR)/include_juce_core_f26d17db.o \ $(JUCE_OBJDIR)/include_juce_cryptography_8cb807a8.o \ $(JUCE_OBJDIR)/include_juce_data_structures_7471b1e3.o \ + $(JUCE_OBJDIR)/include_juce_dsp_aeb2060f.o \ $(JUCE_OBJDIR)/include_juce_events_fd7d695.o \ $(JUCE_OBJDIR)/include_juce_graphics_f817e147.o \ $(JUCE_OBJDIR)/include_juce_gui_basics_e3f79785.o \ $(JUCE_OBJDIR)/include_juce_gui_extra_6dee1c1a.o \ $(JUCE_OBJDIR)/include_juce_opengl_a8a032b.o \ $(JUCE_OBJDIR)/include_juce_osc_f3df604d.o \ + $(JUCE_OBJDIR)/include_juce_product_unlocking_8278fcdc.o \ $(JUCE_OBJDIR)/include_juce_video_be78589.o \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_CONSOLEAPP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_CONSOLEAPP) : check-pkg-config $(OBJECTS_CONSOLEAPP) $(RESOURCES) @echo Linking "UnitTestRunner - ConsoleApp" -$(V_AT)mkdir -p $(JUCE_BINDIR) @@ -116,6 +122,16 @@ $(JUCE_OBJDIR)/include_juce_audio_processors_10c03666.o: ../../JuceLibraryCode/i @echo "Compiling include_juce_audio_processors.cpp" $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_CONSOLEAPP) $(JUCE_CFLAGS_CONSOLEAPP) -o "$@" -c "$<" +$(JUCE_OBJDIR)/include_juce_audio_utils_9f9fb2d6.o: ../../JuceLibraryCode/include_juce_audio_utils.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_audio_utils.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_CONSOLEAPP) $(JUCE_CFLAGS_CONSOLEAPP) -o "$@" -c "$<" + +$(JUCE_OBJDIR)/include_juce_blocks_basics_90805d6c.o: ../../JuceLibraryCode/include_juce_blocks_basics.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_blocks_basics.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_CONSOLEAPP) $(JUCE_CFLAGS_CONSOLEAPP) -o "$@" -c "$<" + $(JUCE_OBJDIR)/include_juce_core_f26d17db.o: ../../JuceLibraryCode/include_juce_core.cpp -$(V_AT)mkdir -p $(JUCE_OBJDIR) @echo "Compiling include_juce_core.cpp" @@ -131,6 +147,11 @@ $(JUCE_OBJDIR)/include_juce_data_structures_7471b1e3.o: ../../JuceLibraryCode/in @echo "Compiling include_juce_data_structures.cpp" $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_CONSOLEAPP) $(JUCE_CFLAGS_CONSOLEAPP) -o "$@" -c "$<" +$(JUCE_OBJDIR)/include_juce_dsp_aeb2060f.o: ../../JuceLibraryCode/include_juce_dsp.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_dsp.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_CONSOLEAPP) $(JUCE_CFLAGS_CONSOLEAPP) -o "$@" -c "$<" + $(JUCE_OBJDIR)/include_juce_events_fd7d695.o: ../../JuceLibraryCode/include_juce_events.cpp -$(V_AT)mkdir -p $(JUCE_OBJDIR) @echo "Compiling include_juce_events.cpp" @@ -161,6 +182,11 @@ $(JUCE_OBJDIR)/include_juce_osc_f3df604d.o: ../../JuceLibraryCode/include_juce_o @echo "Compiling include_juce_osc.cpp" $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_CONSOLEAPP) $(JUCE_CFLAGS_CONSOLEAPP) -o "$@" -c "$<" +$(JUCE_OBJDIR)/include_juce_product_unlocking_8278fcdc.o: ../../JuceLibraryCode/include_juce_product_unlocking.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling include_juce_product_unlocking.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_CONSOLEAPP) $(JUCE_CFLAGS_CONSOLEAPP) -o "$@" -c "$<" + $(JUCE_OBJDIR)/include_juce_video_be78589.o: ../../JuceLibraryCode/include_juce_video.cpp -$(V_AT)mkdir -p $(JUCE_OBJDIR) @echo "Compiling include_juce_video.cpp" diff --git a/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj b/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj index d3210075f2..8895ed78a4 100644 --- a/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj +++ b/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj @@ -10,11 +10,13 @@ A70F7F4891DB1CF67653BE74 = {isa = PBXBuildFile; fileRef = B38A1AC42B002115350C0268; }; 96EFF7BA261F57DD829324D8 = {isa = PBXBuildFile; fileRef = 7898C73DCA6FA9D9CF669D32; }; 6EB1A3B818863EF1787A9CCE = {isa = PBXBuildFile; fileRef = 4B427AF10E722F9A362CEB73; }; + D82BA4D40F5686DAFF5E11FB = {isa = PBXBuildFile; fileRef = 99527F36B4484133087435CD; }; 59004CE43AE081B4A6CE9E17 = {isa = PBXBuildFile; fileRef = 1932D54A7FAE13BADBA3E9B5; }; AA207299991F85938465BF65 = {isa = PBXBuildFile; fileRef = 2030A589A9355FE6A0F72428; }; 66FC7F44EEC9044E5C4A21C3 = {isa = PBXBuildFile; fileRef = C0531453A002C480280C5F05; }; 0C1B9B95BC99382C313BEABC = {isa = PBXBuildFile; fileRef = 8ED5AB2E4E106FB97C033C5B; }; 8D51903C59161885903F60CC = {isa = PBXBuildFile; fileRef = 04C1B8BF62AA09E62B362913; }; + 32010EA67EEFE024B9CE1CB5 = {isa = PBXBuildFile; fileRef = B4202EE1243A8FCA29996D05; }; 263250D6F359CE403B0566FF = {isa = PBXBuildFile; fileRef = 8C449538B266A891147103D6; }; 17A09B4AF453B148CD7349F4 = {isa = PBXBuildFile; fileRef = FCB76958E12B2D7F8277CD59; }; 1A038A2954FB9A4F208BE3F2 = {isa = PBXBuildFile; fileRef = F260758DB97CF0F5C85218C1; }; @@ -25,15 +27,19 @@ 33D24B475EA928745A87EDDB = {isa = PBXBuildFile; fileRef = 00CDB93410EA5AECBA5ADA95; }; FDDF955477BE7FEBC364E19B = {isa = PBXBuildFile; fileRef = A76DD7182C290A9020C96CA7; }; 74EC8AEC296DB2721EB438BF = {isa = PBXBuildFile; fileRef = 3A26A3568F2C301EEED25288; }; + 3822F598DA7044E5DB7633A9 = {isa = PBXBuildFile; fileRef = 846E187EC2E797B982861CA4; }; + 1DD34A677AE8AE533BF6DE53 = {isa = PBXBuildFile; fileRef = AFF0739E38CAEA8CA14FE733; }; 9B48039CDFD679AD944BAC70 = {isa = PBXBuildFile; fileRef = AB19DDC8458D2A420E6D8AC3; }; FC139F56BD13A2C78D21076E = {isa = PBXBuildFile; fileRef = 08ED235CBE02E0FB4BE4653E; }; 5CB3596030B0DD3763CAF85C = {isa = PBXBuildFile; fileRef = 302A999B2803C0D5C15D237C; }; + FD15EF066F019B57F0601D71 = {isa = PBXBuildFile; fileRef = 4CA19EC18C2BC536B3636842; }; A4C15593F5B4E1BE338F4F63 = {isa = PBXBuildFile; fileRef = 3D169C5EFBF6304F5CE4C35E; }; A1A39E64F9E03EFFA10B0A10 = {isa = PBXBuildFile; fileRef = EECBAA403D2D6AEEA8CB05EB; }; D43289CF624A7B068237C192 = {isa = PBXBuildFile; fileRef = 583EA0E5C4B75A629AEF1157; }; AF1FE82A4A20DCB8944B35C7 = {isa = PBXBuildFile; fileRef = 4195CB317C364D778AE2ADB1; }; 1D06F1A254F84A7AE3E90DF2 = {isa = PBXBuildFile; fileRef = 1CA82C74AEC08421812BDCAC; }; 7164274FE42C7EC423455E05 = {isa = PBXBuildFile; fileRef = A59D9064C3A2D7EC3DC45420; }; + 193B1966563B502545A8F940 = {isa = PBXBuildFile; fileRef = E1B7806BF78D66D1E59D7254; }; FD00BAFFDB552AA3EB03B893 = {isa = PBXBuildFile; fileRef = 1088318C19CEB1861C58B3BA; }; 00CDB93410EA5AECBA5ADA95 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_devices.mm"; path = "../../JuceLibraryCode/include_juce_audio_devices.mm"; sourceTree = "SOURCE_ROOT"; }; 04C1B8BF62AA09E62B362913 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; }; @@ -46,6 +52,7 @@ 1DC921E6494548F5E73E1056 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_graphics"; path = "../../../../modules/juce_graphics"; sourceTree = "SOURCE_ROOT"; }; 2030A589A9355FE6A0F72428 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 2A163F48282EEE95B8A8BA7A = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_extra"; path = "../../../../modules/juce_gui_extra"; sourceTree = "SOURCE_ROOT"; }; + 2A889138F8B9285E95BDEEE6 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_utils"; path = "../../../../modules/juce_audio_utils"; sourceTree = "SOURCE_ROOT"; }; 2C4310E5B49051FC40238E11 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = "SOURCE_ROOT"; }; 302A999B2803C0D5C15D237C = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_data_structures.mm"; path = "../../JuceLibraryCode/include_juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; }; 31323D62C5754F4248607F0B = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_basics"; path = "../../../../modules/juce_audio_basics"; sourceTree = "SOURCE_ROOT"; }; @@ -55,28 +62,37 @@ 4195CB317C364D778AE2ADB1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_extra.mm"; path = "../../JuceLibraryCode/include_juce_gui_extra.mm"; sourceTree = "SOURCE_ROOT"; }; 4B427AF10E722F9A362CEB73 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 4BD792956FE7C22CB8FB691D = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_basics.mm"; path = "../../JuceLibraryCode/include_juce_audio_basics.mm"; sourceTree = "SOURCE_ROOT"; }; + 4CA19EC18C2BC536B3636842 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_dsp.mm"; path = "../../JuceLibraryCode/include_juce_dsp.mm"; sourceTree = "SOURCE_ROOT"; }; 583EA0E5C4B75A629AEF1157 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_gui_basics.mm"; path = "../../JuceLibraryCode/include_juce_gui_basics.mm"; sourceTree = "SOURCE_ROOT"; }; 5C7BDD8DF72F2FC2D44D757A = {isa = PBXFileReference; lastKnownFileType = file.nib; name = RecentFilesMenuTemplate.nib; path = RecentFilesMenuTemplate.nib; sourceTree = "SOURCE_ROOT"; }; + 748F996DD2778AD1442AECA6 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_product_unlocking"; path = "../../../../modules/juce_product_unlocking"; sourceTree = "SOURCE_ROOT"; }; 7898C73DCA6FA9D9CF669D32 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 7C4E4601FFB642386AD27B07 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_events"; path = "../../../../modules/juce_events"; sourceTree = "SOURCE_ROOT"; }; 8165CEA1A009721D3D05D98F = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_core"; path = "../../../../modules/juce_core"; sourceTree = "SOURCE_ROOT"; }; + 846E187EC2E797B982861CA4 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_utils.mm"; path = "../../JuceLibraryCode/include_juce_audio_utils.mm"; sourceTree = "SOURCE_ROOT"; }; 88AA2B9840A6792BBAD559EE = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Source/Main.cpp; sourceTree = "SOURCE_ROOT"; }; 8C449538B266A891147103D6 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 8EBA9CF0874619A8FA0B4E74 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_osc"; path = "../../../../modules/juce_osc"; sourceTree = "SOURCE_ROOT"; }; 8ED5AB2E4E106FB97C033C5B = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; + 9514F6D920549F8A44B2E332 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_blocks_basics"; path = "../../../../modules/juce_blocks_basics"; sourceTree = "SOURCE_ROOT"; }; + 99527F36B4484133087435CD = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; }; A40A2A0B2841A622C53047CD = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_processors"; path = "../../../../modules/juce_audio_processors"; sourceTree = "SOURCE_ROOT"; }; A59D9064C3A2D7EC3DC45420 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_osc.cpp"; path = "../../JuceLibraryCode/include_juce_osc.cpp"; sourceTree = "SOURCE_ROOT"; }; A76DD7182C290A9020C96CA7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_formats.mm"; path = "../../JuceLibraryCode/include_juce_audio_formats.mm"; sourceTree = "SOURCE_ROOT"; }; AB19DDC8458D2A420E6D8AC3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_core.mm"; path = "../../JuceLibraryCode/include_juce_core.mm"; sourceTree = "SOURCE_ROOT"; }; + AFF0739E38CAEA8CA14FE733 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_blocks_basics.cpp"; path = "../../JuceLibraryCode/include_juce_blocks_basics.cpp"; sourceTree = "SOURCE_ROOT"; }; B38A1AC42B002115350C0268 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + B4202EE1243A8FCA29996D05 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = System/Library/Frameworks/DiscRecording.framework; sourceTree = SDKROOT; }; B72A2BF24B6FFD414CD3B1CA = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_video"; path = "../../../../modules/juce_video"; sourceTree = "SOURCE_ROOT"; }; BDE2CEC1C2F9C0EA2FDEDEEC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppConfig.h; path = ../../JuceLibraryCode/AppConfig.h; sourceTree = "SOURCE_ROOT"; }; C0531453A002C480280C5F05 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; CC27F53A76BFB2675D2683A1 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_opengl"; path = "../../../../modules/juce_opengl"; sourceTree = "SOURCE_ROOT"; }; D2EBC6292AE5AFC46EB10DAC = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; + D3BE73543708D756BDB8AEF7 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_dsp"; path = "../../../../modules/juce_dsp"; sourceTree = "SOURCE_ROOT"; }; D6F54293A21405C783852645 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_formats"; path = "../../../../modules/juce_audio_formats"; sourceTree = "SOURCE_ROOT"; }; D785E7E0304F3CC1E42A3ADF = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_data_structures"; path = "../../../../modules/juce_data_structures"; sourceTree = "SOURCE_ROOT"; }; DD849A04E38279B842EDE213 = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_gui_basics"; path = "../../../../modules/juce_gui_basics"; sourceTree = "SOURCE_ROOT"; }; + E1B7806BF78D66D1E59D7254 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "include_juce_product_unlocking.cpp"; path = "../../JuceLibraryCode/include_juce_product_unlocking.cpp"; sourceTree = "SOURCE_ROOT"; }; EECBAA403D2D6AEEA8CB05EB = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_graphics.mm"; path = "../../JuceLibraryCode/include_juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; }; F260758DB97CF0F5C85218C1 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; FCB76958E12B2D7F8277CD59 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; @@ -89,15 +105,19 @@ 39F1D4C0BF563E43EA8A98B2, D6F54293A21405C783852645, A40A2A0B2841A622C53047CD, + 2A889138F8B9285E95BDEEE6, + 9514F6D920549F8A44B2E332, 8165CEA1A009721D3D05D98F, 05501801BF6C4A47598C59E2, D785E7E0304F3CC1E42A3ADF, + D3BE73543708D756BDB8AEF7, 7C4E4601FFB642386AD27B07, 1DC921E6494548F5E73E1056, DD849A04E38279B842EDE213, 2A163F48282EEE95B8A8BA7A, CC27F53A76BFB2675D2683A1, 8EBA9CF0874619A8FA0B4E74, + 748F996DD2778AD1442AECA6, B72A2BF24B6FFD414CD3B1CA, ); name = "Juce Modules"; sourceTree = ""; }; 3F7D4D52FAA229344338F40C = {isa = PBXGroup; children = ( BDE2CEC1C2F9C0EA2FDEDEEC, @@ -105,15 +125,19 @@ 00CDB93410EA5AECBA5ADA95, A76DD7182C290A9020C96CA7, 3A26A3568F2C301EEED25288, + 846E187EC2E797B982861CA4, + AFF0739E38CAEA8CA14FE733, AB19DDC8458D2A420E6D8AC3, 08ED235CBE02E0FB4BE4653E, 302A999B2803C0D5C15D237C, + 4CA19EC18C2BC536B3636842, 3D169C5EFBF6304F5CE4C35E, EECBAA403D2D6AEEA8CB05EB, 583EA0E5C4B75A629AEF1157, 4195CB317C364D778AE2ADB1, 1CA82C74AEC08421812BDCAC, A59D9064C3A2D7EC3DC45420, + E1B7806BF78D66D1E59D7254, 1088318C19CEB1861C58B3BA, 2C4310E5B49051FC40238E11, ); name = "Juce Library Code"; sourceTree = ""; }; F31A71A7A7566E4D44B2844C = {isa = PBXGroup; children = ( @@ -122,11 +146,13 @@ B38A1AC42B002115350C0268, 7898C73DCA6FA9D9CF669D32, 4B427AF10E722F9A362CEB73, + 99527F36B4484133087435CD, 1932D54A7FAE13BADBA3E9B5, 2030A589A9355FE6A0F72428, C0531453A002C480280C5F05, 8ED5AB2E4E106FB97C033C5B, 04C1B8BF62AA09E62B362913, + B4202EE1243A8FCA29996D05, 8C449538B266A891147103D6, FCB76958E12B2D7F8277CD59, F260758DB97CF0F5C85218C1, @@ -141,7 +167,7 @@ 2055BAFF80DBBC11CF2907C0, 6D697538ADDCFBB6C79AC6C6, ); name = Source; sourceTree = ""; }; A81C9C5D3696F83D5E8CFE11 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -163,16 +189,16 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INSTALL_PATH = "/usr/bin"; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - OTHER_CPLUSPLUSFLAGS = "-pedantic-errors -Wreorder -Wconstant-conversion -Wint-conversion -Woverloaded-virtual -Wuninitialized -Wunused-parameter -Wshorten-64-to-32 -Wstrict-aliasing -Wshadow -Wconversion -Wsign-compare -Wsign-conversion"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.UnitTestRunner; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 962CC7E0A536C3F56DBE1F8F = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -195,26 +221,47 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INSTALL_PATH = "/usr/bin"; MACOSX_DEPLOYMENT_TARGET = 10.10; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; - OTHER_CPLUSPLUSFLAGS = "-pedantic-errors -Wreorder -Wconstant-conversion -Wint-conversion -Woverloaded-virtual -Wuninitialized -Wunused-parameter -Wshorten-64-to-32 -Wstrict-aliasing -Wshadow -Wconversion -Wsign-compare -Wsign-conversion"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.UnitTestRunner; SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Release; }; 53146F81C8222491DC6DF2A5 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "UnitTestRunner"; @@ -222,15 +269,36 @@ ZERO_LINK = NO; }; name = Debug; }; A5040BB0AC85722F6D54A948 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "UnitTestRunner"; WARNING_CFLAGS = -Wreorder; @@ -250,25 +318,31 @@ 33D24B475EA928745A87EDDB, FDDF955477BE7FEBC364E19B, 74EC8AEC296DB2721EB438BF, + 3822F598DA7044E5DB7633A9, + 1DD34A677AE8AE533BF6DE53, 9B48039CDFD679AD944BAC70, FC139F56BD13A2C78D21076E, 5CB3596030B0DD3763CAF85C, + FD15EF066F019B57F0601D71, A4C15593F5B4E1BE338F4F63, A1A39E64F9E03EFFA10B0A10, D43289CF624A7B068237C192, AF1FE82A4A20DCB8944B35C7, 1D06F1A254F84A7AE3E90DF2, 7164274FE42C7EC423455E05, + 193B1966563B502545A8F940, FD00BAFFDB552AA3EB03B893, ); runOnlyForDeploymentPostprocessing = 0; }; 136E27FD16209F9868093A6C = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( A70F7F4891DB1CF67653BE74, 96EFF7BA261F57DD829324D8, 6EB1A3B818863EF1787A9CCE, + D82BA4D40F5686DAFF5E11FB, 59004CE43AE081B4A6CE9E17, AA207299991F85938465BF65, 66FC7F44EEC9044E5C4A21C3, 0C1B9B95BC99382C313BEABC, 8D51903C59161885903F60CC, + 32010EA67EEFE024B9CE1CB5, 263250D6F359CE403B0566FF, 17A09B4AF453B148CD7349F4, 1A038A2954FB9A4F208BE3F2, diff --git a/extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner.sln b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner.sln similarity index 54% rename from extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner.sln rename to extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner.sln index 7b85b37a9d..6c947423ae 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner.sln +++ b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner.sln @@ -1,18 +1,18 @@ Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2015 +# Visual Studio 2017 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTestRunner - ConsoleApp", "UnitTestRunner_ConsoleApp.vcxproj", "{8059D6DB-7FA3-D129-4ADE-B3C1A560027C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8059D6DB-7FA3-D129-4ADE-B3C1A560027C}.Debug|Win32.Build.0 = Debug|Win32 - {8059D6DB-7FA3-D129-4ADE-B3C1A560027C}.Debug|Win32.ActiveCfg = Debug|Win32 - {8059D6DB-7FA3-D129-4ADE-B3C1A560027C}.Release|Win32.Build.0 = Release|Win32 - {8059D6DB-7FA3-D129-4ADE-B3C1A560027C}.Release|Win32.ActiveCfg = Release|Win32 + {8059D6DB-7FA3-D129-4ADE-B3C1A560027C}.Debug|x64.ActiveCfg = Debug|x64 + {8059D6DB-7FA3-D129-4ADE-B3C1A560027C}.Debug|x64.Build.0 = Debug|x64 + {8059D6DB-7FA3-D129-4ADE-B3C1A560027C}.Release|x64.ActiveCfg = Release|x64 + {8059D6DB-7FA3-D129-4ADE-B3C1A560027C}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner_ConsoleApp.vcxproj b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj similarity index 88% rename from extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner_ConsoleApp.vcxproj rename to extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj index 69d5b9e463..19d108a674 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner_ConsoleApp.vcxproj +++ b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj @@ -1,35 +1,40 @@ - + Debug - Win32 + x64 - + Release - Win32 + x64 {8059D6DB-7FA3-D129-4ADE-B3C1A560027C} - v140 + v141 + 10.0.15063.0 - Application false - v140 + v141 + v141 + 10.0.15063.0 - Application false true - v140 + v141 + v141 + 10.0.15063.0 @@ -39,22 +44,24 @@ Label="LocalAppDataPlatform"/> - v140 + v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 .exe - $(SolutionDir)$(Platform)\$(Configuration)\ConsoleApp\ - $(Platform)\$(Configuration)\ConsoleApp\ - UnitTestRunner - true - $(SolutionDir)$(Platform)\$(Configuration)\ConsoleApp\ - $(Platform)\$(Configuration)\ConsoleApp\ - UnitTestRunner - true - v140 + $(SolutionDir)$(Platform)\$(Configuration)\ConsoleApp\ + $(Platform)\$(Configuration)\ConsoleApp\ + UnitTestRunner + true + $(SolutionDir)$(Platform)\$(Configuration)\ConsoleApp\ + $(Platform)\$(Configuration)\ConsoleApp\ + UnitTestRunner + true + v141 + 10.0.15063.0 - + _DEBUG;%(PreprocessorDefinitions) true @@ -64,9 +71,9 @@ Disabled - EditAndContinue + ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=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;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=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;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -76,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -87,8 +95,6 @@ true $(IntDir)\UnitTestRunner.pdb Console - MachineX86 - false true @@ -96,7 +102,7 @@ $(IntDir)\UnitTestRunner.bsc - + NDEBUG;%(PreprocessorDefinitions) true @@ -107,7 +113,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=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;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=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;%(PreprocessorDefinitions) MultiThreaded true @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -128,7 +135,6 @@ false $(IntDir)\UnitTestRunner.pdb Console - MachineX86 true true true @@ -152,9 +158,6 @@ true - - true - true @@ -215,6 +218,9 @@ true + + true + true @@ -431,9 +437,6 @@ true - - true - true @@ -515,12 +518,81 @@ true + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + true true + + true + true @@ -842,6 +914,57 @@ true + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + true @@ -1697,16 +1820,22 @@ true + + true + + + true + + + true + + + true + true - - true - - - true - - + true @@ -1716,15 +1845,19 @@ + + + + @@ -1735,7 +1868,6 @@ - @@ -1755,10 +1887,12 @@ + + @@ -1864,7 +1998,6 @@ - @@ -1906,6 +2039,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2053,6 +2222,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2130,6 +2327,7 @@ + @@ -2322,9 +2520,18 @@ + + + + + - - + + + + + + @@ -2332,6 +2539,10 @@ + + + + diff --git a/extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner_ConsoleApp.vcxproj.filters b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters similarity index 87% rename from extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner_ConsoleApp.vcxproj.filters rename to extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters index 1f24602b99..b4c5ccb664 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner_ConsoleApp.vcxproj.filters +++ b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters @@ -1,6 +1,6 @@ - + {C4DA93DE-FC1C-C4F1-591F-C92F838860C3} @@ -23,6 +23,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -116,6 +119,39 @@ {0B0E7392-324B-088C-FBEB-5FE999D61782} + + {C396369E-8C55-88E9-5D19-5D3772B773D3} + + + {8167E753-09C7-5D1C-EF2B-32D297557443} + + + {B48C883A-8483-AF6D-808C-1D9A749048D8} + + + {AEDCB7F7-7A36-5392-8E9A-715F5BDE35CB} + + + {B63F69FD-8A40-8E1E-E7ED-419B8DC1C12B} + + + {F00B1208-CE3A-EE5C-C33C-9A016BAD5E70} + + + {31632996-AC68-BCF8-B244-110FC6087A6E} + + + {65A9A26C-02FC-34D8-BEAC-C30A1E255B44} + + + {F61978A2-275C-CD64-3724-AE5945CB8970} + + + {3BF28565-4A19-23EA-96D6-910B5646D6B9} + + + {DFA2DC59-3B2E-1F2A-8661-79D25C3D7F1B} + {0608ADE9-66EF-1A19-6D57-12D07F76EB53} @@ -194,6 +230,27 @@ {928D8FCC-5E00-174B-6538-93E8D75AB396} + + {5E662F89-AD8B-D0D6-9BB6-D42DCFC3C38B} + + + {D272EE9B-CA6A-186E-1C62-0DF893C7A34E} + + + {5C139EFD-6DD2-83E0-C013-24CC03428D81} + + + {03DBA258-F2EF-EC1D-5A86-2CEE402FE021} + + + {8EE92EFE-883B-A2FA-161D-94AC912BF1DE} + + + {16B24975-5792-03FC-64A8-D04E59D077E1} + + + {362ADBDB-6FDF-5BD4-9F06-0A0270832F67} + {B098BC87-3298-7E6B-12DC-D26C09CDCAED} @@ -341,6 +398,12 @@ {1A62F82C-C14A-E14A-94DE-8A27E0F8A090} + + {802F7556-25D6-FBCE-3D15-32F3E1E65513} + + + {2ECAF0DC-881F-89B5-FBAD-78FDEE1907FB} + {7F11E7D2-54C0-2A36-5F15-BEC0A5374A08} @@ -376,9 +439,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -439,6 +499,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -661,9 +724,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -754,12 +814,96 @@ Juce Modules\juce_audio_processors + + Juce Modules\juce_audio_utils\audio_cd + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\native + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils + + + Juce Modules\juce_audio_utils + + + Juce Modules\juce_blocks_basics\blocks + + + Juce Modules\juce_blocks_basics\topology + + + Juce Modules\juce_blocks_basics\topology + + + Juce Modules\juce_blocks_basics\visualisers + + + Juce Modules\juce_blocks_basics\visualisers + + + Juce Modules\juce_blocks_basics + Juce Modules\juce_core\containers Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -1105,6 +1249,60 @@ Juce Modules\juce_data_structures + + Juce Modules\juce_dsp\containers + + + Juce Modules\juce_dsp\filter_design + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp + + + Juce Modules\juce_dsp + Juce Modules\juce_events\broadcasters @@ -2020,23 +2218,23 @@ Juce Modules\juce_osc + + Juce Modules\juce_product_unlocking\marketplace + + + Juce Modules\juce_product_unlocking\marketplace + + + Juce Modules\juce_product_unlocking\marketplace + + + Juce Modules\juce_product_unlocking + Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2056,6 +2254,12 @@ Juce Library Code + + Juce Library Code + + + Juce Library Code + Juce Library Code @@ -2065,6 +2269,9 @@ Juce Library Code + + Juce Library Code + Juce Library Code @@ -2083,6 +2290,9 @@ Juce Library Code + + Juce Library Code + Juce Library Code @@ -2109,9 +2319,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2169,6 +2376,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2181,6 +2391,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2496,9 +2709,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -2622,6 +2832,114 @@ Juce Modules\juce_audio_processors + + Juce Modules\juce_audio_utils\audio_cd + + + Juce Modules\juce_audio_utils\audio_cd + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\gui + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils\players + + + Juce Modules\juce_audio_utils + + + Juce Modules\juce_blocks_basics\blocks + + + Juce Modules\juce_blocks_basics\blocks + + + Juce Modules\juce_blocks_basics\blocks + + + Juce Modules\juce_blocks_basics\blocks + + + Juce Modules\juce_blocks_basics\blocks + + + Juce Modules\juce_blocks_basics\blocks + + + Juce Modules\juce_blocks_basics\blocks + + + Juce Modules\juce_blocks_basics\blocks + + + Juce Modules\juce_blocks_basics\littlefoot + + + Juce Modules\juce_blocks_basics\littlefoot + + + Juce Modules\juce_blocks_basics\littlefoot + + + Juce Modules\juce_blocks_basics\protocol + + + Juce Modules\juce_blocks_basics\protocol + + + Juce Modules\juce_blocks_basics\protocol + + + Juce Modules\juce_blocks_basics\protocol + + + Juce Modules\juce_blocks_basics\protocol + + + Juce Modules\juce_blocks_basics\topology + + + Juce Modules\juce_blocks_basics\topology + + + Juce Modules\juce_blocks_basics\topology + + + Juce Modules\juce_blocks_basics\topology + + + Juce Modules\juce_blocks_basics\visualisers + + + Juce Modules\juce_blocks_basics\visualisers + + + Juce Modules\juce_blocks_basics + Juce Modules\juce_core\containers @@ -3063,6 +3381,90 @@ Juce Modules\juce_data_structures + + Juce Modules\juce_dsp\containers + + + Juce Modules\juce_dsp\containers + + + Juce Modules\juce_dsp\filter_design + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\frequency + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\maths + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\native + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp\processors + + + Juce Modules\juce_dsp + Juce Modules\juce_events\broadcasters @@ -3294,6 +3696,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -3870,13 +4275,40 @@ Juce Modules\juce_osc + + Juce Modules\juce_product_unlocking\marketplace + + + Juce Modules\juce_product_unlocking\marketplace + + + Juce Modules\juce_product_unlocking\marketplace + + + Juce Modules\juce_product_unlocking\marketplace + + + Juce Modules\juce_product_unlocking + Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback @@ -3896,6 +4328,18 @@ Juce Modules\juce_audio_formats\codecs\oggvorbis + + Juce Modules\juce_blocks_basics\littlefoot + + + Juce Modules\juce_blocks_basics\protocol + + + Juce Modules\juce_blocks_basics + + + Juce Modules\juce_blocks_basics + Juce Modules\juce_graphics\image_formats\jpglib diff --git a/extras/UnitTestRunner/Builds/VisualStudio2015/resources.rc b/extras/UnitTestRunner/Builds/VisualStudio2017/resources.rc similarity index 100% rename from extras/UnitTestRunner/Builds/VisualStudio2015/resources.rc rename to extras/UnitTestRunner/Builds/VisualStudio2017/resources.rc diff --git a/extras/UnitTestRunner/JuceLibraryCode/AppConfig.h b/extras/UnitTestRunner/JuceLibraryCode/AppConfig.h index c2b9d5645f..a81ea387e7 100644 --- a/extras/UnitTestRunner/JuceLibraryCode/AppConfig.h +++ b/extras/UnitTestRunner/JuceLibraryCode/AppConfig.h @@ -34,29 +34,233 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A #define JUCE_USE_DARK_SPLASH_SCREEN 1 //============================================================================== -#define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 -#define JUCE_MODULE_AVAILABLE_juce_audio_devices 1 -#define JUCE_MODULE_AVAILABLE_juce_audio_formats 1 -#define JUCE_MODULE_AVAILABLE_juce_audio_processors 1 -#define JUCE_MODULE_AVAILABLE_juce_core 1 -#define JUCE_MODULE_AVAILABLE_juce_cryptography 1 -#define JUCE_MODULE_AVAILABLE_juce_data_structures 1 -#define JUCE_MODULE_AVAILABLE_juce_events 1 -#define JUCE_MODULE_AVAILABLE_juce_graphics 1 -#define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 -#define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 -#define JUCE_MODULE_AVAILABLE_juce_opengl 1 -#define JUCE_MODULE_AVAILABLE_juce_osc 1 -#define JUCE_MODULE_AVAILABLE_juce_video 1 +#define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 +#define JUCE_MODULE_AVAILABLE_juce_audio_devices 1 +#define JUCE_MODULE_AVAILABLE_juce_audio_formats 1 +#define JUCE_MODULE_AVAILABLE_juce_audio_processors 1 +#define JUCE_MODULE_AVAILABLE_juce_audio_utils 1 +#define JUCE_MODULE_AVAILABLE_juce_blocks_basics 1 +#define JUCE_MODULE_AVAILABLE_juce_core 1 +#define JUCE_MODULE_AVAILABLE_juce_cryptography 1 +#define JUCE_MODULE_AVAILABLE_juce_data_structures 1 +#define JUCE_MODULE_AVAILABLE_juce_dsp 1 +#define JUCE_MODULE_AVAILABLE_juce_events 1 +#define JUCE_MODULE_AVAILABLE_juce_graphics 1 +#define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 +#define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 +#define JUCE_MODULE_AVAILABLE_juce_opengl 1 +#define JUCE_MODULE_AVAILABLE_juce_osc 1 +#define JUCE_MODULE_AVAILABLE_juce_product_unlocking 1 +#define JUCE_MODULE_AVAILABLE_juce_video 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_dsp flags: + +#ifndef JUCE_ASSERTION_FIRFILTER + //#define JUCE_ASSERTION_FIRFILTER 1 +#endif + +#ifndef JUCE_DSP_USE_INTEL_MKL + //#define JUCE_DSP_USE_INTEL_MKL 1 +#endif + +#ifndef JUCE_DSP_USE_SHARED_FFTW + //#define JUCE_DSP_USE_SHARED_FFTW 1 +#endif + +#ifndef JUCE_DSP_USE_STATIC_FFTW + //#define JUCE_DSP_USE_STATIC_FFTW 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif + +//============================================================================== +// juce_video flags: + +#ifndef JUCE_USE_CAMERA + //#define JUCE_USE_CAMERA 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -65,180 +269,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif - -//============================================================================== -// juce_video flags: - -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - //#define JUCE_QUICKTIME -#endif - -#ifndef JUCE_USE_CAMERA - //#define JUCE_USE_CAMERA -#endif diff --git a/extras/UnitTestRunner/JuceLibraryCode/JuceHeader.h b/extras/UnitTestRunner/JuceLibraryCode/JuceHeader.h index 5248c5dda4..e2852f3e79 100644 --- a/extras/UnitTestRunner/JuceLibraryCode/JuceHeader.h +++ b/extras/UnitTestRunner/JuceLibraryCode/JuceHeader.h @@ -18,15 +18,19 @@ #include #include #include +#include +#include #include #include #include +#include #include #include #include #include #include #include +#include #include diff --git a/extras/UnitTestRunner/JuceLibraryCode/include_juce_audio_utils.cpp b/extras/UnitTestRunner/JuceLibraryCode/include_juce_audio_utils.cpp new file mode 100644 index 0000000000..97bd2c568c --- /dev/null +++ b/extras/UnitTestRunner/JuceLibraryCode/include_juce_audio_utils.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/extras/UnitTestRunner/JuceLibraryCode/include_juce_audio_utils.mm b/extras/UnitTestRunner/JuceLibraryCode/include_juce_audio_utils.mm new file mode 100644 index 0000000000..8eae7c6e2f --- /dev/null +++ b/extras/UnitTestRunner/JuceLibraryCode/include_juce_audio_utils.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/extras/UnitTestRunner/JuceLibraryCode/include_juce_blocks_basics.cpp b/extras/UnitTestRunner/JuceLibraryCode/include_juce_blocks_basics.cpp new file mode 100644 index 0000000000..6ab147fbb4 --- /dev/null +++ b/extras/UnitTestRunner/JuceLibraryCode/include_juce_blocks_basics.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/extras/UnitTestRunner/JuceLibraryCode/include_juce_dsp.cpp b/extras/UnitTestRunner/JuceLibraryCode/include_juce_dsp.cpp new file mode 100644 index 0000000000..430d943f26 --- /dev/null +++ b/extras/UnitTestRunner/JuceLibraryCode/include_juce_dsp.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/extras/UnitTestRunner/JuceLibraryCode/include_juce_dsp.mm b/extras/UnitTestRunner/JuceLibraryCode/include_juce_dsp.mm new file mode 100644 index 0000000000..1dea5d08a6 --- /dev/null +++ b/extras/UnitTestRunner/JuceLibraryCode/include_juce_dsp.mm @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/extras/UnitTestRunner/JuceLibraryCode/include_juce_product_unlocking.cpp b/extras/UnitTestRunner/JuceLibraryCode/include_juce_product_unlocking.cpp new file mode 100644 index 0000000000..f3fcd328d6 --- /dev/null +++ b/extras/UnitTestRunner/JuceLibraryCode/include_juce_product_unlocking.cpp @@ -0,0 +1,9 @@ +/* + + IMPORTANT! This file is auto-generated each time you save your + project - if you alter its contents, your changes may be overwritten! + +*/ + +#include "AppConfig.h" +#include diff --git a/extras/UnitTestRunner/Source/Main.cpp b/extras/UnitTestRunner/Source/Main.cpp index fb23ef9b31..52c20bb464 100644 --- a/extras/UnitTestRunner/Source/Main.cpp +++ b/extras/UnitTestRunner/Source/Main.cpp @@ -45,15 +45,23 @@ class ConsoleUnitTestRunner : public UnitTestRunner }; //============================================================================== -int main (int argc, char* argv[]) +int main() { - ignoreUnused (argc, argv); - - ScopedPointer logger; - Logger::setCurrentLogger (logger); + #if ! JUCE_DEBUG + ConsoleLogger logger; + Logger::setCurrentLogger (&logger); + #endif ConsoleUnitTestRunner runner; runner.runAllTests(); + #if ! JUCE_DEBUG + Logger::setCurrentLogger (nullptr); + #endif + + for (int i = 0; i < runner.getNumResults(); ++i) + if (runner.getResult(i)->failures > 0) + return 1; + return 0; } diff --git a/extras/UnitTestRunner/UnitTestRunner.jucer b/extras/UnitTestRunner/UnitTestRunner.jucer index 8d73f3c07a..9d98392424 100644 --- a/extras/UnitTestRunner/UnitTestRunner.jucer +++ b/extras/UnitTestRunner/UnitTestRunner.jucer @@ -2,20 +2,23 @@ + jucerVersion="5.1.0" defines="JUCE_UNIT_TESTS=1" displaySplashScreen="0" + reportAppUsage="0" splashScreenColour="Dark" companyName="ROLI Ltd." + cppLanguageStandard="14"> - + + isDebug="1" optimisation="1" targetName="UnitTestRunner" cppLanguageStandard="gnu++14"/> + osxArchitecture="default" isDebug="0" optimisation="3" targetName="UnitTestRunner" + cppLanguageStandard="gnu++14"/> @@ -32,6 +35,10 @@ + + + + @@ -56,47 +63,60 @@ + + + + - + - - + + + + - + + + + + diff --git a/extras/binarybuilder/BinaryBuilder.jucer b/extras/binarybuilder/BinaryBuilder.jucer index abb4db7261..7e605d5a9f 100644 --- a/extras/binarybuilder/BinaryBuilder.jucer +++ b/extras/binarybuilder/BinaryBuilder.jucer @@ -1,9 +1,10 @@ + reportAppUsage="0" splashScreenColour="Dark" companyName="ROLI Ltd." + cppLanguageStandard="11"> diff --git a/extras/binarybuilder/Builds/LinuxMakefile/Makefile b/extras/binarybuilder/Builds/LinuxMakefile/Makefile index db490d072a..1adac43f8f 100644 --- a/extras/binarybuilder/Builds/LinuxMakefile/Makefile +++ b/extras/binarybuilder/Builds/LinuxMakefile/Makefile @@ -71,6 +71,8 @@ OBJECTS_CONSOLEAPP := \ .PHONY: clean all +all : $(JUCE_OUTDIR)/$(JUCE_TARGET_CONSOLEAPP) + $(JUCE_OUTDIR)/$(JUCE_TARGET_CONSOLEAPP) : check-pkg-config $(OBJECTS_CONSOLEAPP) $(RESOURCES) @echo Linking "BinaryBuilder - ConsoleApp" -$(V_AT)mkdir -p $(JUCE_BINDIR) diff --git a/extras/binarybuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj b/extras/binarybuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj index e6a8ca949d..f5dbb58542 100644 --- a/extras/binarybuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj +++ b/extras/binarybuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj @@ -46,7 +46,7 @@ E28F51A0038F01E08E22F853, 70A875922C34E55D4F48A196, ); name = Source; sourceTree = ""; }; 00F18709927DE6070FBA7BD0 = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -67,7 +67,7 @@ "JucePlugin_Build_AAX=0", "JucePlugin_Build_Standalone=0", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INSTALL_PATH = "/usr/bin"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -75,7 +75,7 @@ SDKROOT_ppc = macosx10.5; USE_HEADERMAP = NO; }; name = Debug; }; 8A190EF24B99F557190320DA = {isa = XCBuildConfiguration; buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++11"; CLANG_LINK_OBJC_RUNTIME = NO; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)"; @@ -97,7 +97,7 @@ "JucePlugin_Build_Standalone=0", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "/juce_audio_plugin_client", "$(inherited)"); + HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../../../modules", "$(inherited)"); INSTALL_PATH = "/usr/bin"; MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET_ppc = 10.4; @@ -106,16 +106,37 @@ USE_HEADERMAP = NO; }; name = Release; }; D9552CAECBA3D7D5725848E5 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "BinaryBuilder"; @@ -123,15 +144,36 @@ ZERO_LINK = NO; }; name = Debug; }; 7545BE591FD462C37E44B903 = {isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "BinaryBuilder"; WARNING_CFLAGS = -Wreorder; diff --git a/extras/binarybuilder/Builds/VisualStudio2017/BinaryBuilder.sln b/extras/binarybuilder/Builds/VisualStudio2017/BinaryBuilder.sln index d3b3c645fd..329844cd4f 100644 --- a/extras/binarybuilder/Builds/VisualStudio2017/BinaryBuilder.sln +++ b/extras/binarybuilder/Builds/VisualStudio2017/BinaryBuilder.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {88983F7C-DB65-9E04-84E7-05F8979E0383}.Debug|x64.Build.0 = Debug|x64 {88983F7C-DB65-9E04-84E7-05F8979E0383}.Debug|x64.ActiveCfg = Debug|x64 - {88983F7C-DB65-9E04-84E7-05F8979E0383}.Release|x64.Build.0 = Release|x64 + {88983F7C-DB65-9E04-84E7-05F8979E0383}.Debug|x64.Build.0 = Debug|x64 {88983F7C-DB65-9E04-84E7-05F8979E0383}.Release|x64.ActiveCfg = Release|x64 + {88983F7C-DB65-9E04-84E7-05F8979E0383}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/extras/binarybuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj b/extras/binarybuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj index e48fb4534a..1eee8ebbc0 100644 --- a/extras/binarybuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj +++ b/extras/binarybuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj @@ -16,6 +16,7 @@ {88983F7C-DB65-9E04-84E7-05F8979E0383} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ BinaryBuilder true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -145,6 +152,9 @@ true + + true + true diff --git a/extras/binarybuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj.filters b/extras/binarybuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj.filters index c1fd252165..69bed1dfd6 100644 --- a/extras/binarybuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj.filters +++ b/extras/binarybuilder/Builds/VisualStudio2017/BinaryBuilder_ConsoleApp.vcxproj.filters @@ -82,6 +82,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers diff --git a/extras/binarybuilder/JuceLibraryCode/AppConfig.h b/extras/binarybuilder/JuceLibraryCode/AppConfig.h index c8648db3ce..28d7899c72 100644 --- a/extras/binarybuilder/JuceLibraryCode/AppConfig.h +++ b/extras/binarybuilder/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -44,6 +50,42 @@ //============================================================================== #define JUCE_MODULE_AVAILABLE_juce_core 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -52,40 +94,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif diff --git a/extras/windows dll/Builds/VisualStudio2017/juce_dll.sln b/extras/windows dll/Builds/VisualStudio2017/juce_dll.sln index a059b8b035..ffe6ba88d1 100644 --- a/extras/windows dll/Builds/VisualStudio2017/juce_dll.sln +++ b/extras/windows dll/Builds/VisualStudio2017/juce_dll.sln @@ -9,10 +9,10 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B636B53B-C44B-1E04-8668-D61B3900BAA4}.Debug|x64.Build.0 = Debug|x64 {B636B53B-C44B-1E04-8668-D61B3900BAA4}.Debug|x64.ActiveCfg = Debug|x64 - {B636B53B-C44B-1E04-8668-D61B3900BAA4}.Release|x64.Build.0 = Release|x64 + {B636B53B-C44B-1E04-8668-D61B3900BAA4}.Debug|x64.Build.0 = Debug|x64 {B636B53B-C44B-1E04-8668-D61B3900BAA4}.Release|x64.ActiveCfg = Release|x64 + {B636B53B-C44B-1E04-8668-D61B3900BAA4}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/extras/windows dll/Builds/VisualStudio2017/juce_dll_StaticLibrary.vcxproj b/extras/windows dll/Builds/VisualStudio2017/juce_dll_StaticLibrary.vcxproj index ce09d8fbd7..74bc04355d 100644 --- a/extras/windows dll/Builds/VisualStudio2017/juce_dll_StaticLibrary.vcxproj +++ b/extras/windows dll/Builds/VisualStudio2017/juce_dll_StaticLibrary.vcxproj @@ -16,6 +16,7 @@ {B636B53B-C44B-1E04-8668-D61B3900BAA4} v141 + 10.0.15063.0 false v141 v141 + 10.0.15063.0 @@ -32,6 +34,7 @@ true v141 v141 + 10.0.15063.0 @@ -42,6 +45,7 @@ v141 + 10.0.15063.0 <_ProjectFileVersion>10.0.30319.1 @@ -55,6 +59,7 @@ juce_dll true v141 + 10.0.15063.0 @@ -78,6 +83,7 @@ Level4 true true + stdcpp14 _DEBUG;%(PreprocessorDefinitions) @@ -117,6 +123,7 @@ Level4 true true + stdcpp14 NDEBUG;%(PreprocessorDefinitions) @@ -150,9 +157,6 @@ true - - true - true @@ -213,6 +217,9 @@ true + + true + true @@ -429,9 +436,6 @@ true - - true - true @@ -567,6 +571,9 @@ true + + true + true @@ -1719,13 +1726,7 @@ true - - true - - - true - - + true @@ -1754,7 +1755,6 @@ - @@ -1774,10 +1774,12 @@ + + @@ -1883,7 +1885,6 @@ - @@ -2162,6 +2163,7 @@ + @@ -2346,8 +2348,12 @@ - - + + + + + + diff --git a/extras/windows dll/Builds/VisualStudio2017/juce_dll_StaticLibrary.vcxproj.filters b/extras/windows dll/Builds/VisualStudio2017/juce_dll_StaticLibrary.vcxproj.filters index bbf1a65cc3..91114b285b 100644 --- a/extras/windows dll/Builds/VisualStudio2017/juce_dll_StaticLibrary.vcxproj.filters +++ b/extras/windows dll/Builds/VisualStudio2017/juce_dll_StaticLibrary.vcxproj.filters @@ -17,6 +17,9 @@ {8C868E51-156D-A916-047C-0D9EA1393675} + + {D0C0664E-18ED-2BD3-6ED4-EF3A0EDE0E20} + {EF2CAB40-0432-429B-C517-86ADF136BB8A} @@ -376,9 +379,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -439,6 +439,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -661,9 +664,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -823,6 +823,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -2059,20 +2062,8 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native - - - Juce Modules\juce_video\native + + Juce Modules\juce_video\playback Juce Modules\juce_video @@ -2145,9 +2136,6 @@ Juce Modules\juce_audio_basics\effects - - Juce Modules\juce_audio_basics\effects - Juce Modules\juce_audio_basics\effects @@ -2205,6 +2193,9 @@ Juce Modules\juce_audio_basics\mpe + + Juce Modules\juce_audio_basics\native + Juce Modules\juce_audio_basics\sources @@ -2217,6 +2208,9 @@ Juce Modules\juce_audio_basics\sources + + Juce Modules\juce_audio_basics\sources + Juce Modules\juce_audio_basics\sources @@ -2532,9 +2526,6 @@ Juce Modules\juce_audio_formats\codecs - - Juce Modules\juce_audio_formats\codecs - Juce Modules\juce_audio_formats\codecs @@ -3369,6 +3360,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics\placement @@ -3921,10 +3915,22 @@ Juce Modules\juce_video\capture - - Juce Modules\juce_video\playback + + Juce Modules\juce_video\native - + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + + Juce Modules\juce_video\native + + Juce Modules\juce_video\playback diff --git a/extras/windows dll/JuceLibraryCode/AppConfig.h b/extras/windows dll/JuceLibraryCode/AppConfig.h index 55eef3d08f..835b6ff6b2 100644 --- a/extras/windows dll/JuceLibraryCode/AppConfig.h +++ b/extras/windows dll/JuceLibraryCode/AppConfig.h @@ -34,8 +34,14 @@ // BEGIN SECTION A -#define JUCE_DISPLAY_SPLASH_SCREEN 0 -#define JUCE_REPORT_APP_USAGE 0 +#ifndef JUCE_DISPLAY_SPLASH_SCREEN + #define JUCE_DISPLAY_SPLASH_SCREEN 0 +#endif + +#ifndef JUCE_REPORT_APP_USAGE + #define JUCE_REPORT_APP_USAGE 0 +#endif + // END SECTION A @@ -57,6 +63,181 @@ #define JUCE_MODULE_AVAILABLE_juce_opengl 1 #define JUCE_MODULE_AVAILABLE_juce_video 1 +#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 + +//============================================================================== +// juce_audio_devices flags: + +#ifndef JUCE_ASIO + //#define JUCE_ASIO 1 +#endif + +#ifndef JUCE_WASAPI + //#define JUCE_WASAPI 1 +#endif + +#ifndef JUCE_WASAPI_EXCLUSIVE + //#define JUCE_WASAPI_EXCLUSIVE 1 +#endif + +#ifndef JUCE_DIRECTSOUND + //#define JUCE_DIRECTSOUND 1 +#endif + +#ifndef JUCE_ALSA + //#define JUCE_ALSA 1 +#endif + +#ifndef JUCE_JACK + //#define JUCE_JACK 1 +#endif + +#ifndef JUCE_USE_ANDROID_OPENSLES + //#define JUCE_USE_ANDROID_OPENSLES 1 +#endif + +#ifndef JUCE_USE_WINRT_MIDI + //#define JUCE_USE_WINRT_MIDI 1 +#endif + +//============================================================================== +// juce_audio_formats flags: + +#ifndef JUCE_USE_FLAC + //#define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + //#define JUCE_USE_OGGVORBIS 1 +#endif + +#ifndef JUCE_USE_MP3AUDIOFORMAT + //#define JUCE_USE_MP3AUDIOFORMAT 1 +#endif + +#ifndef JUCE_USE_LAME_AUDIO_FORMAT + //#define JUCE_USE_LAME_AUDIO_FORMAT 1 +#endif + +#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT + //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 +#endif + +//============================================================================== +// juce_audio_processors flags: + +#ifndef JUCE_PLUGINHOST_VST + //#define JUCE_PLUGINHOST_VST 1 +#endif + +#ifndef JUCE_PLUGINHOST_VST3 + //#define JUCE_PLUGINHOST_VST3 1 +#endif + +#ifndef JUCE_PLUGINHOST_AU + //#define JUCE_PLUGINHOST_AU 1 +#endif + +//============================================================================== +// juce_audio_utils flags: + +#ifndef JUCE_USE_CDREADER + //#define JUCE_USE_CDREADER 1 +#endif + +#ifndef JUCE_USE_CDBURNER + //#define JUCE_USE_CDBURNER 1 +#endif + +//============================================================================== +// juce_core flags: + +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +#ifndef JUCE_LOG_ASSERTIONS + //#define JUCE_LOG_ASSERTIONS 1 +#endif + +#ifndef JUCE_CHECK_MEMORY_LEAKS + //#define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1 +#endif + +#ifndef JUCE_INCLUDE_ZLIB_CODE + //#define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_USE_CURL + //#define JUCE_USE_CURL 1 +#endif + +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES + //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 +#endif + +//============================================================================== +// juce_events flags: + +#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK + //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 1 +#endif + +//============================================================================== +// juce_graphics flags: + +#ifndef JUCE_USE_COREIMAGE_LOADER + //#define JUCE_USE_COREIMAGE_LOADER 1 +#endif + +#ifndef JUCE_USE_DIRECTWRITE + //#define JUCE_USE_DIRECTWRITE 1 +#endif + +//============================================================================== +// juce_gui_basics flags: + +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING + //#define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +#ifndef JUCE_USE_XSHM + //#define JUCE_USE_XSHM 1 +#endif + +#ifndef JUCE_USE_XRENDER + //#define JUCE_USE_XRENDER 1 +#endif + +#ifndef JUCE_USE_XCURSOR + //#define JUCE_USE_XCURSOR 1 +#endif + +//============================================================================== +// juce_gui_extra flags: + +#ifndef JUCE_WEB_BROWSER + //#define JUCE_WEB_BROWSER 1 +#endif + +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif + +//============================================================================== +// juce_video flags: + +#ifndef JUCE_USE_CAMERA + //#define JUCE_USE_CAMERA 1 +#endif //============================================================================== #ifndef JUCE_STANDALONE_APPLICATION #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) @@ -65,191 +246,3 @@ #define JUCE_STANDALONE_APPLICATION 1 #endif #endif - -#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 - -//============================================================================== -// juce_audio_devices flags: - -#ifndef JUCE_ASIO - //#define JUCE_ASIO -#endif - -#ifndef JUCE_WASAPI - //#define JUCE_WASAPI -#endif - -#ifndef JUCE_WASAPI_EXCLUSIVE - //#define JUCE_WASAPI_EXCLUSIVE -#endif - -#ifndef JUCE_DIRECTSOUND - //#define JUCE_DIRECTSOUND -#endif - -#ifndef JUCE_ALSA - //#define JUCE_ALSA -#endif - -#ifndef JUCE_JACK - //#define JUCE_JACK -#endif - -#ifndef JUCE_USE_ANDROID_OPENSLES - //#define JUCE_USE_ANDROID_OPENSLES -#endif - -#ifndef JUCE_USE_WINRT_MIDI - //#define JUCE_USE_WINRT_MIDI -#endif - -//============================================================================== -// juce_audio_formats flags: - -#ifndef JUCE_USE_FLAC - //#define JUCE_USE_FLAC -#endif - -#ifndef JUCE_USE_OGGVORBIS - //#define JUCE_USE_OGGVORBIS -#endif - -#ifndef JUCE_USE_MP3AUDIOFORMAT - //#define JUCE_USE_MP3AUDIOFORMAT -#endif - -#ifndef JUCE_USE_LAME_AUDIO_FORMAT - //#define JUCE_USE_LAME_AUDIO_FORMAT -#endif - -#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT - //#define JUCE_USE_WINDOWS_MEDIA_FORMAT -#endif - -//============================================================================== -// juce_audio_processors flags: - -#ifndef JUCE_PLUGINHOST_VST - //#define JUCE_PLUGINHOST_VST -#endif - -#ifndef JUCE_PLUGINHOST_VST3 - //#define JUCE_PLUGINHOST_VST3 -#endif - -#ifndef JUCE_PLUGINHOST_AU - //#define JUCE_PLUGINHOST_AU -#endif - -//============================================================================== -// juce_audio_utils flags: - -#ifndef JUCE_USE_CDREADER - //#define JUCE_USE_CDREADER -#endif - -#ifndef JUCE_USE_CDBURNER - //#define JUCE_USE_CDBURNER -#endif - -//============================================================================== -// juce_core flags: - -#ifndef JUCE_FORCE_DEBUG - //#define JUCE_FORCE_DEBUG -#endif - -#ifndef JUCE_LOG_ASSERTIONS - //#define JUCE_LOG_ASSERTIONS -#endif - -#ifndef JUCE_CHECK_MEMORY_LEAKS - //#define JUCE_CHECK_MEMORY_LEAKS -#endif - -#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES -#endif - -#ifndef JUCE_INCLUDE_ZLIB_CODE - //#define JUCE_INCLUDE_ZLIB_CODE -#endif - -#ifndef JUCE_USE_CURL - //#define JUCE_USE_CURL -#endif - -#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS - //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS -#endif - -#ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES -#endif - -//============================================================================== -// juce_events flags: - -#ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK - //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK -#endif - -//============================================================================== -// juce_graphics flags: - -#ifndef JUCE_USE_COREIMAGE_LOADER - //#define JUCE_USE_COREIMAGE_LOADER -#endif - -#ifndef JUCE_USE_DIRECTWRITE - //#define JUCE_USE_DIRECTWRITE -#endif - -//============================================================================== -// juce_gui_basics flags: - -#ifndef JUCE_ENABLE_REPAINT_DEBUGGING - //#define JUCE_ENABLE_REPAINT_DEBUGGING -#endif - -#ifndef JUCE_USE_XSHM - //#define JUCE_USE_XSHM -#endif - -#ifndef JUCE_USE_XRENDER - //#define JUCE_USE_XRENDER -#endif - -#ifndef JUCE_USE_XCURSOR - //#define JUCE_USE_XCURSOR -#endif - -//============================================================================== -// juce_gui_extra flags: - -#ifndef JUCE_WEB_BROWSER - //#define JUCE_WEB_BROWSER -#endif - -#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR - //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR -#endif - -//============================================================================== -// juce_video flags: - -#ifndef JUCE_DIRECTSHOW - //#define JUCE_DIRECTSHOW -#endif - -#ifndef JUCE_MEDIAFOUNDATION - //#define JUCE_MEDIAFOUNDATION -#endif - -#ifndef JUCE_QUICKTIME - //#define JUCE_QUICKTIME -#endif - -#ifndef JUCE_USE_CAMERA - //#define JUCE_USE_CAMERA -#endif diff --git a/extras/windows dll/jucedll.jucer b/extras/windows dll/jucedll.jucer index 0600e88b12..ee5b14b77c 100644 --- a/extras/windows dll/jucedll.jucer +++ b/extras/windows dll/jucedll.jucer @@ -1,9 +1,10 @@ + reportAppUsage="0" splashScreenColour="Dark" companyName="ROLI Ltd." + cppLanguageStandard="11"> diff --git a/modules/JUCE Module Format.txt b/modules/JUCE Module Format.txt index 6b068e1e8b..571f7b0341 100644 --- a/modules/JUCE Module Format.txt +++ b/modules/JUCE Module Format.txt @@ -124,6 +124,10 @@ iOS: libs/iOS/{arch}, where {arch} is the architecture you are targeting in Xcode ("arm64" or "x86_64", for example). +Android: + libs/Android/{arch}, where {arch} is the architecture provided by the Android Studio variable + "${ANDROID_ABI}" ("x86", "armeabi-v7a", "mips", for example). + The BEGIN_JUCE_MODULE_DECLARATION block ======================================= @@ -145,35 +149,37 @@ The order in which they're declared doesn't matter. Possible values: - ID: (Compulsory) This ID must match the name of the file and folder, e.g. juce_core. - The main reason for also including it here is as a sanity-check - vendor: (Compulsory) A unique ID for the vendor, e.g. "juce". This should be short - and shouldn't contain any spaces - version: (Compulsory) A version number for the module - name: (Compulsory) A short description of the module - description: (Compulsory) A longer description (but still only one line of text, please!) + ID: (Compulsory) This ID must match the name of the file and folder, e.g. juce_core. + The main reason for also including it here is as a sanity-check + vendor: (Compulsory) A unique ID for the vendor, e.g. "juce". This should be short + and shouldn't contain any spaces + version: (Compulsory) A version number for the module + name: (Compulsory) A short description of the module + description: (Compulsory) A longer description (but still only one line of text, please!) - dependencies: (Optional) A list (space or comma-separated) of other modules that are required by - this one. The Introjucer can use this to auto-resolve dependencies. - website: (Optional) A URL linking to useful info about the module] - license: (Optional) A description of the type of software license that applies - searchpaths: (Optional) A space-separated list of internal include paths, relative to the module's - parent folder, which need to be added to a project's header search path - OSXFrameworks: (Optional) A list (space or comma-separated) of OSX frameworks that are needed - by this module - iOSFrameworks: (Optional) Like OSXFrameworks, but for iOS targets - linuxPackages: (Optional) A list (space or comma-separated) pkg-config packages that should be used to pass - compiler (CFLAGS) and linker (LDFLAGS) flags - linuxLibs: (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in a - linux build (these are passed to the linker via the -l flag) - mingwLibs: (Optional) A list (space or comma-separated) of static libs that should be linked in a - win32 mingw build (these are passed to the linker via the -l flag) - OSXLibs: (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in an - OS X build (these are passed to the linker via the -l flag) - iOSLibs: (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in an - iOS build (these are passed to the linker via the -l flag) - windowsLibs: (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in a - Visual Studio build (without the .lib suffixes) + dependencies: (Optional) A list (space or comma-separated) of other modules that are required by + this one. The Introjucer can use this to auto-resolve dependencies. + website: (Optional) A URL linking to useful info about the module] + license: (Optional) A description of the type of software license that applies + minimumCppStandard: (Optional) A number indicating the minimum C++ language standard that is required for this module. + This must be just the standard number with no prefix e.g. 14 for C++14 + searchpaths: (Optional) A space-separated list of internal include paths, relative to the module's + parent folder, which need to be added to a project's header search path + OSXFrameworks: (Optional) A list (space or comma-separated) of OSX frameworks that are needed + by this module + iOSFrameworks: (Optional) Like OSXFrameworks, but for iOS targets + linuxPackages: (Optional) A list (space or comma-separated) pkg-config packages that should be used to pass + compiler (CFLAGS) and linker (LDFLAGS) flags + linuxLibs: (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in a + linux build (these are passed to the linker via the -l flag) + mingwLibs: (Optional) A list (space or comma-separated) of static libs that should be linked in a + win32 mingw build (these are passed to the linker via the -l flag) + OSXLibs: (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in an + OS X build (these are passed to the linker via the -l flag) + iOSLibs: (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in an + iOS build (these are passed to the linker via the -l flag) + windowsLibs: (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in a + Visual Studio build (without the .lib suffixes) Here's an example block: diff --git a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp index bc101d5806..e75f90b4e9 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp +++ b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp @@ -21,6 +21,11 @@ */ AudioChannelSet::AudioChannelSet (uint32 c) : channels (c) {} +AudioChannelSet::AudioChannelSet (const Array& c) +{ + for (auto channel : c) + addChannel (channel); +} bool AudioChannelSet::operator== (const AudioChannelSet& other) const noexcept { return channels == other.channels; } bool AudioChannelSet::operator!= (const AudioChannelSet& other) const noexcept { return channels != other.channels; } @@ -207,10 +212,10 @@ String AudioChannelSet::getDescription() const bool AudioChannelSet::isDiscreteLayout() const noexcept { for (auto& speaker : getChannelTypes()) - if (speaker > ambisonicZ) - return true; + if (speaker <= ambisonicZ) + return false; - return false; + return true; } int AudioChannelSet::size() const noexcept @@ -274,20 +279,20 @@ AudioChannelSet AudioChannelSet::createLCR() { return AudioChannelSet ( AudioChannelSet AudioChannelSet::createLRS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << surround)); } AudioChannelSet AudioChannelSet::createLCRS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << surround)); } AudioChannelSet AudioChannelSet::create5point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround)); } -AudioChannelSet AudioChannelSet::create5point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround) | (1u << LFE)); } +AudioChannelSet AudioChannelSet::create5point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << LFE) | (1u << leftSurround) | (1u << rightSurround)); } AudioChannelSet AudioChannelSet::create6point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround) | (1u << centreSurround)); } -AudioChannelSet AudioChannelSet::create6point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround) | (1u << centreSurround) | (1u << LFE)); } +AudioChannelSet AudioChannelSet::create6point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << LFE) | (1u << leftSurround) | (1u << rightSurround) | (1u << centreSurround)); } AudioChannelSet AudioChannelSet::create6point0Music() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << leftSurround) | (1u << rightSurround) | (1u << leftSurroundSide) | (1u << rightSurroundSide)); } -AudioChannelSet AudioChannelSet::create6point1Music() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << leftSurround) | (1u << rightSurround) | (1u << leftSurroundSide) | (1u << rightSurroundSide) | (1u << LFE)); } +AudioChannelSet AudioChannelSet::create6point1Music() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << LFE) | (1u << leftSurround) | (1u << rightSurround) | (1u << leftSurroundSide) | (1u << rightSurroundSide)); } AudioChannelSet AudioChannelSet::create7point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurroundSide) | (1u << rightSurroundSide) | (1u << leftSurroundRear) | (1u << rightSurroundRear)); } AudioChannelSet AudioChannelSet::create7point0SDDS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround) | (1u << leftCentre) | (1u << rightCentre)); } -AudioChannelSet AudioChannelSet::create7point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurroundSide) | (1u << rightSurroundSide) | (1u << leftSurroundRear) | (1u << rightSurroundRear) | (1u << LFE)); } -AudioChannelSet AudioChannelSet::create7point1SDDS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround) | (1u << leftCentre) | (1u << rightCentre) | (1u << LFE)); } +AudioChannelSet AudioChannelSet::create7point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << LFE) | (1u << leftSurroundSide) | (1u << rightSurroundSide) | (1u << leftSurroundRear) | (1u << rightSurroundRear)); } +AudioChannelSet AudioChannelSet::create7point1SDDS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << LFE) | (1u << leftSurround) | (1u << rightSurround) | (1u << leftCentre) | (1u << rightCentre)); } AudioChannelSet AudioChannelSet::ambisonic() { return AudioChannelSet ((1u << ambisonicW) | (1u << ambisonicX) | (1u << ambisonicY) | (1u << ambisonicZ)); } AudioChannelSet AudioChannelSet::quadraphonic() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << leftSurround) | (1u << rightSurround)); } AudioChannelSet AudioChannelSet::pentagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurroundRear) | (1u << rightSurroundRear)); } -AudioChannelSet AudioChannelSet::hexagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << leftSurroundRear) | (1u << rightSurroundRear) | (1u << centre) | (1u << centreSurround)); } -AudioChannelSet AudioChannelSet::octagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << leftSurround) | (1u << rightSurround) | (1u << centre) | (1u << centreSurround) | (1u << wideLeft) | (1u << wideRight)); } +AudioChannelSet AudioChannelSet::hexagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << centreSurround) | (1u << leftSurroundRear) | (1u << rightSurroundRear)); } +AudioChannelSet AudioChannelSet::octagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround) | (1u << centreSurround) | (1u << wideLeft) | (1u << wideRight)); } AudioChannelSet AudioChannelSet::discreteChannels (int numChannels) @@ -381,3 +386,31 @@ Array AudioChannelSet::channelSetsWithNumberOfChannels (int num return retval; } + +AudioChannelSet JUCE_CALLTYPE AudioChannelSet::channelSetWithChannels (const Array& channelArray) +{ + AudioChannelSet set; + + for (auto ch : channelArray) + { + jassert (! set.channels[static_cast (ch)]); + + set.addChannel (ch); + } + + return set; +} + +//============================================================================== +AudioChannelSet JUCE_CALLTYPE AudioChannelSet::fromWaveChannelMask (int32 dwChannelMask) +{ + return AudioChannelSet (static_cast ((dwChannelMask & ((1 << 18) - 1)) << 1)); +} + +int32 AudioChannelSet::getWaveChannelMask() const noexcept +{ + if (channels.getHighestBit() > topRearRight) + return -1; + + return (channels.toInteger() >> 1); +} diff --git a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.h b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.h index e169c8dc4b..14c0ff900a 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.h +++ b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.h @@ -351,12 +351,40 @@ public: /** Intersect two channel layouts. */ void intersect (const AudioChannelSet& other) { channels &= other.channels; } + /** Creates a channel set for a list of channel types. This function will assert + if you supply a duplicate channel. + + Note that this method ignores the order in which the channels are given, i.e. + two arrays with the same elements but in a different order will still result + in the same channel set. + */ + static AudioChannelSet JUCE_CALLTYPE channelSetWithChannels (const Array&); + + //============================================================================== + // Conversion between wave and juce channel layout identifiers + + /** Create an AudioChannelSet from a WAVEFORMATEXTENSIBLE channelMask (typically used + in .wav files). */ + static AudioChannelSet JUCE_CALLTYPE fromWaveChannelMask (int32 dwChannelMask); + + /** Returns a WAVEFORMATEXTENSIBLE channelMask representation (typically used in .wav + files) of the receiver. + + Returns -1 if the receiver cannot be represented in a WAVEFORMATEXTENSIBLE channelMask + representation. + */ + int32 getWaveChannelMask() const noexcept; + //============================================================================== bool operator== (const AudioChannelSet&) const noexcept; bool operator!= (const AudioChannelSet&) const noexcept; bool operator< (const AudioChannelSet&) const noexcept; + private: + //============================================================================== BigInteger channels; + //============================================================================== explicit AudioChannelSet (uint32); + explicit AudioChannelSet (const Array&); }; diff --git a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp index c9e543ebbe..de705a8d36 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp +++ b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp @@ -475,7 +475,7 @@ void AudioDataConverters::deinterleaveSamples (const float* const source, class AudioConversionTests : public UnitTest { public: - AudioConversionTests() : UnitTest ("Audio data conversion") {} + AudioConversionTests() : UnitTest ("Audio data conversion", "Audio") {} template struct Test5 diff --git a/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h b/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h index e91fe3105a..04dc758135 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h +++ b/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h @@ -57,9 +57,7 @@ public: : numChannels (numChannelsToAllocate), size (numSamplesToAllocate) { - jassert (size >= 0); - jassert (numChannels >= 0); - + jassert (size >= 0 && numChannels >= 0); allocateData(); } @@ -233,7 +231,7 @@ public: const Type* getReadPointer (int channelNumber) const noexcept { jassert (isPositiveAndBelow (channelNumber, numChannels)); - return channels [channelNumber]; + return channels[channelNumber]; } /** Returns a pointer to an array of read-only samples in one of the buffer's channels. @@ -247,7 +245,7 @@ public: { jassert (isPositiveAndBelow (channelNumber, numChannels)); jassert (isPositiveAndBelow (sampleIndex, size)); - return channels [channelNumber] + sampleIndex; + return channels[channelNumber] + sampleIndex; } /** Returns a writeable pointer to one of the buffer's channels. @@ -260,7 +258,7 @@ public: { jassert (isPositiveAndBelow (channelNumber, numChannels)); isClear = false; - return channels [channelNumber]; + return channels[channelNumber]; } /** Returns a writeable pointer to one of the buffer's channels. @@ -274,7 +272,7 @@ public: jassert (isPositiveAndBelow (channelNumber, numChannels)); jassert (isPositiveAndBelow (sampleIndex, size)); isClear = false; - return channels [channelNumber] + sampleIndex; + return channels[channelNumber] + sampleIndex; } /** Returns an array of pointers to the channels in the buffer. @@ -322,20 +320,20 @@ public: if (newNumSamples != size || newNumChannels != numChannels) { - const size_t allocatedSamplesPerChannel = ((size_t) newNumSamples + 3) & ~3u; - const size_t channelListSize = ((sizeof (Type*) * (size_t) (newNumChannels + 1)) + 15) & ~15u; - const size_t newTotalBytes = ((size_t) newNumChannels * (size_t) allocatedSamplesPerChannel * sizeof (Type)) - + channelListSize + 32; + const auto allocatedSamplesPerChannel = ((size_t) newNumSamples + 3) & ~3u; + const auto channelListSize = ((sizeof (Type*) * (size_t) (newNumChannels + 1)) + 15) & ~15u; + const auto newTotalBytes = ((size_t) newNumChannels * (size_t) allocatedSamplesPerChannel * sizeof (Type)) + + channelListSize + 32; if (keepExistingContent) { HeapBlock newData; newData.allocate (newTotalBytes, clearExtraSpace || isClear); - const size_t numSamplesToCopy = (size_t) jmin (newNumSamples, size); + auto numSamplesToCopy = (size_t) jmin (newNumSamples, size); - Type** const newChannels = reinterpret_cast (newData.getData()); - Type* newChan = reinterpret_cast (newData + channelListSize); + auto newChannels = reinterpret_cast (newData.getData()); + auto newChan = reinterpret_cast (newData + channelListSize); for (int j = 0; j < newNumChannels; ++j) { @@ -345,7 +343,8 @@ public: if (! isClear) { - const int numChansToCopy = jmin (numChannels, newNumChannels); + auto numChansToCopy = jmin (numChannels, newNumChannels); + for (int i = 0; i < numChansToCopy; ++i) FloatVectorOperations::copy (newChannels[i], channels[i], (int) numSamplesToCopy); } @@ -368,7 +367,8 @@ public: channels = reinterpret_cast (allocatedData.getData()); } - Type* chan = reinterpret_cast (allocatedData + channelListSize); + auto* chan = reinterpret_cast (allocatedData + channelListSize); + for (int i = 0; i < newNumChannels; ++i) { channels[i] = chan; @@ -376,7 +376,7 @@ public: } } - channels [newNumChannels] = 0; + channels[newNumChannels] = 0; size = newNumSamples; numChannels = newNumChannels; } @@ -466,8 +466,8 @@ public: for (int chan = 0; chan < numChannels; ++chan) { - Type* const dest = channels[chan]; - const OtherType* const src = other.getReadPointer (chan); + auto* dest = channels[chan]; + auto* src = other.getReadPointer (chan); for (int i = 0; i < size; ++i) dest[i] = static_cast (src[i]); @@ -495,7 +495,7 @@ public: */ void clear (int startSample, int numSamples) noexcept { - jassert (startSample >= 0 && startSample + numSamples <= size); + jassert (startSample >= 0 && numSamples >= 0 && startSample + numSamples <= size); if (! isClear) { @@ -515,10 +515,10 @@ public: void clear (int channel, int startSample, int numSamples) noexcept { jassert (isPositiveAndBelow (channel, numChannels)); - jassert (startSample >= 0 && startSample + numSamples <= size); + jassert (startSample >= 0 && numSamples >= 0 && startSample + numSamples <= size); if (! isClear) - FloatVectorOperations::clear (channels [channel] + startSample, numSamples); + FloatVectorOperations::clear (channels[channel] + startSample, numSamples); } /** Returns true if the buffer has been entirely cleared. @@ -539,7 +539,7 @@ public: { jassert (isPositiveAndBelow (channel, numChannels)); jassert (isPositiveAndBelow (sampleIndex, size)); - return *(channels [channel] + sampleIndex); + return *(channels[channel] + sampleIndex); } /** Sets a sample in the buffer. @@ -551,7 +551,7 @@ public: { jassert (isPositiveAndBelow (destChannel, numChannels)); jassert (isPositiveAndBelow (destSample, size)); - *(channels [destChannel] + destSample) = newValue; + *(channels[destChannel] + destSample) = newValue; isClear = false; } @@ -564,7 +564,7 @@ public: { jassert (isPositiveAndBelow (destChannel, numChannels)); jassert (isPositiveAndBelow (destSample, size)); - *(channels [destChannel] + destSample) += valueToAdd; + *(channels[destChannel] + destSample) += valueToAdd; isClear = false; } @@ -576,11 +576,11 @@ public: void applyGain (int channel, int startSample, int numSamples, Type gain) noexcept { jassert (isPositiveAndBelow (channel, numChannels)); - jassert (startSample >= 0 && startSample + numSamples <= size); + jassert (startSample >= 0 && numSamples >= 0 && startSample + numSamples <= size); if (gain != (Type) 1 && ! isClear) { - Type* const d = channels [channel] + startSample; + auto* d = channels[channel] + startSample; if (gain == 0) FloatVectorOperations::clear (d, numSamples); @@ -627,10 +627,10 @@ public: else { jassert (isPositiveAndBelow (channel, numChannels)); - jassert (startSample >= 0 && startSample + numSamples <= size); + jassert (startSample >= 0 && numSamples >= 0 && startSample + numSamples <= size); - const Type increment = (endGain - startGain) / numSamples; - auto* d = channels [channel] + startSample; + const auto increment = (endGain - startGain) / numSamples; + auto* d = channels[channel] + startSample; while (--numSamples >= 0) { @@ -680,14 +680,14 @@ public: { jassert (&source != this || sourceChannel != destChannel); jassert (isPositiveAndBelow (destChannel, numChannels)); - jassert (destStartSample >= 0 && destStartSample + numSamples <= size); + jassert (destStartSample >= 0 && numSamples >= 0 && destStartSample + numSamples <= size); jassert (isPositiveAndBelow (sourceChannel, source.numChannels)); jassert (sourceStartSample >= 0 && sourceStartSample + numSamples <= source.size); if (gainToApplyToSource != 0 && numSamples > 0 && ! source.isClear) { - auto* d = channels [destChannel] + destStartSample; - const Type* const s = source.channels [sourceChannel] + sourceStartSample; + auto* d = channels[destChannel] + destStartSample; + auto* s = source.channels[sourceChannel] + sourceStartSample; if (isClear) { @@ -727,12 +727,12 @@ public: Type gainToApplyToSource = (Type) 1) noexcept { jassert (isPositiveAndBelow (destChannel, numChannels)); - jassert (destStartSample >= 0 && destStartSample + numSamples <= size); + jassert (destStartSample >= 0 && numSamples >= 0 && destStartSample + numSamples <= size); jassert (source != nullptr); if (gainToApplyToSource != 0 && numSamples > 0) { - auto* d = channels [destChannel] + destStartSample; + auto* d = channels[destChannel] + destStartSample; if (isClear) { @@ -772,21 +772,21 @@ public: Type startGain, Type endGain) noexcept { - jassert (isPositiveAndBelow (destChannel, numChannels)); - jassert (destStartSample >= 0 && destStartSample + numSamples <= size); - jassert (source != nullptr); - if (startGain == endGain) { addFrom (destChannel, destStartSample, source, numSamples, startGain); } else { - if (numSamples > 0 && (startGain != 0 || endGain != 0)) + jassert (isPositiveAndBelow (destChannel, numChannels)); + jassert (destStartSample >= 0 && numSamples >= 0 && destStartSample + numSamples <= size); + jassert (source != nullptr); + + if (numSamples > 0) { isClear = false; - const Type increment = (endGain - startGain) / numSamples; - auto* d = channels [destChannel] + destStartSample; + const auto increment = (endGain - startGain) / numSamples; + auto* d = channels[destChannel] + destStartSample; while (--numSamples >= 0) { @@ -819,20 +819,20 @@ public: jassert (isPositiveAndBelow (destChannel, numChannels)); jassert (destStartSample >= 0 && destStartSample + numSamples <= size); jassert (isPositiveAndBelow (sourceChannel, source.numChannels)); - jassert (sourceStartSample >= 0 && sourceStartSample + numSamples <= source.size); + jassert (sourceStartSample >= 0 && numSamples >= 0 && sourceStartSample + numSamples <= source.size); if (numSamples > 0) { if (source.isClear) { if (! isClear) - FloatVectorOperations::clear (channels [destChannel] + destStartSample, numSamples); + FloatVectorOperations::clear (channels[destChannel] + destStartSample, numSamples); } else { isClear = false; - FloatVectorOperations::copy (channels [destChannel] + destStartSample, - source.channels [sourceChannel] + sourceStartSample, + FloatVectorOperations::copy (channels[destChannel] + destStartSample, + source.channels[sourceChannel] + sourceStartSample, numSamples); } } @@ -853,13 +853,13 @@ public: int numSamples) noexcept { jassert (isPositiveAndBelow (destChannel, numChannels)); - jassert (destStartSample >= 0 && destStartSample + numSamples <= size); + jassert (destStartSample >= 0 && numSamples >= 0 && destStartSample + numSamples <= size); jassert (source != nullptr); if (numSamples > 0) { isClear = false; - FloatVectorOperations::copy (channels [destChannel] + destStartSample, source, numSamples); + FloatVectorOperations::copy (channels[destChannel] + destStartSample, source, numSamples); } } @@ -880,12 +880,12 @@ public: Type gain) noexcept { jassert (isPositiveAndBelow (destChannel, numChannels)); - jassert (destStartSample >= 0 && destStartSample + numSamples <= size); + jassert (destStartSample >= 0 && numSamples >= 0 && destStartSample + numSamples <= size); jassert (source != nullptr); if (numSamples > 0) { - auto* d = channels [destChannel] + destStartSample; + auto* d = channels[destChannel] + destStartSample; if (gain != (Type) 1) { @@ -928,21 +928,21 @@ public: Type startGain, Type endGain) noexcept { - jassert (isPositiveAndBelow (destChannel, numChannels)); - jassert (destStartSample >= 0 && destStartSample + numSamples <= size); - jassert (source != nullptr); - if (startGain == endGain) { copyFrom (destChannel, destStartSample, source, numSamples, startGain); } else { - if (numSamples > 0 && (startGain != 0 || endGain != 0)) + jassert (isPositiveAndBelow (destChannel, numChannels)); + jassert (destStartSample >= 0 && numSamples >= 0 && destStartSample + numSamples <= size); + jassert (source != nullptr); + + if (numSamples > 0) { isClear = false; - const Type increment = (endGain - startGain) / numSamples; - auto* d = channels [destChannel] + destStartSample; + const auto increment = (endGain - startGain) / numSamples; + auto* d = channels[destChannel] + destStartSample; while (--numSamples >= 0) { @@ -962,19 +962,19 @@ public: Range findMinMax (int channel, int startSample, int numSamples) const noexcept { jassert (isPositiveAndBelow (channel, numChannels)); - jassert (startSample >= 0 && startSample + numSamples <= size); + jassert (startSample >= 0 && numSamples >= 0 && startSample + numSamples <= size); if (isClear) return {}; - return FloatVectorOperations::findMinAndMax (channels [channel] + startSample, numSamples); + return FloatVectorOperations::findMinAndMax (channels[channel] + startSample, numSamples); } /** Finds the highest absolute sample value within a region of a channel. */ Type getMagnitude (int channel, int startSample, int numSamples) const noexcept { jassert (isPositiveAndBelow (channel, numChannels)); - jassert (startSample >= 0 && startSample + numSamples <= size); + jassert (startSample >= 0 && numSamples >= 0 && startSample + numSamples <= size); if (isClear) return {}; @@ -1000,17 +1000,17 @@ public: Type getRMSLevel (int channel, int startSample, int numSamples) const noexcept { jassert (isPositiveAndBelow (channel, numChannels)); - jassert (startSample >= 0 && startSample + numSamples <= size); + jassert (startSample >= 0 && numSamples >= 0 && startSample + numSamples <= size); if (numSamples <= 0 || channel < 0 || channel >= numChannels || isClear) return {}; - const Type* const data = channels [channel] + startSample; + auto* data = channels[channel] + startSample; double sum = 0.0; for (int i = 0; i < numSamples; ++i) { - const Type sample = data [i]; + const Type sample = data[i]; sum += sample * sample; } @@ -1021,7 +1021,7 @@ public: void reverse (int channel, int startSample, int numSamples) const noexcept { jassert (isPositiveAndBelow (channel, numChannels)); - jassert (startSample >= 0 && startSample + numSamples <= size); + jassert (startSample >= 0 && numSamples >= 0 && startSample + numSamples <= size); if (! isClear) std::reverse (channels[channel] + startSample, @@ -1047,7 +1047,8 @@ private: void allocateData() { - const size_t channelListSize = sizeof (Type*) * (size_t) (numChannels + 1); + jassert (size >= 0); + auto channelListSize = sizeof (Type*) * (size_t) (numChannels + 1); allocatedBytes = (size_t) numChannels * (size_t) size * sizeof (Type) + channelListSize + 32; allocatedData.malloc (allocatedBytes); channels = reinterpret_cast (allocatedData.getData()); @@ -1059,11 +1060,11 @@ private: chan += size; } - channels [numChannels] = nullptr; + channels[numChannels] = nullptr; isClear = false; } - void allocateChannels (Type* const* const dataToReferTo, int offset) + void allocateChannels (Type* const* dataToReferTo, int offset) { jassert (offset >= 0); @@ -1086,7 +1087,7 @@ private: channels[i] = dataToReferTo[i] + offset; } - channels [numChannels] = nullptr; + channels[numChannels] = nullptr; isClear = false; } diff --git a/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp b/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp index fe23ceea65..be1d59f655 100644 --- a/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp +++ b/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp @@ -689,9 +689,13 @@ void JUCE_CALLTYPE FloatVectorOperations::addWithMultiply (float* dest, const fl void JUCE_CALLTYPE FloatVectorOperations::addWithMultiply (double* dest, const double* src, double multiplier, int num) noexcept { + #if JUCE_USE_VDSP_FRAMEWORK + vDSP_vsmaD (src, 1, &multiplier, dest, 1, dest, 1, (vDSP_Length) num); + #else JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] += src[i] * multiplier, Mode::add (d, Mode::mul (mult, s)), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, const Mode::ParallelType mult = Mode::load1 (multiplier);) + #endif } void JUCE_CALLTYPE FloatVectorOperations::addWithMultiply (float* dest, const float* src1, const float* src2, int num) noexcept @@ -716,6 +720,34 @@ void JUCE_CALLTYPE FloatVectorOperations::addWithMultiply (double* dest, const d #endif } +void JUCE_CALLTYPE FloatVectorOperations::subtractWithMultiply (float* dest, const float* src, float multiplier, int num) noexcept +{ + JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] -= src[i] * multiplier, Mode::sub (d, Mode::mul (mult, s)), + JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, + const Mode::ParallelType mult = Mode::load1 (multiplier);) +} + +void JUCE_CALLTYPE FloatVectorOperations::subtractWithMultiply (double* dest, const double* src, double multiplier, int num) noexcept +{ + JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] -= src[i] * multiplier, Mode::sub (d, Mode::mul (mult, s)), + JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, + const Mode::ParallelType mult = Mode::load1 (multiplier);) +} + +void JUCE_CALLTYPE FloatVectorOperations::subtractWithMultiply (float* dest, const float* src1, const float* src2, int num) noexcept +{ + JUCE_PERFORM_VEC_OP_SRC1_SRC2_DEST_DEST (dest[i] -= src1[i] * src2[i], Mode::sub (d, Mode::mul (s1, s2)), + JUCE_LOAD_SRC1_SRC2_DEST, + JUCE_INCREMENT_SRC1_SRC2_DEST, ) +} + +void JUCE_CALLTYPE FloatVectorOperations::subtractWithMultiply (double* dest, const double* src1, const double* src2, int num) noexcept +{ + JUCE_PERFORM_VEC_OP_SRC1_SRC2_DEST_DEST (dest[i] -= src1[i] * src2[i], Mode::sub (d, Mode::mul (s1, s2)), + JUCE_LOAD_SRC1_SRC2_DEST, + JUCE_INCREMENT_SRC1_SRC2_DEST, ) +} + void JUCE_CALLTYPE FloatVectorOperations::multiply (float* dest, const float* src, int num) noexcept { #if JUCE_USE_VDSP_FRAMEWORK @@ -1016,7 +1048,7 @@ void JUCE_CALLTYPE FloatVectorOperations::disableDenormalisedNumberSupport() noe class FloatVectorOperationsTests : public UnitTest { public: - FloatVectorOperationsTests() : UnitTest ("FloatVectorOperations") {} + FloatVectorOperationsTests() : UnitTest ("FloatVectorOperations", "Audio") {} template struct TestRunner diff --git a/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.h b/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.h index 25276e4ced..2b9741cb14 100644 --- a/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.h +++ b/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.h @@ -22,6 +22,11 @@ #pragma once +#if JUCE_INTEL + #define JUCE_SNAP_TO_ZERO(n) if (! (n < -1.0e-8f || n > 1.0e-8f)) n = 0; +#else + #define JUCE_SNAP_TO_ZERO(n) +#endif //============================================================================== /** @@ -104,6 +109,18 @@ public: /** Multiplies each source1 value by the corresponding source2 value, then adds it to the destination value. */ static void JUCE_CALLTYPE addWithMultiply (double* dest, const double* src1, const double* src2, int num) noexcept; + /** Multiplies each source value by the given multiplier, then subtracts it to the destination value. */ + static void JUCE_CALLTYPE subtractWithMultiply (float* dest, const float* src, float multiplier, int numValues) noexcept; + + /** Multiplies each source value by the given multiplier, then subtracts it to the destination value. */ + static void JUCE_CALLTYPE subtractWithMultiply (double* dest, const double* src, double multiplier, int numValues) noexcept; + + /** Multiplies each source1 value by the corresponding source2 value, then subtracts it to the destination value. */ + static void JUCE_CALLTYPE subtractWithMultiply (float* dest, const float* src1, const float* src2, int num) noexcept; + + /** Multiplies each source1 value by the corresponding source2 value, then subtracts it to the destination value. */ + static void JUCE_CALLTYPE subtractWithMultiply (double* dest, const double* src1, const double* src2, int num) noexcept; + /** Multiplies the destination values by the source values. */ static void JUCE_CALLTYPE multiply (float* dest, const float* src, int numValues) noexcept; diff --git a/modules/juce_audio_basics/effects/juce_FFT.cpp b/modules/juce_audio_basics/effects/juce_FFT.cpp deleted file mode 100644 index 4cf233b686..0000000000 --- a/modules/juce_audio_basics/effects/juce_FFT.cpp +++ /dev/null @@ -1,303 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -// (For the moment, we'll implement a few local operators for this complex class - one -// day we'll probably either have a juce complex class, or use the C++11 one) -static FFT::Complex operator+ (FFT::Complex a, FFT::Complex b) noexcept { FFT::Complex c = { a.r + b.r, a.i + b.i }; return c; } -static FFT::Complex operator- (FFT::Complex a, FFT::Complex b) noexcept { FFT::Complex c = { a.r - b.r, a.i - b.i }; return c; } -static FFT::Complex operator* (FFT::Complex a, FFT::Complex b) noexcept { FFT::Complex c = { a.r * b.r - a.i * b.i, a.r * b.i + a.i * b.r }; return c; } -static FFT::Complex& operator+= (FFT::Complex& a, FFT::Complex b) noexcept { a.r += b.r; a.i += b.i; return a; } - -//============================================================================== -struct FFT::FFTConfig -{ - FFTConfig (int sizeOfFFT, bool isInverse) - : fftSize (sizeOfFFT), inverse (isInverse), twiddleTable ((size_t) sizeOfFFT) - { - for (int i = 0; i < fftSize; ++i) - { - const double phase = (isInverse ? 2.0 : -2.0) * double_Pi * i / fftSize; - twiddleTable[i].r = (float) cos (phase); - twiddleTable[i].i = (float) sin (phase); - } - - const int root = (int) std::sqrt ((double) fftSize); - int divisor = 4, n = fftSize; - - for (int i = 0; i < numElementsInArray (factors); ++i) - { - while ((n % divisor) != 0) - { - if (divisor == 2) divisor = 3; - else if (divisor == 4) divisor = 2; - else divisor += 2; - - if (divisor > root) - divisor = n; - } - - n /= divisor; - - jassert (divisor == 1 || divisor == 2 || divisor == 4); - factors[i].radix = divisor; - factors[i].length = n; - } - } - - void perform (const Complex* input, Complex* output) const noexcept - { - perform (input, output, 1, 1, factors); - } - - const int fftSize; - const bool inverse; - - struct Factor { int radix, length; }; - Factor factors[32]; - HeapBlock twiddleTable; - - void perform (const Complex* input, Complex* output, const int stride, const int strideIn, const Factor* facs) const noexcept - { - const Factor factor (*facs++); - Complex* const originalOutput = output; - const Complex* const outputEnd = output + factor.radix * factor.length; - - if (stride == 1 && factor.radix <= 5) - { - for (int i = 0; i < factor.radix; ++i) - perform (input + stride * strideIn * i, output + i * factor.length, stride * factor.radix, strideIn, facs); - - butterfly (factor, output, stride); - return; - } - - if (factor.length == 1) - { - do - { - *output++ = *input; - input += stride * strideIn; - } - while (output < outputEnd); - } - else - { - do - { - perform (input, output, stride * factor.radix, strideIn, facs); - input += stride * strideIn; - output += factor.length; - } - while (output < outputEnd); - } - - butterfly (factor, originalOutput, stride); - } - - void butterfly (const Factor factor, Complex* data, const int stride) const noexcept - { - switch (factor.radix) - { - case 1: break; - case 2: butterfly2 (data, stride, factor.length); return; - case 4: butterfly4 (data, stride, factor.length); return; - default: jassertfalse; break; - } - - Complex* scratch = static_cast (alloca (sizeof (Complex) * (size_t) factor.radix)); - - for (int i = 0; i < factor.length; ++i) - { - for (int k = i, q1 = 0; q1 < factor.radix; ++q1) - { - scratch[q1] = data[k]; - k += factor.length; - } - - for (int k = i, q1 = 0; q1 < factor.radix; ++q1) - { - int twiddleIndex = 0; - data[k] = scratch[0]; - - for (int q = 1; q < factor.radix; ++q) - { - twiddleIndex += stride * k; - - if (twiddleIndex >= fftSize) - twiddleIndex -= fftSize; - - data[k] += scratch[q] * twiddleTable[twiddleIndex]; - } - - k += factor.length; - } - } - } - - void butterfly2 (Complex* data, const int stride, const int length) const noexcept - { - Complex* dataEnd = data + length; - const Complex* tw = twiddleTable; - - for (int i = length; --i >= 0;) - { - const Complex s (*dataEnd * *tw); - tw += stride; - *dataEnd++ = *data - s; - *data++ += s; - } - } - - void butterfly4 (Complex* data, const int stride, const int length) const noexcept - { - const int lengthX2 = length * 2; - const int lengthX3 = length * 3; - - const Complex* twiddle1 = twiddleTable; - const Complex* twiddle2 = twiddle1; - const Complex* twiddle3 = twiddle1; - - for (int i = length; --i >= 0;) - { - const Complex s0 = data[length] * *twiddle1; - const Complex s1 = data[lengthX2] * *twiddle2; - const Complex s2 = data[lengthX3] * *twiddle3; - const Complex s3 = s0 + s2; - const Complex s4 = s0 - s2; - const Complex s5 = *data - s1; - *data += s1; - data[lengthX2] = *data - s3; - twiddle1 += stride; - twiddle2 += stride * 2; - twiddle3 += stride * 3; - *data += s3; - - if (inverse) - { - data[length].r = s5.r - s4.i; - data[length].i = s5.i + s4.r; - data[lengthX3].r = s5.r + s4.i; - data[lengthX3].i = s5.i - s4.r; - } - else - { - data[length].r = s5.r + s4.i; - data[length].i = s5.i - s4.r; - data[lengthX3].r = s5.r - s4.i; - data[lengthX3].i = s5.i + s4.r; - } - - ++data; - } - } - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FFTConfig) -}; - - -//============================================================================== -FFT::FFT (int order, bool inverse) : config (new FFTConfig (1 << order, inverse)), size (1 << order) {} -FFT::~FFT() {} - -void FFT::perform (const Complex* const input, Complex* const output) const noexcept -{ - config->perform (input, output); -} - -const size_t maxFFTScratchSpaceToAlloca = 256 * 1024; - -void FFT::performRealOnlyForwardTransform (float* d) const noexcept -{ - const size_t scratchSize = 16 + sizeof (FFT::Complex) * (size_t) size; - - if (scratchSize < maxFFTScratchSpaceToAlloca) - { - performRealOnlyForwardTransform (static_cast (alloca (scratchSize)), d); - } - else - { - HeapBlock heapSpace (scratchSize); - performRealOnlyForwardTransform (reinterpret_cast (heapSpace.getData()), d); - } -} - -void FFT::performRealOnlyInverseTransform (float* d) const noexcept -{ - const size_t scratchSize = 16 + sizeof (FFT::Complex) * (size_t) size; - - if (scratchSize < maxFFTScratchSpaceToAlloca) - { - performRealOnlyInverseTransform (static_cast (alloca (scratchSize)), d); - } - else - { - HeapBlock heapSpace (scratchSize); - performRealOnlyInverseTransform (reinterpret_cast (heapSpace.getData()), d); - } -} - -void FFT::performRealOnlyForwardTransform (Complex* scratch, float* d) const noexcept -{ - // This can only be called on an FFT object that was created to do forward transforms. - jassert (! config->inverse); - - for (int i = 0; i < size; ++i) - { - scratch[i].r = d[i]; - scratch[i].i = 0; - } - - perform (scratch, reinterpret_cast (d)); -} - -void FFT::performRealOnlyInverseTransform (Complex* scratch, float* d) const noexcept -{ - // This can only be called on an FFT object that was created to do inverse transforms. - jassert (config->inverse); - - perform (reinterpret_cast (d), scratch); - - const float scaleFactor = 1.0f / size; - - for (int i = 0; i < size; ++i) - { - d[i] = scratch[i].r * scaleFactor; - d[i + size] = scratch[i].i * scaleFactor; - } -} - -void FFT::performFrequencyOnlyForwardTransform (float* d) const noexcept -{ - performRealOnlyForwardTransform (d); - const int twiceSize = size * 2; - - for (int i = 0; i < twiceSize; i += 2) - { - d[i / 2] = juce_hypot (d[i], d[i + 1]); - - if (i >= size) - { - d[i] = 0; - d[i + 1] = 0; - } - } -} diff --git a/modules/juce_audio_basics/effects/juce_IIRFilter.cpp b/modules/juce_audio_basics/effects/juce_IIRFilter.cpp index 7062f84335..39def04d38 100644 --- a/modules/juce_audio_basics/effects/juce_IIRFilter.cpp +++ b/modules/juce_audio_basics/effects/juce_IIRFilter.cpp @@ -20,12 +20,6 @@ ============================================================================== */ -#if JUCE_INTEL - #define JUCE_SNAP_TO_ZERO(n) if (! (n < -1.0e-8f || n > 1.0e-8f)) n = 0; -#else - #define JUCE_SNAP_TO_ZERO(n) -#endif - //============================================================================== IIRCoefficients::IIRCoefficients() noexcept { diff --git a/modules/juce_audio_basics/effects/juce_LinearSmoothedValue.h b/modules/juce_audio_basics/effects/juce_LinearSmoothedValue.h index c3385ee5bf..a17aed5d59 100644 --- a/modules/juce_audio_basics/effects/juce_LinearSmoothedValue.h +++ b/modules/juce_audio_basics/effects/juce_LinearSmoothedValue.h @@ -36,18 +36,20 @@ class LinearSmoothedValue public: /** Constructor. */ LinearSmoothedValue() noexcept - : currentValue (0), target (0), step (0), countdown (0), stepsToTarget (0) { } /** Constructor. */ LinearSmoothedValue (FloatType initialValue) noexcept - : currentValue (initialValue), target (initialValue), step (0), countdown (0), stepsToTarget (0) + : currentValue (initialValue), target (initialValue) { } //============================================================================== - /** Reset to a new sample rate and ramp length. */ + /** Reset to a new sample rate and ramp length. + @param sampleRate The sampling rate + @param rampLengthInSeconds The duration of the ramp in seconds + */ void reset (double sampleRate, double rampLengthInSeconds) noexcept { jassert (sampleRate > 0 && rampLengthInSeconds >= 0); @@ -56,7 +58,10 @@ public: countdown = 0; } - /** Set a new target value. */ + //============================================================================== + /** Set a new target value. + @param newValue New target value + */ void setValue (FloatType newValue) noexcept { if (target != newValue) @@ -71,7 +76,10 @@ public: } } - /** Compute the next value. */ + //============================================================================== + /** Compute the next value. + @returns Smoothed value + */ FloatType getNextValue() noexcept { if (countdown <= 0) @@ -94,8 +102,83 @@ public: return target; } + //============================================================================== + /** Applies a linear smoothed gain to a stream of samples + S[i] *= gain + @param samples Pointer to a raw array of samples + @param numSamples Length of array of samples + */ + void applyGain (FloatType *samples, int numSamples) noexcept + { + jassert(numSamples >= 0); + + if (isSmoothing()) + { + for (int i = 0; i < numSamples; i++) + samples[i] *= getNextValue(); + } + else + { + FloatVectorOperations::multiply (samples, target, numSamples); + } + } + + //============================================================================== + /** Computes output as linear smoothed gain applied to a stream of samples. + Sout[i] = Sin[i] * gain + @param samples Pointer to a raw array of samples + @param numSamples Length of sample array + @param numSamples Length of array of samples + */ + void applyGain (FloatType *samplesOut, const FloatType *samplesIn, int numSamples) noexcept + { + jassert (numSamples >= 0); + + if (isSmoothing()) + { + for (int i = 0; i < numSamples; i++) + samplesOut[i] = samplesIn[i] * getNextValue(); + } + else + { + FloatVectorOperations::multiply (samplesOut, samplesIn, target, numSamples); + } + } + + //============================================================================== + /** Applies a linear smoothed gain to a buffer */ + void applyGain(AudioBuffer buffer, int numSamples) noexcept + { + jassert (numSamples >= 0); + + if (isSmoothing()) + { + if (buffer.getNumChannels() == 1) + { + FloatType *samples = buffer.getWritePointer(0); + + for (int i = 0; i < numSamples; i++) + samples[i] *= getNextValue(); + } + else + { + for (int i = 0; i < numSamples; i++) + { + const FloatType gain = getNextValue(); + + for (int channel = 0; channel < buffer.getNumChannels(); channel++) + buffer.setSample (channel, i, buffer.getSample (channel, i) * gain); + } + } + } + else + { + buffer.applyGain (0, numSamples, target); + } + } + private: //============================================================================== - FloatType currentValue, target, step; - int countdown, stepsToTarget; + FloatType currentValue = 0, target = 0, step = 0; + int countdown = 0, stepsToTarget = 0; }; diff --git a/modules/juce_audio_basics/juce_audio_basics.cpp b/modules/juce_audio_basics/juce_audio_basics.cpp index e1691341b2..258de8fe44 100644 --- a/modules/juce_audio_basics/juce_audio_basics.cpp +++ b/modules/juce_audio_basics/juce_audio_basics.cpp @@ -85,7 +85,6 @@ namespace juce #include "effects/juce_IIRFilter.cpp" #include "effects/juce_LagrangeInterpolator.cpp" #include "effects/juce_CatmullRomInterpolator.cpp" -#include "effects/juce_FFT.cpp" #include "midi/juce_MidiBuffer.cpp" #include "midi/juce_MidiFile.cpp" #include "midi/juce_MidiKeyboardState.cpp" @@ -104,6 +103,7 @@ namespace juce #include "sources/juce_BufferingAudioSource.cpp" #include "sources/juce_ChannelRemappingAudioSource.cpp" #include "sources/juce_IIRFilterAudioSource.cpp" +#include "sources/juce_MemoryAudioSource.cpp" #include "sources/juce_MixerAudioSource.cpp" #include "sources/juce_ResamplingAudioSource.cpp" #include "sources/juce_ReverbAudioSource.cpp" diff --git a/modules/juce_audio_basics/juce_audio_basics.h b/modules/juce_audio_basics/juce_audio_basics.h index aa87ab8ce9..1f0f417d0b 100644 --- a/modules/juce_audio_basics/juce_audio_basics.h +++ b/modules/juce_audio_basics/juce_audio_basics.h @@ -31,7 +31,7 @@ ID: juce_audio_basics vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE audio and MIDI data classes description: Classes for audio buffer manipulation, midi message handling, synthesis, etc. website: http://www.juce.com/juce @@ -65,7 +65,6 @@ namespace juce #include "effects/juce_IIRFilter.h" #include "effects/juce_LagrangeInterpolator.h" #include "effects/juce_CatmullRomInterpolator.h" -#include "effects/juce_FFT.h" #include "effects/juce_LinearSmoothedValue.h" #include "effects/juce_Reverb.h" #include "midi/juce_MidiMessage.h" @@ -88,6 +87,7 @@ namespace juce #include "sources/juce_BufferingAudioSource.h" #include "sources/juce_ChannelRemappingAudioSource.h" #include "sources/juce_IIRFilterAudioSource.h" +#include "sources/juce_MemoryAudioSource.h" #include "sources/juce_MixerAudioSource.h" #include "sources/juce_ResamplingAudioSource.h" #include "sources/juce_ReverbAudioSource.h" diff --git a/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp b/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp index e0c0bb8994..6a3f851cbf 100644 --- a/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp @@ -20,6 +20,12 @@ ============================================================================== */ + +MidiMessageSequence::MidiEventHolder::MidiEventHolder (const MidiMessage& mm) : message (mm) {} +MidiMessageSequence::MidiEventHolder::MidiEventHolder (MidiMessage&& mm) : message (static_cast (mm)) {} +MidiMessageSequence::MidiEventHolder::~MidiEventHolder() {} + +//============================================================================== MidiMessageSequence::MidiMessageSequence() { } @@ -37,15 +43,25 @@ MidiMessageSequence& MidiMessageSequence::operator= (const MidiMessageSequence& return *this; } -void MidiMessageSequence::swapWith (MidiMessageSequence& other) noexcept +MidiMessageSequence::MidiMessageSequence (MidiMessageSequence&& other) noexcept + : list (static_cast&&> (other.list)) +{} + +MidiMessageSequence& MidiMessageSequence::operator= (MidiMessageSequence&& other) noexcept { - list.swapWith (other.list); + list = static_cast&&> (other.list); + return *this; } MidiMessageSequence::~MidiMessageSequence() { } +void MidiMessageSequence::swapWith (MidiMessageSequence& other) noexcept +{ + list.swapWith (other.list); +} + void MidiMessageSequence::clear() { list.clear(); @@ -56,34 +72,37 @@ int MidiMessageSequence::getNumEvents() const noexcept return list.size(); } -MidiMessageSequence::MidiEventHolder* MidiMessageSequence::getEventPointer (const int index) const noexcept +MidiMessageSequence::MidiEventHolder* MidiMessageSequence::getEventPointer (int index) const noexcept { - return list [index]; + return list[index]; } -double MidiMessageSequence::getTimeOfMatchingKeyUp (const int index) const noexcept +MidiMessageSequence::MidiEventHolder** MidiMessageSequence::begin() const noexcept { return list.begin(); } +MidiMessageSequence::MidiEventHolder** MidiMessageSequence::end() const noexcept { return list.end(); } + +double MidiMessageSequence::getTimeOfMatchingKeyUp (int index) const noexcept { - if (const MidiEventHolder* const meh = list [index]) + if (auto* meh = list[index]) if (meh->noteOffObject != nullptr) return meh->noteOffObject->message.getTimeStamp(); return 0.0; } -int MidiMessageSequence::getIndexOfMatchingKeyUp (const int index) const noexcept +int MidiMessageSequence::getIndexOfMatchingKeyUp (int index) const noexcept { - if (const MidiEventHolder* const meh = list [index]) + if (auto* meh = list [index]) return list.indexOf (meh->noteOffObject); return -1; } -int MidiMessageSequence::getIndexOf (const MidiEventHolder* const event) const noexcept +int MidiMessageSequence::getIndexOf (const MidiEventHolder* event) const noexcept { return list.indexOf (event); } -int MidiMessageSequence::getNextIndexAtTime (const double timeStamp) const noexcept +int MidiMessageSequence::getNextIndexAtTime (double timeStamp) const noexcept { const int numEvents = list.size(); @@ -108,32 +127,38 @@ double MidiMessageSequence::getEndTime() const noexcept double MidiMessageSequence::getEventTime (const int index) const noexcept { - if (const MidiEventHolder* const meh = list [index]) + if (auto* meh = list [index]) return meh->message.getTimeStamp(); return 0.0; } //============================================================================== -MidiMessageSequence::MidiEventHolder* MidiMessageSequence::addEvent (const MidiMessage& newMessage, - double timeAdjustment) +MidiMessageSequence::MidiEventHolder* MidiMessageSequence::addEvent (MidiEventHolder* newEvent, double timeAdjustment) { - MidiEventHolder* const newOne = new MidiEventHolder (newMessage); - - timeAdjustment += newMessage.getTimeStamp(); - newOne->message.setTimeStamp (timeAdjustment); + newEvent->message.addToTimeStamp (timeAdjustment); + auto time = newEvent->message.getTimeStamp(); int i; for (i = list.size(); --i >= 0;) - if (list.getUnchecked(i)->message.getTimeStamp() <= timeAdjustment) + if (list.getUnchecked(i)->message.getTimeStamp() <= time) break; - list.insert (i + 1, newOne); - return newOne; + list.insert (i + 1, newEvent); + return newEvent; } -void MidiMessageSequence::deleteEvent (const int index, - const bool deleteMatchingNoteUp) +MidiMessageSequence::MidiEventHolder* MidiMessageSequence::addEvent (const MidiMessage& newMessage, double timeAdjustment) +{ + return addEvent (new MidiEventHolder (newMessage), timeAdjustment); +} + +MidiMessageSequence::MidiEventHolder* MidiMessageSequence::addEvent (MidiMessage&& newMessage, double timeAdjustment) +{ + return addEvent (new MidiEventHolder (static_cast (newMessage)), timeAdjustment); +} + +void MidiMessageSequence::deleteEvent (int index, bool deleteMatchingNoteUp) { if (isPositiveAndBelow (index, list.size())) { @@ -144,23 +169,11 @@ void MidiMessageSequence::deleteEvent (const int index, } } -struct MidiMessageSequenceSorter -{ - static int compareElements (const MidiMessageSequence::MidiEventHolder* const first, - const MidiMessageSequence::MidiEventHolder* const second) noexcept - { - const double diff = first->message.getTimeStamp() - second->message.getTimeStamp(); - return (diff > 0) - (diff < 0); - } -}; - void MidiMessageSequence::addSequence (const MidiMessageSequence& other, double timeAdjustment) { - for (int i = 0; i < other.list.size(); ++i) + for (auto* m : other) { - const MidiMessage& m = other.list.getUnchecked(i)->message; - - MidiEventHolder* const newOne = new MidiEventHolder (m); + auto newOne = new MidiEventHolder (m->message); newOne->message.addToTimeStamp (timeAdjustment); list.add (newOne); } @@ -173,16 +186,14 @@ void MidiMessageSequence::addSequence (const MidiMessageSequence& other, double firstAllowableTime, double endOfAllowableDestTimes) { - for (int i = 0; i < other.list.size(); ++i) + for (auto* m : other) { - const MidiMessage& m = other.list.getUnchecked(i)->message; - const double t = m.getTimeStamp() + timeAdjustment; + auto t = m->message.getTimeStamp() + timeAdjustment; if (t >= firstAllowableTime && t < endOfAllowableDestTimes) { - MidiEventHolder* const newOne = new MidiEventHolder (m); + auto newOne = new MidiEventHolder (m->message); newOne->message.setTimeStamp (t); - list.add (newOne); } } @@ -190,7 +201,16 @@ void MidiMessageSequence::addSequence (const MidiMessageSequence& other, sort(); } -//============================================================================== +struct MidiMessageSequenceSorter +{ + static int compareElements (const MidiMessageSequence::MidiEventHolder* first, + const MidiMessageSequence::MidiEventHolder* second) noexcept + { + auto diff = first->message.getTimeStamp() - second->message.getTimeStamp(); + return (diff > 0) - (diff < 0); + } +}; + void MidiMessageSequence::sort() noexcept { MidiMessageSequenceSorter sorter; @@ -201,30 +221,32 @@ void MidiMessageSequence::updateMatchedPairs() noexcept { for (int i = 0; i < list.size(); ++i) { - MidiEventHolder* const meh = list.getUnchecked(i); - const MidiMessage& m1 = meh->message; + auto* meh = list.getUnchecked(i); + auto& m1 = meh->message; if (m1.isNoteOn()) { meh->noteOffObject = nullptr; - const int note = m1.getNoteNumber(); - const int chan = m1.getChannel(); - const int len = list.size(); + auto note = m1.getNoteNumber(); + auto chan = m1.getChannel(); + auto len = list.size(); for (int j = i + 1; j < len; ++j) { - const MidiMessage& m = list.getUnchecked(j)->message; + auto* meh2 = list.getUnchecked(j); + auto& m = meh2->message; if (m.getNoteNumber() == note && m.getChannel() == chan) { if (m.isNoteOff()) { - meh->noteOffObject = list[j]; + meh->noteOffObject = meh2; break; } - else if (m.isNoteOn()) + + if (m.isNoteOn()) { - MidiEventHolder* const newEvent = new MidiEventHolder (MidiMessage::noteOff (chan, note)); + auto newEvent = new MidiEventHolder (MidiMessage::noteOff (chan, note)); list.insert (j, newEvent); newEvent->message.setTimeStamp (m.getTimeStamp()); meh->noteOffObject = newEvent; @@ -236,13 +258,11 @@ void MidiMessageSequence::updateMatchedPairs() noexcept } } -void MidiMessageSequence::addTimeToMessages (const double delta) noexcept +void MidiMessageSequence::addTimeToMessages (double delta) noexcept { - for (int i = list.size(); --i >= 0;) - { - MidiMessage& mm = list.getUnchecked(i)->message; - mm.setTimeStamp (mm.getTimeStamp() + delta); - } + if (delta != 0) + for (auto* m : list) + m->message.addToTimeStamp (delta); } //============================================================================== @@ -250,24 +270,17 @@ void MidiMessageSequence::extractMidiChannelMessages (const int channelNumberToE MidiMessageSequence& destSequence, const bool alsoIncludeMetaEvents) const { - for (int i = 0; i < list.size(); ++i) - { - const MidiMessage& mm = list.getUnchecked(i)->message; - - if (mm.isForChannel (channelNumberToExtract) || (alsoIncludeMetaEvents && mm.isMetaEvent())) - destSequence.addEvent (mm); - } + for (auto* meh : list) + if (meh->message.isForChannel (channelNumberToExtract) + || (alsoIncludeMetaEvents && meh->message.isMetaEvent())) + destSequence.addEvent (meh->message); } void MidiMessageSequence::extractSysExMessages (MidiMessageSequence& destSequence) const { - for (int i = 0; i < list.size(); ++i) - { - const MidiMessage& mm = list.getUnchecked(i)->message; - - if (mm.isSysEx()) - destSequence.addEvent (mm); - } + for (auto* meh : list) + if (meh->message.isSysEx()) + destSequence.addEvent (meh->message); } void MidiMessageSequence::deleteMidiChannelMessages (const int channelNumberToRemove) @@ -285,15 +298,15 @@ void MidiMessageSequence::deleteSysExMessages() } //============================================================================== -void MidiMessageSequence::createControllerUpdatesForTime (const int channelNumber, const double time, Array& dest) +void MidiMessageSequence::createControllerUpdatesForTime (int channelNumber, double time, Array& dest) { bool doneProg = false; bool donePitchWheel = false; - bool doneControllers[128] = { 0 }; + bool doneControllers[128] = {}; for (int i = list.size(); --i >= 0;) { - const MidiMessage& mm = list.getUnchecked(i)->message; + auto& mm = list.getUnchecked(i)->message; if (mm.isForChannel (channelNumber) && mm.getTimeStamp() <= time) { @@ -321,14 +334,3 @@ void MidiMessageSequence::createControllerUpdatesForTime (const int channelNumbe } } } - - -//============================================================================== -MidiMessageSequence::MidiEventHolder::MidiEventHolder (const MidiMessage& mm) - : message (mm), noteOffObject (nullptr) -{ -} - -MidiMessageSequence::MidiEventHolder::~MidiEventHolder() -{ -} diff --git a/modules/juce_audio_basics/midi/juce_MidiMessageSequence.h b/modules/juce_audio_basics/midi/juce_MidiMessageSequence.h index b729ce925b..916431b986 100644 --- a/modules/juce_audio_basics/midi/juce_MidiMessageSequence.h +++ b/modules/juce_audio_basics/midi/juce_MidiMessageSequence.h @@ -46,16 +46,10 @@ public: MidiMessageSequence& operator= (const MidiMessageSequence&); /** Move constructor */ - MidiMessageSequence (MidiMessageSequence&& other) noexcept - : list (static_cast&&> (other.list)) - {} + MidiMessageSequence (MidiMessageSequence&&) noexcept; /** Move assignment operator */ - MidiMessageSequence& operator= (MidiMessageSequence&& other) noexcept - { - list = static_cast&&> (other.list); - return *this; - } + MidiMessageSequence& operator= (MidiMessageSequence&&) noexcept; /** Destructor. */ ~MidiMessageSequence(); @@ -86,12 +80,13 @@ public: note-offs up-to-date after events have been moved around in the sequence or deleted. */ - MidiEventHolder* noteOffObject; + MidiEventHolder* noteOffObject = nullptr; private: //============================================================================== friend class MidiMessageSequence; MidiEventHolder (const MidiMessage&); + MidiEventHolder (MidiMessage&&); JUCE_LEAK_DETECTOR (MidiEventHolder) }; @@ -105,6 +100,12 @@ public: /** Returns a pointer to one of the events. */ MidiEventHolder* getEventPointer (int index) const noexcept; + /** Iterator for the list of MidiEventHolders */ + MidiEventHolder** begin() const noexcept; + + /** Iterator for the list of MidiEventHolders */ + MidiEventHolder** end() const noexcept; + /** Returns the time of the note-up that matches the note-on at this index. If the event at this index isn't a note-on, it'll just return 0. @see MidiMessageSequence::MidiEventHolder::noteOffObject @@ -155,8 +156,21 @@ public: that will be inserted @see updateMatchedPairs */ - MidiEventHolder* addEvent (const MidiMessage& newMessage, - double timeAdjustment = 0); + MidiEventHolder* addEvent (const MidiMessage& newMessage, double timeAdjustment = 0); + + /** Inserts a midi message into the sequence. + + The index at which the new message gets inserted will depend on its timestamp, + because the sequence is kept sorted. + + Remember to call updateMatchedPairs() after adding note-on events. + + @param newMessage the new message to add (an internal copy will be made) + @param timeAdjustment an optional value to add to the timestamp of the message + that will be inserted + @see updateMatchedPairs + */ + MidiEventHolder* addEvent (MidiMessage&& newMessage, double timeAdjustment = 0); /** Deletes one of the events in the sequence. @@ -276,5 +290,7 @@ private: friend class MidiFile; OwnedArray list; + MidiEventHolder* addEvent (MidiEventHolder*, double); + JUCE_LEAK_DETECTOR (MidiMessageSequence) }; diff --git a/modules/juce_audio_basics/midi/juce_MidiRPN.cpp b/modules/juce_audio_basics/midi/juce_MidiRPN.cpp index eb829fc2b2..a5189566c4 100644 --- a/modules/juce_audio_basics/midi/juce_MidiRPN.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiRPN.cpp @@ -163,7 +163,7 @@ MidiBuffer MidiRPNGenerator::generate (int midiChannel, class MidiRPNDetectorTests : public UnitTest { public: - MidiRPNDetectorTests() : UnitTest ("MidiRPNDetector class") {} + MidiRPNDetectorTests() : UnitTest ("MidiRPNDetector class", "MIDI/MPE") {} void runTest() override { @@ -305,7 +305,7 @@ static MidiRPNDetectorTests MidiRPNDetectorUnitTests; class MidiRPNGeneratorTests : public UnitTest { public: - MidiRPNGeneratorTests() : UnitTest ("MidiRPNGenerator class") {} + MidiRPNGeneratorTests() : UnitTest ("MidiRPNGenerator class", "MIDI/MPE") {} void runTest() override { @@ -361,7 +361,7 @@ private: expectEquals (result.channel, expected.channel); expectEquals (result.parameterNumber, expected.parameterNumber); expectEquals (result.value, expected.value); - expect (result.isNRPN == expected.isNRPN), + expect (result.isNRPN == expected.isNRPN); expect (result.is14BitValue == expected.is14BitValue); } }; diff --git a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp index be836cc6f2..70aee29fde 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp @@ -695,7 +695,7 @@ class MPEInstrumentTests : public UnitTest { public: MPEInstrumentTests() - : UnitTest ("MPEInstrument class") + : UnitTest ("MPEInstrument class", "MIDI/MPE") { // using two MPE zones with the following layout for testing // diff --git a/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp b/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp index b6e7dfff24..09939a1045 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp @@ -71,7 +71,7 @@ MidiBuffer MPEMessages::setZoneLayout (const MPEZoneLayout& layout) class MPEMessagesTests : public UnitTest { public: - MPEMessagesTests() : UnitTest ("MPEMessages class") {} + MPEMessagesTests() : UnitTest ("MPEMessages class", "MIDI/MPE") {} void runTest() override { diff --git a/modules/juce_audio_basics/mpe/juce_MPENote.cpp b/modules/juce_audio_basics/mpe/juce_MPENote.cpp index 33b9cde397..1f47cec021 100644 --- a/modules/juce_audio_basics/mpe/juce_MPENote.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPENote.cpp @@ -99,7 +99,7 @@ bool MPENote::operator!= (const MPENote& other) const noexcept class MPENoteTests : public UnitTest { public: - MPENoteTests() : UnitTest ("MPENote class") {} + MPENoteTests() : UnitTest ("MPENote class", "MIDI/MPE") {} //============================================================================== void runTest() override diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp b/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp index 996fca5297..3e965f434b 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp @@ -24,7 +24,7 @@ MPESynthesiser::MPESynthesiser() { } -MPESynthesiser::MPESynthesiser (MPEInstrument* instrument) : MPESynthesiserBase (instrument) +MPESynthesiser::MPESynthesiser (MPEInstrument* mpeInstrument) : MPESynthesiserBase (mpeInstrument) { } diff --git a/modules/juce_audio_basics/mpe/juce_MPEValue.cpp b/modules/juce_audio_basics/mpe/juce_MPEValue.cpp index 597140743e..9413057542 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEValue.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEValue.cpp @@ -89,7 +89,7 @@ bool MPEValue::operator!= (const MPEValue& other) const noexcept class MPEValueTests : public UnitTest { public: - MPEValueTests() : UnitTest ("MPEValue class") {} + MPEValueTests() : UnitTest ("MPEValue class", "MIDI/MPE") {} void runTest() override { diff --git a/modules/juce_audio_basics/mpe/juce_MPEZone.cpp b/modules/juce_audio_basics/mpe/juce_MPEZone.cpp index 3ea8f14f7a..912a86c3c5 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEZone.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEZone.cpp @@ -163,7 +163,7 @@ bool MPEZone::operator!= (const MPEZone& other) const noexcept class MPEZoneTests : public UnitTest { public: - MPEZoneTests() : UnitTest ("MPEZone class") {} + MPEZoneTests() : UnitTest ("MPEZone class", "MIDI/MPE") {} void runTest() override { diff --git a/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp b/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp index 944d6d3ea6..450dc09f6b 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp @@ -204,7 +204,7 @@ void MPEZoneLayout::removeListener (Listener* const listenerToRemove) noexcept class MPEZoneLayoutTests : public UnitTest { public: - MPEZoneLayoutTests() : UnitTest ("MPEZoneLayout class") {} + MPEZoneLayoutTests() : UnitTest ("MPEZoneLayout class", "MIDI/MPE") {} void runTest() override { diff --git a/modules/juce_audio_basics/native/juce_mac_CoreAudioLayouts.h b/modules/juce_audio_basics/native/juce_mac_CoreAudioLayouts.h new file mode 100644 index 0000000000..d6b95326e5 --- /dev/null +++ b/modules/juce_audio_basics/native/juce_mac_CoreAudioLayouts.h @@ -0,0 +1,307 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + The code included in this file is provided under the terms of the ISC license + http://www.isc.org/downloads/software-support-policy/isc-license. Permission + To use, copy, modify, and/or distribute this software for any purpose with or + without fee is hereby granted provided that the above copyright notice and + this permission notice appear in all copies. + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#pragma once + +#if JUCE_MAC || JUCE_IOS + +struct CoreAudioLayouts +{ + //============================================================================== + /** Convert CoreAudio's native AudioChannelLayout to JUCE's AudioChannelSet. + + Note that this method cannot preserve the order of channels. + */ + static AudioChannelSet fromCoreAudio (const AudioChannelLayout& layout) + { + return AudioChannelSet::channelSetWithChannels (getCoreAudioLayoutChannels (layout)); + } + + /** Convert JUCE's AudioChannelSet to CoreAudio's AudioChannelLayoutTag. + + Note that this method cannot preserve the order of channels. + */ + static AudioChannelLayoutTag toCoreAudio (const AudioChannelSet& set) + { + for (auto* tbl = SpeakerLayoutTable::get(); tbl->tag != 0; ++tbl) + { + AudioChannelSet caSet; + + for (int i = 0; i < numElementsInArray (tbl->channelTypes) + && tbl->channelTypes[i] != AudioChannelSet::unknown; ++i) + caSet.addChannel (tbl->channelTypes[i]); + + if (caSet == set) + return tbl->tag; + } + + return kAudioChannelLayoutTag_DiscreteInOrder | static_cast (set.size()); + } + + static const Array& getKnownCoreAudioTags() + { + static Array tags (createKnownCoreAudioTags()); + return tags; + } + + //============================================================================== + /** Convert CoreAudio's native AudioChannelLayout to an array of JUCE ChannelTypes. */ + static Array getCoreAudioLayoutChannels (const AudioChannelLayout& layout) + { + switch (layout.mChannelLayoutTag) + { + case kAudioChannelLayoutTag_UseChannelBitmap: + return AudioChannelSet::fromWaveChannelMask (static_cast (layout.mChannelBitmap)).getChannelTypes(); + case kAudioChannelLayoutTag_UseChannelDescriptions: + { + Array channels; + + for (UInt32 i = 0; i < layout.mNumberChannelDescriptions; ++i) + channels.addIfNotAlreadyThere (getChannelTypeFromAudioChannelLabel (layout.mChannelDescriptions[i].mChannelLabel)); + + // different speaker mappings may point to the same JUCE speaker so fill up + // this array with discrete channels + for (int j = 0; channels.size() < static_cast (layout.mNumberChannelDescriptions); ++j) + channels.addIfNotAlreadyThere (static_cast (AudioChannelSet::discreteChannel0 + j)); + + return channels; + } + case kAudioChannelLayoutTag_DiscreteInOrder: + return AudioChannelSet::discreteChannels (static_cast (layout.mChannelLayoutTag) & 0xffff).getChannelTypes(); + default: + break; + } + + return getSpeakerLayoutForCoreAudioTag (layout.mChannelLayoutTag); + } + + //============================================================================== + /* Convert between a CoreAudio and JUCE channel indices - and vice versa. */ + // TODO: Fabian remove this +// static int convertChannelIndex (const AudioChannelLayout& caLayout, const AudioChannelSet& juceLayout, int index, bool fromJUCE) +// { +// auto coreAudioChannels = getCoreAudioLayoutChannels (caLayout); +// +// jassert (juceLayout.size() == coreAudioChannels.size()); +// jassert (index >= 0 && index < juceLayout.size()); +// +// return (fromJUCE ? coreAudioChannels.indexOf (juceLayout.getTypeOfChannel (index)) +// : juceLayout.getChannelIndexForType (coreAudioChannels.getReference (index))); +// } + +private: + //============================================================================== + struct LayoutTagSpeakerList + { + AudioChannelLayoutTag tag; + AudioChannelSet::ChannelType channelTypes[16]; + }; + + static Array getSpeakerLayoutForCoreAudioTag (AudioChannelLayoutTag tag) + { + Array speakers; + + for (auto* tbl = SpeakerLayoutTable::get(); tbl->tag != 0; ++tbl) + { + if (tag == tbl->tag) + { + for (int i = 0; i < numElementsInArray (tbl->channelTypes) + && tbl->channelTypes[i] != AudioChannelSet::unknown; ++i) + speakers.add (tbl->channelTypes[i]); + + return speakers; + } + } + + auto numChannels = tag & 0xffff; + for (UInt32 i = 0; i < numChannels; ++i) + speakers.add (static_cast (AudioChannelSet::discreteChannel0 + i)); + + return speakers; + } + + static Array createKnownCoreAudioTags() + { + Array tags; + + for (auto* tbl = SpeakerLayoutTable::get(); tbl->tag != 0; ++tbl) + tags.addIfNotAlreadyThere (tbl->tag); + + return tags; + } + + //============================================================================== + // This list has been derived from https://pastebin.com/24dQ4BPJ + // Apple channel labels have been replaced by JUCE channel names + // This means that some layouts will be identical in JUCE but not in CoreAudio + + // In Apple's official definition the following tags exist with the same speaker layout and order + // even when *not* represented in JUCE channels + // kAudioChannelLayoutTag_Binaural = kAudioChannelLayoutTag_Stereo + // kAudioChannelLayoutTag_MPEG_5_0_B = kAudioChannelLayoutTag_Pentagonal + // kAudioChannelLayoutTag_ITU_2_2 = kAudioChannelLayoutTag_Quadraphonic + // kAudioChannelLayoutTag_AudioUnit_6_0 = kAudioChannelLayoutTag_Hexagonal + struct SpeakerLayoutTable : AudioChannelSet // save us some typing + { + static LayoutTagSpeakerList* get() noexcept + { + static LayoutTagSpeakerList tbl[] = { + // list layouts for which there is a corresponding named AudioChannelSet first + { kAudioChannelLayoutTag_Mono, { centre } }, + { kAudioChannelLayoutTag_Stereo, { left, right } }, + { kAudioChannelLayoutTag_MPEG_3_0_A, { left, right, centre } }, + { kAudioChannelLayoutTag_ITU_2_1, { left, right, centreSurround } }, + { kAudioChannelLayoutTag_MPEG_4_0_A, { left, right, centre, centreSurround } }, + { kAudioChannelLayoutTag_MPEG_5_0_A, { left, right, centre, leftSurround, rightSurround } }, + { kAudioChannelLayoutTag_MPEG_5_1_A, { left, right, centre, LFE, leftSurround, rightSurround } }, + { kAudioChannelLayoutTag_AudioUnit_6_0, { left, right, leftSurround, rightSurround, centre, centreSurround } }, + { kAudioChannelLayoutTag_MPEG_6_1_A, { left, right, centre, LFE, leftSurround, rightSurround, centreSurround } }, + { kAudioChannelLayoutTag_DTS_6_0_A, { leftSurroundSide, rightSurroundSide, left, right, leftSurround, rightSurround } }, + { kAudioChannelLayoutTag_DTS_6_1_A, { leftSurroundSide, rightSurroundSide, left, right, leftSurround, rightSurround, LFE } }, + { kAudioChannelLayoutTag_AudioUnit_7_0, { left, right, leftSurroundSide, rightSurroundSide, centre, leftSurroundRear, rightSurroundRear } }, + { kAudioChannelLayoutTag_AudioUnit_7_0_Front, { left, right, leftSurround, rightSurround, centre, leftCentre, rightCentre } }, + { kAudioChannelLayoutTag_MPEG_7_1_C, { left, right, centre, LFE, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear } }, + { kAudioChannelLayoutTag_MPEG_7_1_A, { left, right, centre, LFE, leftSurround, rightSurround, leftCentre, rightCentre } }, + { kAudioChannelLayoutTag_Ambisonic_B_Format, { ambisonicW, ambisonicX, ambisonicY, ambisonicZ } }, + { kAudioChannelLayoutTag_Quadraphonic, { left, right, leftSurround, rightSurround } }, + { kAudioChannelLayoutTag_Pentagonal, { left, right, leftSurroundRear, rightSurroundRear, centre } }, + { kAudioChannelLayoutTag_Hexagonal, { left, right, leftSurroundRear, rightSurroundRear, centre, centreSurround } }, + { kAudioChannelLayoutTag_Octagonal, { left, right, leftSurround, rightSurround, centre, centreSurround, wideLeft, wideRight } }, + + // more uncommon layouts + { kAudioChannelLayoutTag_StereoHeadphones, { left, right } }, + { kAudioChannelLayoutTag_MatrixStereo, { left, right } }, + { kAudioChannelLayoutTag_MidSide, { centre, discreteChannel0 } }, + { kAudioChannelLayoutTag_XY, { ambisonicX, ambisonicY } }, + { kAudioChannelLayoutTag_Binaural, { left, right } }, + { kAudioChannelLayoutTag_Cube, { left, right, leftSurround, rightSurround, topFrontLeft, topFrontRight, topRearLeft, topRearRight } }, + { kAudioChannelLayoutTag_MPEG_3_0_B, { centre, left, right } }, + { kAudioChannelLayoutTag_MPEG_4_0_B, { centre, left, right, centreSurround } }, + { kAudioChannelLayoutTag_MPEG_5_0_B, { left, right, leftSurround, rightSurround, centre } }, + { kAudioChannelLayoutTag_MPEG_5_0_C, { left, centre, right, leftSurround, rightSurround } }, + { kAudioChannelLayoutTag_MPEG_5_0_D, { centre, left, right, leftSurround, rightSurround } }, + { kAudioChannelLayoutTag_MPEG_5_1_B, { left, right, leftSurround, rightSurround, centre, LFE } }, + { kAudioChannelLayoutTag_MPEG_5_1_C, { left, centre, right, leftSurround, rightSurround, LFE } }, + { kAudioChannelLayoutTag_MPEG_5_1_D, { centre, left, right, leftSurround, rightSurround, LFE } }, + { kAudioChannelLayoutTag_MPEG_7_1_B, { centre, leftCentre, rightCentre, left, right, leftSurround, rightSurround, LFE } }, + { kAudioChannelLayoutTag_Emagic_Default_7_1, { left, right, leftSurround, rightSurround, centre, LFE, leftCentre, rightCentre } }, + { kAudioChannelLayoutTag_SMPTE_DTV, { left, right, centre, LFE, leftSurround, rightSurround, discreteChannel0 /* leftMatrixTotal */, (ChannelType) (discreteChannel0 + 1) /* rightMatrixTotal */} }, + { kAudioChannelLayoutTag_ITU_2_2, { left, right, leftSurround, rightSurround } }, + { kAudioChannelLayoutTag_DVD_4, { left, right, LFE } }, + { kAudioChannelLayoutTag_DVD_5, { left, right, LFE, centreSurround } }, + { kAudioChannelLayoutTag_DVD_6, { left, right, LFE, leftSurround, rightSurround } }, + { kAudioChannelLayoutTag_DVD_10, { left, right, centre, LFE } }, + { kAudioChannelLayoutTag_DVD_11, { left, right, centre, LFE, centreSurround } }, + { kAudioChannelLayoutTag_DVD_18, { left, right, leftSurround, rightSurround, LFE } }, + { kAudioChannelLayoutTag_AAC_6_0, { centre, left, right, leftSurround, rightSurround, centreSurround } }, + { kAudioChannelLayoutTag_AAC_6_1, { centre, left, right, leftSurround, rightSurround, centreSurround, LFE } }, + { kAudioChannelLayoutTag_AAC_7_0, { centre, left, right, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear } }, + { kAudioChannelLayoutTag_AAC_7_1_B, { centre, left, right, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, LFE } }, + { kAudioChannelLayoutTag_AAC_7_1_C, { centre, left, right, leftSurround, rightSurround, LFE, topFrontLeft, topFrontRight } }, + { kAudioChannelLayoutTag_AAC_Octagonal, { centre, left, right, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, centreSurround } }, + { kAudioChannelLayoutTag_TMH_10_2_std, { left, right, centre, topFrontCentre, leftSurroundSide, rightSurroundSide, leftSurround, rightSurround, topFrontLeft, topFrontRight, wideLeft, wideRight, topRearCentre, centreSurround, LFE, LFE2 } }, + { kAudioChannelLayoutTag_AC3_1_0_1, { centre, LFE } }, + { kAudioChannelLayoutTag_AC3_3_0, { left, centre, right } }, + { kAudioChannelLayoutTag_AC3_3_1, { left, centre, right, centreSurround } }, + { kAudioChannelLayoutTag_AC3_3_0_1, { left, centre, right, LFE } }, + { kAudioChannelLayoutTag_AC3_2_1_1, { left, right, centreSurround, LFE } }, + { kAudioChannelLayoutTag_AC3_3_1_1, { left, centre, right, centreSurround, LFE } }, + { kAudioChannelLayoutTag_EAC_6_0_A, { left, centre, right, leftSurround, rightSurround, centreSurround } }, + { kAudioChannelLayoutTag_EAC_7_0_A, { left, centre, right, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear } }, + { kAudioChannelLayoutTag_EAC3_6_1_A, { left, centre, right, leftSurround, rightSurround, LFE, centreSurround } }, + { kAudioChannelLayoutTag_EAC3_6_1_B, { left, centre, right, leftSurround, rightSurround, LFE, centreSurround } }, + { kAudioChannelLayoutTag_EAC3_6_1_C, { left, centre, right, leftSurround, rightSurround, LFE, topFrontCentre } }, + { kAudioChannelLayoutTag_EAC3_7_1_A, { left, centre, right, leftSurround, rightSurround, LFE, leftSurroundRear, rightSurroundRear } }, + { kAudioChannelLayoutTag_EAC3_7_1_B, { left, centre, right, leftSurround, rightSurround, LFE, leftCentre, rightCentre } }, + { kAudioChannelLayoutTag_EAC3_7_1_C, { left, centre, right, leftSurround, rightSurround, LFE, leftSurroundSide, rightSurroundSide } }, + { kAudioChannelLayoutTag_EAC3_7_1_D, { left, centre, right, leftSurround, rightSurround, LFE, wideLeft, wideRight } }, + { kAudioChannelLayoutTag_EAC3_7_1_E, { left, centre, right, leftSurround, rightSurround, LFE, topFrontLeft, topFrontRight } }, + { kAudioChannelLayoutTag_EAC3_7_1_F, { left, centre, right, leftSurround, rightSurround, LFE, centreSurround, topMiddle } }, + { kAudioChannelLayoutTag_EAC3_7_1_G, { left, centre, right, leftSurround, rightSurround, LFE, centreSurround, topFrontCentre } }, + { kAudioChannelLayoutTag_EAC3_7_1_H, { left, centre, right, leftSurround, rightSurround, LFE, centreSurround, topFrontCentre } }, + { kAudioChannelLayoutTag_DTS_3_1, { centre, left, right, LFE } }, + { kAudioChannelLayoutTag_DTS_4_1, { centre, left, right, centreSurround, LFE } }, + { kAudioChannelLayoutTag_DTS_6_0_B, { centre, left, right, leftSurroundRear, rightSurroundRear, centreSurround } }, + { kAudioChannelLayoutTag_DTS_6_0_C, { centre, centreSurround, left, right, leftSurroundRear, rightSurroundRear } }, + { kAudioChannelLayoutTag_DTS_6_1_B, { centre, left, right, leftSurroundRear, rightSurroundRear, centreSurround, LFE } }, + { kAudioChannelLayoutTag_DTS_6_1_C, { centre, centreSurround, left, right, leftSurroundRear, rightSurroundRear, LFE } }, + { kAudioChannelLayoutTag_DTS_6_1_D, { centre, left, right, leftSurround, rightSurround, LFE, centreSurround } }, + { kAudioChannelLayoutTag_DTS_7_0, { leftCentre, centre, rightCentre, left, right, leftSurround, rightSurround } }, + { kAudioChannelLayoutTag_DTS_7_1, { leftCentre, centre, rightCentre, left, right, leftSurround, rightSurround, LFE } }, + { kAudioChannelLayoutTag_DTS_8_0_A, { leftCentre, rightCentre, left, right, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear } }, + { kAudioChannelLayoutTag_DTS_8_0_B, { leftCentre, centre, rightCentre, left, right, leftSurround, centreSurround, rightSurround } }, + { kAudioChannelLayoutTag_DTS_8_1_A, { leftCentre, rightCentre, left, right, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, LFE } }, + { kAudioChannelLayoutTag_DTS_8_1_B, { leftCentre, centre, rightCentre, left, right, leftSurround, centreSurround, rightSurround, LFE } }, + { 0, {} } + }; + + return tbl; + } + }; + + //============================================================================== + static AudioChannelSet::ChannelType getChannelTypeFromAudioChannelLabel (AudioChannelLabel label) noexcept + { + if (label >= kAudioChannelLabel_Discrete_0 && label <= kAudioChannelLabel_Discrete_65535) + { + const unsigned int discreteChannelNum = label - kAudioChannelLabel_Discrete_0; + return static_cast (AudioChannelSet::discreteChannel0 + discreteChannelNum); + } + + switch (label) + { + case kAudioChannelLabel_Center: + case kAudioChannelLabel_Mono: return AudioChannelSet::centre; + case kAudioChannelLabel_Left: + case kAudioChannelLabel_HeadphonesLeft: return AudioChannelSet::left; + case kAudioChannelLabel_Right: + case kAudioChannelLabel_HeadphonesRight: return AudioChannelSet::right; + case kAudioChannelLabel_LFEScreen: return AudioChannelSet::LFE; + case kAudioChannelLabel_LeftSurround: return AudioChannelSet::leftSurround; + case kAudioChannelLabel_RightSurround: return AudioChannelSet::rightSurround; + case kAudioChannelLabel_LeftCenter: return AudioChannelSet::leftCentre; + case kAudioChannelLabel_RightCenter: return AudioChannelSet::rightCentre; + case kAudioChannelLabel_CenterSurround: return AudioChannelSet::surround; + case kAudioChannelLabel_LeftSurroundDirect: return AudioChannelSet::leftSurroundSide; + case kAudioChannelLabel_RightSurroundDirect: return AudioChannelSet::rightSurroundSide; + case kAudioChannelLabel_TopCenterSurround: return AudioChannelSet::topMiddle; + case kAudioChannelLabel_VerticalHeightLeft: return AudioChannelSet::topFrontLeft; + case kAudioChannelLabel_VerticalHeightRight: return AudioChannelSet::topFrontRight; + case kAudioChannelLabel_VerticalHeightCenter: return AudioChannelSet::topFrontCentre; + case kAudioChannelLabel_TopBackLeft: return AudioChannelSet::topRearLeft; + case kAudioChannelLabel_RearSurroundLeft: return AudioChannelSet::leftSurroundRear; + case kAudioChannelLabel_TopBackRight: return AudioChannelSet::topRearRight; + case kAudioChannelLabel_RearSurroundRight: return AudioChannelSet::rightSurroundRear; + case kAudioChannelLabel_TopBackCenter: return AudioChannelSet::topRearCentre; + case kAudioChannelLabel_LFE2: return AudioChannelSet::LFE2; + case kAudioChannelLabel_LeftWide: return AudioChannelSet::wideLeft; + case kAudioChannelLabel_RightWide: return AudioChannelSet::wideRight; + case kAudioChannelLabel_Ambisonic_W: return AudioChannelSet::ambisonicW; + case kAudioChannelLabel_Ambisonic_X: return AudioChannelSet::ambisonicX; + case kAudioChannelLabel_Ambisonic_Y: return AudioChannelSet::ambisonicY; + case kAudioChannelLabel_Ambisonic_Z: return AudioChannelSet::ambisonicZ; + default: return AudioChannelSet::unknown; + } + } +}; + +#endif diff --git a/modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp b/modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp new file mode 100644 index 0000000000..220debfd1f --- /dev/null +++ b/modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp @@ -0,0 +1,66 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + The code included in this file is provided under the terms of the ISC license + http://www.isc.org/downloads/software-support-policy/isc-license. Permission + To use, copy, modify, and/or distribute this software for any purpose with or + without fee is hereby granted provided that the above copyright notice and + this permission notice appear in all copies. + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +//============================================================================== +MemoryAudioSource::MemoryAudioSource (AudioBuffer& bufferToUse, bool copyMemory, bool shouldLoop) + : isLooping (shouldLoop) +{ + if (copyMemory) + buffer.makeCopyOf (bufferToUse); + else + buffer.setDataToReferTo (bufferToUse.getArrayOfWritePointers(), + bufferToUse.getNumChannels(), + bufferToUse.getNumSamples()); +} + +//============================================================================== +void MemoryAudioSource::prepareToPlay (int /*samplesPerBlockExpected*/, double /*sampleRate*/) +{ + position = 0; +} + +void MemoryAudioSource::releaseResources() {} + +void MemoryAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) +{ + auto& dst = *bufferToFill.buffer; + auto channels = jmin (dst.getNumChannels(), buffer.getNumChannels()); + auto max = 0, pos = 0; + auto n = buffer.getNumSamples(), m = bufferToFill.numSamples; + + for (auto i = position; (i < n || isLooping) && (pos < m); i += max) + { + max = jmin (m - pos, n - (i % n)); + + int ch = 0; + for (; ch < channels; ++ch) + dst.copyFrom (ch, bufferToFill.startSample + pos, buffer, ch, i % n, max); + + for (; ch < dst.getNumChannels(); ++ch) + dst.clear (ch, bufferToFill.startSample + pos, max); + + pos += max; + } + + if (pos < m) + dst.clear (bufferToFill.startSample + pos, m - pos); +} diff --git a/modules/juce_audio_basics/sources/juce_MemoryAudioSource.h b/modules/juce_audio_basics/sources/juce_MemoryAudioSource.h new file mode 100644 index 0000000000..1a6fabf1b8 --- /dev/null +++ b/modules/juce_audio_basics/sources/juce_MemoryAudioSource.h @@ -0,0 +1,61 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + The code included in this file is provided under the terms of the ISC license + http://www.isc.org/downloads/software-support-policy/isc-license. Permission + To use, copy, modify, and/or distribute this software for any purpose with or + without fee is hereby granted provided that the above copyright notice and + this permission notice appear in all copies. + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#pragma once + + +//============================================================================== +/** + An AudioSource which takes some float audio data as an input. +*/ +class JUCE_API MemoryAudioSource : public AudioSource +{ +public: + //============================================================================== + /** Creates a MemoryAudioSource by providing an audio buffer. + + If copyMemory is true then the buffer will be copied into an internal + buffer which will be owned by the MemoryAudioSource. If copyMemory is + false, then you must ensure that the lifetime of the audio buffer is + at least as long as the MemoryAudioSource. + */ + MemoryAudioSource (AudioBuffer& audioBuffer, bool copyMemory, bool shouldLoop = false); + + //============================================================================== + /** Implementation of the AudioSource method. */ + void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override; + + /** Implementation of the AudioSource method. */ + void releaseResources() override; + + /** Implementation of the AudioSource method. */ + void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override; + +private: + //============================================================================== + AudioBuffer buffer; + int position = 0; + bool isLooping; + + //============================================================================== + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MemoryAudioSource) +}; diff --git a/modules/juce_audio_devices/juce_audio_devices.h b/modules/juce_audio_devices/juce_audio_devices.h index 122139e4b9..2fabe97610 100644 --- a/modules/juce_audio_devices/juce_audio_devices.h +++ b/modules/juce_audio_devices/juce_audio_devices.h @@ -31,7 +31,7 @@ ID: juce_audio_devices vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE audio and MIDI I/O device classes description: Classes to play and record from audio and MIDI I/O devices website: http://www.juce.com/juce @@ -54,8 +54,8 @@ #include #include -#if JUCE_MODULE_AVAILABLE_juce_gui_extra -#include +#if JUCE_MODULE_AVAILABLE_juce_graphics +#include #endif //============================================================================== diff --git a/modules/juce_audio_devices/native/juce_android_OpenSL.cpp b/modules/juce_audio_devices/native/juce_android_OpenSL.cpp index 2ad1f7437e..248db71a90 100644 --- a/modules/juce_audio_devices/native/juce_android_OpenSL.cpp +++ b/modules/juce_audio_devices/native/juce_android_OpenSL.cpp @@ -155,6 +155,8 @@ template struct BufferHelpers {}; template <> struct BufferHelpers { + enum { isFloatingPoint = 0 }; + static void initPCMDataFormat (PCMDataFormatEx& dataFormat, int numChannels, double sampleRate) { dataFormat.formatType = SL_DATAFORMAT_PCM; @@ -202,6 +204,8 @@ struct BufferHelpers template <> struct BufferHelpers { + enum { isFloatingPoint = 1 }; + static void initPCMDataFormat (PCMDataFormatEx& dataFormat, int numChannels, double sampleRate) { dataFormat.formatType = SL_ANDROID_DATAFORMAT_PCM_EX; @@ -261,6 +265,8 @@ struct BufferHelpers } }; +class SLRealtimeThread; + //============================================================================== class OpenSLAudioIODevice : public AudioIODevice { @@ -320,6 +326,8 @@ public: void finished (SLAndroidSimpleBufferQueueItf) { + attachAndroidJNI(); + --numBlocksOut; owner.doSomeWorkOnAudioThread(); } @@ -510,6 +518,7 @@ public: virtual void start() { stop(); jassert (callback.get() != nullptr); running = true; } virtual void stop() { running = false; } virtual bool setAudioPreprocessingEnabled (bool shouldEnable) = 0; + virtual bool supportsFloatingPoint() const noexcept = 0; void setCallback (AudioIODeviceCallback* callbackToUse) { @@ -529,7 +538,7 @@ public: if (old == callbackToUse) break; - if (callback.compareAndSetValue (callbackToUse, old) == old) + if (callback.compareAndSetBool (callbackToUse, old)) break; Thread::sleep (1); @@ -553,8 +562,7 @@ public: static OpenSLSession* create (DynamicLibrary& slLibrary, int numInputChannels, int numOutputChannels, double samleRateToUse, int bufferSizeToUse, - int numBuffersToUse, - bool floatingPointSupport); + int numBuffersToUse); //============================================================================== typedef SLresult (*CreateEngineFunc)(SLObjectItf*,SLuint32,const SLEngineOption*,SLuint32,const SLInterfaceID*,const SLboolean*); @@ -663,6 +671,8 @@ public: return true; } + bool supportsFloatingPoint() const noexcept override { return (BufferHelpers::isFloatingPoint != 0); } + void doSomeWorkOnAudioThread() { // only the player or the recorder should enter this section at any time @@ -734,8 +744,6 @@ public: inputLatency = (int) ((longestLatency * inputLatency) / totalLatency) & ~15; outputLatency = (int) ((longestLatency * outputLatency) / totalLatency) & ~15; - supportsFloatingPoint = getSupportsFloatingPoint(); - bool success = slLibrary.open ("libOpenSLES.so"); // You can only create this class if you are sure that your hardware supports OpenSL @@ -820,15 +828,6 @@ public: const int audioBuffersToEnqueue = hasLowLatencyAudioPath() ? buffersToEnqueueForLowLatency : buffersToEnqueueSlowAudio; - DBG ("OpenSL: numInputChannels = " << numInputChannels - << ", numOutputChannels = " << numOutputChannels - << ", nativeBufferSize = " << getNativeBufferSize() - << ", nativeSampleRate = " << getNativeSampleRate() - << ", actualBufferSize = " << actualBufferSize - << ", audioBuffersToEnqueue = " << audioBuffersToEnqueue - << ", sampleRate = " << sampleRate - << ", supportsFloatingPoint = " << (supportsFloatingPoint ? "true" : "false")); - if (numInputChannels > 0 && (! RuntimePermissions::isGranted (RuntimePermissions::recordAudio))) { // If you hit this assert, you probably forgot to get RuntimePermissions::recordAudio @@ -838,8 +837,7 @@ public: } session = OpenSLSession::create (slLibrary, numInputChannels, numOutputChannels, - sampleRate, actualBufferSize, audioBuffersToEnqueue, - supportsFloatingPoint); + sampleRate, actualBufferSize, audioBuffersToEnqueue); if (session != nullptr) session->setAudioPreprocessingEnabled (audioProcessingEnabled); else @@ -851,11 +849,19 @@ public: numInputChannels = 0; session = OpenSLSession::create(slLibrary, numInputChannels, numOutputChannels, - sampleRate, actualBufferSize, audioBuffersToEnqueue, - supportsFloatingPoint); + sampleRate, actualBufferSize, audioBuffersToEnqueue); } } + DBG ("OpenSL: numInputChannels = " << numInputChannels + << ", numOutputChannels = " << numOutputChannels + << ", nativeBufferSize = " << getNativeBufferSize() + << ", nativeSampleRate = " << getNativeSampleRate() + << ", actualBufferSize = " << actualBufferSize + << ", audioBuffersToEnqueue = " << audioBuffersToEnqueue + << ", sampleRate = " << sampleRate + << ", supportsFloatingPoint = " << (session != nullptr && session->supportsFloatingPoint() ? "true" : "false")); + if (session == nullptr) lastError = "Unknown error initializing opensl session"; @@ -874,7 +880,7 @@ public: int getInputLatencyInSamples() override { return inputLatency; } bool isOpen() override { return deviceOpen; } int getCurrentBufferSizeSamples() override { return actualBufferSize; } - int getCurrentBitDepth() override { return supportsFloatingPoint ? 32 : 16; } + int getCurrentBitDepth() override { return (session != nullptr && session->supportsFloatingPoint() ? 32 : 16); } BigInteger getActiveOutputChannels() const override { return activeOutputChans; } BigInteger getActiveInputChannels() const override { return activeInputChans; } String getLastError() override { return lastError; } @@ -949,11 +955,14 @@ public: static const char* const openSLTypeName; private: + //============================================================================== + friend class SLRealtimeThread; + //============================================================================== DynamicLibrary slLibrary; int actualBufferSize, sampleRate; int inputLatency, outputLatency; - bool deviceOpen, supportsFloatingPoint, audioProcessingEnabled; + bool deviceOpen, audioProcessingEnabled; String lastError; BigInteger activeOutputChans, activeInputChans; AudioIODeviceCallback* callback; @@ -1008,31 +1017,36 @@ private: return androidHasSystemFeature ("android.hardware.audio.low_latency"); } - static bool getSupportsFloatingPoint() - { - return (getEnv()->GetStaticIntField (AndroidBuildVersion, AndroidBuildVersion.SDK_INT) >= 21); - } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OpenSLAudioIODevice) }; OpenSLAudioIODevice::OpenSLSession* OpenSLAudioIODevice::OpenSLSession::create (DynamicLibrary& slLibrary, int numInputChannels, int numOutputChannels, double samleRateToUse, int bufferSizeToUse, - int numBuffersToUse, - bool floatingPointSupport) + int numBuffersToUse) { ScopedPointer retval; + auto sdkVersion = getEnv()->GetStaticIntField (AndroidBuildVersion, AndroidBuildVersion.SDK_INT); - if (floatingPointSupport) + // SDK versions 21 and higher should natively support floating point... + if (sdkVersion >= 21) + { retval = new OpenSLSessionT (slLibrary, numInputChannels, numOutputChannels, samleRateToUse, bufferSizeToUse, numBuffersToUse); - else + + // ...however, some devices lie so re-try without floating point + if (retval != nullptr && (! retval->openedOK())) + retval = nullptr; + } + + if (retval == nullptr) + { retval = new OpenSLSessionT (slLibrary, numInputChannels, numOutputChannels, samleRateToUse, bufferSizeToUse, numBuffersToUse); - if (retval != nullptr && (! retval->openedOK())) - retval = nullptr; + if (retval != nullptr && (! retval->openedOK())) + retval = nullptr; + } return retval.release(); } @@ -1085,3 +1099,182 @@ AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_OpenSLES() { return isOpenSLAvailable() ? new OpenSLAudioDeviceType() : nullptr; } + +//============================================================================== +class SLRealtimeThread +{ +public: + static constexpr int numBuffers = 4; + + SLRealtimeThread() + { + if (auto createEngine = (OpenSLAudioIODevice::OpenSLSession::CreateEngineFunc) slLibrary.getFunction ("slCreateEngine")) + { + SLObjectItf obj = nullptr; + auto err = createEngine (&obj, 0, nullptr, 0, nullptr, nullptr); + + if (err != SL_RESULT_SUCCESS || obj == nullptr) + return; + + if ((*obj)->Realize (obj, 0) != SL_RESULT_SUCCESS) + { + (*obj)->Destroy (obj); + return; + } + + engine = SlRef::cast (SlObjectRef (obj)); + + if (engine == nullptr) + { + (*obj)->Destroy (obj); + return; + } + + obj = nullptr; + err = (*engine)->CreateOutputMix (engine, &obj, 0, nullptr, nullptr); + + if (err != SL_RESULT_SUCCESS || obj == nullptr || (*obj)->Realize (obj, 0) != SL_RESULT_SUCCESS) + { + (*obj)->Destroy (obj); + return; + } + + outputMix = SlRef::cast (SlObjectRef (obj)); + + if (outputMix == nullptr) + { + (*obj)->Destroy (obj); + return; + } + + SLDataLocator_AndroidSimpleBufferQueue queueLocator = {SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, static_cast (numBuffers)}; + SLDataLocator_OutputMix outputMixLocator = {SL_DATALOCATOR_OUTPUTMIX, outputMix}; + + PCMDataFormatEx dataFormat; + BufferHelpers::initPCMDataFormat (dataFormat, 1, OpenSLAudioIODevice::getNativeSampleRate()); + + SLDataSource source = { &queueLocator, &dataFormat }; + SLDataSink sink = { &outputMixLocator, nullptr }; + + SLInterfaceID queueInterfaces[] = { &IntfIID::iid }; + SLboolean trueFlag = SL_BOOLEAN_TRUE; + + obj = nullptr; + err = (*engine)->CreateAudioPlayer (engine, &obj, &source, &sink, 1, queueInterfaces, &trueFlag); + + if (err != SL_RESULT_SUCCESS || obj == nullptr) + return; + + if ((*obj)->Realize (obj, 0) != SL_RESULT_SUCCESS) + { + (*obj)->Destroy (obj); + return; + } + + player = SlRef::cast (SlObjectRef (obj)); + + if (player == nullptr) + { + (*obj)->Destroy (obj); + return; + } + + queue = SlRef::cast (player); + if (queue == nullptr) + return; + + if ((*queue)->RegisterCallback (queue, staticFinished, this) != SL_RESULT_SUCCESS) + { + queue = nullptr; + return; + } + + pthread_cond_init (&threadReady, nullptr); + pthread_mutex_init (&threadReadyMutex, nullptr); + } + } + + bool isOK() const { return queue != nullptr; } + + pthread_t startThread (void* (*entry) (void*), void* userPtr) + { + memset (buffer.getData(), 0, static_cast (sizeof (int16) * static_cast (bufferSize * numBuffers))); + + for (int i = 0; i < numBuffers; ++i) + { + int16* dst = buffer.getData() + (bufferSize * i); + (*queue)->Enqueue (queue, dst, static_cast (static_cast (bufferSize) * sizeof (int16))); + } + + pthread_mutex_lock (&threadReadyMutex); + + threadEntryProc = entry; + threadUserPtr = userPtr; + + (*player)->SetPlayState (player, SL_PLAYSTATE_PLAYING); + + pthread_cond_wait (&threadReady, &threadReadyMutex); + pthread_mutex_unlock (&threadReadyMutex); + + return threadID; + } + + void finished() + { + if (threadEntryProc != nullptr) + { + pthread_mutex_lock (&threadReadyMutex); + + threadID = pthread_self(); + + pthread_cond_signal (&threadReady); + pthread_mutex_unlock (&threadReadyMutex); + + threadEntryProc (threadUserPtr); + threadEntryProc = nullptr; + + (*player)->SetPlayState (player, SL_PLAYSTATE_STOPPED); + MessageManager::callAsync ([this] () { delete this; }); + } + } + +private: + //============================================================================= + static void staticFinished (SLAndroidSimpleBufferQueueItf, void* context) + { + static_cast (context)->finished(); + } + + //============================================================================= + DynamicLibrary slLibrary { "libOpenSLES.so" }; + + SlRef engine; + SlRef outputMix; + SlRef player; + SlRef queue; + + int bufferSize = OpenSLAudioIODevice::getNativeBufferSize(); + HeapBlock buffer { HeapBlock (static_cast (1 * bufferSize * numBuffers)) }; + + void* (*threadEntryProc) (void*) = nullptr; + void* threadUserPtr = nullptr; + + pthread_cond_t threadReady; + pthread_mutex_t threadReadyMutex; + pthread_t threadID; +}; + +pthread_t juce_createRealtimeAudioThread (void* (*entry) (void*), void* userPtr) +{ + ScopedPointer thread (new SLRealtimeThread); + + if (! thread->isOK()) + return 0; + + pthread_t threadID = thread->startThread (entry, userPtr); + + // the thread will de-allocate itself + thread.release(); + + return threadID; +} diff --git a/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp b/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp index 5f4ea10796..80758de9f3 100644 --- a/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp +++ b/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp @@ -2037,7 +2037,7 @@ private: static OSStatus hardwareListenerProc (AudioDeviceID, UInt32, const AudioObjectPropertyAddress*, void* clientData) { - static_cast (clientData)->audioDeviceListChanged(); + static_cast (clientData)->triggerAsyncAudioDeviceListChange(); return noErr; } diff --git a/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp b/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp index c23b83edae..52d0235fc2 100644 --- a/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp +++ b/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp @@ -94,18 +94,6 @@ bool check (HRESULT hr) } #if JUCE_MINGW - - #define JUCE_COMCLASS(name, guid) \ - struct name; \ - template<> struct UUIDGetter { static CLSID get() { return uuidFromString (guid); } }; \ - struct name - - #ifdef __uuidof - #undef __uuidof - #endif - - #define __uuidof(cls) UUIDGetter::get() - struct PROPERTYKEY { GUID fmtid; @@ -113,8 +101,6 @@ bool check (HRESULT hr) }; WINOLEAPI PropVariantClear (PROPVARIANT*); -#else - #define JUCE_COMCLASS(name, guid) struct __declspec (uuid (guid)) name #endif #if JUCE_MINGW && defined (KSDATAFORMAT_SUBTYPE_PCM) diff --git a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp index 31c8803f8f..40619c54c8 100644 --- a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp @@ -616,7 +616,8 @@ public: case 16: ReadHelper::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); break; case 24: ReadHelper::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); break; case 32: if (usesFloatingPointData) ReadHelper::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); - else ReadHelper::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); break; + else ReadHelper::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); + break; default: jassertfalse; break; } } @@ -636,10 +637,7 @@ public: AiffAudioFormatWriter (OutputStream* out, double rate, unsigned int numChans, unsigned int bits, const StringPairArray& metadataValues) - : AudioFormatWriter (out, aiffFormatName, rate, numChans, bits), - lengthInSamples (0), - bytesWritten (0), - writeFailed (false) + : AudioFormatWriter (out, aiffFormatName, rate, numChans, bits) { using namespace AiffFileHelpers; @@ -706,9 +704,9 @@ public: private: MemoryBlock tempBlock, markChunk, comtChunk, instChunk; - uint64 lengthInSamples, bytesWritten; - int64 headerPosition; - bool writeFailed; + uint64 lengthInSamples = 0, bytesWritten = 0; + int64 headerPosition = 0; + bool writeFailed = false; void writeHeader() { @@ -869,7 +867,8 @@ public: case 16: ReadHelper::read (dest, 0, 1, source, 1, num); break; case 24: ReadHelper::read (dest, 0, 1, source, 1, num); break; case 32: if (usesFloatingPointData) ReadHelper::read (dest, 0, 1, source, 1, num); - else ReadHelper::read (dest, 0, 1, source, 1, num); break; + else ReadHelper::read (dest, 0, 1, source, 1, num); + break; default: jassertfalse; break; } } @@ -881,7 +880,8 @@ public: case 16: ReadHelper::read (dest, 0, 1, source, 1, num); break; case 24: ReadHelper::read (dest, 0, 1, source, 1, num); break; case 32: if (usesFloatingPointData) ReadHelper::read (dest, 0, 1, source, 1, num); - else ReadHelper::read (dest, 0, 1, source, 1, num); break; + else ReadHelper::read (dest, 0, 1, source, 1, num); + break; default: jassertfalse; break; } } @@ -907,7 +907,8 @@ public: case 16: scanMinAndMax (startSampleInFile, numSamples, results, numChannelsToRead); break; case 24: scanMinAndMax (startSampleInFile, numSamples, results, numChannelsToRead); break; case 32: if (usesFloatingPointData) scanMinAndMax (startSampleInFile, numSamples, results, numChannelsToRead); - else scanMinAndMax (startSampleInFile, numSamples, results, numChannelsToRead); break; + else scanMinAndMax (startSampleInFile, numSamples, results, numChannelsToRead); + break; default: jassertfalse; break; } } @@ -962,7 +963,7 @@ bool AiffAudioFormat::canHandleFile (const File& f) if (AudioFormat::canHandleFile (f)) return true; - const OSType type = f.getMacOSType(); + auto type = f.getMacOSType(); // (NB: written as hex to avoid four-char-constant warnings) return type == 0x41494646 /* AIFF */ || type == 0x41494643 /* AIFC */ @@ -970,7 +971,7 @@ bool AiffAudioFormat::canHandleFile (const File& f) } #endif -AudioFormatReader* AiffAudioFormat::createReaderFor (InputStream* sourceStream, const bool deleteStreamIfOpeningFails) +AudioFormatReader* AiffAudioFormat::createReaderFor (InputStream* sourceStream, bool deleteStreamIfOpeningFails) { ScopedPointer w (new AiffAudioFormatReader (sourceStream)); @@ -1009,7 +1010,8 @@ AudioFormatWriter* AiffAudioFormat::createWriterFor (OutputStream* out, int /*qualityOptionIndex*/) { if (out != nullptr && getPossibleBitDepths().contains (bitsPerSample)) - return new AiffAudioFormatWriter (out, sampleRate, numberOfChannels, (unsigned int) bitsPerSample, metadataValues); + return new AiffAudioFormatWriter (out, sampleRate, numberOfChannels, + (unsigned int) bitsPerSample, metadataValues); return nullptr; } diff --git a/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp index 4c2f8dca9d..c408f6af11 100644 --- a/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp @@ -26,6 +26,8 @@ #if JUCE_MAC || JUCE_IOS +#include "../../juce_audio_basics/native/juce_mac_CoreAudioLayouts.h" + //============================================================================== namespace { @@ -376,6 +378,31 @@ public: &sizeOfLengthProperty, &lengthInSamples); + HeapBlock caLayout; + bool hasLayout = false; + UInt32 sizeOfLayout = 0, isWritable = 0; + + status = AudioFileGetPropertyInfo (audioFileID, kAudioFilePropertyChannelLayout, &sizeOfLayout, &isWritable); + + if (status == noErr) + { + caLayout.malloc (1, static_cast (sizeOfLayout)); + + status = AudioFileGetProperty (audioFileID, kAudioFilePropertyChannelLayout, + &sizeOfLayout, caLayout.getData()); + + if (status == noErr) + { + auto fileLayout = CoreAudioLayouts::fromCoreAudio (*caLayout.getData()); + + if (fileLayout.size() == static_cast (numChannels)) + { + hasLayout = true; + channelSet = fileLayout; + } + } + } + destinationAudioFormat.mSampleRate = sampleRate; destinationAudioFormat.mFormatID = kAudioFormatLinearPCM; destinationAudioFormat.mFormatFlags = kLinearPCMFormatFlagIsFloat | kLinearPCMFormatFlagIsNonInterleaved | kAudioFormatFlagsNativeEndian; @@ -393,6 +420,26 @@ public: { bufferList.malloc (1, sizeof (AudioBufferList) + numChannels * sizeof (::AudioBuffer)); bufferList->mNumberBuffers = numChannels; + channelMap.malloc (numChannels); + + if (hasLayout && caLayout != nullptr) + { + auto caOrder = CoreAudioLayouts::getCoreAudioLayoutChannels (*caLayout); + + for (int i = 0; i < static_cast (numChannels); ++i) + { + auto idx = channelSet.getChannelIndexForType (caOrder.getReference (i)); + jassert (isPositiveAndBelow (idx, static_cast (numChannels))); + + channelMap[i] = idx; + } + } + else + { + for (int i = 0; i < static_cast (numChannels); ++i) + channelMap[i] = i; + } + ok = true; } } @@ -447,12 +494,14 @@ public: for (int i = numDestChannels; --i >= 0;) { - if (destSamples[i] != nullptr) + int* dest = destSamples[(i < (int) numChannels ? channelMap[i] : i)]; + + if (dest != nullptr) { if (i < (int) numChannels) - memcpy (destSamples[i] + startOffsetInDestBuffer, bufferList->mBuffers[i].mData, numBytes); + memcpy (dest + startOffsetInDestBuffer, bufferList->mBuffers[i].mData, numBytes); else - zeromem (destSamples[i] + startOffsetInDestBuffer, numBytes); + zeromem (dest + startOffsetInDestBuffer, numBytes); } } @@ -464,15 +513,24 @@ public: return true; } + AudioChannelSet getChannelLayout() override + { + if (channelSet.size() == static_cast (numChannels)) return channelSet; + + return AudioFormatReader::getChannelLayout(); + } + bool ok; private: AudioFileID audioFileID; ExtAudioFileRef audioFileRef; + AudioChannelSet channelSet; AudioStreamBasicDescription destinationAudioFormat; MemoryBlock audioDataBlock; HeapBlock bufferList; int64 lastReadPosition; + HeapBlock channelMap; static SInt64 getSizeCallback (void* inClientData) { @@ -536,4 +594,249 @@ AudioFormatWriter* CoreAudioFormat::createWriterFor (OutputStream*, return nullptr; } +//============================================================================== +// Unit tests for Core Audio layout conversions +//============================================================================== +#if JUCE_UNIT_TESTS + +#define DEFINE_CHANNEL_LAYOUT_DFL_ENTRY(x) CoreAudioChannelLayoutTag { x, #x, AudioChannelSet() } +#define DEFINE_CHANNEL_LAYOUT_TAG_ENTRY(x, y) CoreAudioChannelLayoutTag { x, #x, y } + +class CoreAudioLayoutsUnitTest : public UnitTest +{ +public: + CoreAudioLayoutsUnitTest() : UnitTest ("Core Audio Layout <-> JUCE channel layout conversion", "Audio") {} + + void runTest() override + { + auto& knownTags = getAllKnownLayoutTags(); + + { + // Check that all known tags defined in CoreAudio SDK version 10.12.4 are known to JUCE + // Include all defined tags even if there are duplicates as Apple will sometimes change + // definitions + beginTest ("All CA tags handled"); + + for (auto tagEntry : knownTags) + { + AudioChannelLayout layout { tagEntry.tag }; + auto labels = CoreAudioLayouts::fromCoreAudio (layout); + + expect (! labels.isDiscreteLayout(), String ("Tag \"") + String (tagEntry.name) + "\" is not handled by JUCE"); + } + } + + { + beginTest ("Number of speakers"); + + for (auto tagEntry : knownTags) + { + AudioChannelLayout layout { tagEntry.tag }; + auto labels = CoreAudioLayouts::getCoreAudioLayoutChannels (layout); + + expect (labels.size() == (tagEntry.tag & 0xffff), String ("Tag \"") + String (tagEntry.name) + "\" has incorrect channel count"); + } + } + + { + beginTest ("No duplicate speaker"); + + for (auto tagEntry : knownTags) + { + AudioChannelLayout layout { tagEntry.tag }; + auto labels = CoreAudioLayouts::getCoreAudioLayoutChannels (layout); + labels.sort(); + + for (int i = 0; i < (labels.size() - 1); ++i) + expect (labels.getReference (i) != labels.getReference (i + 1), + String ("Tag \"") + String (tagEntry.name) + "\" has the same speaker twice"); + } + } + + { + beginTest ("CA speaker list and juce layouts are consistent"); + + for (auto tagEntry : knownTags) + { + AudioChannelLayout layout { tagEntry.tag }; + + expect (AudioChannelSet::channelSetWithChannels (CoreAudioLayouts::getCoreAudioLayoutChannels (layout)) + == CoreAudioLayouts::fromCoreAudio (layout), + String ("Tag \"") + String (tagEntry.name) + "\" is not converted consistantly by JUCE"); + } + } + + { + beginTest ("AudioChannelSet documentation is correct"); + + for (auto tagEntry : knownTags) + { + if (tagEntry.equivalentChannelSet.isDisabled()) + continue; + + AudioChannelLayout layout { tagEntry.tag }; + + expect (CoreAudioLayouts::fromCoreAudio (layout) == tagEntry.equivalentChannelSet, + String ("Documentation for tag \"") + String (tagEntry.name) + "\" is incorrect"); + } + } + + { + beginTest ("CA tag reverse conversion"); + + for (auto tagEntry : knownTags) + { + if (tagEntry.equivalentChannelSet.isDisabled()) + continue; + + expect (CoreAudioLayouts::toCoreAudio (tagEntry.equivalentChannelSet) == tagEntry.tag, + String ("Incorrect reverse conversion for tag \"") + String (tagEntry.name) + "\""); + } + } + } + +private: + struct CoreAudioChannelLayoutTag + { + AudioChannelLayoutTag tag; + const char* name; + AudioChannelSet equivalentChannelSet; /* referred to this in the AudioChannelSet documentation */ + }; + + //============================================================================== + const Array& getAllKnownLayoutTags() const + { + static Array knownTags ({ + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_Mono, AudioChannelSet::mono()), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_Stereo, AudioChannelSet::stereo()), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_StereoHeadphones), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_MatrixStereo), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_MidSide), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_XY), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_Binaural), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_Ambisonic_B_Format, AudioChannelSet::ambisonic()), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_Quadraphonic, AudioChannelSet::quadraphonic()), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_Pentagonal, AudioChannelSet::pentagonal()), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_Hexagonal, AudioChannelSet::hexagonal()), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_Octagonal, AudioChannelSet::octagonal()), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_Cube), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_MPEG_1_0), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_MPEG_2_0), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_MPEG_3_0_A, AudioChannelSet::createLCR()), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_MPEG_3_0_B), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_MPEG_4_0_A, AudioChannelSet::createLCRS()), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_MPEG_4_0_B), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_MPEG_5_0_A, AudioChannelSet::create5point0()), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_MPEG_5_0_B), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_MPEG_5_0_C), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_MPEG_5_0_D), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_MPEG_5_1_A, AudioChannelSet::create5point1()), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_MPEG_5_1_B), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_MPEG_5_1_C), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_MPEG_5_1_D), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_MPEG_6_1_A, AudioChannelSet::create6point1()), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_MPEG_7_1_A, AudioChannelSet::create7point1SDDS()), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_MPEG_7_1_B), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_MPEG_7_1_C, AudioChannelSet::create7point1()), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_Emagic_Default_7_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_SMPTE_DTV), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_ITU_1_0), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_ITU_2_0), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_ITU_2_1, AudioChannelSet::createLRS()), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_ITU_2_2), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_ITU_3_0), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_ITU_3_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_ITU_3_2), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_ITU_3_2_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_ITU_3_4_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_0), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_2), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_3), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_4), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_5), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_6), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_7), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_8), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_9), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_10), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_11), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_12), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_13), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_14), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_15), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_16), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_17), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_18), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_19), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DVD_20), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AudioUnit_4), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AudioUnit_5), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AudioUnit_6), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AudioUnit_8), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AudioUnit_5_0), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_AudioUnit_6_0, AudioChannelSet::create6point0()), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_AudioUnit_7_0, AudioChannelSet::create7point0()), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_AudioUnit_7_0_Front, AudioChannelSet::create7point0SDDS()), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AudioUnit_5_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AudioUnit_6_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AudioUnit_7_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AudioUnit_7_1_Front), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AAC_3_0), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AAC_Quadraphonic), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AAC_4_0), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AAC_5_0), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AAC_5_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AAC_6_0), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AAC_6_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AAC_7_0), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AAC_7_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AAC_7_1_B), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AAC_7_1_C), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AAC_Octagonal), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_TMH_10_2_std), + // DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_TMH_10_2_full), no indicatoin on how to handle this tag + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AC3_1_0_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AC3_3_0), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AC3_3_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AC3_3_0_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AC3_2_1_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_AC3_3_1_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_EAC_6_0_A), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_EAC_7_0_A), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_EAC3_6_1_A), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_EAC3_6_1_B), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_EAC3_6_1_C), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_EAC3_7_1_A), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_EAC3_7_1_B), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_EAC3_7_1_C), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_EAC3_7_1_D), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_EAC3_7_1_E), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_EAC3_7_1_F), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_EAC3_7_1_G), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_EAC3_7_1_H), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DTS_3_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DTS_4_1), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_DTS_6_0_A, AudioChannelSet::create6point0Music()), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DTS_6_0_B), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DTS_6_0_C), + DEFINE_CHANNEL_LAYOUT_TAG_ENTRY (kAudioChannelLayoutTag_DTS_6_1_A, AudioChannelSet::create6point1Music()), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DTS_6_1_B), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DTS_6_1_C), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DTS_7_0), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DTS_7_1), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DTS_8_0_A), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DTS_8_0_B), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DTS_8_1_A), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DTS_8_1_B), + DEFINE_CHANNEL_LAYOUT_DFL_ENTRY (kAudioChannelLayoutTag_DTS_6_1_D) + }); + + return knownTags; + } +}; + +static CoreAudioLayoutsUnitTest coreAudioLayoutsUnitTest; + +#endif #endif diff --git a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp index 057ee0acda..34a83caba8 100644 --- a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp @@ -36,13 +36,14 @@ namespace OggVorbisNamespace #if JUCE_MSVC #pragma warning (push) #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706 4995 4365 4456 4457 4459) - #endif - - #if JUCE_CLANG + #elif JUCE_CLANG #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wshadow" #pragma clang diagnostic ignored "-Wdeprecated-register" + #elif JUCE_GCC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wshadow" #endif #include "oggvorbis/vorbisenc.h" @@ -75,10 +76,10 @@ namespace OggVorbisNamespace #if JUCE_MSVC #pragma warning (pop) - #endif - - #if JUCE_CLANG + #elif JUCE_CLANG #pragma clang diagnostic pop + #elif JUCE_GCC + #pragma GCC diagnostic pop #endif #else #include diff --git a/modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.cpp deleted file mode 100644 index ade823f41d..0000000000 --- a/modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.cpp +++ /dev/null @@ -1,389 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 5 End-User License - Agreement and JUCE 5 Privacy Policy (both updated and effective as of the - 27th April 2017). - - End User License Agreement: www.juce.com/juce-5-licence - Privacy Policy: www.juce.com/juce-5-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#if JUCE_QUICKTIME && ! (JUCE_64BIT || JUCE_IOS) - -} // (juce namespace) - -#if ! JUCE_WINDOWS - #include - #include - #include - #include - #include -#else - #if JUCE_MSVC - #pragma warning (push) - #pragma warning (disable : 4100) - #endif - - /* If you've got an include error here, you probably need to install the QuickTime SDK and - add its header directory to your include path. - - Alternatively, if you don't need any QuickTime services, just set the JUCE_QUICKTIME flag to 0. - */ - #undef SIZE_MAX - #include - #include - #include - #include - #include - #undef SIZE_MAX - - #if JUCE_MSVC - #pragma warning (pop) - #endif -#endif - -namespace juce -{ - -bool juce_OpenQuickTimeMovieFromStream (InputStream* input, Movie& movie, Handle& dataHandle); - -static const char* const quickTimeFormatName = "QuickTime file"; - -//============================================================================== -class QTAudioReader : public AudioFormatReader -{ -public: - QTAudioReader (InputStream* const input_, const int trackNum_) - : AudioFormatReader (input_, quickTimeFormatName), - ok (false), - movie (0), - trackNum (trackNum_), - lastSampleRead (0), - lastThreadId (0), - extractor (0), - dataHandle (0) - { - JUCE_AUTORELEASEPOOL - { - bufferList.calloc (256, 1); - - #if JUCE_WINDOWS - if (InitializeQTML (0) != noErr) - return; - #endif - - if (EnterMovies() != noErr) - return; - - bool opened = juce_OpenQuickTimeMovieFromStream (input_, movie, dataHandle); - - if (! opened) - return; - - { - const int numTracks = GetMovieTrackCount (movie); - int trackCount = 0; - - for (int i = 1; i <= numTracks; ++i) - { - track = GetMovieIndTrack (movie, i); - media = GetTrackMedia (track); - - OSType mediaType; - GetMediaHandlerDescription (media, &mediaType, 0, 0); - - if (mediaType == SoundMediaType - && trackCount++ == trackNum_) - { - ok = true; - break; - } - } - } - - if (! ok) - return; - - ok = false; - - lengthInSamples = GetMediaDecodeDuration (media); - usesFloatingPointData = false; - - samplesPerFrame = (int) (GetMediaDecodeDuration (media) / GetMediaSampleCount (media)); - - trackUnitsPerFrame = GetMovieTimeScale (movie) * samplesPerFrame - / GetMediaTimeScale (media); - - MovieAudioExtractionBegin (movie, 0, &extractor); - - unsigned long output_layout_size; - OSStatus err = MovieAudioExtractionGetPropertyInfo (extractor, - kQTPropertyClass_MovieAudioExtraction_Audio, - kQTMovieAudioExtractionAudioPropertyID_AudioChannelLayout, - 0, &output_layout_size, 0); - if (err != noErr) - return; - - HeapBlock qt_audio_channel_layout; - qt_audio_channel_layout.calloc (output_layout_size, 1); - - MovieAudioExtractionGetProperty (extractor, - kQTPropertyClass_MovieAudioExtraction_Audio, - kQTMovieAudioExtractionAudioPropertyID_AudioChannelLayout, - output_layout_size, qt_audio_channel_layout, 0); - - qt_audio_channel_layout[0].mChannelLayoutTag = kAudioChannelLayoutTag_Stereo; - - MovieAudioExtractionSetProperty (extractor, - kQTPropertyClass_MovieAudioExtraction_Audio, - kQTMovieAudioExtractionAudioPropertyID_AudioChannelLayout, - output_layout_size, - qt_audio_channel_layout); - - err = MovieAudioExtractionGetProperty (extractor, - kQTPropertyClass_MovieAudioExtraction_Audio, - kQTMovieAudioExtractionAudioPropertyID_AudioStreamBasicDescription, - sizeof (inputStreamDesc), - &inputStreamDesc, 0); - if (err != noErr) - return; - - inputStreamDesc.mFormatFlags = kAudioFormatFlagIsSignedInteger - | kAudioFormatFlagIsPacked - | kAudioFormatFlagsNativeEndian; - inputStreamDesc.mBitsPerChannel = sizeof (SInt16) * 8; - inputStreamDesc.mChannelsPerFrame = jmin ((UInt32) 2, inputStreamDesc.mChannelsPerFrame); - inputStreamDesc.mBytesPerFrame = sizeof (SInt16) * inputStreamDesc.mChannelsPerFrame; - inputStreamDesc.mBytesPerPacket = inputStreamDesc.mBytesPerFrame; - - err = MovieAudioExtractionSetProperty (extractor, - kQTPropertyClass_MovieAudioExtraction_Audio, - kQTMovieAudioExtractionAudioPropertyID_AudioStreamBasicDescription, - sizeof (inputStreamDesc), - &inputStreamDesc); - if (err != noErr) - return; - - Boolean allChannelsDiscrete = false; - err = MovieAudioExtractionSetProperty (extractor, - kQTPropertyClass_MovieAudioExtraction_Movie, - kQTMovieAudioExtractionMoviePropertyID_AllChannelsDiscrete, - sizeof (allChannelsDiscrete), - &allChannelsDiscrete); - - if (err != noErr) - return; - - bufferList->mNumberBuffers = 1; - bufferList->mBuffers[0].mNumberChannels = inputStreamDesc.mChannelsPerFrame; - bufferList->mBuffers[0].mDataByteSize = jmax ((UInt32) 4096, (UInt32) (samplesPerFrame * (int) inputStreamDesc.mBytesPerFrame) + 16); - - dataBuffer.malloc (bufferList->mBuffers[0].mDataByteSize); - bufferList->mBuffers[0].mData = dataBuffer; - - sampleRate = inputStreamDesc.mSampleRate; - bitsPerSample = 16; - numChannels = inputStreamDesc.mChannelsPerFrame; - - detachThread(); - ok = true; - } - } - - ~QTAudioReader() - { - JUCE_AUTORELEASEPOOL - { - checkThreadIsAttached(); - - if (dataHandle != nullptr) - DisposeHandle (dataHandle); - - if (extractor != nullptr) - { - MovieAudioExtractionEnd (extractor); - extractor = nullptr; - } - - DisposeMovie (movie); - - #if JUCE_MAC - ExitMoviesOnThread(); - #endif - } - } - - bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, - int64 startSampleInFile, int numSamples) - { - JUCE_AUTORELEASEPOOL - { - checkThreadIsAttached(); - bool readOk = true; - - while (numSamples > 0) - { - if (lastSampleRead != startSampleInFile) - { - TimeRecord time; - time.scale = (TimeScale) inputStreamDesc.mSampleRate; - time.base = 0; - time.value.hi = 0; - time.value.lo = (UInt32) startSampleInFile; - - OSStatus err = MovieAudioExtractionSetProperty (extractor, - kQTPropertyClass_MovieAudioExtraction_Movie, - kQTMovieAudioExtractionMoviePropertyID_CurrentTime, - sizeof (time), &time); - - if (err != noErr) - { - readOk = false; - break; - } - } - - int framesToDo = jmin (numSamples, (int) (bufferList->mBuffers[0].mDataByteSize / inputStreamDesc.mBytesPerFrame)); - bufferList->mBuffers[0].mDataByteSize = inputStreamDesc.mBytesPerFrame * (UInt32) framesToDo; - - UInt32 outFlags = 0; - UInt32 actualNumFrames = (UInt32) framesToDo; - OSStatus err = MovieAudioExtractionFillBuffer (extractor, &actualNumFrames, bufferList, &outFlags); - if (err != noErr) - { - readOk = false; - break; - } - - lastSampleRead = startSampleInFile + actualNumFrames; - const int samplesReceived = (int) actualNumFrames; - - for (int j = numDestChannels; --j >= 0;) - { - if (destSamples[j] != nullptr) - { - const short* src = ((const short*) bufferList->mBuffers[0].mData) + j; - - for (int i = 0; i < samplesReceived; ++i) - { - destSamples[j][startOffsetInDestBuffer + i] = (*src << 16); - src += numChannels; - } - } - } - - startOffsetInDestBuffer += samplesReceived; - startSampleInFile += samplesReceived; - numSamples -= samplesReceived; - - if (((outFlags & kQTMovieAudioExtractionComplete) != 0 || samplesReceived == 0) && numSamples > 0) - { - for (int j = numDestChannels; --j >= 0;) - if (destSamples[j] != nullptr) - zeromem (destSamples[j] + startOffsetInDestBuffer, sizeof (int) * (size_t) numSamples); - - break; - } - } - - detachThread(); - return readOk; - } - } - - bool ok; - -private: - Movie movie; - Media media; - Track track; - const int trackNum; - double trackUnitsPerFrame; - int samplesPerFrame; - int64 lastSampleRead; - Thread::ThreadID lastThreadId; - MovieAudioExtractionRef extractor; - AudioStreamBasicDescription inputStreamDesc; - HeapBlock bufferList; - HeapBlock dataBuffer; - Handle dataHandle; - - //============================================================================== - void checkThreadIsAttached() - { - #if JUCE_MAC - if (Thread::getCurrentThreadId() != lastThreadId) - EnterMoviesOnThread (0); - AttachMovieToCurrentThread (movie); - #endif - } - - void detachThread() - { - #if JUCE_MAC - DetachMovieFromCurrentThread (movie); - #endif - } - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (QTAudioReader) -}; - - -//============================================================================== -QuickTimeAudioFormat::QuickTimeAudioFormat() : AudioFormat (quickTimeFormatName, ".mov .mp3 .mp4 .m4a") -{ -} - -QuickTimeAudioFormat::~QuickTimeAudioFormat() -{ -} - -Array QuickTimeAudioFormat::getPossibleSampleRates() { return Array(); } -Array QuickTimeAudioFormat::getPossibleBitDepths() { return Array(); } - -bool QuickTimeAudioFormat::canDoStereo() { return true; } -bool QuickTimeAudioFormat::canDoMono() { return true; } - -//============================================================================== -AudioFormatReader* QuickTimeAudioFormat::createReaderFor (InputStream* sourceStream, - const bool deleteStreamIfOpeningFails) -{ - ScopedPointer r (new QTAudioReader (sourceStream, 0)); - - if (r->ok) - return r.release(); - - if (! deleteStreamIfOpeningFails) - r->input = 0; - - return nullptr; -} - -AudioFormatWriter* QuickTimeAudioFormat::createWriterFor (OutputStream* /*streamToWriteTo*/, - double /*sampleRateToUse*/, - unsigned int /*numberOfChannels*/, - int /*bitsPerSample*/, - const StringPairArray& /*metadataValues*/, - int /*qualityOptionIndex*/) -{ - jassertfalse; // not yet implemented! - return nullptr; -} - -#endif diff --git a/modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.h b/modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.h deleted file mode 100644 index 3cfe59a619..0000000000 --- a/modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 5 End-User License - Agreement and JUCE 5 Privacy Policy (both updated and effective as of the - 27th April 2017). - - End User License Agreement: www.juce.com/juce-5-licence - Privacy Policy: www.juce.com/juce-5-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#if JUCE_QUICKTIME - -//============================================================================== -/** - Uses QuickTime to read the audio track a movie or media file. - - As well as QuickTime movies, this should also manage to open other audio - files that quicktime can understand, like mp3, m4a, etc. - - @see AudioFormat -*/ -class JUCE_API QuickTimeAudioFormat : public AudioFormat -{ -public: - //============================================================================== - /** Creates a format object. */ - QuickTimeAudioFormat(); - - /** Destructor. */ - ~QuickTimeAudioFormat(); - - //============================================================================== - Array getPossibleSampleRates(); - Array getPossibleBitDepths(); - bool canDoStereo(); - bool canDoMono(); - - //============================================================================== - AudioFormatReader* createReaderFor (InputStream* sourceStream, - bool deleteStreamIfOpeningFails); - - AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, - double sampleRateToUse, - unsigned int numberOfChannels, - int bitsPerSample, - const StringPairArray& metadataValues, - int qualityOptionIndex); - - -private: - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (QuickTimeAudioFormat) -}; - - -#endif diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp index bde5db4e43..5c2cd44644 100644 --- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp @@ -220,11 +220,26 @@ namespace WavFileHelpers return data; } - return MemoryBlock(); + return {}; } } JUCE_PACKED; + //============================================================================== + AudioChannelSet canonicalWavChannelSet (int numChannels) + { + if (numChannels == 1) return AudioChannelSet::mono(); + if (numChannels == 2) return AudioChannelSet::stereo(); + if (numChannels == 3) return AudioChannelSet::createLCR(); + if (numChannels == 4) return AudioChannelSet::quadraphonic(); + if (numChannels == 5) return AudioChannelSet::create5point0(); + if (numChannels == 6) return AudioChannelSet::create5point1(); + if (numChannels == 7) return AudioChannelSet::create7point0SDDS(); + if (numChannels == 8) return AudioChannelSet::create7point1SDDS(); + + return AudioChannelSet::discreteChannels (numChannels); + } + //============================================================================== struct SMPLChunk { @@ -366,12 +381,12 @@ namespace WavFileHelpers static MemoryBlock createFrom (const StringPairArray& values) { MemoryBlock data; - const StringArray& keys = values.getAllKeys(); + auto& keys = values.getAllKeys(); if (keys.contains ("LowNote", true) && keys.contains ("HighNote", true)) { data.setSize (8, true); - InstChunk* const inst = static_cast (data.getData()); + auto* inst = static_cast (data.getData()); inst->baseNote = getValue (values, "MidiUnityNote", "60"); inst->detune = getValue (values, "Detune", "0"); @@ -434,7 +449,7 @@ namespace WavFileHelpers { data.setSize (roundUpSize (sizeof (CueChunk) + (size_t) (numCues - 1) * sizeof (Cue)), true); - CueChunk* const c = static_cast (data.getData()); + auto c = static_cast (data.getData()); c->numCues = ByteOrder::swapIfBigEndian ((uint32) numCues); @@ -447,18 +462,18 @@ namespace WavFileHelpers for (int i = 0; i < numCues; ++i) { - const String prefix ("Cue" + String (i)); - const uint32 identifier = (uint32) values.getValue (prefix + "Identifier", "0").getIntValue(); + auto prefix = "Cue" + String (i); + auto identifier = (uint32) values.getValue (prefix + "Identifier", "0").getIntValue(); #if JUCE_DEBUG jassert (! identifiers.contains (identifier)); identifiers.add (identifier); #endif - const int order = values.getValue (prefix + "Order", String (nextOrder)).getIntValue(); + auto order = values.getValue (prefix + "Order", String (nextOrder)).getIntValue(); nextOrder = jmax (nextOrder, order) + 1; - Cue& cue = c->cues[i]; + auto& cue = c->cues[i]; cue.identifier = ByteOrder::swapIfBigEndian ((uint32) identifier); cue.order = ByteOrder::swapIfBigEndian ((uint32) order); cue.chunkID = ByteOrder::swapIfBigEndian ((uint32) values.getValue (prefix + "ChunkID", dataChunkID).getIntValue()); @@ -489,9 +504,9 @@ namespace WavFileHelpers static void appendLabelOrNoteChunk (const StringPairArray& values, const String& prefix, const int chunkType, MemoryOutputStream& out) { - const String label (values.getValue (prefix + "Text", prefix)); - const int labelLength = (int) label.getNumBytesAsUTF8() + 1; - const int chunkLength = 4 + labelLength + (labelLength & 1); + auto label = values.getValue (prefix + "Text", prefix); + auto labelLength = (int) label.getNumBytesAsUTF8() + 1; + auto chunkLength = 4 + labelLength + (labelLength & 1); out.writeInt (chunkType); out.writeInt (chunkLength); @@ -504,9 +519,9 @@ namespace WavFileHelpers static void appendExtraChunk (const StringPairArray& values, const String& prefix, MemoryOutputStream& out) { - const String text (values.getValue (prefix + "Text", prefix)); + auto text = values.getValue (prefix + "Text", prefix); - const int textLength = (int) text.getNumBytesAsUTF8() + 1; // include null terminator + auto textLength = (int) text.getNumBytesAsUTF8() + 1; // include null terminator int chunkLength = textLength + 20 + (textLength & 1); out.writeInt (chunkName ("ltxt")); @@ -526,9 +541,9 @@ namespace WavFileHelpers static MemoryBlock createFrom (const StringPairArray& values) { - const int numCueLabels = getValue (values, "NumCueLabels"); - const int numCueNotes = getValue (values, "NumCueNotes"); - const int numCueRegions = getValue (values, "NumCueRegions"); + auto numCueLabels = getValue (values, "NumCueLabels"); + auto numCueNotes = getValue (values, "NumCueNotes"); + auto numCueRegions = getValue (values, "NumCueRegions"); MemoryOutputStream out; @@ -677,7 +692,7 @@ namespace WavFileHelpers static bool writeValue (const StringPairArray& values, MemoryOutputStream& out, const char* paramName) { - const String value (values.getValue (paramName, String())); + auto value = values.getValue (paramName, {}); if (value.isEmpty()) return false; @@ -830,13 +845,13 @@ namespace WavFileHelpers if (xml != nullptr && xml->hasTagName ("ebucore:ebuCoreMain")) { - if (XmlElement* xml2 = xml->getChildByName ("ebucore:coreMetadata")) + if (auto* xml2 = xml->getChildByName ("ebucore:coreMetadata")) { - if (XmlElement* xml3 = xml2->getChildByName ("ebucore:identifier")) + if (auto* xml3 = xml2->getChildByName ("ebucore:identifier")) { - if (XmlElement* xml4 = xml3->getChildByName ("dc:identifier")) + if (auto* xml4 = xml3->getChildByName ("dc:identifier")) { - const String ISRCCode (xml4->getAllSubText().fromFirstOccurrenceOf ("ISRC:", false, true)); + auto ISRCCode = xml4->getAllSubText().fromFirstOccurrenceOf ("ISRC:", false, true); if (ISRCCode.isNotEmpty()) destValues.set (WavAudioFormat::ISRC, ISRCCode); @@ -848,7 +863,7 @@ namespace WavFileHelpers static MemoryBlock createFrom (const StringPairArray& values) { - const String ISRC (values.getValue (WavAudioFormat::ISRC, String())); + auto ISRC = values.getValue (WavAudioFormat::ISRC, {}); MemoryOutputStream xml; if (ISRC.isNotEmpty()) @@ -911,11 +926,7 @@ class WavAudioFormatReader : public AudioFormatReader { public: WavAudioFormatReader (InputStream* const in) - : AudioFormatReader (in, wavFormatName), - bwavChunkStart (0), - bwavSize (0), - dataLength (0), - isRF64 (false) + : AudioFormatReader (in, wavFormatName) { using namespace WavFileHelpers; uint64 len = 0; @@ -941,7 +952,7 @@ public: return; } - const int64 startOfRIFFChunk = input->getPosition(); + auto startOfRIFFChunk = input->getPosition(); if (input->readInt() == chunkName ("WAVE")) { @@ -968,10 +979,10 @@ public: if (chunkType == chunkName ("fmt ")) { // read the format chunk - const unsigned short format = (unsigned short) input->readShort(); + auto format = (unsigned short) input->readShort(); numChannels = (unsigned int) input->readShort(); sampleRate = input->readInt(); - const int bytesPerSec = input->readInt(); + auto bytesPerSec = input->readInt(); input->skipNextBytes (2); bitsPerSample = (unsigned int) (int) input->readShort(); @@ -998,7 +1009,17 @@ public: else { input->skipNextBytes (4); // skip over size and bitsPerSample - metadataValues.set ("ChannelMask", String (input->readInt())); + auto channelMask = input->readInt(); + metadataValues.set ("ChannelMask", String (channelMask)); + + // AudioChannelSet and wav's dwChannelMask are compatible + BigInteger channelBits (channelMask); + + for (auto bit = channelBits.findNextSetBit (0); bit >= 0; bit = channelBits.findNextSetBit (bit + 1)) + channelLayout.addChannel (static_cast (bit + 1)); + + // channel layout and number of channels do not match + jassert (channelLayout.size() == static_cast (numChannels)); ExtensibleWavSubFormat subFormat; subFormat.data1 = (uint32) input->readInt(); @@ -1197,15 +1218,25 @@ public: case 16: ReadHelper::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); break; case 24: ReadHelper::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); break; case 32: if (usesFloatingPointData) ReadHelper::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); - else ReadHelper::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); break; + else ReadHelper::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); + break; default: jassertfalse; break; } } - int64 bwavChunkStart, bwavSize; - int64 dataChunkStart, dataLength; - int bytesPerFrame; - bool isRF64; + AudioChannelSet getChannelLayout() override + { + if (channelLayout.size() == static_cast (numChannels)) + return channelLayout; + + return WavFileHelpers::canonicalWavChannelSet (static_cast (numChannels)); + } + + int64 bwavChunkStart = 0, bwavSize = 0; + int64 dataChunkStart = 0, dataLength = 0; + int bytesPerFrame = 0; + bool isRF64 = false; + AudioChannelSet channelLayout; private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WavAudioFormatReader) @@ -1216,12 +1247,9 @@ class WavAudioFormatWriter : public AudioFormatWriter { public: WavAudioFormatWriter (OutputStream* const out, const double rate, - const unsigned int numChans, const unsigned int bits, + const AudioChannelSet& channelLayoutToUse, const unsigned int bits, const StringPairArray& metadataValues) - : AudioFormatWriter (out, wavFormatName, rate, numChans, bits), - lengthInSamples (0), - bytesWritten (0), - writeFailed (false) + : AudioFormatWriter (out, wavFormatName, rate, channelLayoutToUse, bits) { using namespace WavFileHelpers; @@ -1290,7 +1318,7 @@ public: bool flush() override { - const int64 lastWritePos = output->getPosition(); + auto lastWritePos = output->getPosition(); writeHeader(); if (output->setPosition (lastWritePos)) @@ -1304,27 +1332,9 @@ public: private: MemoryBlock tempBlock, bwavChunk, axmlChunk, smplChunk, instChunk, cueChunk, listChunk, listInfoChunk, acidChunk, trckChunk; - uint64 lengthInSamples, bytesWritten; - int64 headerPosition; - bool writeFailed; - - static int getChannelMask (const int numChannels) noexcept - { - switch (numChannels) - { - case 1: return 0; - case 2: return 1 + 2; // SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT - case 3: return 1 + 2 + 4; // SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER - case 4: return 1 + 2 + 16 + 32; // SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT - case 5: return 1 + 2 + 4 + 16 + 32; // SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT - case 6: return 1 + 2 + 4 + 8 + 16 + 32; // SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT - case 7: return 1 + 2 + 4 + 16 + 32 + 512 + 1024; // SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT - case 8: return 1 + 2 + 4 + 8 + 16 + 32 + 512 + 1024; // SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT - default: break; - } - - return 0; - } + uint64 lengthInSamples = 0, bytesWritten = 0; + int64 headerPosition = 0; + bool writeFailed = false; void writeHeader() { @@ -1421,7 +1431,7 @@ private: { output->writeShort (22); // cbSize (size of the extension) output->writeShort ((short) bitsPerSample); // wValidBitsPerSample - output->writeInt (getChannelMask ((int) numChannels)); + output->writeInt (getChannelMaskFromChannelLayout (channelLayout)); const ExtensibleWavSubFormat& subFormat = bitsPerSample < 32 ? pcmFormat : IEEEFloatFormat; @@ -1463,6 +1473,22 @@ private: } } + static int getChannelMaskFromChannelLayout (const AudioChannelSet& channelLayout) + { + auto channels = channelLayout.getChannelTypes(); + auto wavChannelMask = 0; + + for (auto channel : channels) + { + int wavChannelBit = static_cast (channel) - 1; + jassert (wavChannelBit >= 0 && wavChannelBit <= 31); + + wavChannelMask |= (1 << wavChannelBit); + } + + return wavChannelMask; + } + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WavAudioFormatWriter) }; @@ -1496,7 +1522,7 @@ public: void getSample (int64 sample, float* result) const noexcept override { - const int num = (int) numChannels; + auto num = (int) numChannels; if (map == nullptr || ! mappedSection.contains (sample)) { @@ -1506,8 +1532,8 @@ public: return; } - float** dest = &result; - const void* source = sampleToPointer (sample); + auto dest = &result; + auto source = sampleToPointer (sample); switch (bitsPerSample) { @@ -1515,7 +1541,8 @@ public: case 16: ReadHelper::read (dest, 0, 1, source, 1, num); break; case 24: ReadHelper::read (dest, 0, 1, source, 1, num); break; case 32: if (usesFloatingPointData) ReadHelper::read (dest, 0, 1, source, 1, num); - else ReadHelper::read (dest, 0, 1, source, 1, num); break; + else ReadHelper::read (dest, 0, 1, source, 1, num); + break; default: jassertfalse; break; } } @@ -1540,7 +1567,8 @@ public: case 16: scanMinAndMax (startSampleInFile, numSamples, results, numChannelsToRead); break; case 24: scanMinAndMax (startSampleInFile, numSamples, results, numChannelsToRead); break; case 32: if (usesFloatingPointData) scanMinAndMax (startSampleInFile, numSamples, results, numChannelsToRead); - else scanMinAndMax (startSampleInFile, numSamples, results, numChannelsToRead); break; + else scanMinAndMax (startSampleInFile, numSamples, results, numChannelsToRead); + break; default: jassertfalse; break; } } @@ -1578,6 +1606,18 @@ Array WavAudioFormat::getPossibleBitDepths() bool WavAudioFormat::canDoStereo() { return true; } bool WavAudioFormat::canDoMono() { return true; } +bool WavAudioFormat::isChannelLayoutSupported (const AudioChannelSet& channelSet) +{ + auto channelTypes = channelSet.getChannelTypes(); + + // WAV supports all channel types from left ... topRearRight + for (auto channel : channelTypes) + if (channel < AudioChannelSet::left || channel > AudioChannelSet::topRearRight) + return false; + + return true; +} + AudioFormatReader* WavAudioFormat::createReaderFor (InputStream* sourceStream, const bool deleteStreamIfOpeningFails) { @@ -1612,10 +1652,21 @@ MemoryMappedAudioFormatReader* WavAudioFormat::createMemoryMappedReader (FileInp AudioFormatWriter* WavAudioFormat::createWriterFor (OutputStream* out, double sampleRate, unsigned int numChannels, int bitsPerSample, - const StringPairArray& metadataValues, int /*qualityOptionIndex*/) + const StringPairArray& metadataValues, int qualityOptionIndex) { - if (out != nullptr && getPossibleBitDepths().contains (bitsPerSample)) - return new WavAudioFormatWriter (out, sampleRate, (unsigned int) numChannels, + return createWriterFor (out, sampleRate, WavFileHelpers::canonicalWavChannelSet (static_cast (numChannels)), + bitsPerSample, metadataValues, qualityOptionIndex); +} + +AudioFormatWriter* WavAudioFormat::createWriterFor (OutputStream* out, + double sampleRate, + const AudioChannelSet& channelLayout, + int bitsPerSample, + const StringPairArray& metadataValues, + int /*qualityOptionIndex*/) +{ + if (out != nullptr && getPossibleBitDepths().contains (bitsPerSample) && isChannelLayoutSupported (channelLayout)) + return new WavAudioFormatWriter (out, sampleRate, channelLayout, (unsigned int) bitsPerSample, metadataValues); return nullptr; @@ -1626,21 +1677,15 @@ namespace WavFileHelpers static bool slowCopyWavFileWithNewMetadata (const File& file, const StringPairArray& metadata) { TemporaryFile tempFile (file); - WavAudioFormat wav; - ScopedPointer reader (wav.createReaderFor (file.createInputStream(), true)); - if (reader != nullptr) + if (ScopedPointer reader = wav.createReaderFor (file.createInputStream(), true)) { - ScopedPointer outStream (tempFile.getFile().createOutputStream()); - - if (outStream != nullptr) + if (ScopedPointer outStream = tempFile.getFile().createOutputStream()) { - ScopedPointer writer (wav.createWriterFor (outStream, reader->sampleRate, - reader->numChannels, (int) reader->bitsPerSample, - metadata, 0)); - - if (writer != nullptr) + if (ScopedPointer writer = wav.createWriterFor (outStream, reader->sampleRate, + reader->numChannels, (int) reader->bitsPerSample, + metadata, 0)) { outStream.release(); @@ -1660,12 +1705,11 @@ namespace WavFileHelpers bool WavAudioFormat::replaceMetadataInFile (const File& wavFile, const StringPairArray& newMetadata) { using namespace WavFileHelpers; - ScopedPointer reader (static_cast (createReaderFor (wavFile.createInputStream(), true))); - if (reader != nullptr) + if (ScopedPointer reader = static_cast (createReaderFor (wavFile.createInputStream(), true))) { - const int64 bwavPos = reader->bwavChunkStart; - const int64 bwavSize = reader->bwavSize; + auto bwavPos = reader->bwavChunkStart; + auto bwavSize = reader->bwavSize; reader = nullptr; if (bwavSize > 0) @@ -1675,7 +1719,7 @@ bool WavAudioFormat::replaceMetadataInFile (const File& wavFile, const StringPai if (chunk.getSize() <= (size_t) bwavSize) { // the new one will fit in the space available, so write it directly.. - const int64 oldSize = wavFile.getSize(); + auto oldSize = wavFile.getSize(); { FileOutputStream out (wavFile); @@ -1701,9 +1745,8 @@ bool WavAudioFormat::replaceMetadataInFile (const File& wavFile, const StringPai //============================================================================== #if JUCE_UNIT_TESTS -class WaveAudioFormatTests : public UnitTest +struct WaveAudioFormatTests : public UnitTest { -public: WaveAudioFormatTests() : UnitTest ("Wave audio format tests") {} void runTest() override diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h index bb0b5612f0..36de97cc7d 100644 --- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h +++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h @@ -180,6 +180,7 @@ public: Array getPossibleBitDepths() override; bool canDoStereo() override; bool canDoMono() override; + bool isChannelLayoutSupported (const AudioChannelSet& channelSet) override; //============================================================================== AudioFormatReader* createReaderFor (InputStream* sourceStream, @@ -195,6 +196,13 @@ public: const StringPairArray& metadataValues, int qualityOptionIndex) override; + AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, + double sampleRateToUse, + const AudioChannelSet& channelLayout, + int bitsPerSample, + const StringPairArray& metadataValues, + int qualityOptionIndex) override; + //============================================================================== /** Utility function to replace the metadata in a wav file with a new set of values. diff --git a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisfile.c b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisfile.c index 5c6cedb15b..3ce1337e76 100644 --- a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisfile.c +++ b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisfile.c @@ -15,10 +15,15 @@ ********************************************************************/ -#ifdef JUCE_MSVC +#if JUCE_MSVC #pragma warning (disable: 4456 4457 4459) #endif +#if JUCE_GCC && __GNUC__ > 6 + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wmisleading-indentation" +#endif + #include #include #include @@ -1561,7 +1566,7 @@ int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos){ if(op.granulepos!=-1){ vf->pcm_offset=op.granulepos-vf->pcmlengths[vf->current_link*2]; if(vf->pcm_offset<0)vf->pcm_offset=0; - vf->pcm_offset+=total; + vf->pcm_offset+=total; break; }else result=ogg_stream_packetout(&vf->os,NULL); @@ -2347,3 +2352,7 @@ int ov_time_seek_lap(OggVorbis_File *vf,double pos){ int ov_time_seek_page_lap(OggVorbis_File *vf,double pos){ return _ov_d_seek_lap(vf,pos,ov_time_seek_page); } + +#if JUCE_GCC && __GNUC__ > 6 + #pragma GCC diagnostic pop +#endif diff --git a/modules/juce_audio_formats/format/juce_AudioFormat.cpp b/modules/juce_audio_formats/format/juce_AudioFormat.cpp index ef67930fd0..a1cacb4b4a 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormat.cpp +++ b/modules/juce_audio_formats/format/juce_AudioFormat.cpp @@ -62,3 +62,26 @@ MemoryMappedAudioFormatReader* AudioFormat::createMemoryMappedReader (FileInputS delete fin; return nullptr; } + +bool AudioFormat::isChannelLayoutSupported (const AudioChannelSet& channelSet) +{ + if (channelSet == AudioChannelSet::mono()) return canDoMono(); + if (channelSet == AudioChannelSet::stereo()) return canDoStereo(); + + return false; +} + +AudioFormatWriter* AudioFormat::createWriterFor (OutputStream* streamToWriteTo, + double sampleRateToUse, + const AudioChannelSet& channelLayout, + int bitsPerSample, + const StringPairArray& metadataValues, + int qualityOptionIndex) +{ + if (isChannelLayoutSupported (channelLayout)) + return createWriterFor (streamToWriteTo, sampleRateToUse, + static_cast (channelLayout.size()), + bitsPerSample, metadataValues, qualityOptionIndex); + + return nullptr; +} diff --git a/modules/juce_audio_formats/format/juce_AudioFormat.h b/modules/juce_audio_formats/format/juce_AudioFormat.h index bfbc94406f..1db42e9797 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormat.h +++ b/modules/juce_audio_formats/format/juce_AudioFormat.h @@ -80,6 +80,9 @@ public: /** Returns true if the format uses compressed data. */ virtual bool isCompressed(); + /** Returns true if the channel layout is supported by this format. */ + virtual bool isChannelLayoutSupported (const AudioChannelSet& channelSet); + /** Returns a list of different qualities that can be used when writing. Non-compressed formats will just return an empty array, but for something @@ -154,6 +157,44 @@ public: const StringPairArray& metadataValues, int qualityOptionIndex) = 0; + /** Tries to create an object that can write to a stream with this audio format. + + The writer object that is returned can be used to write to the stream, and + should then be deleted by the caller. + + If the stream can't be created for some reason (e.g. the parameters passed in + here aren't suitable), this will return nullptr. + + @param streamToWriteTo the stream that the data will go to - this will be + deleted by the AudioFormatWriter object when it's no longer + needed. If no AudioFormatWriter can be created by this method, + the stream will NOT be deleted, so that the caller can re-use it + to try to open a different format, etc + @param sampleRateToUse the sample rate for the file, which must be one of the ones + returned by getPossibleSampleRates() + @param channelLayout the channel layout for the file. Use isChannelLayoutSupported + to check if the writer supports this layout. + @param bitsPerSample the bits per sample to use - this must be one of the values + returned by getPossibleBitDepths() + @param metadataValues a set of metadata values that the writer should try to write + to the stream. Exactly what these are depends on the format, + and the subclass doesn't actually have to do anything with + them if it doesn't want to. Have a look at the specific format + implementation classes to see possible values that can be + used + @param qualityOptionIndex the index of one of compression qualities returned by the + getQualityOptions() method. If there aren't any quality options + for this format, just pass 0 in this parameter, as it'll be + ignored + @see AudioFormatWriter + */ + virtual AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, + double sampleRateToUse, + const AudioChannelSet& channelLayout, + int bitsPerSample, + const StringPairArray& metadataValues, + int qualityOptionIndex); + protected: /** Creates an AudioFormat object. diff --git a/modules/juce_audio_formats/format/juce_AudioFormatReader.cpp b/modules/juce_audio_formats/format/juce_AudioFormatReader.cpp index 9f42d13e7f..ccd002a0f3 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatReader.cpp +++ b/modules/juce_audio_formats/format/juce_AudioFormatReader.cpp @@ -365,6 +365,11 @@ int64 AudioFormatReader::searchForLevel (int64 startSample, return -1; } +AudioChannelSet AudioFormatReader::getChannelLayout() +{ + return AudioChannelSet::canonicalChannelSet (static_cast (numChannels)); +} + //============================================================================== MemoryMappedAudioFormatReader::MemoryMappedAudioFormatReader (const File& f, const AudioFormatReader& reader, int64 start, int64 length, int frameSize) diff --git a/modules/juce_audio_formats/format/juce_AudioFormatReader.h b/modules/juce_audio_formats/format/juce_AudioFormatReader.h index d56abf5f88..8af863a8f2 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatReader.h +++ b/modules/juce_audio_formats/format/juce_AudioFormatReader.h @@ -218,6 +218,9 @@ public: /** The input stream, for use by subclasses. */ InputStream* input; + //============================================================================== + /** Get the channel layout of the audio stream. */ + virtual AudioChannelSet getChannelLayout(); //============================================================================== /** Subclasses must implement this method to perform the low-level read operation. diff --git a/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp b/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp index 398a702c1e..febf8a3259 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp +++ b/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp @@ -33,6 +33,22 @@ AudioFormatWriter::AudioFormatWriter (OutputStream* const out, numChannels (numChannels_), bitsPerSample (bitsPerSample_), usesFloatingPointData (false), + channelLayout (AudioChannelSet::canonicalChannelSet(static_cast (numChannels_))), + output (out), + formatName (formatName_) +{ +} + +AudioFormatWriter::AudioFormatWriter (OutputStream* const out, + const String& formatName_, + const double rate, + const AudioChannelSet& channelLayout_, + const unsigned int bitsPerSample_) + : sampleRate (rate), + numChannels (static_cast (channelLayout_.size())), + bitsPerSample (bitsPerSample_), + usesFloatingPointData (false), + channelLayout (channelLayout_), output (out), formatName (formatName_) { diff --git a/modules/juce_audio_formats/format/juce_AudioFormatWriter.h b/modules/juce_audio_formats/format/juce_AudioFormatWriter.h index d198387b61..30a09e63bf 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatWriter.h +++ b/modules/juce_audio_formats/format/juce_AudioFormatWriter.h @@ -62,6 +62,26 @@ protected: unsigned int numberOfChannels, unsigned int bitsPerSample); + //============================================================================== + /** Creates an AudioFormatWriter object. + + @param destStream the stream to write to - this will be deleted + by this object when it is no longer needed + @param formatName the description that will be returned by the getFormatName() + method + @param sampleRate the sample rate to use - the base class just stores + this value, it doesn't do anything with it + @param channelLayout the channel layout to use for the writer - the base class + just stores this value, it doesn't do anything with it + @param bitsPerSample the bit depth of the stream - the base class just stores + this value, it doesn't do anything with it + */ + AudioFormatWriter (OutputStream* destStream, + const String& formatName, + double sampleRate, + const AudioChannelSet& audioChannelLayout, + unsigned int bitsPerSample); + public: /** Destructor. */ virtual ~AudioFormatWriter(); @@ -235,6 +255,9 @@ protected: /** True if it's a floating-point format, false if it's fixed-point. */ bool usesFloatingPointData; + /** The audio channel layout that the writer should use */ + AudioChannelSet channelLayout; + /** The output stream for use by subclasses. */ OutputStream* output; diff --git a/modules/juce_audio_formats/juce_audio_formats.cpp b/modules/juce_audio_formats/juce_audio_formats.cpp index 9e8b159a71..ab3464dfc8 100644 --- a/modules/juce_audio_formats/juce_audio_formats.cpp +++ b/modules/juce_audio_formats/juce_audio_formats.cpp @@ -41,9 +41,6 @@ //============================================================================== #if JUCE_MAC - #if JUCE_QUICKTIME - #import - #endif #include #elif JUCE_IOS @@ -51,44 +48,14 @@ #import //============================================================================== -#elif JUCE_WINDOWS - #if JUCE_QUICKTIME - /* If you've got an include error here, you probably need to install the QuickTime SDK and - add its header directory to your include path. - - Alternatively, if you don't need any QuickTime services, just set the JUCE_QUICKTIME flag to 0. - */ - #include - #include - #include - #include - #include - - /* If you've got QuickTime 7 installed, then these COM objects should be found in - the "\Program Files\Quicktime" directory. You'll need to add this directory to - your include search path to make these import statements work. - */ - #import - #import - - #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - #pragma comment (lib, "QTMLClient.lib") - #endif - #endif - - #if JUCE_USE_WINDOWS_MEDIA_FORMAT - #include - #endif +#elif JUCE_WINDOWS && JUCE_USE_WINDOWS_MEDIA_FORMAT + #include #endif //============================================================================== namespace juce { -#if JUCE_ANDROID - #undef JUCE_QUICKTIME -#endif - #include "format/juce_AudioFormat.cpp" #include "format/juce_AudioFormatManager.cpp" #include "format/juce_AudioFormatReader.cpp" @@ -102,7 +69,6 @@ namespace juce #include "codecs/juce_FlacAudioFormat.cpp" #include "codecs/juce_MP3AudioFormat.cpp" #include "codecs/juce_OggVorbisAudioFormat.cpp" -#include "codecs/juce_QuickTimeAudioFormat.cpp" #include "codecs/juce_WavAudioFormat.cpp" #include "codecs/juce_LAMEEncoderAudioFormat.cpp" diff --git a/modules/juce_audio_formats/juce_audio_formats.h b/modules/juce_audio_formats/juce_audio_formats.h index cb8ffd3602..7e4f126ea4 100644 --- a/modules/juce_audio_formats/juce_audio_formats.h +++ b/modules/juce_audio_formats/juce_audio_formats.h @@ -35,7 +35,7 @@ ID: juce_audio_formats vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE audio file format codecs description: Classes for reading and writing various audio file formats. website: http://www.juce.com/juce @@ -128,7 +128,6 @@ class AudioFormat; #include "codecs/juce_LAMEEncoderAudioFormat.h" #include "codecs/juce_MP3AudioFormat.h" #include "codecs/juce_OggVorbisAudioFormat.h" -#include "codecs/juce_QuickTimeAudioFormat.h" #include "codecs/juce_WavAudioFormat.h" #include "codecs/juce_WindowsMediaAudioFormat.h" #include "sampler/juce_Sampler.h" diff --git a/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp b/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp index 2e6614bc53..b0f80cce43 100644 --- a/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp @@ -301,9 +301,10 @@ namespace AAXClasses PluginInstanceInfo* pluginInstance; int32_t* isPrepared; - int32_t* sideChainBuffers; float* const* meterTapBuffers; + + int32_t* sideChainBuffers; }; struct JUCEAlgorithmIDs @@ -326,9 +327,9 @@ namespace AAXClasses pluginInstance = AAX_FIELD_INDEX (JUCEAlgorithmContext, pluginInstance), preparedFlag = AAX_FIELD_INDEX (JUCEAlgorithmContext, isPrepared), - sideChainBuffers = AAX_FIELD_INDEX (JUCEAlgorithmContext, sideChainBuffers), + meterTapBuffers = AAX_FIELD_INDEX (JUCEAlgorithmContext, meterTapBuffers), - meterTapBuffers = AAX_FIELD_INDEX (JUCEAlgorithmContext, meterTapBuffers) + sideChainBuffers = AAX_FIELD_INDEX (JUCEAlgorithmContext, sideChainBuffers) }; }; @@ -613,29 +614,18 @@ namespace AAXClasses return AAX_SUCCESS; } - juce::MemoryBlock& getTemporaryChunkMemory() const - { - ScopedLock sl (perThreadDataLock); - const Thread::ThreadID currentThread = Thread::getCurrentThreadId(); - - if (ChunkMemoryBlock::Ptr m = perThreadFilterData [currentThread]) - return m->data; - - ChunkMemoryBlock::Ptr m (new ChunkMemoryBlock()); - perThreadFilterData.set (currentThread, m); - return m->data; - } - AAX_Result GetChunkSize (AAX_CTypeID chunkID, uint32_t* oSize) const override { if (chunkID != juceChunkType) return AAX_CEffectParameters::GetChunkSize (chunkID, oSize); - juce::MemoryBlock& tempFilterData = getTemporaryChunkMemory(); - tempFilterData.reset(); - pluginInstance->getStateInformation (tempFilterData); + auto& chunkMemoryBlock = perThreadFilterData.get(); - *oSize = (uint32_t) tempFilterData.getSize(); + chunkMemoryBlock.data.reset(); + pluginInstance->getStateInformation (chunkMemoryBlock.data); + chunkMemoryBlock.isValid = true; + + *oSize = (uint32_t) chunkMemoryBlock.data.getSize(); return AAX_SUCCESS; } @@ -644,14 +634,15 @@ namespace AAXClasses if (chunkID != juceChunkType) return AAX_CEffectParameters::GetChunk (chunkID, oChunk); - juce::MemoryBlock& tempFilterData = getTemporaryChunkMemory(); - if (tempFilterData.getSize() == 0) + auto& chunkMemoryBlock = perThreadFilterData.get(); + + if (! chunkMemoryBlock.isValid) return 20700; // AAX_ERROR_PLUGIN_API_INVALID_THREAD - oChunk->fSize = (int32_t) tempFilterData.getSize(); - tempFilterData.copyTo (oChunk->fData, 0, tempFilterData.getSize()); - tempFilterData.reset(); + oChunk->fSize = (int32_t) chunkMemoryBlock.data.getSize(); + chunkMemoryBlock.data.copyTo (oChunk->fData, 0, chunkMemoryBlock.data.getSize()); + chunkMemoryBlock.isValid = false; return AAX_SUCCESS; } @@ -707,6 +698,20 @@ namespace AAXClasses break; } + case JUCEAlgorithmIDs::meterTapBuffers: + { + // this is a dummy field only when there are no aaxMeters + jassert (aaxMeters.size() == 0); + + { + const size_t numObjects = dataSize / sizeof (float*); + float** const objects = static_cast (data); + + for (size_t i = 0; i < numObjects; ++i) + new (objects + i) (float*) (nullptr); + } + break; + } } return AAX_SUCCESS; @@ -1622,11 +1627,10 @@ namespace AAXClasses Array aaxMeters; - struct ChunkMemoryBlock : public ReferenceCountedObject + struct ChunkMemoryBlock { juce::MemoryBlock data; - - typedef ReferenceCountedObjectPtr Ptr; + bool isValid; }; // temporary filter data is generated in GetChunkSize @@ -1635,7 +1639,7 @@ namespace AAXClasses // However, as GetChunkSize and GetChunk can be called // on different threads, we store it in thread dependant storage // in a hash map with the thread id as a key. - mutable HashMap perThreadFilterData; + mutable ThreadLocalValue perThreadFilterData; CriticalSection perThreadDataLock; JUCE_DECLARE_NON_COPYABLE (JuceAAX_Processor) @@ -1783,6 +1787,12 @@ namespace AAXClasses check (desc.AddMeters (JUCEAlgorithmIDs::meterTapBuffers, meterIDs.getData(), static_cast (numMeters))); } + else + { + // AAX does not allow there to be any gaps in the fields of the algorithm context structure + // so just add a dummy one here if there aren't any meters + check (desc.AddPrivateData (JUCEAlgorithmIDs::meterTapBuffers, sizeof (uintptr_t))); + } // Create a property map AAX_IPropertyMap* const properties = desc.NewPropertyMap(); @@ -1870,8 +1880,16 @@ namespace AAXClasses const int numInputBuses = plugin->getBusCount (true); const int numOutputBuses = plugin->getBusCount (false); - descriptor.AddName (JucePlugin_Desc); - descriptor.AddName (JucePlugin_Name); + auto pluginNames = plugin->getAlternateDisplayNames(); + + pluginNames.insert (0, JucePlugin_Desc); + pluginNames.insert (0, JucePlugin_Name); + + pluginNames.removeDuplicates (false); + + for (auto name : pluginNames) + descriptor.AddName (name.toRawUTF8()); + descriptor.AddCategory (JucePlugin_AAXCategory); const int numMeters = addAAXMeters (*plugin, descriptor); diff --git a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm index d940b34771..36d121d965 100644 --- a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm +++ b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm @@ -80,6 +80,7 @@ #include "../utility/juce_FakeMouseMoveGenerator.h" #include "../utility/juce_CarbonVisibility.h" +#include "../../juce_audio_basics/native/juce_mac_CoreAudioLayouts.h" #include "../../juce_audio_processors/format_types/juce_AU_Shared.h" //============================================================================== @@ -771,7 +772,7 @@ public: if (const AUIOElement* ioElement = GetIOElement (isInput ? kAudioUnitScope_Input : kAudioUnitScope_Output, element)) { - const AudioChannelSet newChannelSet = AudioUnitHelpers::CoreAudioChannelLayoutToJuceType (*inLayout); + const AudioChannelSet newChannelSet = CoreAudioLayouts::fromCoreAudio (*inLayout); const int currentNumChannels = static_cast (ioElement->GetStreamFormat().NumberChannels()); const int newChannelNum = newChannelSet.size(); @@ -789,7 +790,7 @@ public: return kAudioUnitErr_FormatNotSupported; #endif - getCurrentLayout (isInput, busNr) = AudioUnitHelpers::ChannelSetToCALayoutTag (newChannelSet); + getCurrentLayout (isInput, busNr) = CoreAudioLayouts::toCoreAudio (newChannelSet); return noErr; } @@ -1093,8 +1094,10 @@ public: err = MusicDeviceBase::ChangeStreamFormat (scope, element, old, format); + DBG (set.getDescription()); + if (err == noErr) - currentTag = AudioUnitHelpers::ChannelSetToCALayoutTag (set); + currentTag = CoreAudioLayouts::toCoreAudio (set); return err; } @@ -1815,7 +1818,12 @@ private: if (numChannels != tagNumChannels) return kAudioUnitErr_FormatNotSupported; - requestedBuses.add (AudioUnitHelpers::CALayoutTagToChannelSet(currentLayoutTag)); + AudioChannelLayout layout; + + zerostruct (layout); + layout.mChannelLayoutTag = currentLayoutTag; + + requestedBuses.add (CoreAudioLayouts::fromCoreAudio (layout)); } } @@ -1840,7 +1848,7 @@ private: { const int numChannels = channelSet.size(); - getCurrentLayout (isInput, busNr) = AudioUnitHelpers::ChannelSetToCALayoutTag (channelSet); + getCurrentLayout (isInput, busNr) = CoreAudioLayouts::toCoreAudio (channelSet); // is this bus activated? if (numChannels == 0) @@ -1895,14 +1903,13 @@ private: //============================================================================== void addSupportedLayoutTagsForBus (bool isInput, int busNum, Array& tags) { - int layoutIndex; - AudioChannelLayoutTag tag; - if (AudioProcessor::Bus* bus = juceFilter->getBus (isInput, busNum)) { #ifndef JucePlugin_PreferredChannelConfigurations - for (layoutIndex = 0; (tag = AudioUnitHelpers::StreamOrder::auChannelStreamOrder[layoutIndex].auLayoutTag) != 0; ++layoutIndex) - if (bus->isLayoutSupported (AudioUnitHelpers::CALayoutTagToChannelSet (tag))) + auto& knownTags = CoreAudioLayouts::getKnownCoreAudioTags(); + + for (auto tag : knownTags) + if (bus->isLayoutSupported (CoreAudioLayouts::fromCoreAudio (AudioChannelLayout {tag}))) tags.addIfNotAlreadyThere (tag); #endif diff --git a/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm b/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm index c3c6236fdb..2b9f2620df 100644 --- a/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm +++ b/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm @@ -54,6 +54,7 @@ #include "../../juce_core/native/juce_osx_ObjCHelpers.h" #include "../../juce_graphics/native/juce_mac_CoreGraphicsHelpers.h" +#include "../../juce_audio_basics/native/juce_mac_CoreAudioLayouts.h" #include "../../juce_audio_processors/format_types/juce_AU_Shared.h" #define JUCE_VIEWCONTROLLER_OBJC_NAME(x) JUCE_JOIN_MACRO (x, FactoryAUv3) @@ -198,10 +199,13 @@ private: { addIvar ("cppObject"); + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wundeclared-selector" addMethod (@selector (initWithComponentDescription:options:error:juceClass:), initWithComponentDescriptionAndJuceClass, "@@:", @encode (AudioComponentDescription), @encode (AudioComponentInstantiationOptions), "^@@"); + #pragma clang diagnostic pop addMethod (@selector (initWithComponentDescription:options:error:), initWithComponentDescription, "@@:", @@ -559,7 +563,13 @@ public: const AudioChannelLayoutTag layoutTag = (layout != nullptr ? [layout layoutTag] : 0); if (layoutTag != 0) - newLayout = AudioUnitHelpers::CALayoutTagToChannelSet (layoutTag); + { + AudioChannelLayout caLayout; + + zerostruct (caLayout); + caLayout.mChannelLayoutTag = layoutTag; + newLayout = CoreAudioLayouts::fromCoreAudio (caLayout); + } else newLayout = bus->supportedLayoutWithChannels (static_cast ([format channelCount])); @@ -661,7 +671,11 @@ public: if (layoutTag != 0) { - AudioChannelSet newLayout = AudioUnitHelpers::CALayoutTagToChannelSet (layoutTag); + AudioChannelLayout caLayout; + + zerostruct (caLayout); + caLayout.mChannelLayoutTag = layoutTag; + AudioChannelSet newLayout = CoreAudioLayouts::fromCoreAudio (caLayout); if (newLayout.size() != newNumChannels) return false; @@ -688,6 +702,7 @@ public: ignoreUnused (processor); [au willChangeValueForKey: @"allParameterValues"]; + addPresets(); [au didChangeValueForKey: @"allParameterValues"]; } @@ -978,7 +993,7 @@ private: address: address min: 0.0f max: 1.0f - unit: kAudioUnitParameterUnit_Generic + unit: unit unitName: nullptr flags: flags valueStrings: nullptr diff --git a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp index 391f905229..7b8934b4c8 100644 --- a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp +++ b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp @@ -124,7 +124,7 @@ protected: ScopedPointer mainWindow; }; -#if JucePlugin_Build_STANDALONE && JUCE_IOS +#if JucePlugin_Build_Standalone && JUCE_IOS bool JUCE_CALLTYPE juce_isInterAppAudioConnected() { diff --git a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h index 42baea647e..cca54908e9 100644 --- a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h +++ b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h @@ -62,14 +62,31 @@ public: bool takeOwnershipOfSettings = true, const String& preferredDefaultDeviceName = String(), const AudioDeviceManager::AudioDeviceSetup* preferredSetupOptions = nullptr, - const Array& constrainToConfiguration = Array()) + const Array& channels = Array()) : settings (settingsToUse, takeOwnershipOfSettings), - channelConfiguration (constrainToConfiguration), + channelConfiguration (channels), shouldMuteInput (! isInterAppAudioConnected()) { createPlugin(); - setupAudioDevices (preferredDefaultDeviceName, preferredSetupOptions); + + auto inChannels = (channelConfiguration.size() > 0 ? channelConfiguration[0].numIns + : processor->getMainBusNumInputChannels()); + + if (preferredSetupOptions != nullptr) + options = new AudioDeviceManager::AudioDeviceSetup (*preferredSetupOptions); + + if (inChannels > 0 && RuntimePermissions::isRequired (RuntimePermissions::recordAudio) + && ! RuntimePermissions::isGranted (RuntimePermissions::recordAudio)) + RuntimePermissions::request (RuntimePermissions::recordAudio, + [this, preferredDefaultDeviceName] (bool granted) { init (granted, preferredDefaultDeviceName); }); + else + init (true, preferredDefaultDeviceName); + } + + void init (bool enableAudioInput, const String& preferredDefaultDeviceName) + { + setupAudioDevices (enableAudioInput, preferredDefaultDeviceName, options); reloadPluginState(); startPlaying(); @@ -263,7 +280,8 @@ public: } } - void reloadAudioDeviceState (const String& preferredDefaultDeviceName, + void reloadAudioDeviceState (bool enableAudioInput, + const String& preferredDefaultDeviceName, const AudioDeviceManager::AudioDeviceSetup* preferredSetupOptions) { ScopedPointer savedState; @@ -287,7 +305,7 @@ public: totalOutChannels = defaultConfig.numOuts; } - deviceManager.initialise (totalInChannels, + deviceManager.initialise (enableAudioInput ? totalInChannels : 0, totalOutChannels, savedState, true, @@ -365,6 +383,8 @@ public: Value shouldMuteInput; AudioSampleBuffer emptyBuffer; + ScopedPointer options; + #if JUCE_IOS || JUCE_ANDROID StringArray lastMidiDevices; #endif @@ -412,23 +432,21 @@ private: void resized() override { - auto itemHeight = deviceSelector.getItemHeight(); - auto seperatorHeight = (itemHeight >> 1); - auto r = getLocalBounds(); - auto extra = r.removeFromBottom (itemHeight + seperatorHeight); - deviceSelector.setBounds (r); if (owner.getProcessorHasPotentialFeedbackLoop()) { - auto bottom = 0; - for (int i = 0; i < deviceSelector.getNumChildComponents(); ++i) - bottom = jmax (bottom, deviceSelector.getChildComponent (i)->getBottom()); + auto itemHeight = deviceSelector.getItemHeight(); + auto extra = r.removeFromTop (itemHeight); - shouldMuteButton.setBounds (Rectangle (r.proportionOfWidth (0.35f), bottom + seperatorHeight, - r.proportionOfWidth (0.60f), deviceSelector.getItemHeight())); + auto seperatorHeight = (itemHeight >> 1); + shouldMuteButton.setBounds (Rectangle (extra.proportionOfWidth (0.35f), seperatorHeight, + extra.proportionOfWidth (0.60f), deviceSelector.getItemHeight())); + + r.removeFromTop (seperatorHeight); } + deviceSelector.setBounds (r); } private: @@ -476,13 +494,14 @@ private: } //============================================================================== - void setupAudioDevices (const String& preferredDefaultDeviceName, + void setupAudioDevices (bool enableAudioInput, + const String& preferredDefaultDeviceName, const AudioDeviceManager::AudioDeviceSetup* preferredSetupOptions) { deviceManager.addAudioCallback (this); deviceManager.addMidiInputCallback ({}, &player); - reloadAudioDeviceState (preferredDefaultDeviceName, preferredSetupOptions); + reloadAudioDeviceState (enableAudioInput, preferredDefaultDeviceName, preferredSetupOptions); } void shutDownAudioDevices() @@ -818,7 +837,7 @@ private: StandalonePluginHolder* StandalonePluginHolder::getInstance() { - #if JucePlugin_Enable_IAA || JucePlugin_Build_STANDALONE + #if JucePlugin_Enable_IAA || JucePlugin_Build_Standalone if (PluginHostType::getPluginLoadedAs() == AudioProcessor::wrapperType_Standalone) { auto& desktop = Desktop::getInstance(); diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index 467efc4741..0c81afc361 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -44,7 +44,7 @@ #define __cdecl #endif -#ifdef __clang__ +#if JUCE_CLANG #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wshadow" @@ -65,7 +65,7 @@ #pragma warning (pop) #endif -#ifdef __clang__ +#if JUCE_CLANG #pragma clang diagnostic pop #endif @@ -121,7 +121,7 @@ namespace while (w != 0) { - HWND parent = getWindowParent (w); + auto parent = getWindowParent (w); if (parent == 0) break; @@ -136,8 +136,8 @@ namespace GetWindowRect (w, &windowPos); GetWindowRect (parent, &parentPos); - const int dw = (parentPos.right - parentPos.left) - (windowPos.right - windowPos.left); - const int dh = (parentPos.bottom - parentPos.top) - (windowPos.bottom - windowPos.top); + auto dw = (parentPos.right - parentPos.left) - (windowPos.right - windowPos.left); + auto dh = (parentPos.bottom - parentPos.top) - (windowPos.bottom - windowPos.top); if (dw > 100 || dh > 100) break; @@ -159,9 +159,8 @@ namespace struct SharedMessageThread : public Thread { - SharedMessageThread() - : Thread ("VstMessageThread"), - initialised (false) + SharedMessageThread () + : Thread ("VstMessageThread") { startThread (7); @@ -184,14 +183,15 @@ struct SharedMessageThread : public Thread MessageManager::getInstance()->setCurrentThreadAsMessageThread(); + ScopedXDisplay xDisplay; + while ((! threadShouldExit()) && MessageManager::getInstance()->runDispatchLoopUntil (250)) {} } juce_DeclareSingleton (SharedMessageThread, false) -private: - bool initialised; + bool initialised = false; }; juce_ImplementSingleton (SharedMessageThread) @@ -314,10 +314,6 @@ public: vstEffect.flags |= vstEffectFlagDataInChunks; - #if JUCE_LINUX - display = XWindowSystem::getInstance()->displayRef(); - #endif - activePlugins.add (this); } @@ -356,10 +352,6 @@ public: messageThreadIsDefinitelyCorrect = false; #endif } - - #if JUCE_LINUX - display = XWindowSystem::getInstance()->displayUnref(); - #endif } } @@ -484,7 +476,7 @@ public: if (! midiEvents.isEmpty()) { #if JucePlugin_ProducesMidiOutput || JucePlugin_IsMidiEffect - const int numEvents = midiEvents.getNumEvents(); + auto numEvents = midiEvents.getNumEvents(); outgoingEvents.ensureSize (numEvents); outgoingEvents.clear(); @@ -1042,10 +1034,8 @@ public: chunkMemoryTime = 0; } - #if JUCE_MAC - if (hostWindow != 0) - checkWindowVisibilityVST (hostWindow, editorComp, useNSView); - #endif + if (editorComp != nullptr) + editorComp->checkVisibility(); } void createEditorComp() @@ -1058,10 +1048,11 @@ public: if (auto* ed = processor->createEditorIfNeeded()) { vstEffect.flags |= vstEffectFlagHasEditor; - ed->setOpaque (true); - ed->setVisible (true); - editorComp = new EditorCompWrapper (*this, *ed); + + #if ! (JUCE_MAC || JUCE_IOS) + ed->setScaleFactor (editorScaleFactor); + #endif } else { @@ -1094,15 +1085,10 @@ public: } } - #if JUCE_MAC - if (hostWindow != 0) - { - detachComponentFromWindowRefVST (editorComp, hostWindow, useNSView); - hostWindow = 0; - } - #endif + editorComp->detachHostWindow(); - processor->editorBeingDeleted (editorComp->getEditorComp()); + if (auto* ed = editorComp->getEditorComp()) + processor->editorBeingDeleted (ed); editorComp = nullptr; @@ -1110,10 +1096,6 @@ public: // is trying to delete our plugin. You should try to avoid this happening.. jassert (Component::getCurrentlyModalComponent() == nullptr); } - - #if JUCE_LINUX - hostWindow = 0; - #endif } } @@ -1186,18 +1168,164 @@ public: return wrapper->dispatcher (opCode, args); } - void resizeHostWindow (int newWidth, int newHeight) + //============================================================================== + // A component to hold the AudioProcessorEditor, and cope with some housekeeping + // chores when it changes or repaints. + struct EditorCompWrapper : public Component { - if (editorComp != nullptr) + EditorCompWrapper (JuceVSTWrapper& w, AudioProcessorEditor& editor) : wrapper (w) + { + editor.setOpaque (true); + editor.setVisible (true); + setOpaque (true); + + setTopLeftPosition (editor.getPosition()); + editor.setTopLeftPosition (0, 0); + auto b = getLocalArea (&editor, editor.getLocalBounds()); + setSize (b.getWidth(), b.getHeight()); + + addAndMakeVisible (editor); + + #if JUCE_WINDOWS + if (! getHostType().isReceptor()) + addMouseListener (this, true); + #endif + + ignoreUnused (fakeMouseGenerator); + } + + ~EditorCompWrapper() + { + deleteAllChildren(); // note that we can't use a ScopedPointer because the editor may + // have been transferred to another parent which takes over ownership. + } + + void paint (Graphics&) override {} + + void getEditorBounds (VstEditorBounds& bounds) + { + auto b = getSizeToContainChild(); + + bounds.upper = 0; + bounds.leftmost = 0; + bounds.lower = (int16) b.getHeight(); + bounds.rightmost = (int16) b.getWidth(); + } + + void attachToHost (VstOpCodeArguments args) + { + setOpaque (true); + setVisible (false); + + #if JUCE_WINDOWS + addToDesktop (0, args.ptr); + hostWindow = (HWND) args.ptr; + #elif JUCE_LINUX + addToDesktop (0, args.ptr); + hostWindow = (Window) args.ptr; + XReparentWindow (display.display, (Window) getWindowHandle(), hostWindow, 0, 0); + #else + hostWindow = attachComponentToWindowRefVST (this, args.ptr, wrapper.useNSView); + #endif + + setVisible (true); + } + + void detachHostWindow() + { + #if JUCE_MAC + if (hostWindow != 0) + { + detachComponentFromWindowRefVST (this, hostWindow, wrapper.useNSView); + hostWindow = 0; + } + #endif + + #if JUCE_LINUX + hostWindow = 0; + #endif + } + + void checkVisibility() + { + #if JUCE_MAC + if (hostWindow != 0) + checkWindowVisibilityVST (hostWindow, this, wrapper.useNSView); + #endif + } + + AudioProcessorEditor* getEditorComp() const noexcept + { + return dynamic_cast (getChildComponent(0)); + } + + void resized() override + { + if (auto* ed = getEditorComp()) + { + ed->setTopLeftPosition (0, 0); + ed->setBounds (ed->getLocalArea (this, getLocalBounds())); + updateWindowSize(); + } + + #if JUCE_MAC && ! JUCE_64BIT + if (! wrapper.useNSView) + updateEditorCompBoundsVST (this); + #endif + } + + void childBoundsChanged (Component*) override + { + updateWindowSize(); + } + + juce::Rectangle getSizeToContainChild() + { + if (auto* ed = getEditorComp()) + return getLocalArea (ed, ed->getLocalBounds()); + + return {}; + } + + void updateWindowSize() + { + if (! isInSizeWindow) + { + if (auto* ed = getEditorComp()) + { + ed->setTopLeftPosition (0, 0); + auto pos = getSizeToContainChild(); + + #if JUCE_MAC + if (wrapper.useNSView) + setTopLeftPosition (0, getHeight() - pos.getHeight()); + #endif + + resizeHostWindow (pos.getWidth(), pos.getHeight()); + + #if ! JUCE_LINUX // setSize() on linux causes renoise and energyxt to fail. + setSize (pos.getWidth(), pos.getHeight()); + #else + XResizeWindow (display.display, (Window) getWindowHandle(), pos.getWidth(), pos.getHeight()); + #endif + + #if JUCE_MAC + resizeHostWindow (pos.getWidth(), pos.getHeight()); // (doing this a second time seems to be necessary in tracktion) + #endif + } + } + } + + void resizeHostWindow (int newWidth, int newHeight) { bool sizeWasSuccessful = false; - if (hostCallback != nullptr) + if (auto host = wrapper.hostCallback) { - if (hostCallback (&vstEffect, hostOpcodeCanHostDo, 0, 0, const_cast ("sizeWindow"), 0)) + if (host (wrapper.getVstEffectInterface(), hostOpcodeCanHostDo, 0, 0, const_cast ("sizeWindow"), 0)) { isInSizeWindow = true; - sizeWasSuccessful = (hostCallback (&vstEffect, hostOpcodeWindowSize, newWidth, newHeight, 0, 0) != 0); + sizeWasSuccessful = (host (wrapper.getVstEffectInterface(), hostOpcodeWindowSize, newWidth, newHeight, 0, 0) != 0); isInSizeWindow = false; } } @@ -1206,18 +1334,18 @@ public: { // some hosts don't support the sizeWindow call, so do it manually.. #if JUCE_MAC - setNativeHostWindowSizeVST (hostWindow, editorComp, newWidth, newHeight, useNSView); + setNativeHostWindowSizeVST (hostWindow, this, newWidth, newHeight, wrapper.useNSView); #elif JUCE_LINUX // (Currently, all linux hosts support sizeWindow, so this should never need to happen) - editorComp->setSize (newWidth, newHeight); + setSize (newWidth, newHeight); #else int dw = 0; int dh = 0; const int frameThickness = GetSystemMetrics (SM_CYFIXEDFRAME); - HWND w = (HWND) editorComp->getWindowHandle(); + HWND w = (HWND) getWindowHandle(); while (w != 0) { @@ -1257,101 +1385,10 @@ public: #endif } - if (auto* peer = editorComp->getPeer()) + if (auto* peer = getPeer()) { peer->handleMovedOrResized(); - peer->getComponent().repaint(); - } - } - } - - //============================================================================== - // A component to hold the AudioProcessorEditor, and cope with some housekeeping - // chores when it changes or repaints. - struct EditorCompWrapper : public Component - { - EditorCompWrapper (JuceVSTWrapper& w, AudioProcessorEditor& editor) : wrapper (w) - { - setOpaque (true); - editor.setOpaque (true); - - setBounds (editor.getBounds()); - editor.setTopLeftPosition (0, 0); - addAndMakeVisible (editor); - - #if JUCE_WINDOWS - if (! getHostType().isReceptor()) - addMouseListener (this, true); - #endif - - ignoreUnused (fakeMouseGenerator); - } - - ~EditorCompWrapper() - { - deleteAllChildren(); // note that we can't use a ScopedPointer because the editor may - // have been transferred to another parent which takes over ownership. - } - - void paint (Graphics&) override {} - - #if JUCE_MAC - bool keyPressed (const KeyPress&) override - { - // If we have an unused keypress, move the key-focus to a host window - // and re-inject the event.. - return forwardCurrentKeyEventToHostVST (this, wrapper.useNSView); - } - #endif - - AudioProcessorEditor* getEditorComp() const - { - return dynamic_cast (getChildComponent(0)); - } - - void resized() override - { - if (auto* editorChildComp = getChildComponent(0)) - editorChildComp->setBounds (getLocalBounds()); - - #if JUCE_MAC && ! JUCE_64BIT - if (! wrapper.useNSView) - updateEditorCompBoundsVST (this); - #endif - } - - void childBoundsChanged (Component* child) override - { - if (! wrapper.isInSizeWindow) - { - child->setTopLeftPosition (0, 0); - - const int cw = child->getWidth(); - const int ch = child->getHeight(); - - #if JUCE_MAC - if (wrapper.useNSView) - setTopLeftPosition (0, getHeight() - ch); - #endif - - wrapper.resizeHostWindow (cw, ch); - - #if ! JUCE_LINUX // setSize() on linux causes renoise and energyxt to fail. - setSize (cw, ch); - #else - const double scale = Desktop::getInstance().getDisplays().getDisplayContaining (getScreenBounds().getCentre()).scale; - Rectangle childBounds (child->getWidth(), child->getHeight()); - childBounds *= scale; - - { - ScopedXDisplay xDisplay; - XResizeWindow (xDisplay.display, (Window) getWindowHandle(), childBounds.getWidth(), childBounds.getHeight()); - } - #endif - - #if JUCE_MAC - wrapper.resizeHostWindow (cw, ch); // (doing this a second time seems to be necessary in tracktion) - #endif + repaint(); } } @@ -1371,12 +1408,27 @@ public: } #endif - private: + #if JUCE_MAC + bool keyPressed (const KeyPress&) override + { + // If we have an unused keypress, move the key-focus to a host window + // and re-inject the event.. + return forwardCurrentKeyEventToHostVST (this, wrapper.useNSView); + } + #endif + //============================================================================== JuceVSTWrapper& wrapper; FakeMouseMoveGenerator fakeMouseGenerator; + bool isInSizeWindow = false; - #if JUCE_WINDOWS + #if JUCE_MAC + void* hostWindow = {}; + #elif JUCE_LINUX + ScopedXDisplay display; + Window hostWindow = {}; + #else + HWND hostWindow = {}; WindowsHooks hooks; #endif @@ -1396,8 +1448,9 @@ private: VstEditorBounds editorBounds; MidiBuffer midiEvents; VSTMidiEventList outgoingEvents; + float editorScaleFactor = 1.0f; - bool isProcessing = false, isBypassed = false, hasShutdown = false, isInSizeWindow = false; + bool isProcessing = false, isBypassed = false, hasShutdown = false; bool firstProcessCallback = true, shouldDeleteEditor = false; #if JUCE_64BIT @@ -1412,15 +1465,6 @@ private: HeapBlock cachedInArrangement, cachedOutArrangement; - #if JUCE_MAC - void* hostWindow = {}; - #elif JUCE_LINUX - ::Display* display = {}; - Window hostWindow = {}; - #else - HWND hostWindow = {}; - #endif - static JuceVSTWrapper* getWrapper (VstEffectInterface* v) noexcept { return static_cast (v->effectPointer); } bool isProcessLevelOffline() @@ -1643,13 +1687,8 @@ private: if (editorComp != nullptr) { - editorBounds.upper = 0; - editorBounds.leftmost = 0; - editorBounds.lower = (int16) editorComp->getHeight(); - editorBounds.rightmost = (int16) editorComp->getWidth(); - + editorComp->getEditorBounds (editorBounds); *((VstEditorBounds**) args.ptr) = &editorBounds; - return (pointer_sized_int) &editorBounds; } @@ -1669,24 +1708,10 @@ private: if (editorComp != nullptr) { - editorComp->setOpaque (true); - editorComp->setVisible (false); - - #if JUCE_WINDOWS - editorComp->addToDesktop (0, args.ptr); - hostWindow = (HWND) args.ptr; - #elif JUCE_LINUX - editorComp->addToDesktop (0, args.ptr); - hostWindow = (Window) args.ptr; - Window editorWnd = (Window) editorComp->getWindowHandle(); - XReparentWindow (display, editorWnd, hostWindow, 0, 0); - #else - hostWindow = attachComponentToWindowRefVST (editorComp, args.ptr, useNSView); - #endif - editorComp->setVisible (true); - + editorComp->attachToHost (args); return 1; } + return 0; } @@ -1882,6 +1907,9 @@ private: if (handleManufacturerSpecificVST2Opcode (args.index, args.value, args.ptr, args.opt)) return 1; + if (args.index == presonusVendorID && args.value == presonusSetContentScaleFactor) + return handleSetContentScaleFactor (args.opt); + if (auto callbackHandler = dynamic_cast (processor)) return callbackHandler->handleVstManufacturerSpecific (args.index, args.value, args.ptr, args.opt); @@ -2013,6 +2041,27 @@ private: return 0; } + pointer_sized_int handleSetContentScaleFactor (float scale) + { + if (editorScaleFactor != scale) + { + editorScaleFactor = scale; + + #if ! (JUCE_MAC || JUCE_IOS) + if (editorComp != nullptr) + { + if (auto* ed = editorComp->getEditorComp()) + ed->setScaleFactor (editorScaleFactor); + + if (editorComp != nullptr) + editorComp->updateWindowSize(); + } + #endif + } + + return 1; + } + //============================================================================== pointer_sized_int handleGetNumMidiInputChannels() { diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index fcf37d65b5..8e65d8b732 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -34,15 +34,6 @@ #define JUCE_VST3HEADERS_INCLUDE_HEADERS_ONLY 1 #endif -#if (_WIN32 || _WIN64) - #if (_MSC_VER <= 1500) - // old VS2008 needs this to include the VST3 SDK - #ifndef nullptr - #define nullptr (0) - #endif - #endif -#endif - #include "../../juce_audio_processors/format_types/juce_VST3Headers.h" #undef JUCE_VST3HEADERS_INCLUDE_HEADERS_ONLY @@ -98,9 +89,7 @@ using namespace Steinberg; class JuceAudioProcessor : public FUnknown { public: - JuceAudioProcessor (AudioProcessor* source) noexcept - : isBypassed (false), refCount (0), audioProcessor (source) {} - + JuceAudioProcessor (AudioProcessor* source) noexcept : audioProcessor (source) {} virtual ~JuceAudioProcessor() {} AudioProcessor* get() const noexcept { return audioProcessor; } @@ -110,7 +99,7 @@ public: static const FUID iid; - bool isBypassed; + bool isBypassed = false; private: Atomic refCount; @@ -130,9 +119,6 @@ class JuceVST3EditController : public Vst::EditController, { public: JuceVST3EditController (Vst::IHostApplication* host) - #if ! JUCE_FORCE_USE_LEGACY_PARAM_IDS - : usingManagedParameter (false) - #endif { if (host != nullptr) host->queryInterface (FUnknown::iid, (void**) &hostContext); @@ -195,7 +181,7 @@ public: tresult PLUGIN_API terminate() override { - if (AudioProcessor* const pluginInstance = getPluginInstance()) + if (auto* pluginInstance = getPluginInstance()) pluginInstance->removeListener (this); audioProcessor = nullptr; @@ -255,7 +241,7 @@ public: void toString (Vst::ParamValue value, Vst::String128 result) const override { - if (AudioProcessorParameter* p = owner.getParameters()[paramIndex]) + if (auto* p = owner.getParameters()[paramIndex]) toString128 (result, p->getText ((float) value, 128)); else // remain backward-compatible with old JUCE code @@ -264,7 +250,7 @@ public: bool fromString (const Vst::TChar* text, Vst::ParamValue& outValueNormalized) const override { - if (AudioProcessorParameter* p = owner.getParameters()[paramIndex]) + if (auto* p = owner.getParameters()[paramIndex]) { outValueNormalized = p->getValueForText (getStringFromVstTChars (text)); return true; @@ -328,7 +314,7 @@ public: bool fromString (const Vst::TChar* text, Vst::ParamValue& outValueNormalized) const override { - const String paramValueString (getStringFromVstTChars (text)); + auto paramValueString = getStringFromVstTChars (text); if (paramValueString.equalsIgnoreCase ("on") || paramValueString.equalsIgnoreCase ("yes") @@ -382,7 +368,8 @@ public: toString128 (info.shortTitle, "Program"); toString128 (info.units, ""); info.stepCount = owner.getNumPrograms() - 1; - info.defaultNormalizedValue = static_cast (owner.getCurrentProgram()) / static_cast (info.stepCount); + info.defaultNormalizedValue = static_cast (owner.getCurrentProgram()) + / static_cast (info.stepCount); info.unitId = Vst::kRootUnitId; info.flags = Vst::ParameterInfo::kIsProgramChange | Vst::ParameterInfo::kCanAutomate; } @@ -408,15 +395,14 @@ public: void toString (Vst::ParamValue value, Vst::String128 result) const override { - Vst::ParamValue program = value * info.stepCount; - toString128 (result, owner.getProgramName ((int) program)); + toString128 (result, owner.getProgramName (static_cast (value * info.stepCount))); } bool fromString (const Vst::TChar* text, Vst::ParamValue& outValueNormalized) const override { - const String paramValueString (getStringFromVstTChars (text)); + auto paramValueString = getStringFromVstTChars (text); + auto n = owner.getNumPrograms(); - const int n = owner.getNumPrograms(); for (int i = 0; i < n; ++i) { if (paramValueString == owner.getProgramName (i)) @@ -431,7 +417,7 @@ public: static String getStringFromVstTChars (const Vst::TChar* text) { - return juce::String (juce::CharPointer_UTF16 (reinterpret_cast (text))); + return String (CharPointer_UTF16 (reinterpret_cast (text))); } Vst::ParamValue toPlain (Vst::ParamValue v) const override { return v * info.stepCount; } @@ -447,21 +433,23 @@ public: tresult PLUGIN_API setComponentState (IBStream* stream) override { // Cubase and Nuendo need to inform the host of the current parameter values - if (AudioProcessor* const pluginInstance = getPluginInstance()) + if (auto* pluginInstance = getPluginInstance()) { - const int numParameters = pluginInstance->getNumParameters(); + auto numParameters = pluginInstance->getNumParameters(); for (int i = 0; i < numParameters; ++i) setParamNormalized (getVSTParamIDForIndex (i), (double) pluginInstance->getParameter (i)); setParamNormalized (bypassParamID, audioProcessor->isBypassed ? 1.0f : 0.0f); - const int numPrograms = pluginInstance->getNumPrograms(); + auto numPrograms = pluginInstance->getNumPrograms(); + if (numPrograms > 1) - setParamNormalized (paramPreset, static_cast (pluginInstance->getCurrentProgram()) / static_cast (numPrograms - 1)); + setParamNormalized (paramPreset, static_cast (pluginInstance->getCurrentProgram()) + / static_cast (numPrograms - 1)); } - if (Vst::IComponentHandler* handler = getComponentHandler()) + if (auto* handler = getComponentHandler()) handler->restartComponent (Vst::kParamValuesChanged); return Vst::EditController::setComponentState (stream); @@ -480,7 +468,7 @@ public: { if (other != nullptr && audioProcessor == nullptr) { - const tresult result = ComponentBase::connect (other); + auto result = ComponentBase::connect (other); if (! audioProcessor.loadFrom (other)) sendIntMessage ("JuceVST3EditController", (Steinberg::int64) (pointer_sized_int) this); @@ -506,15 +494,15 @@ public: // Converts an incoming parameter index to a MIDI controller: bool getMidiControllerForParameter (Vst::ParamID index, int& channel, int& ctrlNumber) { - const int mappedIndex = static_cast (index - parameterToMidiControllerOffset); + auto mappedIndex = static_cast (index - parameterToMidiControllerOffset); if (isPositiveAndBelow (mappedIndex, numElementsInArray (parameterToMidiController))) { - const MidiController& mc = parameterToMidiController[mappedIndex]; + auto& mc = parameterToMidiController[mappedIndex]; if (mc.channel != -1 && mc.ctrlNumber != -1) { - channel = jlimit (1, 16, mc.channel + 1); + channel = jlimit (1, 16, mc.channel + 1); ctrlNumber = mc.ctrlNumber; return true; } @@ -533,7 +521,7 @@ public: //============================================================================== IPlugView* PLUGIN_API createView (const char* name) override { - if (AudioProcessor* const pluginInstance = getPluginInstance()) + if (auto* pluginInstance = getPluginInstance()) { if (pluginInstance->hasEditor() && name != nullptr && strcmp (name, Vst::ViewType::kEditor) == 0) @@ -547,6 +535,7 @@ public: //============================================================================== void audioProcessorParameterChangeGestureBegin (AudioProcessor*, int index) override { beginEdit (getVSTParamIDForIndex (index)); } + void audioProcessorParameterChangeGestureEnd (AudioProcessor*, int index) override { endEdit (getVSTParamIDForIndex (index)); } void audioProcessorParameterChanged (AudioProcessor*, int index, float newValue) override { @@ -555,11 +544,9 @@ public: performEdit (getVSTParamIDForIndex (index), (double) newValue); } - void audioProcessorParameterChangeGestureEnd (AudioProcessor*, int index) override { endEdit (getVSTParamIDForIndex (index)); } - void audioProcessorChanged (AudioProcessor*) override { - if (AudioProcessor* pluginInstance = getPluginInstance()) + if (auto* pluginInstance = getPluginInstance()) { if (pluginInstance->getNumPrograms() > 1) EditController::setParamNormalized (paramPreset, static_cast (pluginInstance->getCurrentProgram()) @@ -580,7 +567,6 @@ public: } private: - friend class JuceVST3Component; //============================================================================== @@ -589,9 +575,7 @@ private: struct MidiController { - MidiController() noexcept : channel (-1), ctrlNumber (-1) {} - - int channel, ctrlNumber; + int channel = -1, ctrlNumber = -1; }; enum { numMIDIChannels = 16 }; @@ -601,7 +585,7 @@ private: //============================================================================== #if ! JUCE_FORCE_USE_LEGACY_PARAM_IDS - bool usingManagedParameter; + bool usingManagedParameter = false; Array vstParamIDs; #endif Vst::ParamID bypassParamID; @@ -610,7 +594,7 @@ private: //============================================================================== void setupParameters() { - if (AudioProcessor* const pluginInstance = getPluginInstance()) + if (auto* pluginInstance = getPluginInstance()) { pluginInstance->addListener (this); @@ -620,7 +604,7 @@ private: if (parameters.getParameterCount() <= 0) { - const int numParameters = pluginInstance->getNumParameters(); + auto numParameters = pluginInstance->getNumParameters(); #if ! JUCE_FORCE_USE_LEGACY_PARAM_IDS usingManagedParameter = (pluginInstance->getParameters().size() == numParameters); @@ -677,7 +661,7 @@ private: { jassert (hostContext != nullptr); - if (Vst::IMessage* message = allocateMessage()) + if (auto* message = allocateMessage()) { const FReleaser releaser (message); message->setMessageID (idTag); @@ -699,9 +683,9 @@ private: if (isPositiveAndBelow (paramIndex, n)) { - const String& juceParamID = pluginFilter->getParameterID (paramIndex); + auto juceParamID = pluginFilter->getParameterID (paramIndex); + auto paramHash = static_cast (juceParamID.hashCode()); - Vst::ParamID paramHash = static_cast (juceParamID.hashCode()); #if JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS // studio one doesn't like negative parameters paramHash &= ~(1 << (sizeof (Vst::ParamID) * 8 - 1)); @@ -722,21 +706,26 @@ private: #endif //============================================================================== - class JuceVST3Editor : public Vst::EditorView, private Timer + class JuceVST3Editor : public Vst::EditorView, + public Steinberg::IPlugViewContentScaleSupport, + private Timer { public: JuceVST3Editor (JuceVST3EditController& ec, AudioProcessor& p) : Vst::EditorView (&ec, nullptr), owner (&ec), pluginInstance (p) { - #if JUCE_MAC - macHostWindow = nullptr; - isNSView = false; - #endif - component = new ContentWrapperComponent (*this, p); } + tresult PLUGIN_API queryInterface (const TUID targetIID, void** obj) override + { + TEST_FOR_AND_RETURN_IF_VALID (targetIID, Steinberg::IPlugViewContentScaleSupport) + return Vst::EditorView::queryInterface (targetIID, obj); + } + + REFCOUNT_METHODS (Vst::EditorView) + //============================================================================== tresult PLUGIN_API isPlatformTypeSupported (FIDString type) override { @@ -810,7 +799,8 @@ private: if (component != nullptr) { component->setSize (rect.getWidth(), rect.getHeight()); - if (ComponentPeer* const peer = component->getPeer()) + + if (auto* peer = component->getPeer()) peer->updateBounds(); } @@ -835,7 +825,7 @@ private: tresult PLUGIN_API canResize() override { if (component != nullptr) - if (AudioProcessorEditor* editor = component->pluginEditor) + if (auto* editor = component->pluginEditor.get()) return editor->isResizable() ? kResultTrue : kResultFalse; return kResultFalse; @@ -846,12 +836,23 @@ private: if (rectToCheck != nullptr && component != nullptr) { // checkSizeConstraint - Rectangle juceRect = Rectangle::leftTopRightBottom (rectToCheck->left, rectToCheck->top, - rectToCheck->right, rectToCheck->bottom); - if (AudioProcessorEditor* editor = component->pluginEditor) - if (ComponentBoundsConstrainer* constrainer = editor->getConstrainer()) - juceRect.setSize (jlimit (constrainer->getMinimumWidth(), constrainer->getMaximumWidth(), juceRect.getWidth()), - jlimit (constrainer->getMinimumHeight(), constrainer->getMaximumHeight(), juceRect.getHeight())); + auto juceRect = Rectangle::leftTopRightBottom (rectToCheck->left, rectToCheck->top, + rectToCheck->right, rectToCheck->bottom); + + if (auto* editor = component->pluginEditor.get()) + { + if (auto* constrainer = editor->getConstrainer()) + { + auto scaledMin = component->getLocalArea (editor, Rectangle (constrainer->getMinimumWidth(), + constrainer->getMinimumHeight())); + + auto scaledMax = component->getLocalArea (editor, Rectangle (constrainer->getMaximumWidth(), + constrainer->getMaximumHeight())); + + juceRect.setSize (jlimit (scaledMin.getWidth(), scaledMax.getWidth(), juceRect.getWidth()), + jlimit (scaledMin.getHeight(), scaledMax.getHeight(), juceRect.getHeight())); + } + } rectToCheck->right = rectToCheck->left + juceRect.getWidth(); rectToCheck->bottom = rectToCheck->top + juceRect.getHeight(); @@ -863,6 +864,21 @@ private: return kResultFalse; } + tresult PLUGIN_API setContentScaleFactor (Steinberg::IPlugViewContentScaleSupport::ScaleFactor factor) override + { + #if (JUCE_MAC || JUCE_IOS) + ignoreUnused (factor); + #else + if (auto* editor = component->pluginEditor.get()) + { + editor->setScaleFactor (factor); + return kResultTrue; + } + #endif + + return kResultFalse; + } + private: void timerCallback() override { @@ -874,9 +890,8 @@ private: } //============================================================================== - class ContentWrapperComponent : public Component + struct ContentWrapperComponent : public Component { - public: ContentWrapperComponent (JuceVST3Editor& editor, AudioProcessor& plugin) : pluginEditor (plugin.createEditorIfNeeded()), owner (editor) @@ -891,8 +906,11 @@ private: { addAndMakeVisible (pluginEditor); - lastBounds = pluginEditor->getLocalBounds(); + pluginEditor->setTopLeftPosition (0, 0); + lastBounds = getSizeToContainChild(); + isResizingParentToFitChild = true; setBounds (lastBounds); + isResizingParentToFitChild = false; resizeHostWindow(); } @@ -914,12 +932,27 @@ private: g.fillAll (Colours::black); } - void childBoundsChanged (Component* childComponent) override + juce::Rectangle getSizeToContainChild() { - if (lastBounds != childComponent->getLocalBounds()) + if (pluginEditor != nullptr) + return getLocalArea (pluginEditor, pluginEditor->getLocalBounds()); + + return {}; + } + + void childBoundsChanged (Component*) override + { + if (isResizingChildToFitParent) + return; + + auto b = getSizeToContainChild(); + + if (lastBounds != b) { - lastBounds = childComponent->getLocalBounds(); + lastBounds = b; + isResizingParentToFitChild = true; resizeHostWindow(); + isResizingParentToFitChild = false; } } @@ -927,8 +960,14 @@ private: { if (pluginEditor != nullptr) { - lastBounds = getLocalBounds(); - pluginEditor->setBounds (lastBounds); + if (! isResizingParentToFitChild) + { + lastBounds = getLocalBounds(); + isResizingChildToFitParent = true; + pluginEditor->setTopLeftPosition (0, 0); + pluginEditor->setBounds (pluginEditor->getLocalArea (this, getLocalBounds())); + isResizingChildToFitParent = false; + } } } @@ -936,9 +975,10 @@ private: { if (pluginEditor != nullptr) { - const int w = pluginEditor->getWidth(); - const int h = pluginEditor->getHeight(); - const PluginHostType host (getHostType()); + auto b = getSizeToContainChild(); + auto w = b.getWidth(); + auto h = b.getHeight(); + auto host = getHostType(); #if JUCE_WINDOWS setSize (w, h); @@ -950,7 +990,9 @@ private: if (owner.plugFrame != nullptr) { ViewRect newSize (0, 0, w, h); + isResizingParentToFitChild = true; owner.plugFrame->resizeView (&owner, &newSize); + isResizingParentToFitChild = false; #if JUCE_MAC if (host.isWavelab() || host.isReaper()) @@ -968,6 +1010,8 @@ private: JuceVST3Editor& owner; FakeMouseMoveGenerator fakeMouseGenerator; Rectangle lastBounds; + bool isResizingChildToFitParent = false; + bool isResizingParentToFitChild = false; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ContentWrapperComponent) }; @@ -977,11 +1021,11 @@ private: AudioProcessor& pluginInstance; ScopedPointer component; - friend class ContentWrapperComponent; + friend struct ContentWrapperComponent; #if JUCE_MAC - void* macHostWindow; - bool isNSView; + void* macHostWindow = nullptr; + bool isNSView = false; #endif #if JUCE_WINDOWS @@ -1018,22 +1062,11 @@ class JuceVST3Component : public Vst::IComponent, { public: JuceVST3Component (Vst::IHostApplication* h) - : refCount (1), - pluginInstance (createPluginFilterOfType (AudioProcessor::wrapperType_VST3)), - host (h), - isMidiInputBusEnabled (false), - isMidiOutputBusEnabled (false) + : pluginInstance (createPluginFilterOfType (AudioProcessor::wrapperType_VST3)), + host (h) { - #if JucePlugin_WantsMidiInput - isMidiInputBusEnabled = true; - #endif - - #if JucePlugin_ProducesMidiOutput - isMidiOutputBusEnabled = true; - #endif - #ifdef JucePlugin_PreferredChannelConfigurations - short configs[][2] = {JucePlugin_PreferredChannelConfigurations}; + short configs[][2] = { JucePlugin_PreferredChannelConfigurations }; const int numConfigs = sizeof (configs) / sizeof (short[2]); jassert (numConfigs > 0 && (configs[0][0] > 0 || configs[0][1] > 0)); @@ -1171,8 +1204,8 @@ public: } else { - double sampleRate = getPluginInstance().getSampleRate(); - int bufferSize = getPluginInstance().getBlockSize(); + auto sampleRate = getPluginInstance().getSampleRate(); + auto bufferSize = getPluginInstance().getBlockSize(); sampleRate = processSetup.sampleRate > 0.0 ? processSetup.sampleRate @@ -1194,8 +1227,8 @@ public: tresult PLUGIN_API setIoMode (Vst::IoMode) override { return kNotImplemented; } tresult PLUGIN_API getRoutingInfo (Vst::RoutingInfo&, Vst::RoutingInfo&) override { return kNotImplemented; } - bool isBypassed() { return comPluginInstance->isBypassed; } - void setBypassed (bool bypassed) { comPluginInstance->isBypassed = bypassed; } + bool isBypassed() { return comPluginInstance->isBypassed; } + void setBypassed (bool bypassed) { comPluginInstance->isBypassed = bypassed; } //============================================================================== void writeJucePrivateStateInformation (MemoryOutputStream& out) @@ -1210,7 +1243,7 @@ public: void setJucePrivateStateInformation (const void* data, int sizeInBytes) { - ValueTree privateData = ValueTree::readFromData (data, static_cast (sizeInBytes)); + auto privateData = ValueTree::readFromData (data, static_cast (sizeInBytes)); setBypassed (static_cast (privateData.getProperty ("Bypass", var (false)))); } @@ -1228,7 +1261,7 @@ public: extraData.writeInt64 (0); writeJucePrivateStateInformation (extraData); - const int64 privateDataSize = (int64) (extraData.getDataSize() - sizeof (int64)); + auto privateDataSize = (int64) (extraData.getDataSize() - sizeof (int64)); extraData.writeInt64 (privateDataSize); extraData << kJucePrivateDataIdentifier; @@ -1242,11 +1275,11 @@ public: // Check if this data was written with a newer JUCE version // and if it has the JUCE private data magic code at the end - const size_t jucePrivDataIdentifierSize = std::strlen (kJucePrivateDataIdentifier); + auto jucePrivDataIdentifierSize = std::strlen (kJucePrivateDataIdentifier); if ((size_t) size >= jucePrivDataIdentifierSize + sizeof (int64)) { - const char* buffer = static_cast (data); + auto buffer = static_cast (data); String magic (CharPointer_UTF8 (buffer + size - jucePrivDataIdentifierSize), CharPointer_UTF8 (buffer + size)); @@ -1278,9 +1311,9 @@ public: #if JUCE_VST3_CAN_REPLACE_VST2 void loadVST2VstWBlock (const char* data, int size) { - const int headerLen = static_cast (htonl (*(juce::int32*) (data + 4))); - const vst2FxBank* bank = (const vst2FxBank*) (data + (8 + headerLen)); - const int version = static_cast (htonl (bank->version1)); ignoreUnused (version); + auto headerLen = static_cast (htonl (*(juce::int32*) (data + 4))); + auto bank = (const vst2FxBank*) (data + (8 + headerLen)); + auto version = static_cast (htonl (bank->version1)); ignoreUnused (version); jassert ('VstW' == htonl (*(juce::int32*) data)); jassert (1 == htonl (*(juce::int32*) (data + 8))); // version should be 1 according to Steinberg's docs @@ -1301,14 +1334,14 @@ public: // At offset 4 there's a little-endian version number which seems to typically be 1 // At offset 8 there's 32 bytes the SDK calls "ASCII-encoded class id" - const int chunkListOffset = (int) ByteOrder::littleEndianInt (data + 40); + auto chunkListOffset = (int) ByteOrder::littleEndianInt (data + 40); jassert (memcmp (data + chunkListOffset, "List", 4) == 0); - const int entryCount = (int) ByteOrder::littleEndianInt (data + chunkListOffset + 4); + auto entryCount = (int) ByteOrder::littleEndianInt (data + chunkListOffset + 4); jassert (entryCount > 0); for (int i = 0; i < entryCount; ++i) { - const int entryOffset = chunkListOffset + 8 + 20 * i; + auto entryOffset = chunkListOffset + 8 + 20 * i; if (entryOffset + 20 > size) return false; @@ -1316,8 +1349,8 @@ public: if (memcmp (data + entryOffset, "Comp", 4) == 0) { // "Comp" entries seem to contain the data. - juce::uint64 chunkOffset = ByteOrder::littleEndianInt64 (data + entryOffset + 4); - juce::uint64 chunkSize = ByteOrder::littleEndianInt64 (data + entryOffset + 12); + auto chunkOffset = ByteOrder::littleEndianInt64 (data + entryOffset + 4); + auto chunkSize = ByteOrder::littleEndianInt64 (data + entryOffset + 12); if (chunkOffset + chunkSize > static_cast (size)) { @@ -1413,7 +1446,7 @@ public: for (;;) { Steinberg::int32 bytesRead = 0; - const Steinberg::tresult status = state->read (buffer, (Steinberg::int32) bytesPerBlock, &bytesRead); + auto status = state->read (buffer, (Steinberg::int32) bytesPerBlock, &bytesRead); if (bytesRead <= 0 || (status != kResultTrue && ! getHostType().isWavelab())) break; @@ -1439,6 +1472,7 @@ public: { if (! getHostType().isFruityLoops() && readFromMemoryStream (state)) return kResultTrue; + if (readFromUnknownStream (state)) return kResultTrue; } @@ -1664,7 +1698,7 @@ public: if (index < 0 || index >= getNumAudioBuses (dir == Vst::kInput)) return kResultFalse; - if (const AudioProcessor::Bus* bus = pluginInstance->getBus (dir == Vst::kInput, index)) + if (auto* bus = pluginInstance->getBus (dir == Vst::kInput, index)) { info.mediaType = Vst::kAudio; info.direction = dir; @@ -1735,24 +1769,22 @@ public: if (index < 0 || index >= getNumAudioBuses (dir == Vst::kInput)) return kResultFalse; - if (AudioProcessor::Bus* bus = pluginInstance->getBus (dir == Vst::kInput, index)) + if (auto* bus = pluginInstance->getBus (dir == Vst::kInput, index)) { #ifdef JucePlugin_PreferredChannelConfigurations - AudioProcessor::BusesLayout newLayout = pluginInstance->getBusesLayout(); - AudioChannelSet targetLayout - = (state != 0 ? bus->getLastEnabledLayout() : AudioChannelSet::disabled()); + auto newLayout = pluginInstance->getBusesLayout(); + auto targetLayout = (state != 0 ? bus->getLastEnabledLayout() : AudioChannelSet::disabled()); (dir == Vst::kInput ? newLayout.inputBuses : newLayout.outputBuses).getReference (index) = targetLayout; - short configs[][2] = {JucePlugin_PreferredChannelConfigurations}; - AudioProcessor::BusesLayout compLayout - = pluginInstance->getNextBestLayoutInLayoutList (newLayout, configs); + short configs[][2] = { JucePlugin_PreferredChannelConfigurations }; + auto compLayout = pluginInstance->getNextBestLayoutInLayoutList (newLayout, configs); if ((dir == Vst::kInput ? compLayout.inputBuses : compLayout.outputBuses).getReference (index) != targetLayout) return kResultFalse; #endif - return (bus->enable (state != 0) ? kResultTrue : kResultFalse); + return bus->enable (state != 0) ? kResultTrue : kResultFalse; } } @@ -1761,10 +1793,10 @@ public: bool checkBusFormatsAreNotDiscrete() { - const int numInputBuses = pluginInstance->getBusCount (true); - const int numOutputBuses = pluginInstance->getBusCount (false); + auto numInputBuses = pluginInstance->getBusCount (true); + auto numOutputBuses = pluginInstance->getBusCount (false); - for (int i = 0; i < numInputBuses; ++i) + for (int i = 0; i < numInputBuses; ++i) if (pluginInstance->getChannelLayoutOfBus (true, i).isDiscreteLayout()) return false; @@ -1778,13 +1810,13 @@ public: tresult PLUGIN_API setBusArrangements (Vst::SpeakerArrangement* inputs, Steinberg::int32 numIns, Vst::SpeakerArrangement* outputs, Steinberg::int32 numOuts) override { - const int numInputBuses = pluginInstance->getBusCount (true); - const int numOutputBuses = pluginInstance->getBusCount (false); + auto numInputBuses = pluginInstance->getBusCount (true); + auto numOutputBuses = pluginInstance->getBusCount (false); if (numIns > numInputBuses || numOuts > numOutputBuses) return false; - AudioProcessor::BusesLayout requested = pluginInstance->getBusesLayout(); + auto requested = pluginInstance->getBusesLayout(); for (int i = 0; i < numIns; ++i) requested.getChannelSet (true, i) = getChannelSetForSpeakerArrangement (inputs[i]); @@ -1793,17 +1825,17 @@ public: requested.getChannelSet (false, i) = getChannelSetForSpeakerArrangement (outputs[i]); #ifdef JucePlugin_PreferredChannelConfigurations - short configs[][2] = {JucePlugin_PreferredChannelConfigurations}; + short configs[][2] = { JucePlugin_PreferredChannelConfigurations }; if (! AudioProcessor::containsLayout (requested, configs)) return kResultFalse; #endif - return (pluginInstance->setBusesLayoutWithoutEnabling (requested) ? kResultTrue : kResultFalse); + return pluginInstance->setBusesLayoutWithoutEnabling (requested) ? kResultTrue : kResultFalse; } tresult PLUGIN_API getBusArrangement (Vst::BusDirection dir, Steinberg::int32 index, Vst::SpeakerArrangement& arr) override { - if (AudioProcessor::Bus* bus = pluginInstance->getBus (dir == Vst::kInput, index)) + if (auto* bus = pluginInstance->getBus (dir == Vst::kInput, index)) { arr = getVst3SpeakerArrangement (bus->getLastEnabledLayout()); return kResultTrue; @@ -1852,7 +1884,7 @@ public: Steinberg::uint32 PLUGIN_API getTailSamples() override { - const double tailLengthSeconds = getPluginInstance().getTailLengthSeconds(); + auto tailLengthSeconds = getPluginInstance().getTailLengthSeconds(); if (tailLengthSeconds <= 0.0 || processSetup.sampleRate > 0.0) return Vst::kNoTail; @@ -1865,20 +1897,20 @@ public: { jassert (pluginInstance != nullptr); - const Steinberg::int32 numParamsChanged = paramChanges.getParameterCount(); + auto numParamsChanged = paramChanges.getParameterCount(); for (Steinberg::int32 i = 0; i < numParamsChanged; ++i) { - if (Vst::IParamValueQueue* paramQueue = paramChanges.getParameterData (i)) + if (auto* paramQueue = paramChanges.getParameterData (i)) { - const Steinberg::int32 numPoints = paramQueue->getPointCount(); + auto numPoints = paramQueue->getPointCount(); - Steinberg::int32 offsetSamples; + Steinberg::int32 offsetSamples = 0; double value = 0.0; - if (paramQueue->getPoint (numPoints - 1, offsetSamples, value) == kResultTrue) + if (paramQueue->getPoint (numPoints - 1, offsetSamples, value) == kResultTrue) { - const Vst::ParamID vstParamID = paramQueue->getParameterId(); + auto vstParamID = paramQueue->getParameterId(); if (vstParamID == vstBypassParameterId) setBypassed (static_cast (value) != 0.0f); @@ -1888,16 +1920,17 @@ public: #endif else if (vstParamID == JuceVST3EditController::paramPreset) { - const int numPrograms = pluginInstance->getNumPrograms(); - const int programValue = roundToInt (value * numPrograms); + auto numPrograms = pluginInstance->getNumPrograms(); + auto programValue = roundToInt (value * (jmax (0, numPrograms - 1))); if (numPrograms > 1 && isPositiveAndBelow (programValue, numPrograms) - && programValue != pluginInstance->getCurrentProgram()) + && programValue != pluginInstance->getCurrentProgram()) pluginInstance->setCurrentProgram (programValue); } else { - const int index = getJuceIndexForVSTParamID (vstParamID); + auto index = getJuceIndexForVSTParamID (vstParamID); + if (isPositiveAndBelow (index, pluginInstance->getNumParameters())) pluginInstance->setParameter (index, static_cast (value)); } @@ -1928,7 +1961,6 @@ public: tresult PLUGIN_API process (Vst::ProcessData& data) override { - if (pluginInstance == nullptr) return kResultFalse; @@ -1971,7 +2003,7 @@ public: private: //============================================================================== - Atomic refCount; + Atomic refCount { 1 }; AudioProcessor* pluginInstance; ComSmartPtr host; @@ -1992,7 +2024,17 @@ private: AudioBuffer emptyBufferFloat; AudioBuffer emptyBufferDouble; - bool isMidiInputBusEnabled, isMidiOutputBusEnabled; + #if JucePlugin_WantsMidiInput + bool isMidiInputBusEnabled = true; + #else + bool isMidiInputBusEnabled = false; + #endif + + #if JucePlugin_ProducesMidiOutput + bool isMidiOutputBusEnabled = true; + #else + bool isMidiOutputBusEnabled = false; + #endif ScopedJuceInitialiser_GUI libraryInitialiser; @@ -2009,11 +2051,11 @@ private: template void processAudio (Vst::ProcessData& data, Array& channelList) { - int totalInputChans = 0; + int totalInputChans = 0, totalOutputChans = 0; bool tmpBufferNeedsClearing = false; - const int plugInInputChannels = pluginInstance->getTotalNumInputChannels(); - const int plugInOutputChannels = pluginInstance->getTotalNumOutputChannels(); + auto plugInInputChannels = pluginInstance->getTotalNumInputChannels(); + auto plugInOutputChannels = pluginInstance->getTotalNumOutputChannels(); // Wavelab workaround: wave-lab lies on the number of inputs/outputs so re-count here int vstInputs; @@ -2029,63 +2071,24 @@ private: break; { - const int n = jmax (vstInputs, getNumAudioBuses (true)); - - for (int bus = 0; bus < n && totalInputChans < plugInInputChannels; ++bus) - { - if (bus < vstInputs) - { - if (FloatType** const busChannels = getPointerForAudioBus (data.inputs[bus])) - { - const int numChans = jmin ((int) data.inputs[bus].numChannels, plugInInputChannels - totalInputChans); - - for (int i = 0; i < numChans; ++i) - if (busChannels[i] != nullptr) - channelList.set (totalInputChans++, busChannels[i]); - } - } - else - { - const int numChans = jmin (pluginInstance->getChannelCountOfBus (true, bus), plugInInputChannels - totalInputChans); - - for (int i = 0; i < numChans; ++i) - { - if (FloatType* tmpBuffer = getTmpBufferForChannel (totalInputChans, data.numSamples)) - { - tmpBufferNeedsClearing = true; - channelList.set (totalInputChans++, tmpBuffer); - } - else - return; - } - } - } - } - - int totalOutputChans = 0; - - { - const int n = jmax (vstOutputs, getNumAudioBuses (false)); + auto n = jmax (vstOutputs, getNumAudioBuses (false)); for (int bus = 0; bus < n && totalOutputChans < plugInOutputChannels; ++bus) { if (bus < vstOutputs) { - if (FloatType** const busChannels = getPointerForAudioBus (data.outputs[bus])) + if (auto** const busChannels = getPointerForAudioBus (data.outputs[bus])) { - const int numChans = jmin ((int) data.outputs[bus].numChannels, plugInOutputChannels - totalOutputChans); + auto numChans = jmin ((int) data.outputs[bus].numChannels, plugInOutputChannels - totalOutputChans); for (int i = 0; i < numChans; ++i) { - if (busChannels[i] != nullptr) + if (auto dst = busChannels[i]) { - if (totalOutputChans >= totalInputChans) - { - FloatVectorOperations::clear (busChannels[i], data.numSamples); - channelList.set (totalOutputChans, busChannels[i]); - } + if (totalOutputChans >= plugInInputChannels) + FloatVectorOperations::clear (dst, (int) data.numSamples); - ++totalOutputChans; + channelList.set (totalOutputChans++, busChannels[i]); } } } @@ -2096,15 +2099,59 @@ private: for (int i = 0; i < numChans; ++i) { - if (FloatType* tmpBuffer = getTmpBufferForChannel (totalOutputChans, data.numSamples)) + if (auto* tmpBuffer = getTmpBufferForChannel (totalOutputChans, data.numSamples))\ { - if (totalOutputChans >= totalInputChans) + tmpBufferNeedsClearing = true; + channelList.set (totalOutputChans++, tmpBuffer); + } + else + return; + } + } + } + } + + { + auto n = jmax (vstInputs, getNumAudioBuses (true)); + + for (int bus = 0; bus < n && totalInputChans < plugInInputChannels; ++bus) + { + if (bus < vstInputs) + { + if (auto** const busChannels = getPointerForAudioBus (data.inputs[bus])) + { + const int numChans = jmin ((int) data.inputs[bus].numChannels, plugInInputChannels - totalInputChans); + + for (int i = 0; i < numChans; ++i) + { + if (busChannels[i] != nullptr) { - tmpBufferNeedsClearing = true; - channelList.set (totalOutputChans, tmpBuffer); + if (totalInputChans >= totalOutputChans) + channelList.set (totalInputChans, busChannels[i]); + else + { + auto* dst = channelList.getReference (totalInputChans); + auto* src = busChannels[i]; + + if (dst != src) + FloatVectorOperations::copy (dst, src, (int) data.numSamples); + } } - ++totalOutputChans; + ++totalInputChans; + } + } + } + else + { + auto numChans = jmin (pluginInstance->getChannelCountOfBus (true, bus), plugInInputChannels - totalInputChans); + + for (int i = 0; i < numChans; ++i) + { + if (auto* tmpBuffer = getTmpBufferForChannel (totalInputChans, data.numSamples)) + { + tmpBufferNeedsClearing = true; + channelList.set (totalInputChans++, tmpBuffer); } else return; @@ -2167,29 +2214,6 @@ private: jassert (midiBuffer.getNumEvents() <= numMidiEventsComingIn); #endif } - - if (data.outputs != nullptr) - { - int outChanIndex = 0; - - for (int bus = 0; bus < data.numOutputs; ++bus) - { - if (FloatType** const busChannels = getPointerForAudioBus (data.outputs[bus])) - { - const int numChans = (int) data.outputs[bus].numChannels; - - for (int i = 0; i < numChans; ++i) - { - if (outChanIndex < totalInputChans && busChannels[i] != nullptr) - FloatVectorOperations::copy (busChannels[i], buffer.getReadPointer (outChanIndex), (int) data.numSamples); - else if (outChanIndex >= totalOutputChans && busChannels[i] != nullptr) - FloatVectorOperations::clear (busChannels[i], (int) data.numSamples); - - ++outChanIndex; - } - } - } - } } //============================================================================== @@ -2199,7 +2223,7 @@ private: channelList.clearQuick(); channelList.insertMultiple (0, nullptr, 128); - const AudioProcessor& p = getPluginInstance(); + auto& p = getPluginInstance(); buffer.setSize (jmax (p.getTotalNumInputChannels(), p.getTotalNumOutputChannels()), p.getBlockSize() * 4); buffer.clear(); } @@ -2221,7 +2245,7 @@ private: template FloatType* getTmpBufferForChannel (int channel, int numSamples) noexcept { - AudioBuffer& buffer = ChooseBufferHelper::impl (emptyBufferFloat, emptyBufferDouble); + auto& buffer = ChooseBufferHelper::impl (emptyBufferFloat, emptyBufferDouble); // we can't do anything if the host requests to render many more samples than the // block size, we need to bail out @@ -2233,7 +2257,7 @@ private: void preparePlugin (double sampleRate, int bufferSize) { - AudioProcessor& p = getPluginInstance(); + auto& p = getPluginInstance(); p.setRateAndBufferSizeDetails (sampleRate, bufferSize); p.prepareToPlay (sampleRate, bufferSize); @@ -2253,12 +2277,11 @@ private: for (int i = 0; i < numParameters; ++i) { - const Vst::ParamID paramID = JuceVST3EditController::generateVSTParamIDForIndex (pluginInstance, i); + auto paramID = JuceVST3EditController::generateVSTParamIDForIndex (pluginInstance, i); // Consider yourself very unlucky if you hit this assertion. The hash code of your // parameter ids are not unique. - jassert (! vstParamIDs.contains (static_cast (paramID))); - + jassert (! vstParamIDs.contains (paramID)); vstParamIDs.add (paramID); paramMap.set (static_cast (paramID), i); @@ -2401,25 +2424,23 @@ typedef FUnknown* (*CreateFunction) (Vst::IHostApplication*); static FUnknown* createComponentInstance (Vst::IHostApplication* host) { - return (Vst::IAudioProcessor*) new JuceVST3Component (host); + return static_cast (new JuceVST3Component (host)); } static FUnknown* createControllerInstance (Vst::IHostApplication* host) { - return (Vst::IEditController*) new JuceVST3EditController (host); + return static_cast (new JuceVST3EditController (host)); } //============================================================================== -class JucePluginFactory; +struct JucePluginFactory; static JucePluginFactory* globalFactory = nullptr; //============================================================================== -class JucePluginFactory : public IPluginFactory3 +struct JucePluginFactory : public IPluginFactory3 { -public: JucePluginFactory() - : refCount (1), - factoryInfo (JucePlugin_Manufacturer, JucePlugin_ManufacturerWebsite, + : factoryInfo (JucePlugin_Manufacturer, JucePlugin_ManufacturerWebsite, JucePlugin_ManufacturerEmail, Vst::kDefaultFactoryFlags) { } @@ -2439,7 +2460,7 @@ public: return false; } - ClassEntry* entry = classes.add (new ClassEntry (info, createFunction)); + auto* entry = classes.add (new ClassEntry (info, createFunction)); entry->infoW.fromAscii (info); return true; @@ -2498,7 +2519,7 @@ public: { if (info != nullptr) { - if (ClassEntry* entry = classes[(int) index]) + if (auto* entry = classes[(int) index]) { memcpy (info, &entry->infoW, sizeof (PClassInfoW)); return kResultOk; @@ -2523,13 +2544,11 @@ public: TUID iidToQuery; sourceFuid.toTUID (iidToQuery); - for (int i = 0; i < classes.size(); ++i) + for (auto* entry : classes) { - const ClassEntry& entry = *classes.getUnchecked (i); - - if (doUIDsMatch (entry.infoW.cid, cid)) + if (doUIDsMatch (entry->infoW.cid, cid)) { - if (FUnknown* const instance = entry.createFunction (host)) + if (auto* instance = entry->createFunction (host)) { const FReleaser releaser (instance); @@ -2562,22 +2581,22 @@ public: private: //============================================================================== ScopedJuceInitialiser_GUI libraryInitialiser; - Atomic refCount; + Atomic refCount { 1 }; const PFactoryInfo factoryInfo; ComSmartPtr host; //============================================================================== struct ClassEntry { - ClassEntry() noexcept : createFunction (nullptr), isUnicode (false) {} + ClassEntry() noexcept {} ClassEntry (const PClassInfo2& info, CreateFunction fn) noexcept - : info2 (info), createFunction (fn), isUnicode (false) {} + : info2 (info), createFunction (fn) {} PClassInfo2 info2; PClassInfoW infoW; - CreateFunction createFunction; - bool isUnicode; + CreateFunction createFunction = {}; + bool isUnicode = false; private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ClassEntry) @@ -2593,7 +2612,7 @@ private: { zerostruct (*info); - if (ClassEntry* entry = classes[(int) index]) + if (auto* entry = classes[(int) index]) { if (entry->isUnicode) return kResultFalse; diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client.h b/modules/juce_audio_plugin_client/juce_audio_plugin_client.h index 911685e7e6..ce861e18df 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client.h +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client.h @@ -35,7 +35,7 @@ ID: juce_audio_plugin_client vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE audio plugin wrapper classes description: Classes for building VST, VST3, AudioUnit, AAX and RTAS plugins. website: http://www.juce.com/juce diff --git a/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h b/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h index 6ab819bc24..b4963cd702 100644 --- a/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h +++ b/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h @@ -79,6 +79,7 @@ public: StudioOne, Tracktion3, TracktionGeneric, + TracktionWaveform, VBVSTScanner, WaveBurner }; @@ -111,7 +112,8 @@ public: bool isSteinbergTestHost() const noexcept { return type == SteinbergTestHost; } bool isSteinberg() const noexcept { return isCubase() || isNuendo() || isWavelab() || isSteinbergTestHost(); } bool isStudioOne() const noexcept { return type == StudioOne; } - bool isTracktion() const noexcept { return type == Tracktion3 || type == TracktionGeneric; } + bool isTracktion() const noexcept { return type == Tracktion3 || type == TracktionGeneric || isTracktionWaveform(); } + bool isTracktionWaveform() const noexcept { return type == TracktionWaveform; } bool isVBVSTScanner() const noexcept { return type == VBVSTScanner; } bool isWaveBurner() const noexcept { return type == WaveBurner; } bool isWavelab() const noexcept { return isWavelabLegacy() || type == SteinbergWavelab7 || type == SteinbergWavelab8 || type == SteinbergWavelabGeneric; } @@ -206,86 +208,91 @@ public: private: static HostType getHostType() { - const String hostPath (getHostPath()); - const String hostFilename (File (hostPath).getFileName()); + auto hostPath = getHostPath(); + auto hostFilename = File (hostPath).getFileName(); #if JUCE_MAC - if (hostPath.containsIgnoreCase ("Final Cut Pro.app")) return FinalCut; - if (hostPath.containsIgnoreCase ("Final Cut Pro Trial.app")) return FinalCut; - if (hostPath.containsIgnoreCase ("Live 6.")) return AbletonLive6; - if (hostPath.containsIgnoreCase ("Live 7.")) return AbletonLive7; - if (hostPath.containsIgnoreCase ("Live 8.")) return AbletonLive8; - if (hostFilename.containsIgnoreCase ("Live")) return AbletonLiveGeneric; - if (hostFilename.containsIgnoreCase ("Adobe Premiere")) return AdobePremierePro; - if (hostFilename.contains ("Logic")) return AppleLogic; - if (hostFilename.containsIgnoreCase ("Pro Tools")) return DigidesignProTools; - if (hostFilename.containsIgnoreCase ("Nuendo 3")) return SteinbergNuendo3; - if (hostFilename.containsIgnoreCase ("Nuendo 4")) return SteinbergNuendo4; - if (hostFilename.containsIgnoreCase ("Nuendo 5")) return SteinbergNuendo5; - if (hostFilename.containsIgnoreCase ("Nuendo")) return SteinbergNuendoGeneric; - if (hostFilename.containsIgnoreCase ("Cubase 4")) return SteinbergCubase4; - if (hostFilename.containsIgnoreCase ("Cubase 5")) return SteinbergCubase5; - if (hostFilename.containsIgnoreCase ("Cubase 6")) return SteinbergCubase6; - if (hostFilename.containsIgnoreCase ("Cubase 7")) return SteinbergCubase7; - if (hostFilename.containsIgnoreCase ("Cubase 8")) return SteinbergCubase8; - if (hostFilename.containsIgnoreCase ("Cubase")) return SteinbergCubaseGeneric; - if (hostPath.containsIgnoreCase ("Wavelab 7")) return SteinbergWavelab7; - if (hostPath.containsIgnoreCase ("Wavelab 8")) return SteinbergWavelab8; - if (hostFilename.containsIgnoreCase ("Wavelab")) return SteinbergWavelabGeneric; - if (hostFilename.containsIgnoreCase ("WaveBurner")) return WaveBurner; - if (hostFilename.contains ("Digital Performer")) return DigitalPerformer; - if (hostFilename.containsIgnoreCase ("reaper")) return Reaper; - if (hostPath.containsIgnoreCase ("Studio One")) return StudioOne; - if (hostPath.containsIgnoreCase ("Tracktion 3")) return Tracktion3; - if (hostFilename.containsIgnoreCase ("Tracktion")) return TracktionGeneric; - if (hostFilename.containsIgnoreCase ("Renoise")) return Renoise; - if (hostFilename.containsIgnoreCase ("Resolve")) return DaVinciResolve; - if (hostFilename.startsWith ("Bitwig")) return BitwigStudio; + if (hostPath.containsIgnoreCase ("Final Cut Pro.app")) return FinalCut; + if (hostPath.containsIgnoreCase ("Final Cut Pro Trial.app")) return FinalCut; + if (hostPath.containsIgnoreCase ("Live 6.")) return AbletonLive6; + if (hostPath.containsIgnoreCase ("Live 7.")) return AbletonLive7; + if (hostPath.containsIgnoreCase ("Live 8.")) return AbletonLive8; + if (hostFilename.containsIgnoreCase ("Live")) return AbletonLiveGeneric; + if (hostFilename.containsIgnoreCase ("Adobe Premiere")) return AdobePremierePro; + if (hostFilename.contains ("Logic")) return AppleLogic; + if (hostFilename.containsIgnoreCase ("Pro Tools")) return DigidesignProTools; + if (hostFilename.containsIgnoreCase ("Nuendo 3")) return SteinbergNuendo3; + if (hostFilename.containsIgnoreCase ("Nuendo 4")) return SteinbergNuendo4; + if (hostFilename.containsIgnoreCase ("Nuendo 5")) return SteinbergNuendo5; + if (hostFilename.containsIgnoreCase ("Nuendo")) return SteinbergNuendoGeneric; + if (hostFilename.containsIgnoreCase ("Cubase 4")) return SteinbergCubase4; + if (hostFilename.containsIgnoreCase ("Cubase 5")) return SteinbergCubase5; + if (hostFilename.containsIgnoreCase ("Cubase 6")) return SteinbergCubase6; + if (hostFilename.containsIgnoreCase ("Cubase 7")) return SteinbergCubase7; + if (hostFilename.containsIgnoreCase ("Cubase 8")) return SteinbergCubase8; + if (hostFilename.containsIgnoreCase ("Cubase")) return SteinbergCubaseGeneric; + if (hostPath.containsIgnoreCase ("Wavelab 7")) return SteinbergWavelab7; + if (hostPath.containsIgnoreCase ("Wavelab 8")) return SteinbergWavelab8; + if (hostFilename.containsIgnoreCase ("Wavelab")) return SteinbergWavelabGeneric; + if (hostFilename.containsIgnoreCase ("WaveBurner")) return WaveBurner; + if (hostFilename.contains ("Digital Performer")) return DigitalPerformer; + if (hostFilename.containsIgnoreCase ("reaper")) return Reaper; + if (hostPath.containsIgnoreCase ("Studio One")) return StudioOne; + if (hostFilename.startsWithIgnoreCase ("Waveform")) return TracktionWaveform; + if (hostPath.containsIgnoreCase ("Tracktion 3")) return Tracktion3; + if (hostFilename.containsIgnoreCase ("Tracktion")) return TracktionGeneric; + if (hostFilename.containsIgnoreCase ("Renoise")) return Renoise; + if (hostFilename.containsIgnoreCase ("Resolve")) return DaVinciResolve; + if (hostFilename.startsWith ("Bitwig")) return BitwigStudio; #elif JUCE_WINDOWS - if (hostFilename.containsIgnoreCase ("Live 6.")) return AbletonLive6; - if (hostFilename.containsIgnoreCase ("Live 7.")) return AbletonLive7; - if (hostFilename.containsIgnoreCase ("Live 8.")) return AbletonLive8; - if (hostFilename.containsIgnoreCase ("Live ")) return AbletonLiveGeneric; - if (hostFilename.containsIgnoreCase ("Audition")) return AdobeAudition; - if (hostFilename.containsIgnoreCase ("Adobe Premiere")) return AdobePremierePro; - if (hostFilename.containsIgnoreCase ("ProTools")) return DigidesignProTools; - if (hostPath.containsIgnoreCase ("SONAR 8")) return CakewalkSonar8; - if (hostFilename.containsIgnoreCase ("SONAR")) return CakewalkSonarGeneric; - if (hostFilename.containsIgnoreCase ("Logic")) return AppleLogic; - if (hostPath.containsIgnoreCase ("Tracktion 3")) return Tracktion3; - if (hostFilename.containsIgnoreCase ("Tracktion")) return TracktionGeneric; - if (hostFilename.containsIgnoreCase ("reaper")) return Reaper; - if (hostFilename.containsIgnoreCase ("Cubase4")) return SteinbergCubase4; - if (hostFilename.containsIgnoreCase ("Cubase5")) return SteinbergCubase5; - if (hostFilename.containsIgnoreCase ("Cubase6")) return SteinbergCubase6; - if (hostFilename.containsIgnoreCase ("Cubase7")) return SteinbergCubase7; - if (hostFilename.containsIgnoreCase ("Cubase8")) return SteinbergCubase8; - if (hostFilename.containsIgnoreCase ("Cubase")) return SteinbergCubaseGeneric; - if (hostFilename.containsIgnoreCase ("VSTBridgeApp")) return SteinbergCubase5Bridged; - if (hostPath.containsIgnoreCase ("Wavelab 5")) return SteinbergWavelab5; - if (hostPath.containsIgnoreCase ("Wavelab 6")) return SteinbergWavelab6; - if (hostPath.containsIgnoreCase ("Wavelab 7")) return SteinbergWavelab7; - if (hostPath.containsIgnoreCase ("Wavelab 8")) return SteinbergWavelab8; - if (hostPath.containsIgnoreCase ("Nuendo")) return SteinbergNuendoGeneric; - if (hostFilename.containsIgnoreCase ("Wavelab")) return SteinbergWavelabGeneric; - if (hostFilename.containsIgnoreCase ("TestHost")) return SteinbergTestHost; - if (hostFilename.containsIgnoreCase ("rm-host")) return MuseReceptorGeneric; - if (hostFilename.startsWith ("FL")) return FruityLoops; - if (hostFilename.contains ("ilbridge.")) return FruityLoops; - if (hostPath.containsIgnoreCase ("Studio One")) return StudioOne; - if (hostPath.containsIgnoreCase ("Digital Performer")) return DigitalPerformer; - if (hostFilename.containsIgnoreCase ("VST_Scanner")) return VBVSTScanner; - if (hostPath.containsIgnoreCase ("Merging Technologies")) return MergingPyramix; - if (hostFilename.startsWithIgnoreCase ("Sam")) return MagixSamplitude; - if (hostFilename.containsIgnoreCase ("Renoise")) return Renoise; - if (hostFilename.containsIgnoreCase ("Resolve")) return DaVinciResolve; - if (hostPath.containsIgnoreCase ("Bitwig Studio")) return BitwigStudio; - if (hostFilename.containsIgnoreCase ("Sadie")) return SADiE; + if (hostFilename.containsIgnoreCase ("Live 6.")) return AbletonLive6; + if (hostFilename.containsIgnoreCase ("Live 7.")) return AbletonLive7; + if (hostFilename.containsIgnoreCase ("Live 8.")) return AbletonLive8; + if (hostFilename.containsIgnoreCase ("Live ")) return AbletonLiveGeneric; + if (hostFilename.containsIgnoreCase ("Audition")) return AdobeAudition; + if (hostFilename.containsIgnoreCase ("Adobe Premiere")) return AdobePremierePro; + if (hostFilename.containsIgnoreCase ("ProTools")) return DigidesignProTools; + if (hostPath.containsIgnoreCase ("SONAR 8")) return CakewalkSonar8; + if (hostFilename.containsIgnoreCase ("SONAR")) return CakewalkSonarGeneric; + if (hostFilename.containsIgnoreCase ("Logic")) return AppleLogic; + if (hostFilename.startsWithIgnoreCase ("Waveform")) return TracktionWaveform; + if (hostPath.containsIgnoreCase ("Tracktion 3")) return Tracktion3; + if (hostFilename.containsIgnoreCase ("Tracktion")) return TracktionGeneric; + if (hostFilename.containsIgnoreCase ("Tracktion")) return TracktionGeneric; + if (hostFilename.containsIgnoreCase ("reaper")) return Reaper; + if (hostFilename.containsIgnoreCase ("Cubase4")) return SteinbergCubase4; + if (hostFilename.containsIgnoreCase ("Cubase5")) return SteinbergCubase5; + if (hostFilename.containsIgnoreCase ("Cubase6")) return SteinbergCubase6; + if (hostFilename.containsIgnoreCase ("Cubase7")) return SteinbergCubase7; + if (hostFilename.containsIgnoreCase ("Cubase8")) return SteinbergCubase8; + if (hostFilename.containsIgnoreCase ("Cubase")) return SteinbergCubaseGeneric; + if (hostFilename.containsIgnoreCase ("VSTBridgeApp")) return SteinbergCubase5Bridged; + if (hostPath.containsIgnoreCase ("Wavelab 5")) return SteinbergWavelab5; + if (hostPath.containsIgnoreCase ("Wavelab 6")) return SteinbergWavelab6; + if (hostPath.containsIgnoreCase ("Wavelab 7")) return SteinbergWavelab7; + if (hostPath.containsIgnoreCase ("Wavelab 8")) return SteinbergWavelab8; + if (hostPath.containsIgnoreCase ("Nuendo")) return SteinbergNuendoGeneric; + if (hostFilename.containsIgnoreCase ("Wavelab")) return SteinbergWavelabGeneric; + if (hostFilename.containsIgnoreCase ("TestHost")) return SteinbergTestHost; + if (hostFilename.containsIgnoreCase ("rm-host")) return MuseReceptorGeneric; + if (hostFilename.startsWith ("FL")) return FruityLoops; + if (hostFilename.contains ("ilbridge.")) return FruityLoops; + if (hostPath.containsIgnoreCase ("Studio One")) return StudioOne; + if (hostPath.containsIgnoreCase ("Digital Performer")) return DigitalPerformer; + if (hostFilename.containsIgnoreCase ("VST_Scanner")) return VBVSTScanner; + if (hostPath.containsIgnoreCase ("Merging Technologies")) return MergingPyramix; + if (hostFilename.startsWithIgnoreCase ("Sam")) return MagixSamplitude; + if (hostFilename.containsIgnoreCase ("Renoise")) return Renoise; + if (hostFilename.containsIgnoreCase ("Resolve")) return DaVinciResolve; + if (hostPath.containsIgnoreCase ("Bitwig Studio")) return BitwigStudio; + if (hostFilename.containsIgnoreCase ("Sadie")) return SADiE; #elif JUCE_LINUX - if (hostFilename.containsIgnoreCase ("Ardour")) return Ardour; - if (hostFilename.startsWith ("Bitwig")) return BitwigStudio; + if (hostFilename.containsIgnoreCase ("Ardour")) return Ardour; + if (hostFilename.startsWithIgnoreCase ("Waveform")) return TracktionWaveform; + if (hostFilename.containsIgnoreCase ("Tracktion")) return TracktionGeneric; + if (hostFilename.startsWith ("Bitwig")) return BitwigStudio; #elif JUCE_IOS #elif JUCE_ANDROID diff --git a/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp b/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp index 11433c1dd0..4380839f4b 100644 --- a/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp +++ b/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp @@ -151,7 +151,7 @@ bool JUCE_API handleManufacturerSpecificVST2Opcode (int32 index, pointer_sized_i */ extern AudioProcessor* JUCE_CALLTYPE createPluginFilter(); -#if JucePlugin_Enable_IAA && JucePlugin_Build_STANDALONE && JUCE_IOS && (! JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP) +#if JucePlugin_Enable_IAA && JucePlugin_Build_Standalone && JUCE_IOS && (! JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP) extern bool JUCE_CALLTYPE juce_isInterAppAudioConnected(); extern void JUCE_CALLTYPE juce_switchToHostApplication(); @@ -174,7 +174,7 @@ AudioProcessor* JUCE_API JUCE_CALLTYPE createPluginFilterOfType (AudioProcessor: bool PluginHostType::isInterAppAudioConnected() const { - #if JucePlugin_Enable_IAA && JucePlugin_Build_STANDALONE && JUCE_IOS && (! JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP) + #if JucePlugin_Enable_IAA && JucePlugin_Build_Standalone && JUCE_IOS && (! JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP) if (getPluginLoadedAs() == AudioProcessor::wrapperType_Standalone) return juce_isInterAppAudioConnected(); #endif @@ -184,7 +184,7 @@ bool PluginHostType::isInterAppAudioConnected() const void PluginHostType::switchToHostApplication() const { - #if JucePlugin_Enable_IAA && JucePlugin_Build_STANDALONE && JUCE_IOS && (! JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP) + #if JucePlugin_Enable_IAA && JucePlugin_Build_Standalone && JUCE_IOS && (! JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP) if (getPluginLoadedAs() == AudioProcessor::wrapperType_Standalone) juce_switchToHostApplication(); #endif @@ -199,7 +199,7 @@ Image PluginHostType::getHostIcon (int size) const { ignoreUnused (size); - #if JucePlugin_Enable_IAA && JucePlugin_Build_STANDALONE && JUCE_IOS && (! JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP) + #if JucePlugin_Enable_IAA && JucePlugin_Build_Standalone && JUCE_IOS && (! JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP) if (isInterAppAudioConnected()) return juce_getIAAHostIcon (size); #endif diff --git a/modules/juce_audio_processors/format_types/juce_AU_Shared.h b/modules/juce_audio_processors/format_types/juce_AU_Shared.h index c28ad10531..71768e3b47 100644 --- a/modules/juce_audio_processors/format_types/juce_AU_Shared.h +++ b/modules/juce_audio_processors/format_types/juce_AU_Shared.h @@ -31,293 +31,6 @@ struct AudioUnitHelpers { - // maps a channel index into an AU format to an index of a juce format - struct AUChannelStreamOrder - { - AudioChannelLayoutTag auLayoutTag; - AudioChannelSet::ChannelType speakerOrder[8]; - }; - - struct StreamOrder : public AudioChannelSet - { - static AUChannelStreamOrder auChannelStreamOrder[]; - }; - - static AudioChannelSet::ChannelType CoreAudioChannelLabelToJuceType (AudioChannelLabel label) noexcept - { - if (label >= kAudioChannelLabel_Discrete_0 && label <= kAudioChannelLabel_Discrete_65535) - { - const unsigned int discreteChannelNum = label - kAudioChannelLabel_Discrete_0; - return static_cast (AudioChannelSet::discreteChannel0 + discreteChannelNum); - } - - switch (label) - { - case kAudioChannelLabel_Center: - case kAudioChannelLabel_Mono: return AudioChannelSet::centre; - case kAudioChannelLabel_Left: - case kAudioChannelLabel_HeadphonesLeft: return AudioChannelSet::left; - case kAudioChannelLabel_Right: - case kAudioChannelLabel_HeadphonesRight: return AudioChannelSet::right; - case kAudioChannelLabel_LFEScreen: return AudioChannelSet::LFE; - case kAudioChannelLabel_LeftSurround: return AudioChannelSet::leftSurround; - case kAudioChannelLabel_RightSurround: return AudioChannelSet::rightSurround; - case kAudioChannelLabel_LeftCenter: return AudioChannelSet::leftCentre; - case kAudioChannelLabel_RightCenter: return AudioChannelSet::rightCentre; - case kAudioChannelLabel_CenterSurround: return AudioChannelSet::surround; - case kAudioChannelLabel_LeftSurroundDirect: return AudioChannelSet::leftSurroundSide; - case kAudioChannelLabel_RightSurroundDirect: return AudioChannelSet::rightSurroundSide; - case kAudioChannelLabel_TopCenterSurround: return AudioChannelSet::topMiddle; - case kAudioChannelLabel_VerticalHeightLeft: return AudioChannelSet::topFrontLeft; - case kAudioChannelLabel_VerticalHeightRight: return AudioChannelSet::topFrontRight; - case kAudioChannelLabel_VerticalHeightCenter: return AudioChannelSet::topFrontCentre; - case kAudioChannelLabel_TopBackLeft: return AudioChannelSet::topRearLeft; - case kAudioChannelLabel_RearSurroundLeft: return AudioChannelSet::leftSurroundRear; - case kAudioChannelLabel_TopBackRight: return AudioChannelSet::topRearRight; - case kAudioChannelLabel_RearSurroundRight: return AudioChannelSet::rightSurroundRear; - case kAudioChannelLabel_TopBackCenter: return AudioChannelSet::topRearCentre; - case kAudioChannelLabel_LFE2: return AudioChannelSet::LFE2; - case kAudioChannelLabel_LeftWide: return AudioChannelSet::wideLeft; - case kAudioChannelLabel_RightWide: return AudioChannelSet::wideRight; - case kAudioChannelLabel_Ambisonic_W: return AudioChannelSet::ambisonicW; - case kAudioChannelLabel_Ambisonic_X: return AudioChannelSet::ambisonicX; - case kAudioChannelLabel_Ambisonic_Y: return AudioChannelSet::ambisonicY; - case kAudioChannelLabel_Ambisonic_Z: return AudioChannelSet::ambisonicZ; - default: return AudioChannelSet::unknown; - } - } - - static AudioChannelLabel JuceChannelTypeToCoreAudioLabel (const AudioChannelSet::ChannelType& label) noexcept - { - if (label >= AudioChannelSet::discreteChannel0) - { - const unsigned int discreteChannelNum = label - AudioChannelSet::discreteChannel0;; - return static_cast (kAudioChannelLabel_Discrete_0 + discreteChannelNum); - } - - switch (label) - { - case AudioChannelSet::centre: return kAudioChannelLabel_Center; - case AudioChannelSet::left: return kAudioChannelLabel_Left; - case AudioChannelSet::right: return kAudioChannelLabel_Right; - case AudioChannelSet::LFE: return kAudioChannelLabel_LFEScreen; - case AudioChannelSet::leftSurroundRear: return kAudioChannelLabel_RearSurroundLeft; - case AudioChannelSet::rightSurroundRear: return kAudioChannelLabel_RearSurroundRight; - case AudioChannelSet::leftCentre: return kAudioChannelLabel_LeftCenter; - case AudioChannelSet::rightCentre: return kAudioChannelLabel_RightCenter; - case AudioChannelSet::surround: return kAudioChannelLabel_CenterSurround; - case AudioChannelSet::leftSurround: return kAudioChannelLabel_LeftSurround; - case AudioChannelSet::rightSurround: return kAudioChannelLabel_RightSurround; - case AudioChannelSet::topMiddle: return kAudioChannelLabel_TopCenterSurround; - case AudioChannelSet::topFrontLeft: return kAudioChannelLabel_VerticalHeightLeft; - case AudioChannelSet::topFrontRight: return kAudioChannelLabel_VerticalHeightRight; - case AudioChannelSet::topFrontCentre: return kAudioChannelLabel_VerticalHeightCenter; - case AudioChannelSet::topRearLeft: return kAudioChannelLabel_TopBackLeft; - case AudioChannelSet::topRearRight: return kAudioChannelLabel_TopBackRight; - case AudioChannelSet::topRearCentre: return kAudioChannelLabel_TopBackCenter; - case AudioChannelSet::LFE2: return kAudioChannelLabel_LFE2; - case AudioChannelSet::wideLeft: return kAudioChannelLabel_LeftWide; - case AudioChannelSet::wideRight: return kAudioChannelLabel_RightWide; - case AudioChannelSet::ambisonicW: return kAudioChannelLabel_Ambisonic_W; - case AudioChannelSet::ambisonicX: return kAudioChannelLabel_Ambisonic_X; - case AudioChannelSet::ambisonicY: return kAudioChannelLabel_Ambisonic_Y; - case AudioChannelSet::ambisonicZ: return kAudioChannelLabel_Ambisonic_Z; - case AudioChannelSet::leftSurroundSide: return kAudioChannelLabel_LeftSurroundDirect; - case AudioChannelSet::rightSurroundSide: return kAudioChannelLabel_RightSurroundDirect; - case AudioChannelSet::unknown: return kAudioChannelLabel_Unknown; - case AudioChannelSet::discreteChannel0: return kAudioChannelLabel_Discrete_0; - } - - return kAudioChannelLabel_Unknown; - } - - static AudioChannelSet CoreAudioChannelBitmapToJuceType (UInt32 bitmap) noexcept - { - AudioChannelSet set; - - if ((bitmap & kAudioChannelBit_Left) != 0) set.addChannel (AudioChannelSet::left); - if ((bitmap & kAudioChannelBit_Right) != 0) set.addChannel (AudioChannelSet::right); - if ((bitmap & kAudioChannelBit_Center) != 0) set.addChannel (AudioChannelSet::centre); - if ((bitmap & kAudioChannelBit_LFEScreen) != 0) set.addChannel (AudioChannelSet::LFE); - if ((bitmap & kAudioChannelBit_LeftSurroundDirect) != 0) set.addChannel (AudioChannelSet::leftSurroundSide); - if ((bitmap & kAudioChannelBit_RightSurroundDirect) != 0) set.addChannel (AudioChannelSet::rightSurroundSide); - if ((bitmap & kAudioChannelBit_LeftCenter) != 0) set.addChannel (AudioChannelSet::leftCentre); - if ((bitmap & kAudioChannelBit_RightCenter) != 0) set.addChannel (AudioChannelSet::rightCentre); - if ((bitmap & kAudioChannelBit_CenterSurround) != 0) set.addChannel (AudioChannelSet::surround); - if ((bitmap & kAudioChannelBit_LeftSurround) != 0) set.addChannel (AudioChannelSet::leftSurround); - if ((bitmap & kAudioChannelBit_RightSurround) != 0) set.addChannel (AudioChannelSet::rightSurround); - if ((bitmap & kAudioChannelBit_TopCenterSurround) != 0) set.addChannel (AudioChannelSet::topMiddle); - if ((bitmap & kAudioChannelBit_VerticalHeightLeft) != 0) set.addChannel (AudioChannelSet::topFrontLeft); - if ((bitmap & kAudioChannelBit_VerticalHeightCenter) != 0) set.addChannel (AudioChannelSet::topFrontCentre); - if ((bitmap & kAudioChannelBit_VerticalHeightRight) != 0) set.addChannel (AudioChannelSet::topFrontRight); - if ((bitmap & kAudioChannelBit_TopBackLeft) != 0) set.addChannel (AudioChannelSet::topRearLeft); - if ((bitmap & kAudioChannelBit_TopBackCenter) != 0) set.addChannel (AudioChannelSet::topRearCentre); - if ((bitmap & kAudioChannelBit_TopBackRight) != 0) set.addChannel (AudioChannelSet::topRearRight); - - return set; - } - - static AudioChannelSet CoreAudioChannelLayoutToJuceType (const AudioChannelLayout& layout) noexcept - { - const AudioChannelLayoutTag tag = layout.mChannelLayoutTag; - - if (tag == kAudioChannelLayoutTag_UseChannelBitmap) return CoreAudioChannelBitmapToJuceType (layout.mChannelBitmap); - if (tag == kAudioChannelLayoutTag_UseChannelDescriptions) - { - if (layout.mNumberChannelDescriptions <= 8) - { - // first try to convert the layout via the auChannelStreamOrder array - int layoutIndex; - for (layoutIndex = 0; StreamOrder::auChannelStreamOrder[layoutIndex].auLayoutTag != 0; ++layoutIndex) - { - const AUChannelStreamOrder& streamOrder = StreamOrder::auChannelStreamOrder[layoutIndex]; - - int numChannels; - for (numChannels = 0; numChannels < 8 && streamOrder.speakerOrder[numChannels] != 0;) - ++numChannels; - - if (numChannels != (int) layout.mNumberChannelDescriptions) - continue; - - int ch; - for (ch = 0; ch < numChannels; ++ch) - if (JuceChannelTypeToCoreAudioLabel (streamOrder.speakerOrder[ch]) != layout.mChannelDescriptions[ch].mChannelLabel) - break; - - // match! - if (ch == numChannels) - break; - } - - if (StreamOrder::auChannelStreamOrder[layoutIndex].auLayoutTag != 0) - return CALayoutTagToChannelSet (StreamOrder::auChannelStreamOrder[layoutIndex].auLayoutTag); - } - AudioChannelSet set; - for (unsigned int i = 0; i < layout.mNumberChannelDescriptions; ++i) - set.addChannel (CoreAudioChannelLabelToJuceType (layout.mChannelDescriptions[i].mChannelLabel)); - - return set; - } - - return CALayoutTagToChannelSet (tag); - } - - static AudioChannelSet CALayoutTagToChannelSet (AudioChannelLayoutTag tag) noexcept - { - switch (tag) - { - case kAudioChannelLayoutTag_Unknown: return AudioChannelSet::disabled(); - case kAudioChannelLayoutTag_Mono: return AudioChannelSet::mono(); - case kAudioChannelLayoutTag_Stereo: - case kAudioChannelLayoutTag_StereoHeadphones: - case kAudioChannelLayoutTag_Binaural: return AudioChannelSet::stereo(); - case kAudioChannelLayoutTag_Quadraphonic: return AudioChannelSet::quadraphonic(); - case kAudioChannelLayoutTag_Pentagonal: return AudioChannelSet::pentagonal(); - case kAudioChannelLayoutTag_Hexagonal: return AudioChannelSet::hexagonal(); - case kAudioChannelLayoutTag_Octagonal: return AudioChannelSet::octagonal(); - case kAudioChannelLayoutTag_Ambisonic_B_Format: return AudioChannelSet::ambisonic(); - case kAudioChannelLayoutTag_AudioUnit_6_0: return AudioChannelSet::create6point0(); - case kAudioChannelLayoutTag_DTS_6_0_A: return AudioChannelSet::create6point0Music(); - case kAudioChannelLayoutTag_MPEG_6_1_A: return AudioChannelSet::create6point1(); - case kAudioChannelLayoutTag_DTS_6_1_A: return AudioChannelSet::create6point1Music(); - case kAudioChannelLayoutTag_MPEG_5_0_B: - case kAudioChannelLayoutTag_MPEG_5_0_A: - return AudioChannelSet::create5point0(); - case kAudioChannelLayoutTag_MPEG_5_1_A: return AudioChannelSet::create5point1(); - case kAudioChannelLayoutTag_DTS_7_1: - case kAudioChannelLayoutTag_AudioUnit_7_0: return AudioChannelSet::create7point0(); - case kAudioChannelLayoutTag_AudioUnit_7_0_Front: return AudioChannelSet::create7point0SDDS(); - case kAudioChannelLayoutTag_MPEG_7_1_A: return AudioChannelSet::create7point1SDDS(); - case kAudioChannelLayoutTag_MPEG_3_0_A: - case kAudioChannelLayoutTag_MPEG_3_0_B: return AudioChannelSet::createLCR(); - case kAudioChannelLayoutTag_MPEG_4_0_A: - case kAudioChannelLayoutTag_MPEG_4_0_B: return AudioChannelSet::createLCRS(); - case kAudioChannelLayoutTag_ITU_2_1: return AudioChannelSet::createLRS(); - case kAudioChannelLayoutTag_MPEG_7_1_C: return AudioChannelSet::create7point1(); - } - - if (int numChannels = static_cast (tag) & 0xffff) - return AudioChannelSet::discreteChannels (numChannels); - - // Bitmap and channel description array layout tags are currently unsupported :-( - jassertfalse; - return AudioChannelSet(); - } - - static AudioChannelLayoutTag ChannelSetToCALayoutTag (const AudioChannelSet& set) noexcept - { - if (set == AudioChannelSet::mono()) return kAudioChannelLayoutTag_Mono; - if (set == AudioChannelSet::stereo()) return kAudioChannelLayoutTag_Stereo; - if (set == AudioChannelSet::createLCR()) return kAudioChannelLayoutTag_MPEG_3_0_A; - if (set == AudioChannelSet::createLRS()) return kAudioChannelLayoutTag_ITU_2_1; - if (set == AudioChannelSet::createLCRS()) return kAudioChannelLayoutTag_MPEG_4_0_A; - if (set == AudioChannelSet::quadraphonic()) return kAudioChannelLayoutTag_Quadraphonic; - if (set == AudioChannelSet::pentagonal()) return kAudioChannelLayoutTag_Pentagonal; - if (set == AudioChannelSet::hexagonal()) return kAudioChannelLayoutTag_Hexagonal; - if (set == AudioChannelSet::octagonal()) return kAudioChannelLayoutTag_Octagonal; - if (set == AudioChannelSet::ambisonic()) return kAudioChannelLayoutTag_Ambisonic_B_Format; - if (set == AudioChannelSet::create5point0()) return kAudioChannelLayoutTag_MPEG_5_0_A; - if (set == AudioChannelSet::create5point1()) return kAudioChannelLayoutTag_MPEG_5_1_A; - if (set == AudioChannelSet::create6point0()) return kAudioChannelLayoutTag_AudioUnit_6_0; - if (set == AudioChannelSet::create6point0Music()) return kAudioChannelLayoutTag_DTS_6_0_A; - if (set == AudioChannelSet::create6point1Music()) return kAudioChannelLayoutTag_DTS_6_1_A; - if (set == AudioChannelSet::create6point1()) return kAudioChannelLayoutTag_MPEG_6_1_A; - if (set == AudioChannelSet::create7point0()) return kAudioChannelLayoutTag_AudioUnit_7_0; - if (set == AudioChannelSet::create7point1()) return kAudioChannelLayoutTag_MPEG_7_1_C; - if (set == AudioChannelSet::create7point0SDDS()) return kAudioChannelLayoutTag_AudioUnit_7_0_Front; - if (set == AudioChannelSet::create7point1SDDS()) return kAudioChannelLayoutTag_MPEG_7_1_A; - if (set == AudioChannelSet::disabled()) return kAudioChannelLayoutTag_Unknown; - - return static_cast ((int) kAudioChannelLayoutTag_DiscreteInOrder | set.size()); - } - - static int auChannelIndexToJuce (int auIndex, const AudioChannelSet& channelSet) - { - if (auIndex >= 8) return auIndex; - - AudioChannelLayoutTag currentLayout = ChannelSetToCALayoutTag (channelSet); - - int layoutIndex; - for (layoutIndex = 0; StreamOrder::auChannelStreamOrder[layoutIndex].auLayoutTag != currentLayout; ++layoutIndex) - if (StreamOrder::auChannelStreamOrder[layoutIndex].auLayoutTag == 0) return auIndex; - - AudioChannelSet::ChannelType channelType - = StreamOrder::auChannelStreamOrder[layoutIndex].speakerOrder[auIndex]; - - const int juceIndex = channelSet.getChannelTypes().indexOf (channelType); - - jassert (juceIndex >= 0); - return juceIndex >= 0 ? juceIndex : auIndex; - } - - static int juceChannelIndexToAu (int juceIndex, const AudioChannelSet& channelSet) - { - if (channelSet.isDiscreteLayout()) - return juceIndex; - - AudioChannelLayoutTag currentLayout = ChannelSetToCALayoutTag (channelSet); - - int layoutIndex; - for (layoutIndex = 0; StreamOrder::auChannelStreamOrder[layoutIndex].auLayoutTag != currentLayout; ++layoutIndex) - { - if (StreamOrder::auChannelStreamOrder[layoutIndex].auLayoutTag == 0) - { - jassertfalse; - return juceIndex; - } - } - - const AUChannelStreamOrder& channelOrder = StreamOrder::auChannelStreamOrder[layoutIndex]; - AudioChannelSet::ChannelType channelType = channelSet.getTypeOfChannel (juceIndex); - - for (int i = 0; i < 8 && channelOrder.speakerOrder[i] != 0; ++i) - if (channelOrder.speakerOrder[i] == channelType) - return i; - - jassertfalse; - return juceIndex; - } - class ChannelRemapper { public: @@ -384,11 +97,17 @@ struct AudioUnitHelpers void fillLayoutChannelMaps (bool isInput, int busNr) { int* layoutMap = (isInput ? inputLayoutMap : outputLayoutMap)[busNr]; - const AudioChannelSet& channelFormat = processor.getChannelLayoutOfBus (isInput, busNr); + auto channelFormat = processor.getChannelLayoutOfBus (isInput, busNr); + AudioChannelLayout coreAudioLayout; + + zerostruct (coreAudioLayout); + coreAudioLayout.mChannelLayoutTag = CoreAudioLayouts::toCoreAudio (channelFormat); + const int numChannels = channelFormat.size(); + auto coreAudioChannels = CoreAudioLayouts::getCoreAudioLayoutChannels (coreAudioLayout); for (int i = 0; i < numChannels; ++i) - layoutMap[i] = AudioUnitHelpers::juceChannelIndexToAu (i, channelFormat); + layoutMap[i] = coreAudioChannels.indexOf (channelFormat.getTypeOfChannel (i)); } }; @@ -613,8 +332,8 @@ struct AudioUnitHelpers { Array channelInfo; - const bool hasMainInputBus = (AudioUnitHelpers::getBusCount (&processor, true) > 0); - const bool hasMainOutputBus = (AudioUnitHelpers::getBusCount (&processor, false) > 0); + auto hasMainInputBus = (AudioUnitHelpers::getBusCount (&processor, true) > 0); + auto hasMainOutputBus = (AudioUnitHelpers::getBusCount (&processor, false) > 0); if ((! hasMainInputBus) && (! hasMainOutputBus)) { @@ -623,73 +342,48 @@ struct AudioUnitHelpers info.inChannels = 0; info.outChannels = 0; - channelInfo.add (info); - return channelInfo; + return {&info, 1}; } else { - const uint32_t maxNumChanToCheckFor = 9; + auto layout = processor.getBusesLayout(); + auto maxNumChanToCheckFor = 9; - uint32_t defaultInputs = static_cast (processor.getChannelCountOfBus (true, 0)); - uint32_t defaultOutputs = static_cast (processor.getChannelCountOfBus (false, 0)); + auto defaultInputs = processor.getChannelCountOfBus (true, 0); + auto defaultOutputs = processor.getChannelCountOfBus (false, 0); - uint32_t lastInputs = defaultInputs; - uint32_t lastOutputs = defaultOutputs; - - SortedSet supportedChannels; + SortedSet supportedChannels; // add the current configuration - if (lastInputs != 0 || lastOutputs != 0) - supportedChannels.add ((lastInputs << 16) | lastOutputs); + if (defaultInputs != 0 || defaultOutputs != 0) + supportedChannels.add ((defaultInputs << 16) | defaultOutputs); - for (uint32_t inChanNum = hasMainInputBus ? 1 : 0; inChanNum <= (hasMainInputBus ? maxNumChanToCheckFor : 0); ++inChanNum) + for (auto inChanNum = hasMainInputBus ? 1 : 0; inChanNum <= (hasMainInputBus ? maxNumChanToCheckFor : 0); ++inChanNum) { - const AudioProcessor::Bus* inBus = processor.getBus (true, 0); + auto inLayout = layout; - if (inBus != nullptr && (! inBus->isNumberOfChannelsSupported ((int) inChanNum))) - continue; - - for (uint32_t outChanNum = hasMainOutputBus ? 1 : 0; outChanNum <= (hasMainOutputBus ? maxNumChanToCheckFor : 0); ++outChanNum) - { - const AudioProcessor::Bus* outBus = processor.getBus (false, 0); - - if (outBus != nullptr && (! outBus->isNumberOfChannelsSupported ((int) outChanNum))) + if (auto* inBus = processor.getBus (true, 0)) + if (! isNumberOfChannelsSupported (inBus, inChanNum, inLayout)) continue; - uint32_t channelConfiguration = (inChanNum << 16) | outChanNum; + for (auto outChanNum = hasMainOutputBus ? 1 : 0; outChanNum <= (hasMainOutputBus ? maxNumChanToCheckFor : 0); ++outChanNum) + { + auto outLayout = inLayout; - // did we already try this configuration? - if (supportedChannels.contains (channelConfiguration)) continue; + if (auto* outBus = processor.getBus (false, 0)) + if (! isNumberOfChannelsSupported (outBus, outChanNum, outLayout)) + continue; - if (lastInputs != inChanNum && (inChanNum > 0 && inBus != nullptr)) - { - AudioChannelSet set = inBus->supportedLayoutWithChannels ((int) inChanNum); - AudioProcessor::BusesLayout layouts = inBus->getBusesLayoutForLayoutChangeOfBus (set); - - lastInputs = inChanNum; - lastOutputs = hasMainOutputBus ? static_cast (layouts.outputBuses.getReference (0).size()) : 0; - - supportedChannels.add ((lastInputs << 16) | lastOutputs); - } - - if (lastOutputs != outChanNum && (outChanNum > 0 && outBus != nullptr)) - { - AudioChannelSet set = outBus->supportedLayoutWithChannels ((int) outChanNum); - AudioProcessor::BusesLayout layouts = outBus->getBusesLayoutForLayoutChangeOfBus (set); - - lastOutputs = outChanNum; - lastInputs = hasMainInputBus ? static_cast (layouts.inputBuses.getReference (0).size()) : 0; - - supportedChannels.add ((lastInputs << 16) | lastOutputs); - } + supportedChannels.add (((hasMainInputBus ? outLayout.getMainInputChannels() : 0) << 16) + | (hasMainOutputBus ? outLayout.getMainOutputChannels() : 0)); } } - bool hasInOutMismatch = false; - for (int i = 0; i < supportedChannels.size(); ++i) + auto hasInOutMismatch = false; + for (auto supported : supportedChannels) { - const uint32_t numInputs = (supportedChannels[i] >> 16) & 0xffff; - const uint32_t numOutputs = (supportedChannels[i] >> 0) & 0xffff; + auto numInputs = (supported >> 16) & 0xffff; + auto numOutputs = (supported >> 0) & 0xffff; if (numInputs != numOutputs) { @@ -698,10 +392,11 @@ struct AudioUnitHelpers } } - bool hasUnsupportedInput = ! hasMainOutputBus, hasUnsupportedOutput = ! hasMainInputBus; - for (uint32_t inChanNum = hasMainInputBus ? 1 : 0; inChanNum <= (hasMainInputBus ? maxNumChanToCheckFor : 0); ++inChanNum) + auto hasUnsupportedInput = ! hasMainInputBus, hasUnsupportedOutput = ! hasMainOutputBus; + for (auto inChanNum = hasMainInputBus ? 1 : 0; inChanNum <= (hasMainInputBus ? maxNumChanToCheckFor : 0); ++inChanNum) { - uint32_t channelConfiguration = (inChanNum << 16) | (hasInOutMismatch ? defaultOutputs : inChanNum); + auto channelConfiguration = (inChanNum << 16) | (hasInOutMismatch ? defaultOutputs : inChanNum); + if (! supportedChannels.contains (channelConfiguration)) { hasUnsupportedInput = true; @@ -709,9 +404,10 @@ struct AudioUnitHelpers } } - for (uint32_t outChanNum = hasMainOutputBus ? 1 : 0; outChanNum <= (hasMainOutputBus ? maxNumChanToCheckFor : 0); ++outChanNum) + for (auto outChanNum = hasMainOutputBus ? 1 : 0; outChanNum <= (hasMainOutputBus ? maxNumChanToCheckFor : 0); ++outChanNum) { - uint32_t channelConfiguration = ((hasInOutMismatch ? defaultInputs : outChanNum) << 16) | outChanNum; + auto channelConfiguration = ((hasInOutMismatch ? defaultInputs : outChanNum) << 16) | outChanNum; + if (! supportedChannels.contains (channelConfiguration)) { hasUnsupportedOutput = true; @@ -719,10 +415,10 @@ struct AudioUnitHelpers } } - for (int i = 0; i < supportedChannels.size(); ++i) + for (auto supported : supportedChannels) { - const int numInputs = (supportedChannels[i] >> 16) & 0xffff; - const int numOutputs = (supportedChannels[i] >> 0) & 0xffff; + auto numInputs = (supported >> 16) & 0xffff; + auto numOutputs = (supported >> 0) & 0xffff; AUChannelInfo info; @@ -735,7 +431,8 @@ struct AudioUnitHelpers int j; for (j = 0; j < channelInfo.size(); ++j) - if (channelInfo[j].inChannels == info.inChannels && channelInfo[j].outChannels == info.outChannels) + if (info.inChannels == channelInfo.getReference (j).inChannels + && info.outChannels == channelInfo.getReference (j).outChannels) break; if (j >= channelInfo.size()) @@ -746,6 +443,25 @@ struct AudioUnitHelpers return channelInfo; } + static bool isNumberOfChannelsSupported (const AudioProcessor::Bus* b, int numChannels, AudioProcessor::BusesLayout& inOutCurrentLayout) + { + auto potentialSets = AudioChannelSet::channelSetsWithNumberOfChannels (static_cast (numChannels)); + + + for (auto set : potentialSets) + { + auto copy = inOutCurrentLayout; + + if (b->isLayoutSupported (set, ©)) + { + inOutCurrentLayout = copy; + return true; + } + } + + return false; + } + //============================================================================== static int getBusCount (const AudioProcessor* juceFilter, bool isInput) { @@ -813,35 +529,3 @@ struct AudioUnitHelpers #endif } }; - -AudioUnitHelpers::AUChannelStreamOrder AudioUnitHelpers::StreamOrder::auChannelStreamOrder[] = -{ - {kAudioChannelLayoutTag_Mono, {centre, unknown, unknown, unknown, unknown, unknown, unknown, unknown}}, - {kAudioChannelLayoutTag_Stereo, {left, right, unknown, unknown, unknown, unknown, unknown, unknown}}, - {kAudioChannelLayoutTag_StereoHeadphones, {left, right, unknown, unknown, unknown, unknown, unknown, unknown}}, - {kAudioChannelLayoutTag_Binaural, {left, right, unknown, unknown, unknown, unknown, unknown, unknown}}, - {kAudioChannelLayoutTag_Quadraphonic, {left, right, leftSurround, rightSurround, unknown, unknown, unknown, unknown}}, - {kAudioChannelLayoutTag_Pentagonal, {left, right, leftSurroundRear, rightSurroundRear, centre, unknown, unknown, unknown}}, - {kAudioChannelLayoutTag_Hexagonal, {left, right, leftSurroundRear, rightSurroundRear, centre, centreSurround, unknown, unknown}}, - {kAudioChannelLayoutTag_Octagonal, {left, right, leftSurround, rightSurround, centre, centreSurround, wideLeft, wideRight}}, - {kAudioChannelLayoutTag_Ambisonic_B_Format, {ambisonicW, ambisonicX, ambisonicY, ambisonicZ, unknown, unknown, unknown, unknown}}, - {kAudioChannelLayoutTag_MPEG_5_0_A, {left, right, centre, leftSurround, rightSurround, unknown, unknown, unknown}}, - {kAudioChannelLayoutTag_MPEG_5_0_B, {left, right, leftSurround, rightSurround, centre, unknown, unknown, unknown}}, - {kAudioChannelLayoutTag_MPEG_5_1_A, {left, right, centre, LFE, leftSurround, rightSurround, unknown, unknown}}, - {kAudioChannelLayoutTag_AudioUnit_6_0, {left, right, leftSurround, rightSurround, centre, centreSurround, unknown, unknown}}, - {kAudioChannelLayoutTag_DTS_6_0_A, {left, right, leftSurround, rightSurround, leftSurroundSide, rightSurroundSide, unknown, unknown}}, // TODO check this one - {kAudioChannelLayoutTag_MPEG_6_1_A, {left, right, centre, LFE, leftSurround, rightSurround, centre, unknown}}, - {kAudioChannelLayoutTag_DTS_6_1_A, {leftSurroundSide, rightSurroundSide, left, right, leftSurround, rightSurround, LFE, unknown}}, - {kAudioChannelLayoutTag_AudioUnit_7_0, {left, right, leftSurroundSide, rightSurroundSide, centre, leftSurroundRear, rightSurroundRear, unknown}}, - {kAudioChannelLayoutTag_MPEG_7_1_C, {left, right, centre, LFE, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear}}, - {kAudioChannelLayoutTag_AudioUnit_7_0_Front,{left, right, leftSurround, rightSurround, centre, leftCentre, rightCentre, unknown}}, - {kAudioChannelLayoutTag_MPEG_7_1_A, {left, right, centre, LFE, leftSurround, rightSurround, leftCentre, rightCentre}}, - {kAudioChannelLayoutTag_DTS_7_1, {leftCentre, centre, rightCentre, left, right, leftSurround, rightSurround, LFE}}, - {kAudioChannelLayoutTag_MPEG_3_0_A, {left, right, centre, unknown, unknown, unknown, unknown, unknown}}, - {kAudioChannelLayoutTag_MPEG_3_0_B, {centre, left, right, unknown, unknown, unknown, unknown, unknown}}, - {kAudioChannelLayoutTag_MPEG_4_0_A, {left, right, centre, centreSurround, unknown, unknown, unknown, unknown}}, - {kAudioChannelLayoutTag_MPEG_4_0_B, {centre, left, right, centreSurround, unknown, unknown, unknown, unknown}}, - {kAudioChannelLayoutTag_ITU_2_1, {left, right, centreSurround, unknown, unknown, unknown, unknown, unknown}}, - {kAudioChannelLayoutTag_EAC3_7_1_C, {left, centre, right, leftSurround, rightSurround, LFE, leftSurroundSide, rightSurroundSide}}, - {unknown, {unknown,unknown,unknown,unknown,unknown,unknown,unknown,unknown}} -}; diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index 986168a92b..457d10835b 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -66,6 +66,7 @@ namespace juce #include "../../juce_core/native/juce_osx_ObjCHelpers.h" +#include "../../juce_audio_basics/native/juce_mac_CoreAudioLayouts.h" #include "juce_AU_Shared.h" // Change this to disable logging of various activities @@ -558,7 +559,7 @@ public: if (! set.isDiscreteLayout()) { - const AudioChannelLayoutTag requestedTag = AudioUnitHelpers::ChannelSetToCALayoutTag (set); + const AudioChannelLayoutTag requestedTag = CoreAudioLayouts::toCoreAudio (set); AudioChannelLayout layout; const UInt32 minDataSize = sizeof (layout) - sizeof (AudioChannelDescription); @@ -583,7 +584,8 @@ public: if (err != noErr || dataSize < expectedSize) return false; - actualTag = AudioUnitHelpers::ChannelSetToCALayoutTag (AudioUnitHelpers::CoreAudioChannelLayoutToJuceType (layout)); + // try to convert the layout into a tag + actualTag = CoreAudioLayouts::toCoreAudio (CoreAudioLayouts::fromCoreAudio (layout)); } if (actualTag != requestedTag) @@ -1636,7 +1638,7 @@ private: propertySize = sizeof (auLayout); if (AudioUnitGetProperty (comp, kAudioUnitProperty_AudioChannelLayout, scope, static_cast (busIdx), &auLayout, &propertySize) == noErr) - currentLayout = AudioUnitHelpers::CoreAudioChannelLayoutToJuceType (auLayout); + currentLayout = CoreAudioLayouts::fromCoreAudio (auLayout); } if (currentLayout.isDisabled()) @@ -1679,7 +1681,7 @@ private: UInt32 propertySize = sizeof (auLayout); if (AudioUnitGetProperty (audioUnit, kAudioUnitProperty_AudioChannelLayout, scope, static_cast (busIdx), &auLayout, &propertySize) == noErr) - currentLayout = AudioUnitHelpers::CoreAudioChannelLayoutToJuceType (auLayout); + currentLayout = CoreAudioLayouts::fromCoreAudio (auLayout); } if (currentLayout.isDisabled()) @@ -1711,7 +1713,12 @@ private: const AudioChannelLayoutTag tag = layoutTags[j]; if (tag != kAudioChannelLayoutTag_UseChannelDescriptions) - supported.addIfNotAlreadyThere (AudioUnitHelpers::CALayoutTagToChannelSet (tag)); + { + AudioChannelLayout caLayout; + + caLayout.mChannelLayoutTag = tag; + supported.addIfNotAlreadyThere (CoreAudioLayouts::fromCoreAudio (caLayout)); + } } if (supported.size() > 0) diff --git a/modules/juce_audio_processors/format_types/juce_VST3Common.h b/modules/juce_audio_processors/format_types/juce_VST3Common.h index 64e73d96cd..02a4b8a834 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3Common.h +++ b/modules/juce_audio_processors/format_types/juce_VST3Common.h @@ -138,7 +138,7 @@ static inline Steinberg::Vst::SpeakerArrangement getArrangementForNumChannels (i return (Steinberg::Vst::SpeakerArrangement) bi.toInt64(); } -static inline Steinberg::Vst::Speaker getSpeakerType (AudioChannelSet::ChannelType type) noexcept +static inline Steinberg::Vst::Speaker getSpeakerType (const AudioChannelSet& set, AudioChannelSet::ChannelType type) noexcept { using namespace Steinberg::Vst; @@ -146,15 +146,16 @@ static inline Steinberg::Vst::Speaker getSpeakerType (AudioChannelSet::ChannelTy { case AudioChannelSet::left: return kSpeakerL; case AudioChannelSet::right: return kSpeakerR; - case AudioChannelSet::centre: return kSpeakerC; + case AudioChannelSet::centre: return (set == AudioChannelSet::mono() ? kSpeakerM : kSpeakerC); + case AudioChannelSet::LFE: return kSpeakerLfe; case AudioChannelSet::leftSurround: return kSpeakerLs; case AudioChannelSet::rightSurround: return kSpeakerRs; case AudioChannelSet::leftCentre: return kSpeakerLc; case AudioChannelSet::rightCentre: return kSpeakerRc; case AudioChannelSet::centreSurround: return kSpeakerCs; - case AudioChannelSet::leftSurroundRear: return kSpeakerSl; - case AudioChannelSet::rightSurroundRear: return kSpeakerSr; + case AudioChannelSet::leftSurroundSide: return (1 << 26); /* kSpeakerLcs */ + case AudioChannelSet::rightSurroundSide: return (1 << 27); /* kSpeakerRcs */ case AudioChannelSet::topMiddle: return (1 << 11); /* kSpeakerTm */ case AudioChannelSet::topFrontLeft: return kSpeakerTfl; case AudioChannelSet::topFrontCentre: return kSpeakerTfc; @@ -163,13 +164,37 @@ static inline Steinberg::Vst::Speaker getSpeakerType (AudioChannelSet::ChannelTy case AudioChannelSet::topRearCentre: return kSpeakerTrc; case AudioChannelSet::topRearRight: return kSpeakerTrr; case AudioChannelSet::LFE2: return kSpeakerLfe2; - default: break; + case AudioChannelSet::leftSurroundRear: return kSpeakerSl; + case AudioChannelSet::rightSurroundRear: return kSpeakerSr; + case AudioChannelSet::wideLeft: return kSpeakerPl; + case AudioChannelSet::wideRight: return kSpeakerPr; + case AudioChannelSet::ambisonicW: return (1 << 20); /* kSpeakerW */ + case AudioChannelSet::ambisonicX: return (1 << 21); /* kSpeakerX */ + case AudioChannelSet::ambisonicY: return (1 << 22); /* kSpeakerY */ + case AudioChannelSet::ambisonicZ: return (1 << 23); /* kSpeakerZ */ + + case AudioChannelSet::discreteChannel0: return kSpeakerM; + default: + break; } - return 0; + + switch (static_cast (type)) + { + case (int) AudioChannelSet::discreteChannel0 + 1: return (1 << 24); /* kSpeakerTsl */ + case (int) AudioChannelSet::discreteChannel0 + 2: return (1 << 25); /* kSpeakerTsr */ + case (int) AudioChannelSet::discreteChannel0 + 3: return (1 << 28); /* kSpeakerBfl */ + case (int) AudioChannelSet::discreteChannel0 + 4: return (1 << 29); /* kSpeakerBfc */ + case (int) AudioChannelSet::discreteChannel0 + 5: return (1 << 30); /* kSpeakerBfr */ + default: + break; + } + + auto channelIndex = static_cast (type) - (static_cast (AudioChannelSet::discreteChannel0) + 6ull); + return (1ull << (channelIndex + 33ull /* last speaker in vst layout + 1 */)); } -static inline AudioChannelSet::ChannelType getChannelType (Steinberg::Vst::Speaker type) noexcept +static inline AudioChannelSet::ChannelType getChannelType (Steinberg::Vst::SpeakerArrangement arr, Steinberg::Vst::Speaker type) noexcept { using namespace Steinberg::Vst; @@ -194,10 +219,29 @@ static inline AudioChannelSet::ChannelType getChannelType (Steinberg::Vst::Speak case kSpeakerTrc: return AudioChannelSet::topRearCentre; case kSpeakerTrr: return AudioChannelSet::topRearRight; case kSpeakerLfe2: return AudioChannelSet::LFE2; + case (1 << 19): return ((arr & kSpeakerC) != 0 ? AudioChannelSet::discreteChannel0 : AudioChannelSet::centre); + case (1 << 20): return AudioChannelSet::ambisonicW; /* kSpeakerW */ + case (1 << 21): return AudioChannelSet::ambisonicX; /* kSpeakerX */ + case (1 << 22): return AudioChannelSet::ambisonicY; /* kSpeakerY */ + case (1 << 23): return AudioChannelSet::ambisonicZ; /* kSpeakerZ */ + case (1 << 24): return static_cast ((int)AudioChannelSet::discreteChannel0 + 1); /* kSpeakerTsl */ + case (1 << 25): return static_cast ((int)AudioChannelSet::discreteChannel0 + 2); /* kSpeakerTsr */ + case (1 << 26): return AudioChannelSet::leftSurroundSide; /* kSpeakerLcs */ + case (1 << 27): return AudioChannelSet::rightSurroundSide; /* kSpeakerRcs */ + case (1 << 28): return static_cast ((int)AudioChannelSet::discreteChannel0 + 3); /* kSpeakerBfl */ + case (1 << 29): return static_cast ((int)AudioChannelSet::discreteChannel0 + 4); /* kSpeakerBfc */ + case (1 << 30): return static_cast ((int)AudioChannelSet::discreteChannel0 + 5); /* kSpeakerBfr */ + case kSpeakerPl: return AudioChannelSet::wideLeft; + case kSpeakerPr: return AudioChannelSet::wideRight; default: break; } - return AudioChannelSet::unknown; + auto channelType = BigInteger (static_cast (type)).findNextSetBit (0); + + // VST3 <-> JUCE layout conversion error: report this bug to the JUCE forum + jassert (channelType >= 33); + + return static_cast (static_cast (AudioChannelSet::discreteChannel0) + 6 + (channelType - 33)); } static inline Steinberg::Vst::SpeakerArrangement getVst3SpeakerArrangement (const AudioChannelSet& channels) noexcept @@ -226,7 +270,7 @@ static inline Steinberg::Vst::SpeakerArrangement getVst3SpeakerArrangement (cons Array types (channels.getChannelTypes()); for (int i = 0; i < types.size(); ++i) - result |= getSpeakerType (types.getReference(i)); + result |= getSpeakerType (channels, types.getReference(i)); return result; } @@ -254,9 +298,16 @@ static inline AudioChannelSet getChannelSetForSpeakerArrangement (Steinberg::Vst AudioChannelSet result; - for (Steinberg::Vst::Speaker speaker = 1; speaker <= Steinberg::Vst::kSpeakerRcs; speaker <<= 1) - if ((arr & speaker) != 0) - result.addChannel (getChannelType (speaker)); + BigInteger vstChannels (static_cast (arr)); + for (auto bit = vstChannels.findNextSetBit (0); bit != -1; bit = vstChannels.findNextSetBit (bit + 1)) + { + AudioChannelSet::ChannelType channelType = getChannelType (arr, 1ull << static_cast (bit)); + if (channelType != AudioChannelSet::unknown) + result.addChannel (channelType); + } + + // VST3 <-> JUCE layout conversion error: report this bug to the JUCE forum + jassert (result.size() == vstChannels.countNumberOfSetBits()); return result; } diff --git a/modules/juce_audio_processors/format_types/juce_VST3Headers.h b/modules/juce_audio_processors/format_types/juce_VST3Headers.h index 8721cafe37..1eec32557b 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3Headers.h +++ b/modules/juce_audio_processors/format_types/juce_VST3Headers.h @@ -99,6 +99,7 @@ #include #include #include + #include #include #include #include @@ -121,6 +122,7 @@ namespace Steinberg DEF_CLASS_IID (IPluginFactory) DEF_CLASS_IID (IPluginFactory2) DEF_CLASS_IID (IPluginFactory3) + DEF_CLASS_IID (IPlugViewContentScaleSupport) } #endif //JUCE_VST3HEADERS_INCLUDE_HEADERS_ONLY diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index 384aa86dca..88d8f49cf1 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -53,7 +53,7 @@ struct VST3Classes #endif #if JUCE_DEBUG -static int warnOnFailure (int result) +static int warnOnFailure (int result) noexcept { const char* message = "Unknown result!"; @@ -157,9 +157,9 @@ static int getNumSingleDirectionChannelsFor (Vst::IComponent* component, } static void setStateForAllBusesOfType (Vst::IComponent* component, - bool state, - bool activateInputs, - bool activateAudioChannels) + bool state, + bool activateInputs, + bool activateAudioChannels) { jassert (component != nullptr); @@ -346,17 +346,16 @@ static StringArray getPluginInstrumentCategories() } //============================================================================== -class VST3PluginInstance; +struct VST3PluginInstance; -class VST3HostContext : public Vst::IComponentHandler, // From VST V3.0.0 - public Vst::IComponentHandler2, // From VST V3.1.0 (a very well named class, of course!) - public Vst::IComponentHandler3, // From VST V3.5.0 (also very well named!) - public Vst::IContextMenuTarget, - public Vst::IHostApplication, - public Vst::IUnitHandler +struct VST3HostContext : public Vst::IComponentHandler, // From VST V3.0.0 + public Vst::IComponentHandler2, // From VST V3.1.0 (a very well named class, of course!) + public Vst::IComponentHandler3, // From VST V3.5.0 (also very well named!) + public Vst::IContextMenuTarget, + public Vst::IHostApplication, + public Vst::IUnitHandler { -public: - VST3HostContext() : plugin (nullptr) + VST3HostContext() { appName = File::getSpecialLocation (File::currentApplicationFile).getFileNameWithoutExtension(); attributeList = new AttributeList (this); @@ -378,7 +377,7 @@ public: { if (plugin != nullptr) { - const int index = getIndexOfParamID (paramID); + auto index = getIndexOfParamID (paramID); if (index < 0) return kResultFalse; @@ -393,7 +392,7 @@ public: { if (plugin != nullptr) { - const int index = getIndexOfParamID (paramID); + auto index = getIndexOfParamID (paramID); if (index < 0) return kResultFalse; @@ -417,13 +416,14 @@ public: { if (plugin != nullptr) { - const int index = getIndexOfParamID (paramID); + auto index = getIndexOfParamID (paramID); if (index < 0) return kResultFalse; plugin->endParameterChangeGesture (index); } + return kResultTrue; } @@ -436,11 +436,11 @@ public: if (hasFlag (flags, Vst::kIoChanged)) { - const double sampleRate = plugin->getSampleRate(); - const int blockSize = plugin->getBlockSize(); + auto sampleRate = plugin->getSampleRate(); + auto blockSize = plugin->getBlockSize(); plugin->prepareToPlay (sampleRate >= 8000 ? sampleRate : 44100.0, - blockSize > 0 ? blockSize : 1024); + blockSize > 0 ? blockSize : 1024); } if (hasFlag (flags, Vst::kLatencyChanged)) @@ -487,9 +487,8 @@ public: } //============================================================================== - class ContextMenu : public Vst::IContextMenu + struct ContextMenu : public Vst::IContextMenu { - public: ContextMenu (VST3PluginInstance& pluginInstance) : owner (pluginInstance) {} virtual ~ContextMenu() {} @@ -514,7 +513,7 @@ public: { for (int i = items.size(); --i >= 0;) { - ItemAndTarget& item = items.getReference(i); + auto& item = items.getReference(i); if (item.item.tag == toRemove.tag && item.target == target) items.remove (i); @@ -527,7 +526,7 @@ public: { for (int i = 0; i < items.size(); ++i) { - const ItemAndTarget& item = items.getReference(i); + auto& item = items.getReference(i); if (item.item.tag == tag) { @@ -552,9 +551,8 @@ public: for (int i = 0; i < items.size(); ++i) { - const Item& item = items.getReference (i).item; - - PopupMenu* menuToUse = menuStack.getLast(); + auto& item = items.getReference (i).item; + auto* menuToUse = menuStack.getLast(); if (hasFlag (item.flags, Item::kIsGroupStart & ~Item::kIsDisabled)) { @@ -563,9 +561,9 @@ public: } else if (hasFlag (item.flags, Item::kIsGroupEnd)) { - if (const Item* subItem = subItemStack.getLast()) + if (auto* subItem = subItemStack.getLast()) { - if (PopupMenu* m = menuStack [menuStack.size() - 2]) + if (auto* m = menuStack [menuStack.size() - 2]) m->addSubMenu (toString (subItem->name), *menuToUse, ! hasFlag (subItem->flags, Item::kIsDisabled), nullptr, @@ -590,7 +588,7 @@ public: PopupMenu::Options options; - if (AudioProcessorEditor* ed = owner.getActiveEditor()) + if (auto* ed = owner.getActiveEditor()) options = options.withTargetScreenArea (ed->getScreenBounds().translated ((int) x, (int) y).withSize (1, 1)); #if JUCE_MODAL_LOOPS_PERMITTED @@ -631,7 +629,7 @@ public: for (int i = 0; i < items.size(); ++i) { - const ItemAndTarget& item = items.getReference(i); + auto& item = items.getReference(i); if ((int) item.item.tag == result) { @@ -736,7 +734,7 @@ public: private: //============================================================================== - VST3PluginInstance* plugin; + VST3PluginInstance* plugin = nullptr; Atomic refCount; String appName; @@ -748,11 +746,11 @@ private: if (plugin == nullptr || plugin->editController == nullptr) return -1; - int result = getMappedParamID (paramID); + auto result = getMappedParamID (paramID); if (result < 0) { - const int numParams = plugin->editController->getParameterCount(); + auto numParams = plugin->editController->getParameterCount(); for (int i = 0; i < numParams; ++i) { @@ -769,14 +767,13 @@ private: int getMappedParamID (Vst::ParamID paramID) { - const ParamMapType::iterator it (paramToIndexMap.find (paramID)); + auto it = paramToIndexMap.find (paramID); return it != paramToIndexMap.end() ? it->second : -1; } //============================================================================== - class Message : public Vst::IMessage + struct Message : public Vst::IMessage { - public: Message (Vst::IAttributeList* list) : attributeList (list) { @@ -814,9 +811,8 @@ private: Array, CriticalSection> messageQueue; //============================================================================== - class AttributeList : public Vst::IAttributeList + struct AttributeList : public Vst::IAttributeList { - public: AttributeList (VST3HostContext* o) : owner (o) {} virtual ~AttributeList() {} @@ -893,13 +889,11 @@ private: { jassert (id != nullptr); - for (int i = owner->messageQueue.size(); --i >= 0;) + for (auto&& m : owner->messageQueue) { - Message* const message = owner->messageQueue.getReference (i); - - if (std::strcmp (message->getMessageID(), id) == 0) + if (std::strcmp (m->getMessageID(), id) == 0) { - if (MemoryBlock* binaryData = message->value.getBinaryData()) + if (auto* binaryData = m->value.getBinaryData()) { data = binaryData->getData(); size = (Steinberg::uint32) binaryData->getSize(); @@ -921,13 +915,11 @@ private: { jassert (id != nullptr); - for (int i = owner->messageQueue.size(); --i >= 0;) + for (auto&& m : owner->messageQueue) { - VST3HostContext::Message* const message = owner->messageQueue.getReference (i); - - if (std::strcmp (message->getMessageID(), id) == 0) + if (std::strcmp (m->getMessageID(), id) == 0) { - message->value = value; + m->value = value; return; } } @@ -940,13 +932,11 @@ private: { jassert (id != nullptr); - for (int i = owner->messageQueue.size(); --i >= 0;) + for (auto&& m : owner->messageQueue) { - VST3HostContext::Message* const message = owner->messageQueue.getReference (i); - - if (std::strcmp (message->getMessageID(), id) == 0) + if (std::strcmp (m->getMessageID(), id) == 0) { - value = message->value; + value = m->value; return true; } } @@ -963,9 +953,8 @@ private: }; //============================================================================== -class DescriptionFactory +struct DescriptionFactory { -public: DescriptionFactory (VST3HostContext* host, IPluginFactory* pluginFactory) : vst3HostContext (host), factory (pluginFactory) { @@ -979,11 +968,11 @@ public: StringArray foundNames; PFactoryInfo factoryInfo; factory->getFactoryInfo (&factoryInfo); - const String companyName (toString (factoryInfo.vendor).trim()); + auto companyName = toString (factoryInfo.vendor).trim(); Result result (Result::ok()); - const Steinberg::int32 numClasses = factory->countClasses(); + auto numClasses = factory->countClasses(); for (Steinberg::int32 i = 0; i < numClasses; ++i) { @@ -1029,8 +1018,8 @@ public: { if (component->initialize (vst3HostContext->getFUnknown()) == kResultOk) { - const int numInputs = getNumSingleDirectionChannelsFor (component, true, true); - const int numOutputs = getNumSingleDirectionChannelsFor (component, false, true); + auto numInputs = getNumSingleDirectionChannelsFor (component, true, true); + auto numOutputs = getNumSingleDirectionChannelsFor (component, false, true); createPluginDescription (desc, file, companyName, name, info, info2, infoW, numInputs, numOutputs); @@ -1057,8 +1046,7 @@ public: return result; } -protected: - virtual Result performOnDescription (PluginDescription& description) = 0; + virtual Result performOnDescription (PluginDescription&) = 0; private: ComSmartPtr vst3HostContext; @@ -1067,14 +1055,14 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DescriptionFactory) }; -struct MatchingDescriptionFinder : public DescriptionFactory +struct MatchingDescriptionFinder : public DescriptionFactory { - MatchingDescriptionFinder (VST3HostContext* host, IPluginFactory* pluginFactory, const PluginDescription& desc) - : DescriptionFactory (host, pluginFactory), description (desc) + MatchingDescriptionFinder (VST3HostContext* h, IPluginFactory* f, const PluginDescription& desc) + : DescriptionFactory (h, f), description (desc) { } - static const char* getSuccessString() noexcept { return "Found Description"; } + static const char* getSuccessString() noexcept { return "Found Description"; } Result performOnDescription (PluginDescription& desc) { @@ -1090,7 +1078,7 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MatchingDescriptionFinder) }; -struct DescriptionLister : public DescriptionFactory +struct DescriptionLister : public DescriptionFactory { DescriptionLister (VST3HostContext* host, IPluginFactory* pluginFactory) : DescriptionFactory (host, pluginFactory) @@ -1113,7 +1101,6 @@ private: struct DLLHandle { DLLHandle (const String& modulePath) - : factory (nullptr) { if (modulePath.trim().isNotEmpty()) open (modulePath); @@ -1126,7 +1113,7 @@ struct DLLHandle #if JUCE_WINDOWS releaseFactory(); - if (ExitModuleFn exitFn = (ExitModuleFn) getFunction ("ExitDll")) + if (auto exitFn = (ExitModuleFn) getFunction ("ExitDll")) exitFn(); library.close(); @@ -1136,7 +1123,7 @@ struct DLLHandle { releaseFactory(); - if (ExitModuleFn exitFn = (ExitModuleFn) getFunction ("bundleExit")) + if (auto exitFn = (ExitModuleFn) getFunction ("bundleExit")) exitFn(); CFRelease (bundleRef); @@ -1167,7 +1154,7 @@ struct DLLHandle IPluginFactory* JUCE_CALLTYPE getPluginFactory() { if (factory == nullptr) - if (GetFactoryProc proc = (GetFactoryProc) getFunction ("GetPluginFactory")) + if (auto proc = (GetFactoryProc) getFunction ("GetPluginFactory")) factory = proc(); // The plugin NEEDS to provide a factory to be able to be called a VST3! @@ -1193,7 +1180,7 @@ struct DLLHandle } private: - IPluginFactory* factory; + IPluginFactory* factory = nullptr; void releaseFactory() { @@ -1210,7 +1197,7 @@ private: { typedef bool (PLUGIN_API *InitModuleProc) (); - if (InitModuleProc proc = (InitModuleProc) getFunction ("InitDll")) + if (auto proc = (InitModuleProc) getFunction ("InitDll")) { if (proc()) return true; @@ -1247,7 +1234,7 @@ private: { typedef bool (*BundleEntryProc)(CFBundleRef); - if (BundleEntryProc proc = (BundleEntryProc) getFunction ("bundleEntry")) + if (auto proc = (BundleEntryProc) getFunction ("bundleEntry")) { if (proc (bundleRef)) return true; @@ -1282,9 +1269,8 @@ private: }; //============================================================================== -class VST3ModuleHandle : public ReferenceCountedObject +struct VST3ModuleHandle : public ReferenceCountedObject { -public: explicit VST3ModuleHandle (const File& pluginFile) : file (pluginFile) { getActiveModules().add (this); @@ -1311,7 +1297,7 @@ public: { ComSmartPtr host (new VST3HostContext()); DescriptionLister lister (host, pluginFactory); - const Result result (lister.findDescriptionsAndPerform (File (fileOrIdentifier))); + auto result = lister.findDescriptionsAndPerform (File (fileOrIdentifier)); results.addCopiesOf (lister.list); @@ -1327,16 +1313,10 @@ public: static VST3ModuleHandle::Ptr findOrCreateModule (const File& file, const PluginDescription& description) { - Array& activeModules = getActiveModules(); - - for (int i = activeModules.size(); --i >= 0;) - { - VST3ModuleHandle* const module = activeModules.getUnchecked (i); - + for (auto* module : getActiveModules()) // VST3s are basically shells, you must therefore check their name along with their file: if (module->file == file && module->name == description.name) return module; - } VST3ModuleHandle::Ptr m (new VST3ModuleHandle (file)); @@ -1374,7 +1354,7 @@ private: ComSmartPtr host (new VST3HostContext()); MatchingDescriptionFinder finder (host, pluginFactory, description); - const Result result (finder.findDescriptionsAndPerform (f)); + auto result = finder.findDescriptionsAndPerform (f); if (result.getErrorMessage() == MatchingDescriptionFinder::getSuccessString()) { @@ -1390,28 +1370,21 @@ private: }; //============================================================================== -class VST3PluginWindow : public AudioProcessorEditor, - public ComponentMovementWatcher, - public IPlugFrame +struct VST3PluginWindow : public AudioProcessorEditor, + public ComponentMovementWatcher, + public IPlugFrame { -public: VST3PluginWindow (AudioProcessor* owner, IPlugView* pluginView) : AudioProcessorEditor (owner), ComponentMovementWatcher (this), - refCount (1), - view (pluginView, false), - pluginHandle (nullptr), - recursiveResize (false) + view (pluginView, false) { setSize (10, 10); setOpaque (true); setVisible (true); warnOnFailure (view->setFrame (this)); - - ViewRect rect; - warnOnFailure (view->getSize (&rect)); - resizeWithRect (*this, rect); + resizeToFit(); } ~VST3PluginWindow() @@ -1422,7 +1395,7 @@ public: processor.editorBeingDeleted (this); #if JUCE_MAC - dummyComponent.setView (nullptr); + embeddedComponent.setView (nullptr); #endif view = nullptr; @@ -1441,14 +1414,14 @@ public: view->onWheel (wheel.deltaY); } - void focusGained (FocusChangeType) override { view->onFocus (true); } - void focusLost (FocusChangeType) override { view->onFocus (false); } + void focusGained (FocusChangeType) override { view->onFocus (true); } + void focusLost (FocusChangeType) override { view->onFocus (false); } /** It seems that most, if not all, plugins do their own keyboard hooks, but IPlugView does have a set of keyboard related methods... */ - bool keyStateChanged (bool /*isKeyDown*/) override { return true; } - bool keyPressed (const KeyPress& /*key*/) override { return true; } + bool keyStateChanged (bool /*isKeyDown*/) override { return true; } + bool keyPressed (const KeyPress& /*key*/) override { return true; } //============================================================================== void componentMovedOrResized (bool, bool wasResized) override @@ -1456,12 +1429,12 @@ public: if (recursiveResize) return; - Component* const topComp = getTopLevelComponent(); + auto* topComp = getTopLevelComponent(); if (topComp->getPeer() != nullptr) { #if JUCE_WINDOWS - const Point pos (topComp->getLocalPoint (this, Point())); + auto pos = topComp->getLocalPoint (this, Point()); #endif recursiveResize = true; @@ -1474,14 +1447,16 @@ public: rect.bottom = (Steinberg::int32) getHeight(); view->checkSizeConstraint (&rect); - setSize ((int) rect.getWidth(), (int) rect.getHeight()); + auto w = (int) rect.getWidth(); + auto h = (int) rect.getHeight(); + setSize (w, h); #if JUCE_WINDOWS SetWindowPos (pluginHandle, 0, - pos.x, pos.y, rect.getWidth(), rect.getHeight(), + pos.x, pos.y, w, h, isVisible() ? SWP_SHOWWINDOW : SWP_HIDEWINDOW); #elif JUCE_MAC - dummyComponent.setBounds (getLocalBounds()); + embeddedComponent.setBounds (getLocalBounds()); #endif view->onSize (&rect); @@ -1495,7 +1470,7 @@ public: pos.x, pos.y, rect.getWidth(), rect.getHeight(), isVisible() ? SWP_SHOWWINDOW : SWP_HIDEWINDOW); #elif JUCE_MAC - dummyComponent.setBounds (0, 0, (int) rect.getWidth(), (int) rect.getHeight()); + embeddedComponent.setBounds (0, 0, (int) rect.getWidth(), (int) rect.getHeight()); #endif } @@ -1506,7 +1481,7 @@ public: } } - void componentPeerChanged() override { } + void componentPeerChanged() override {} void componentVisibilityChanged() override { @@ -1514,14 +1489,21 @@ public: componentMovedOrResized (true, true); } + void resizeToFit() + { + ViewRect rect; + warnOnFailure (view->getSize (&rect)); + resizeWithRect (*this, rect); + } + tresult PLUGIN_API resizeView (IPlugView* incomingView, ViewRect* newSize) override { if (incomingView != nullptr && newSize != nullptr && incomingView == view) { - resizeWithRect (dummyComponent, *newSize); - setSize (dummyComponent.getWidth(), dummyComponent.getHeight()); + resizeWithRect (embeddedComponent, *newSize); + setSize (embeddedComponent.getWidth(), embeddedComponent.getHeight()); return kResultTrue; } @@ -1529,37 +1511,47 @@ public: return kInvalidArgument; } + void setScaleFactor (float newScale) override + { + Steinberg::IPlugViewContentScaleSupport* scaleInterface = nullptr; + view->queryInterface (Steinberg::IPlugViewContentScaleSupport::iid, (void**) &scaleInterface); + + if (scaleInterface != nullptr) + { + scaleInterface->setContentScaleFactor ((Steinberg::IPlugViewContentScaleSupport::ScaleFactor) newScale); + scaleInterface->release(); + resizeToFit(); + } + } + private: //============================================================================== - Atomic refCount; + Atomic refCount { 1 }; ComSmartPtr view; #if JUCE_WINDOWS - class ChildComponent : public Component + struct ChildComponent : public Component { - public: ChildComponent() {} void paint (Graphics& g) override { g.fillAll (Colours::cornflowerblue); } - using Component::createNewPeer; - private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildComponent) }; - ChildComponent dummyComponent; + ChildComponent embeddedComponent; ScopedPointer peer; typedef HWND HandleFormat; #elif JUCE_MAC - AutoResizingNSViewComponentWithParent dummyComponent; + AutoResizingNSViewComponentWithParent embeddedComponent; typedef NSView* HandleFormat; #else - Component dummyComponent; + Component embeddedComponent; typedef void* HandleFormat; #endif - HandleFormat pluginHandle; - bool recursiveResize; + HandleFormat pluginHandle = {}; + bool recursiveResize = false; //============================================================================== static void resizeWithRect (Component& comp, const ViewRect& rect) @@ -1574,17 +1566,17 @@ private: if (pluginHandle == nullptr) { #if JUCE_WINDOWS - if (Component* topComp = getTopLevelComponent()) - peer = dummyComponent.createNewPeer (0, topComp->getWindowHandle()); + if (auto* topComp = getTopLevelComponent()) + peer = embeddedComponent.createNewPeer (0, topComp->getWindowHandle()); else peer = nullptr; if (peer != nullptr) pluginHandle = (HandleFormat) peer->getNativeHandle(); #elif JUCE_MAC - dummyComponent.setBounds (getLocalBounds()); - addAndMakeVisible (dummyComponent); - pluginHandle = (NSView*) dummyComponent.getView(); + embeddedComponent.setBounds (getLocalBounds()); + addAndMakeVisible (embeddedComponent); + pluginHandle = (NSView*) embeddedComponent.getView(); jassert (pluginHandle != nil); #endif @@ -1604,9 +1596,7 @@ private: //============================================================================== struct VST3ComponentHolder { - VST3ComponentHolder (const VST3ModuleHandle::Ptr& handle) - : module (handle), - isComponentInitialised (false) + VST3ComponentHolder (const VST3ModuleHandle::Ptr& m) : module (m) { host = new VST3HostContext(); } @@ -1638,7 +1628,8 @@ struct VST3ComponentHolder if (editController == nullptr) { // Try finding the IEditController the long way around: - const Steinberg::int32 numClasses = factory->countClasses(); + auto numClasses = factory->countClasses(); + for (Steinberg::int32 i = 0; i < numClasses; ++i) { PClassInfo classInfo; @@ -1663,8 +1654,9 @@ struct VST3ComponentHolder PFactoryInfo factoryInfo; factory->getFactoryInfo (&factoryInfo); - int classIdx; - if ((classIdx = getClassIndex (module->name)) >= 0) + auto classIdx = getClassIndex (module->name); + + if (classIdx >= 0) { PClassInfo info; bool success = (factory->getClassInfo (classIdx, &info) == kResultOk); @@ -1770,8 +1762,8 @@ struct VST3ComponentHolder for (Steinberg::int32 j = 0; j < numClasses; ++j) if (factory->getClassInfo (j, &info) == kResultOk - && std::strcmp (info.category, kVstAudioEffectClass) == 0 - && toString (info.name).trim() == className) + && std::strcmp (info.category, kVstAudioEffectClass) == 0 + && toString (info.name).trim() == className) return j; return -1; @@ -1783,23 +1775,19 @@ struct VST3ComponentHolder ComSmartPtr host; ComSmartPtr component; - bool isComponentInitialised; + bool isComponentInitialised = false; }; //============================================================================== -class VST3PluginInstance : public AudioPluginInstance +struct VST3PluginInstance : public AudioPluginInstance { -public: VST3PluginInstance (VST3ComponentHolder* componentHolder) : AudioPluginInstance (getBusProperties (componentHolder->component)), holder (componentHolder), - programParameterID ((Vst::ParamID) -1), inputParameterChanges (new ParamValueQueueList()), outputParameterChanges (new ParamValueQueueList()), midiInputs (new MidiEventList()), - midiOutputs (new MidiEventList()), - isControllerInitialised (false), - isActive (false) + midiOutputs (new MidiEventList()) { holder->host->setPlugin (this); } @@ -1879,8 +1867,8 @@ public: inputArrangements.clearQuick(); outputArrangements.clearQuick(); - const int numInputAudioBuses = getBusCount (true); - const int numOutputAudioBuses = getBusCount (false); + auto numInputAudioBuses = getBusCount (true); + auto numOutputAudioBuses = getBusCount (false); for (int i = 0; i < numInputAudioBuses; ++i) inputArrangements.add (getArrangementForBus (processor, true, i)); @@ -1894,8 +1882,8 @@ public: inputArrangements.clearQuick(); outputArrangements.clearQuick(); - const int numInputBuses = getBusCount (true); - const int numOutputBuses = getBusCount (false); + auto numInputBuses = getBusCount (true); + auto numOutputBuses = getBusCount (false); for (int i = 0; i < numInputBuses; ++i) inputArrangements.add (getVst3SpeakerArrangement (getBus (true, i)->getLastEnabledLayout())); @@ -1940,8 +1928,8 @@ public: // Needed for having the same sample rate in processBlock(); some plugins need this! setRateAndBufferSizeDetails (newSampleRate, estimatedSamplesPerBlock); - const int numInputBuses = getBusCount (true); - const int numOutputBuses = getBusCount (false); + auto numInputBuses = getBusCount (true); + auto numOutputBuses = getBusCount (false); for (int i = 0; i < numInputBuses; ++i) warnOnFailure (holder->component->activateBus (Vst::kAudio, Vst::kInput, i, getBus (true, i)->isEnabled() ? 1 : 0)); @@ -2000,10 +1988,10 @@ public: Vst::SymbolicSampleSizes sampleSize) { using namespace Vst; - const int numSamples = buffer.getNumSamples(); + auto numSamples = buffer.getNumSamples(); - const int numInputAudioBuses = getBusCount (true); - const int numOutputAudioBuses = getBusCount (false); + auto numInputAudioBuses = getBusCount (true); + auto numOutputAudioBuses = getBusCount (false); ProcessData data; data.processMode = isNonRealtime() ? kOffline : kRealtime; @@ -2044,10 +2032,11 @@ public: // Let's at least check if it is a VST3 compatible layout for (int dir = 0; dir < 2; ++dir) { - const bool isInput = (dir == 0); - const int n = getBusCount (isInput); + bool isInput = (dir == 0); + auto n = getBusCount (isInput); + for (int i = 0; i < n; ++i) - if (getChannelLayoutOfBus(isInput, i).isDiscreteLayout()) + if (getChannelLayoutOfBus (isInput, i).isDiscreteLayout()) return false; } @@ -2058,13 +2047,14 @@ public: { for (int dir = 0; dir < 2; ++dir) { - const bool isInput = (dir == 0); - const int n = getBusCount (isInput); + bool isInput = (dir == 0); + auto n = getBusCount (isInput); const Vst::BusDirection vstDir = (isInput ? Vst::kInput : Vst::kOutput); for (int busIdx = 0; busIdx < n; ++busIdx) { const bool isEnabled = (! layouts.getChannelSet (isInput, busIdx).isDisabled()); + if (holder->component->activateBus (Vst::kAudio, vstDir, busIdx, (isEnabled ? 1 : 0)) != kResultOk) return false; } @@ -2074,13 +2064,13 @@ public: for (int i = 0; i < layouts.inputBuses.size(); ++i) { - const AudioChannelSet& requested = layouts.getChannelSet (true, i); + const auto& requested = layouts.getChannelSet (true, i); inputArrangements.add (getVst3SpeakerArrangement (requested.isDisabled() ? getBus (true, i)->getLastEnabledLayout() : requested)); } for (int i = 0; i < layouts.outputBuses.size(); ++i) { - const AudioChannelSet& requested = layouts.getChannelSet (false, i); + const auto& requested = layouts.getChannelSet (false, i); outputArrangements.add (getVst3SpeakerArrangement (requested.isDisabled() ? getBus (false, i)->getLastEnabledLayout() : requested)); } @@ -2113,12 +2103,12 @@ public: //============================================================================== String getChannelName (int channelIndex, bool forInput, bool forAudioChannel) const { - const int numBuses = getNumSingleDirectionBusesFor (holder->component, forInput, forAudioChannel); + auto numBuses = getNumSingleDirectionBusesFor (holder->component, forInput, forAudioChannel); int numCountedChannels = 0; for (int i = 0; i < numBuses; ++i) { - Vst::BusInfo busInfo (getBusInfo (forInput, forAudioChannel, i)); + auto busInfo = getBusInfo (forInput, forAudioChannel, i); numCountedChannels += busInfo.channelCount; @@ -2153,7 +2143,7 @@ public: { if (processor != nullptr) { - const double sampleRate = getSampleRate(); + auto sampleRate = getSampleRate(); if (sampleRate > 0.0) return jlimit (0, 0x7fffffff, (int) processor->getTailSamples()) / sampleRate; @@ -2165,7 +2155,7 @@ public: //============================================================================== AudioProcessorEditor* createEditor() override { - if (IPlugView* view = tryCreatingView()) + if (auto* view = tryCreatingView()) return new VST3PluginWindow (this, view); return nullptr; @@ -2199,7 +2189,7 @@ public: { if (editController != nullptr) { - const uint32 id = getParameterInfoForIndex (parameterIndex).id; + auto id = getParameterInfoForIndex (parameterIndex).id; return (float) editController->getParamNormalized (id); } @@ -2210,7 +2200,7 @@ public: { if (editController != nullptr) { - const uint32 id = getParameterInfoForIndex (parameterIndex).id; + auto id = getParameterInfoForIndex (parameterIndex).id; Vst::String128 result; warnOnFailure (editController->getParamStringByValue (id, editController->getParamNormalized (id), result)); @@ -2225,7 +2215,7 @@ public: { if (editController != nullptr) { - const uint32 paramID = getParameterInfoForIndex (parameterIndex).id; + auto paramID = getParameterInfoForIndex (parameterIndex).id; editController->setParamNormalized (paramID, (double) newValue); Steinberg::int32 index; @@ -2243,8 +2233,7 @@ public: { if (programNames.size() > 0 && editController != nullptr) { - Vst::ParamValue value = - static_cast (program) / static_cast (programNames.size()); + auto value = static_cast (program) / static_cast (programNames.size()); editController->setParamNormalized (programParameterID, value); Steinberg::int32 index; @@ -2325,10 +2314,9 @@ public: //============================================================================== // NB: this class and its subclasses must be public to avoid problems in // DLL builds under MSVC. - class ParamValueQueueList : public Vst::IParameterChanges + struct ParamValueQueueList : public Vst::IParameterChanges { - public: - ParamValueQueueList() : numQueuesUsed (0) {} + ParamValueQueueList() {} virtual ~ParamValueQueueList() {} JUCE_DECLARE_VST3_COM_REF_METHODS @@ -2350,7 +2338,7 @@ public: index = numQueuesUsed++; ParamValueQueue* valueQueue = (index < queues.size() ? queues[index] - : queues.add (new ParamValueQueue)); + : queues.add (new ParamValueQueue())); valueQueue->clear(); valueQueue->setParamID (id); @@ -2365,7 +2353,7 @@ public: struct ParamValueQueue : public Vst::IParamValueQueue { - ParamValueQueue() : paramID (static_cast (-1)) + ParamValueQueue() { points.ensureStorageAllocated (1024); } @@ -2425,7 +2413,7 @@ public: }; Atomic refCount; - Vst::ParamID paramID; + Vst::ParamID paramID = static_cast (-1); Array points; CriticalSection pointLock; @@ -2434,7 +2422,7 @@ public: Atomic refCount; OwnedArray queues; - int numQueuesUsed; + int numQueuesUsed = 0; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ParamValueQueueList) }; @@ -2460,8 +2448,7 @@ private: ComSmartPtr unitInfo; ComSmartPtr unitData; ComSmartPtr programListData; - ComSmartPtr componentConnection; - ComSmartPtr editControllerConnection; + ComSmartPtr componentConnection, editControllerConnection; /** The number of IO buses MUST match that of the plugin, even if there aren't enough channels to process, @@ -2472,7 +2459,7 @@ private: AudioProcessor::BusesLayout cachedBusLayouts; StringArray programNames; - Vst::ParamID programParameterID; + Vst::ParamID programParameterID = (Vst::ParamID) -1; //============================================================================== template @@ -2494,7 +2481,7 @@ private: { Steinberg::MemoryStream* stream = nullptr; - if (XmlElement* const state = head.getChildByName (identifier)) + if (auto* state = head.getChildByName (identifier)) { MemoryBlock mem; @@ -2512,7 +2499,7 @@ private: ComSmartPtr inputParameterChanges, outputParameterChanges; ComSmartPtr midiInputs, midiOutputs; Vst::ProcessContext timingInfo; //< Only use this in processBlock()! - bool isControllerInitialised, isActive; + bool isControllerInitialised = false, isActive = false; //============================================================================== /** Some plugins need to be "connected" to intercommunicate between their implemented classes */ @@ -2704,7 +2691,8 @@ private: && (paramInfo.flags & Steinberg::Vst::ParameterInfo::kIsProgramChange) != 0) break; - if (idx >= num) return; + if (idx >= num) + return; programParameterID = paramInfo.id; programUnitID = paramInfo.unitId; @@ -2747,11 +2735,13 @@ private: if (editController != nullptr && paramInfo.stepCount > 0) { - const int numPrograms = paramInfo.stepCount + 1; + auto numPrograms = paramInfo.stepCount + 1; + for (int i = 0; i < numPrograms; ++i) { + auto valueNormalized = static_cast (i) / static_cast (paramInfo.stepCount); + Vst::String128 programName; - Vst::ParamValue valueNormalized = static_cast (i) / static_cast (paramInfo.stepCount); if (editController->getParamStringByValue (paramInfo.id, valueNormalized, programName) == kResultOk) programNames.add (toString (programName)); } @@ -2773,7 +2763,7 @@ AudioPluginInstance* VST3Classes::VST3ComponentHolder::createPluginInstance() if (! initialise()) return nullptr; - VST3PluginInstance* plugin = new VST3PluginInstance (this); + auto* plugin = new VST3PluginInstance (this); host->setPlugin (plugin); return plugin; } @@ -2785,16 +2775,11 @@ VST3PluginFormat::~VST3PluginFormat() {} void VST3PluginFormat::findAllTypesForFile (OwnedArray& results, const String& fileOrIdentifier) { - if (! fileMightContainThisPluginType (fileOrIdentifier)) - return; - - VST3Classes::VST3ModuleHandle::getAllDescriptionsForFile (results, fileOrIdentifier); + if (fileMightContainThisPluginType (fileOrIdentifier)) + VST3Classes::VST3ModuleHandle::getAllDescriptionsForFile (results, fileOrIdentifier); } -void VST3PluginFormat::createPluginInstance (const PluginDescription& description, - double, - int, - void* userData, +void VST3PluginFormat::createPluginInstance (const PluginDescription& description, double, int, void* userData, void (*callback) (void*, AudioPluginInstance*, const String&)) { ScopedPointer result; @@ -2803,15 +2788,17 @@ void VST3PluginFormat::createPluginInstance (const PluginDescription& descriptio { File file (description.fileOrIdentifier); - const File previousWorkingDirectory (File::getCurrentWorkingDirectory()); + auto previousWorkingDirectory = File::getCurrentWorkingDirectory(); file.getParentDirectory().setAsCurrentWorkingDirectory(); if (const VST3Classes::VST3ModuleHandle::Ptr module = VST3Classes::VST3ModuleHandle::findOrCreateModule (file, description)) { ScopedPointer holder = new VST3Classes::VST3ComponentHolder (module); + if (holder->initialise()) { result = new VST3Classes::VST3PluginInstance (holder.release()); + if (! result->initialise()) result = nullptr; } @@ -2835,7 +2822,7 @@ bool VST3PluginFormat::requiresUnblockedMessageThreadDuringCreation (const Plugi bool VST3PluginFormat::fileMightContainThisPluginType (const String& fileOrIdentifier) { - const File f (File::createFileWithoutCheckingPath (fileOrIdentifier)); + auto f = File::createFileWithoutCheckingPath (fileOrIdentifier); return f.hasFileExtension (".vst3") #if JUCE_MAC @@ -2876,7 +2863,7 @@ void VST3PluginFormat::recursiveFileSearch (StringArray& results, const File& di while (iter.next()) { - const File f (iter.getFile()); + auto f = iter.getFile(); bool isPlugin = false; if (fileMightContainThisPluginType (f.getFullPathName())) @@ -2893,7 +2880,7 @@ void VST3PluginFormat::recursiveFileSearch (StringArray& results, const File& di FileSearchPath VST3PluginFormat::getDefaultLocationsToSearch() { #if JUCE_WINDOWS - const String programFiles (File::getSpecialLocation (File::globalApplicationsDirectory).getFullPathName()); + auto programFiles = File::getSpecialLocation (File::globalApplicationsDirectory).getFullPathName(); return FileSearchPath (programFiles + "\\Common Files\\VST3"); #elif JUCE_MAC return FileSearchPath ("/Library/Audio/Plug-Ins/VST3;~/Library/Audio/Plug-Ins/VST3"); diff --git a/modules/juce_audio_processors/format_types/juce_VSTCommon.h b/modules/juce_audio_processors/format_types/juce_VSTCommon.h index e431051deb..7d0a93b954 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTCommon.h +++ b/modules/juce_audio_processors/format_types/juce_VSTCommon.h @@ -180,7 +180,7 @@ struct SpeakerMappings : private AudioChannelSet // (inheritance only to give e VstSpeakerConfiguration* allocate (int numChannels) { - auto arrangementSize = (sizeof (VstSpeakerConfiguration) - sizeof(VstSpeakerConfiguration::speakers)) + auto arrangementSize = (sizeof (VstSpeakerConfiguration) - (sizeof(VstIndividualSpeakerInfo) * 8)) + (sizeof (VstIndividualSpeakerInfo) * static_cast (numChannels)); storage.malloc (1, arrangementSize); diff --git a/modules/juce_audio_processors/format_types/juce_VSTInterface.h b/modules/juce_audio_processors/format_types/juce_VSTInterface.h index 4db7271349..c8310a0022 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTInterface.h +++ b/modules/juce_audio_processors/format_types/juce_VSTInterface.h @@ -345,7 +345,7 @@ enum VstTimingInformationFlags vstTimingInfoFlagNanosecondsValid = 256, vstTimingInfoFlagMusicalPositionValid = 512, vstTimingInfoFlagTempoValid = 1024, - vstTimingInfoFlagLastBarPositionValid = 2056, + vstTimingInfoFlagLastBarPositionValid = 2048, vstTimingInfoFlagLoopPositionValid = 4096, vstTimingInfoFlagTimeSignatureValid = 8192, vstTimingInfoFlagSmpteValid = 16384, @@ -451,6 +451,18 @@ enum VstSpeakerConfigurationType vstSpeakerConfigTypeLRCLfeLsRsTflTfcTfrTrlTrrLfe2 }; +#if JUCE_BIG_ENDIAN + #define JUCE_MULTICHAR_CONSTANT(a, b, c, d) (a | (((uint32) b) << 8) | (((uint32) c) << 16) | (((uint32) d) << 24)) +#else + #define JUCE_MULTICHAR_CONSTANT(a, b, c, d) (d | (((uint32) c) << 8) | (((uint32) b) << 16) | (((uint32) a) << 24)) +#endif + +enum PresonusExtensionConstants +{ + presonusVendorID = JUCE_MULTICHAR_CONSTANT ('P', 'r', 'e', 'S'), + presonusSetContentScaleFactor = JUCE_MULTICHAR_CONSTANT ('A', 'e', 'C', 's') +}; + //============================================================================== struct vst2FxBank { diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index 1ddc8cec65..11e311d684 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -43,7 +43,7 @@ namespace Vst2 { -#include "juce_VSTInterface.h" + #include "juce_VSTInterface.h" } using namespace Vst2; @@ -144,8 +144,8 @@ namespace || magic == (int32) ByteOrder::bigEndianInt (name); } - static int32 fxbName (const char* name) noexcept { return (int32) ByteOrder::littleEndianInt (name); } - static int32 fxbSwap (const int32 x) noexcept { return (int32) ByteOrder::swapIfLittleEndian ((uint32) x); } + static int32 fxbName (const char* name) noexcept { return (int32) ByteOrder::littleEndianInt (name); } + static int32 fxbSwap (int32 x) noexcept { return (int32) ByteOrder::swapIfLittleEndian ((uint32) x); } static float fxbSwapFloat (const float x) noexcept { @@ -209,7 +209,7 @@ namespace //============================================================================== typedef VstEffectInterface* (VSTINTERFACECALL *MainCall) (VstHostCallback); -static pointer_sized_int VSTINTERFACECALL audioMaster (VstEffectInterface* effect, int32 opcode, int32 index, pointer_sized_int value, void* ptr, float opt); +static pointer_sized_int VSTINTERFACECALL audioMaster (VstEffectInterface*, int32, int32, pointer_sized_int, void*, float); //============================================================================== // Change this to disable logging of various VST activities @@ -330,12 +330,10 @@ namespace #endif //============================================================================== -class ModuleHandle : public ReferenceCountedObject +struct ModuleHandle : public ReferenceCountedObject { -public: - //============================================================================== File file; - MainCall moduleMain, customMain; + MainCall moduleMain, customMain = {}; String pluginName; ScopedPointer vstXml; @@ -350,13 +348,9 @@ public: //============================================================================== static Ptr findOrCreateModule (const File& file) { - for (int i = getActiveModules().size(); --i >= 0;) - { - ModuleHandle* const module = getActiveModules().getUnchecked(i); - + for (auto* module : getActiveModules()) if (module->file == file) return module; - } const IdleCallRecursionPreventer icrp; shellUIDToCreate = 0; @@ -372,18 +366,12 @@ public: return m; } - return nullptr; + return {}; } //============================================================================== ModuleHandle (const File& f, MainCall customMainCall) - : file (f), moduleMain (customMainCall), customMain (nullptr) - #if JUCE_MAC || JUCE_IOS - , resHandle (0), bundleRef (0) - #if JUCE_MAC - , resFileId (0) - #endif - #endif + : file (f), moduleMain (customMainCall) { getActiveModules().add (this); @@ -455,15 +443,15 @@ public: static String getDLLResource (const File& dllFile, const String& type, int resID) { DynamicLibrary dll (dllFile.getFullPathName()); - HMODULE dllModule = (HMODULE) dll.getNativeHandle(); + auto dllModule = (HMODULE) dll.getNativeHandle(); if (dllModule != INVALID_HANDLE_VALUE) { - if (HRSRC res = FindResource (dllModule, MAKEINTRESOURCE (resID), type.toWideCharPointer())) + if (auto res = FindResource (dllModule, MAKEINTRESOURCE (resID), type.toWideCharPointer())) { - if (HGLOBAL hGlob = LoadResource (dllModule, res)) + if (auto hGlob = LoadResource (dllModule, res)) { - const char* data = static_cast (LockResource (hGlob)); + auto* data = static_cast (LockResource (hGlob)); return String::fromUTF8 (data, SizeofResource (dllModule, res)); } } @@ -473,11 +461,11 @@ public: } #endif #else - Handle resHandle; - CFBundleRef bundleRef; + Handle resHandle = {}; + CFBundleRef bundleRef = {}; #if JUCE_MAC - CFBundleRefNum resFileId; + CFBundleRefNum resFileId = {}; FSSpec parentDirFSSpec; #endif @@ -490,7 +478,7 @@ public: if (file.hasFileExtension (".vst")) { - const char* const utf8 = file.getFullPathName().toRawUTF8(); + auto* utf8 = file.getFullPathName().toRawUTF8(); if (CFURLRef url = CFURLCreateFromFileSystemRepresentation (0, (const UInt8*) utf8, (CFIndex) strlen (utf8), file.isDirectory())) @@ -594,26 +582,20 @@ static const int defaultVSTBlockSizeValue = 512; //============================================================================== //============================================================================== -class VSTPluginInstance : public AudioPluginInstance, - private Timer, - private AsyncUpdater +struct VSTPluginInstance : public AudioPluginInstance, + private Timer, + private AsyncUpdater { -private: VSTPluginInstance (const ModuleHandle::Ptr& mh, const BusesProperties& ioConfig, VstEffectInterface* effect, double sampleRateToUse, int blockSizeToUse) : AudioPluginInstance (ioConfig), vstEffect (effect), vstModule (mh), - usesCocoaNSView (false), - name (mh->pluginName), - wantsMidiMessages (false), - initialised (false), - isPowerOn (false) + name (mh->pluginName) { setRateAndBufferSizeDetails (sampleRateToUse, blockSizeToUse); } -public: ~VSTPluginInstance() { if (vstEffect != nullptr && vstEffect->interfaceIdentifier == juceVstInterfaceIdentifier) @@ -672,7 +654,7 @@ public: double initialSampleRate, int initialBlockSize) { - if (VstEffectInterface* newEffect = constructEffect (newModule)) + if (auto* newEffect = constructEffect (newModule)) { newEffect->hostSpace2 = 0; @@ -823,13 +805,12 @@ public: if (vstEffect == nullptr) return 0.0; - const double sampleRate = getSampleRate(); + auto sampleRate = getSampleRate(); if (sampleRate <= 0) return 0.0; - pointer_sized_int samples = dispatch (plugInOpcodeGetTailSize, 0, 0, 0, 0); - return samples / sampleRate; + return dispatch (plugInOpcodeGetTailSize, 0, 0, 0, 0) / sampleRate; } bool acceptsMidi() const override { return wantsMidiMessages; } @@ -852,7 +833,7 @@ public: vstHostTime.tempoBPM = 120.0; vstHostTime.timeSignatureNumerator = 4; - vstHostTime.timeSignatureDenominator = 4; + vstHostTime.timeSignatureDenominator = 4; vstHostTime.sampleRate = rate; vstHostTime.samplePosition = 0; vstHostTime.flags = vstTimingInfoFlagNanosecondsValid @@ -883,7 +864,15 @@ public: dispatch (plugInOpcodeSetSampleFloatType, 0, (pointer_sized_int) vstPrecision, 0, 0); } - tempBuffer.setSize (jmax (1, vstEffect->numInputChannels), samplesPerBlockExpected); + auto maxChannels = jmax (1, jmax (vstEffect->numInputChannels, vstEffect->numOutputChannels)); + + tmpBufferFloat .setSize (maxChannels, samplesPerBlockExpected); + tmpBufferDouble.setSize (maxChannels, samplesPerBlockExpected); + + channelBufferFloat .calloc (static_cast (maxChannels)); + channelBufferDouble.calloc (static_cast (maxChannels)); + + outOfPlaceBuffer.setSize (jmax (1, vstEffect->numOutputChannels), samplesPerBlockExpected); if (! isPowerOn) setPower (true); @@ -891,7 +880,7 @@ public: // dodgy hack to force some plugins to initialise the sample rate.. if ((! hasEditor()) && getNumParameters() > 0) { - const float old = getParameter (0); + auto old = getParameter (0); setParameter (0, (old < 0.5f) ? 1.0f : 0.0f); setParameter (0, old); } @@ -910,7 +899,13 @@ public: setPower (false); } - tempBuffer.setSize (1, 1); + channelBufferFloat.free(); + tmpBufferFloat.setSize (0, 0); + + channelBufferDouble.free(); + tmpBufferDouble.setSize (0, 0); + + outOfPlaceBuffer.setSize (1, 1); incomingMidi.clear(); midiEventsToSend.freeEvents(); @@ -928,13 +923,13 @@ public: void processBlock (AudioBuffer& buffer, MidiBuffer& midiMessages) override { jassert (! isUsingDoublePrecision()); - processAudio (buffer, midiMessages); + processAudio (buffer, midiMessages, tmpBufferFloat, channelBufferFloat); } void processBlock (AudioBuffer& buffer, MidiBuffer& midiMessages) override { jassert (isUsingDoublePrecision()); - processAudio (buffer, midiMessages); + processAudio (buffer, midiMessages, tmpBufferDouble, channelBufferDouble); } bool supportsDoublePrecisionProcessing() const override @@ -949,8 +944,8 @@ public: bool isBusesLayoutSupported (const BusesLayout& layouts) const override { - const int numInputBuses = getBusCount (true); - const int numOutputBuses = getBusCount (false); + auto numInputBuses = getBusCount (true); + auto numOutputBuses = getBusCount (false); // it's not possible to change layout if there are sidechains/aux buses if (numInputBuses > 1 || numOutputBuses > 1) @@ -1211,7 +1206,7 @@ public: } //============================================================================== - pointer_sized_int dispatch (const int opcode, const int index, const pointer_sized_int value, void* const ptr, float opt) const + pointer_sized_int dispatch (int opcode, int index, pointer_sized_int value, void* const ptr, float opt) const { pointer_sized_int result = 0; @@ -1223,7 +1218,7 @@ public: try { #if JUCE_MAC - const ResFileRefNum oldResFile = CurResFile(); + auto oldResFile = CurResFile(); if (vstModule->resFileId != 0) UseResFile (vstModule->resFileId); @@ -1232,7 +1227,8 @@ public: result = vstEffect->dispatchFunction (vstEffect, opcode, index, value, ptr, opt); #if JUCE_MAC - const ResFileRefNum newResFile = CurResFile(); + auto newResFile = CurResFile(); + if (newResFile != oldResFile) // avoid confusing the parent app's resource file with the plug-in's { vstModule->resFileId = newResFile; @@ -1252,7 +1248,7 @@ public: if (dataSize < 28) return false; - const fxSet* const set = (const fxSet*) data; + auto set = (const fxSet*) data; if ((! compareMagic (set->chunkMagic, "CcnK")) || fxbSwap (set->version) > fxbVersionNum) return false; @@ -1262,15 +1258,16 @@ public: // bank of programs if (fxbSwap (set->numPrograms) >= 0) { - const int oldProg = getCurrentProgram(); - const int numParams = fxbSwap (((const fxProgram*) (set->programs))->numParams); - const int progLen = (int) sizeof (fxProgram) + (numParams - 1) * (int) sizeof (float); + auto oldProg = getCurrentProgram(); + auto numParams = fxbSwap (((const fxProgram*) (set->programs))->numParams); + auto progLen = (int) sizeof (fxProgram) + (numParams - 1) * (int) sizeof (float); for (int i = 0; i < fxbSwap (set->numPrograms); ++i) { if (i != oldProg) { - const fxProgram* const prog = (const fxProgram*) (((const char*) (set->programs)) + i * progLen); + auto prog = (const fxProgram*) (((const char*) (set->programs)) + i * progLen); + if (((const char*) prog) - ((const char*) set) >= (ssize_t) dataSize) return false; @@ -1285,7 +1282,8 @@ public: if (fxbSwap (set->numPrograms) > 0) setCurrentProgram (oldProg); - const fxProgram* const prog = (const fxProgram*) (((const char*) (set->programs)) + oldProg * progLen); + auto prog = (const fxProgram*) (((const char*) (set->programs)) + oldProg * progLen); + if (((const char*) prog) - ((const char*) set) >= (ssize_t) dataSize) return false; @@ -1296,7 +1294,7 @@ public: else if (compareMagic (set->fxMagic, "FxCk")) { // single program - const fxProgram* const prog = (const fxProgram*) data; + auto prog = (const fxProgram*) data; if (! compareMagic (prog->chunkMagic, "CcnK")) return false; @@ -1309,7 +1307,7 @@ public: else if (compareMagic (set->fxMagic, "FBCh")) { // non-preset chunk - const fxChunkSet* const cset = (const fxChunkSet*) data; + auto cset = (const fxChunkSet*) data; if ((size_t) fxbSwap (cset->chunkSize) + sizeof (fxChunkSet) - 8 > (size_t) dataSize) return false; @@ -1319,7 +1317,7 @@ public: else if (compareMagic (set->fxMagic, "FPCh")) { // preset chunk - const fxProgramSet* const cset = (const fxProgramSet*) data; + auto cset = (const fxProgramSet*) data; if ((size_t) fxbSwap (cset->chunkSize) + sizeof (fxProgramSet) - 8 > (size_t) dataSize) return false; @@ -1338,8 +1336,8 @@ public: bool saveToFXBFile (MemoryBlock& dest, bool isFXB, int maxSizeMB = 128) { - const int numPrograms = getNumPrograms(); - const int numParams = getNumParameters(); + auto numPrograms = getNumPrograms(); + auto numParams = getNumParameters(); if (usesChunks()) { @@ -1348,10 +1346,10 @@ public: if (isFXB) { - const size_t totalLen = sizeof (fxChunkSet) + chunk.getSize() - 8; + auto totalLen = sizeof (fxChunkSet) + chunk.getSize() - 8; dest.setSize (totalLen, true); - fxChunkSet* const set = (fxChunkSet*) dest.getData(); + auto set = (fxChunkSet*) dest.getData(); set->chunkMagic = fxbName ("CcnK"); set->byteSize = 0; set->fxMagic = fxbName ("FBCh"); @@ -1365,10 +1363,10 @@ public: } else { - const size_t totalLen = sizeof (fxProgramSet) + chunk.getSize() - 8; + auto totalLen = sizeof (fxProgramSet) + chunk.getSize() - 8; dest.setSize (totalLen, true); - fxProgramSet* const set = (fxProgramSet*) dest.getData(); + auto set = (fxProgramSet*) dest.getData(); set->chunkMagic = fxbName ("CcnK"); set->byteSize = 0; set->fxMagic = fxbName ("FPCh"); @@ -1386,11 +1384,11 @@ public: { if (isFXB) { - const int progLen = (int) sizeof (fxProgram) + (numParams - 1) * (int) sizeof (float); - const size_t len = (sizeof (fxSet) - sizeof (fxProgram)) + (size_t) (progLen * jmax (1, numPrograms)); + auto progLen = (int) sizeof (fxProgram) + (numParams - 1) * (int) sizeof (float); + auto len = (sizeof (fxSet) - sizeof (fxProgram)) + (size_t) (progLen * jmax (1, numPrograms)); dest.setSize (len, true); - fxSet* const set = (fxSet*) dest.getData(); + auto set = (fxSet*) dest.getData(); set->chunkMagic = fxbName ("CcnK"); set->byteSize = 0; set->fxMagic = fxbName ("FxBk"); @@ -1402,7 +1400,7 @@ public: MemoryBlock oldSettings; createTempParameterStore (oldSettings); - const int oldProgram = getCurrentProgram(); + auto oldProgram = getCurrentProgram(); if (oldProgram >= 0) setParamsInProgramBlock ((fxProgram*) (((char*) (set->programs)) + oldProgram * progLen)); @@ -1438,7 +1436,7 @@ public: if (usesChunks()) { void* data = nullptr; - const size_t bytes = (size_t) dispatch (plugInOpcodeGetData, isPreset ? 1 : 0, 0, &data, 0.0f); + auto bytes = (size_t) dispatch (plugInOpcodeGetData, isPreset ? 1 : 0, 0, &data, 0.0f); if (data != nullptr && bytes <= (size_t) maxSizeMB * 1024 * 1024) { @@ -1471,19 +1469,26 @@ public: ModuleHandle::Ptr vstModule; ScopedPointer extraFunctions; - bool usesCocoaNSView; + bool usesCocoaNSView = false; private: String name; CriticalSection lock; - bool wantsMidiMessages, initialised, isPowerOn; + bool wantsMidiMessages = false, initialised = false, isPowerOn = false; mutable StringArray programNames; - AudioBuffer tempBuffer; + AudioBuffer outOfPlaceBuffer; + CriticalSection midiInLock; MidiBuffer incomingMidi; VSTMidiEventList midiEventsToSend; VstTimingInformation vstHostTime; + AudioBuffer tmpBufferFloat; + HeapBlock channelBufferFloat; + + AudioBuffer tmpBufferDouble; + HeapBlock channelBufferDouble; + static pointer_sized_int handleCanDo (const char* name) { static const char* canDos[] = { "supplyIdle", @@ -1507,7 +1512,7 @@ private: { String hostName ("Juce VST Host"); - if (JUCEApplicationBase* app = JUCEApplicationBase::getInstance()) + if (auto* app = JUCEApplicationBase::getInstance()) hostName = app->getApplicationName(); hostName.copyToUTF8 (name, (size_t) jmin (vstMaxManufacturerStringLength, vstMaxPlugInNameStringLength) - 1); @@ -1543,14 +1548,14 @@ private: handleUpdateNowIfNeeded(); for (int i = ComponentPeer::getNumPeers(); --i >= 0;) - if (ComponentPeer* p = ComponentPeer::getPeer(i)) + if (auto* p = ComponentPeer::getPeer(i)) p->performAnyPendingRepaintsNow(); } } void setWindowSize (int width, int height) { - if (AudioProcessorEditor* ed = getActiveEditor()) + if (auto* ed = getActiveEditor()) { #if JUCE_LINUX const MessageManagerLock mmLock; @@ -1601,11 +1606,30 @@ private: { BusesProperties returnValue; + if (effect->numInputChannels == 0 && effect->numOutputChannels == 0) + return returnValue; + + // Workaround for old broken JUCE plug-ins which would return an invalid + // speaker arrangement if the host didn't ask for a specific arrangement + // beforehand. + // Check if the plug-in reports any default layouts. If it doesn't, then + // try setting a default layout compatible with the number of pins this + // plug-in is reporting. + if (! pluginHasDefaultChannelLayouts (effect)) + { + SpeakerMappings::VstSpeakerConfigurationHolder canonicalIn (AudioChannelSet::canonicalChannelSet (effect->numInputChannels)); + SpeakerMappings::VstSpeakerConfigurationHolder canonicalOut (AudioChannelSet::canonicalChannelSet (effect->numOutputChannels)); + + effect->dispatchFunction (effect, plugInOpcodeSetSpeakerConfiguration, 0, + (pointer_sized_int) &canonicalIn.get(), (void*) &canonicalOut.get(), 0.0f); + } + HeapBlock inArrBlock (1, true), outArrBlock (1, true); - VstSpeakerConfiguration* inArr = inArrBlock.getData(), *outArr = outArrBlock.getData(); - if (effect->numInputChannels == 0 || - effect->dispatchFunction (effect, plugInOpcodeGetSpeakerArrangement, 0, reinterpret_cast (&inArr), &outArr, 0.0f) == 0) + auto* inArr = inArrBlock.getData(); + auto* outArr = outArrBlock.getData(); + + if (! getSpeakerArrangementWrapper (effect, inArr, outArr)) inArr = outArr = nullptr; for (int dir = 0; dir < 2; ++dir) @@ -1618,6 +1642,7 @@ private: VstPinInfo pinProps; AudioChannelSet layout; + for (int ch = 0; ch < maxChannels; ch += layout.size()) { if (effect->dispatchFunction (effect, opcode, ch, 0, &pinProps, 0.0f) == 0) @@ -1626,13 +1651,16 @@ private: if ((pinProps.flags & vstPinInfoFlagValid) != 0) { layout = SpeakerMappings::vstArrangementTypeToChannelSet (pinProps.configurationType, 0); + if (layout.isDisabled()) break; } - else + else if (arr == nullptr) { layout = ((pinProps.flags & vstPinInfoFlagIsStereo) != 0 ? AudioChannelSet::stereo() : AudioChannelSet::mono()); } + else + break; busAdded = true; returnValue.addBus (isInput, pinProps.text, layout, true); @@ -1642,6 +1670,7 @@ private: if (! busAdded && maxChannels > 0) { String busName = (isInput ? "Input" : "Output"); + if (effect->dispatchFunction (effect, opcode, 0, 0, &pinProps, 0.0f) != 0) busName = pinProps.text; @@ -1657,15 +1686,68 @@ private: return returnValue; } + static bool pluginHasDefaultChannelLayouts (VstEffectInterface* effect) + { + HeapBlock inArrBlock (1, true), outArrBlock (1, true); + + auto* inArr = inArrBlock.getData(); + auto* outArr = outArrBlock.getData(); + + if (getSpeakerArrangementWrapper (effect, inArr, outArr)) + return true; + + for (int dir = 0; dir < 2; ++dir) + { + const bool isInput = (dir == 0); + const int opcode = (isInput ? plugInOpcodeGetInputPinProperties : plugInOpcodeGetOutputPinProperties); + const int maxChannels = (isInput ? effect->numInputChannels : effect->numOutputChannels); + + int channels = 1; + + for (int ch = 0; ch < maxChannels; ch += channels) + { + VstPinInfo pinProps; + + if (effect->dispatchFunction (effect, opcode, ch, 0, &pinProps, 0.0f) == 0) + return false; + + if ((pinProps.flags & vstPinInfoFlagValid) != 0) + return true; + + channels = (pinProps.flags & vstPinInfoFlagIsStereo) != 0 ? 2 : 1; + } + } + + return false; + } + + static bool getSpeakerArrangementWrapper (VstEffectInterface* effect, + VstSpeakerConfiguration* inArr, + VstSpeakerConfiguration* outArr) + { + // Workaround: unfortunately old JUCE VST-2 plug-ins had a bug and would crash if + // you try to get the speaker arrangement when there are no input channels present. + // Hopefully, one day (when there are no more old JUCE plug-ins around), we can + // commment out the next two lines. + if (effect->numInputChannels == 0) + return false; + + return (effect->dispatchFunction (effect, plugInOpcodeGetSpeakerArrangement, 0, + reinterpret_cast (&inArr), &outArr, 0.0f) != 0); + } + //============================================================================== template - void processAudio (AudioBuffer& buffer, MidiBuffer& midiMessages) + void processAudio (AudioBuffer& buffer, MidiBuffer& midiMessages, + AudioBuffer& tmpBuffer, + HeapBlock& channelBuffer) { - const int numSamples = buffer.getNumSamples(); + auto numSamples = buffer.getNumSamples(); + auto numChannels = buffer.getNumChannels(); if (initialised) { - if (AudioPlayHead* const currentPlayHead = getPlayHead()) + if (auto* currentPlayHead = getPlayHead()) { AudioPlayHead::CurrentPositionInfo position; @@ -1732,17 +1814,34 @@ private: int numBytesOfMidiData, samplePosition; while (iter.getNextEvent (midiData, numBytesOfMidiData, samplePosition)) - { midiEventsToSend.addEvent (midiData, numBytesOfMidiData, jlimit (0, numSamples - 1, samplePosition)); - } vstEffect->dispatchFunction (vstEffect, plugInOpcodePreAudioProcessingEvents, 0, 0, midiEventsToSend.events, 0); } _clearfp(); - invokeProcessFunction (buffer, numSamples); + // always ensure that the buffer is at least as large as the maximum number of channels + auto maxChannels = jmax (vstEffect->numInputChannels, vstEffect->numOutputChannels); + auto channels = channelBuffer.getData(); + + if (numChannels < maxChannels) + { + if (numSamples > tmpBuffer.getNumSamples()) + tmpBuffer.setSize (tmpBuffer.getNumChannels(), numSamples); + + tmpBuffer.clear(); + } + + for (int ch = 0; ch < maxChannels; ++ch) + channels[ch] = (ch < numChannels ? buffer.getWritePointer (ch) : tmpBuffer.getWritePointer (ch)); + + { + AudioBuffer processBuffer (channels, maxChannels, numSamples); + + invokeProcessFunction (processBuffer, numSamples); + } } else { @@ -1765,31 +1864,34 @@ private: { if ((vstEffect->flags & vstEffectFlagInplaceAudio) != 0) { - vstEffect->processAudioInplaceFunction (vstEffect, buffer.getArrayOfWritePointers(), buffer.getArrayOfWritePointers(), sampleFrames); + vstEffect->processAudioInplaceFunction (vstEffect, buffer.getArrayOfWritePointers(), + buffer.getArrayOfWritePointers(), sampleFrames); } else { - tempBuffer.setSize (vstEffect->numOutputChannels, sampleFrames); - tempBuffer.clear(); + outOfPlaceBuffer.setSize (vstEffect->numOutputChannels, sampleFrames); + outOfPlaceBuffer.clear(); - vstEffect->processAudioFunction (vstEffect, buffer.getArrayOfWritePointers(), tempBuffer.getArrayOfWritePointers(), sampleFrames); + vstEffect->processAudioFunction (vstEffect, buffer.getArrayOfWritePointers(), + outOfPlaceBuffer.getArrayOfWritePointers(), sampleFrames); for (int i = vstEffect->numOutputChannels; --i >= 0;) - buffer.copyFrom (i, 0, tempBuffer.getReadPointer (i), sampleFrames); + buffer.copyFrom (i, 0, outOfPlaceBuffer.getReadPointer (i), sampleFrames); } } inline void invokeProcessFunction (AudioBuffer& buffer, int32 sampleFrames) { - vstEffect->processDoubleAudioInplaceFunction (vstEffect, buffer.getArrayOfWritePointers(), buffer.getArrayOfWritePointers(), sampleFrames); + vstEffect->processDoubleAudioInplaceFunction (vstEffect, buffer.getArrayOfWritePointers(), + buffer.getArrayOfWritePointers(), sampleFrames); } //============================================================================== void setHostTimeFrameRate (long frameRateIndex, double frameRate, double currentTime) noexcept { vstHostTime.flags |= vstTimingInfoFlagSmpteValid; - vstHostTime.smpteRate = (int32) frameRateIndex; - vstHostTime.smpteOffset = (int32) (currentTime * 80.0 * frameRate + 0.5); + vstHostTime.smpteRate = (int32) frameRateIndex; + vstHostTime.smpteOffset = (int32) (currentTime * 80.0 * frameRate + 0.5); } void setHostTimeFrameRateDrop (long frameRateIndex, double frameRate, double currentTime) noexcept @@ -1850,9 +1952,9 @@ private: return progName; } - void setParamsInProgramBlock (fxProgram* const prog) + void setParamsInProgramBlock (fxProgram* prog) { - const int numParams = getNumParameters(); + auto numParams = getNumParameters(); prog->chunkMagic = fxbName ("CcnK"); prog->byteSize = 0; @@ -1877,7 +1979,7 @@ private: // only do this if the plugin can't use indexed names.. if (dispatch (plugInOpcodeGetProgramName, 0, -1, nm, 0) == 0) { - const int oldProgram = getCurrentProgram(); + auto oldProgram = getCurrentProgram(); MemoryBlock oldSettings; createTempParameterStore (oldSettings); @@ -1893,7 +1995,7 @@ private: } } - void handleMidiFromPlugin (const VstEventBlock* const events) + void handleMidiFromPlugin (const VstEventBlock* events) { if (events != nullptr) { @@ -1910,7 +2012,8 @@ private: getCurrentProgramName().copyToUTF8 ((char*) dest.getData(), 63); - float* const p = (float*) (((char*) dest.getData()) + 64); + auto p = (float*) (((char*) dest.getData()) + 64); + for (int i = 0; i < getNumParameters(); ++i) p[i] = getParameter(i); } @@ -1919,7 +2022,8 @@ private: { changeProgramName (getCurrentProgram(), (const char*) m.getData()); - float* p = (float*) (((char*) m.getData()) + 64); + auto p = (float*) (((char*) m.getData()) + 64); + for (int i = 0; i < getNumParameters(); ++i) setParameter (i, p[i]); } @@ -1938,7 +2042,7 @@ private: String getVersion() const { - unsigned int v = (unsigned int) dispatch (plugInOpcodeGetManufacturerVersion, 0, 0, 0, 0); + auto v = (unsigned int) dispatch (plugInOpcodeGetManufacturerVersion, 0, 0, 0, 0); String s; @@ -1950,14 +2054,14 @@ private: int versionBits[32]; int n = 0; - for (unsigned int vv = v; vv != 0; vv /= 10) + for (auto vv = v; vv != 0; vv /= 10) versionBits [n++] = vv % 10; if (n > 4) // if the number ends up silly, it's probably encoded as hex instead of decimal.. { n = 0; - for (unsigned int vv = v; vv != 0; vv >>= 8) + for (auto vv = v; vv != 0; vv >>= 8) versionBits [n++] = vv & 255; } @@ -2008,15 +2112,15 @@ private: //============================================================================== #if ! (JUCE_IOS || JUCE_ANDROID) -class VSTPluginWindow; +struct VSTPluginWindow; static Array activeVSTWindows; //============================================================================== -class VSTPluginWindow : public AudioProcessorEditor, - #if ! JUCE_MAC - public ComponentMovementWatcher, - #endif - public Timer +struct VSTPluginWindow : public AudioProcessorEditor, + #if ! JUCE_MAC + private ComponentMovementWatcher, + #endif + private Timer { public: VSTPluginWindow (VSTPluginInstance& plug) @@ -2024,18 +2128,9 @@ public: #if ! JUCE_MAC ComponentMovementWatcher (this), #endif - plugin (plug), - isOpen (false), - recursiveResize (false), - pluginWantsKeys (false), - pluginRefusesToResize (false), - alreadyInside (false) + plugin (plug) { - #if JUCE_WINDOWS - pluginHWND = 0; - sizeCheckCount = 0; - - #elif JUCE_LINUX + #if JUCE_LINUX pluginWindow = None; display = XWindowSystem::getInstance()->displayRef(); @@ -2081,11 +2176,11 @@ public: if (recursiveResize) return; - Component* const topComp = getTopLevelComponent(); + auto* topComp = getTopLevelComponent(); if (topComp->getPeer() != nullptr) { - const Point pos (topComp->getLocalPoint (this, Point())); + auto pos = topComp->getLocalPoint (this, Point()); recursiveResize = true; @@ -2123,6 +2218,10 @@ public: { closePluginWindow(); openPluginWindow(); + + #if JUCE_LINUX + componentMovedOrResized (true, true); + #endif } #endif @@ -2142,8 +2241,8 @@ public: { if (cocoaWrapper != nullptr) { - int w = cocoaWrapper->getWidth(); - int h = cocoaWrapper->getHeight(); + auto w = cocoaWrapper->getWidth(); + auto h = cocoaWrapper->getHeight(); if (w != getWidth() || h != getHeight()) setSize (w, h); @@ -2169,11 +2268,12 @@ public: #if JUCE_LINUX if (pluginWindow != 0) { - const Rectangle clip (g.getClipBounds()); + auto clip = g.getClipBounds(); XClearArea (display, pluginWindow, clip.getX(), clip.getY(), - static_cast (clip.getWidth()), static_cast (clip.getHeight()), + static_cast (clip.getWidth()), + static_cast (clip.getHeight()), True); } #endif @@ -2239,16 +2339,30 @@ public: #endif } + void setScaleFactor (float newScale) override + { + scaleFactor = newScale; + dispatch (plugInOpcodeManufacturerSpecific, presonusVendorID, + presonusSetContentScaleFactor, nullptr, newScale); + } + + void sendScaleFactorIfNotUnity() + { + if (scaleFactor != 1.0f) + setScaleFactor (scaleFactor); + } + //============================================================================== private: VSTPluginInstance& plugin; - bool isOpen, recursiveResize; - bool pluginWantsKeys, pluginRefusesToResize, alreadyInside; + float scaleFactor = 1.0f; + bool isOpen = false, recursiveResize = false; + bool pluginWantsKeys = false, pluginRefusesToResize = false, alreadyInside = false; #if JUCE_WINDOWS - HWND pluginHWND; - void* originalWndProc; - int sizeCheckCount; + HWND pluginHWND = {}; + void* originalWndProc = {}; + int sizeCheckCount = 0; #elif JUCE_LINUX ::Display* display; Window pluginWindow; @@ -2259,7 +2373,7 @@ private: bool shouldAvoidDeletingWindow() const { return plugin.getPluginDescription() - .manufacturerName.containsIgnoreCase ("Loud Technologies"); + .manufacturerName.containsIgnoreCase ("Loud Technologies"); } // This is an old workaround for some plugins that need a repaint when their @@ -2281,6 +2395,7 @@ private: VstEditorBounds* rect = nullptr; dispatch (plugInOpcodeGetEditorBounds, 0, 0, &rect, 0); dispatch (plugInOpcodeOpenEditor, 0, 0, parentWindow, 0); + sendScaleFactorIfNotUnity(); // do this before and after like in the steinberg example dispatch (plugInOpcodeGetEditorBounds, 0, 0, &rect, 0); @@ -2325,6 +2440,7 @@ private: VstEditorBounds* rect = nullptr; dispatch (plugInOpcodeGetEditorBounds, 0, 0, &rect, 0); dispatch (plugInOpcodeOpenEditor, 0, 0, getWindowHandle(), 0); + sendScaleFactorIfNotUnity(); // do this before and after like in the steinberg example dispatch (plugInOpcodeGetEditorBounds, 0, 0, &rect, 0); @@ -2460,13 +2576,13 @@ private: } //============================================================================== -#if JUCE_WINDOWS + #if JUCE_WINDOWS void checkPluginWindowSize() { RECT r; GetWindowRect (pluginHWND, &r); - const int w = r.right - r.left; - const int h = r.bottom - r.top; + auto w = r.right - r.left; + auto h = r.bottom - r.top; if (isShowing() && w > 0 && h > 0 && (w != getWidth() || h != getHeight()) @@ -2506,7 +2622,7 @@ private: return DefWindowProc (hW, message, wParam, lParam); } -#endif + #endif #if JUCE_LINUX void updatePluginWindowHandle() @@ -2518,11 +2634,9 @@ private: //============================================================================== #if JUCE_MAC #if JUCE_SUPPORT_CARBON - class CarbonWrapperComponent : public CarbonViewWrapperComponent + struct CarbonWrapperComponent : public CarbonViewWrapperComponent { - public: - CarbonWrapperComponent (VSTPluginWindow& w) - : owner (w), alreadyInside (false) + CarbonWrapperComponent (VSTPluginWindow& w) : owner (w) { keepPluginWindowWhenHidden = w.shouldAvoidDeletingWindow(); setRepaintsChildHIViewWhenCreated (w.shouldRepaintCarbonWindowWhenCreated()); @@ -2536,7 +2650,7 @@ private: HIViewRef attachView (WindowRef windowRef, HIViewRef /*rootView*/) override { owner.openPluginWindow (windowRef); - return 0; + return {}; } void removeView (HIViewRef) override @@ -2575,9 +2689,9 @@ private: void handlePaint() override { - if (ComponentPeer* const peer = getPeer()) + if (auto* peer = getPeer()) { - const Point pos (peer->globalToLocal (getScreenPosition())); + auto pos = peer->globalToLocal (getScreenPosition()); VstEditorBounds r; r.leftmost = (int16) pos.getX(); r.upper = (int16) pos.getY(); @@ -2590,12 +2704,12 @@ private: private: VSTPluginWindow& owner; - bool alreadyInside; + bool alreadyInside = false; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CarbonWrapperComponent) }; - friend class CarbonWrapperComponent; + friend struct CarbonWrapperComponent; ScopedPointer carbonWrapper; #endif @@ -2636,7 +2750,7 @@ AudioProcessorEditor* VSTPluginInstance::createEditor() static pointer_sized_int VSTINTERFACECALL audioMaster (VstEffectInterface* effect, int32 opcode, int32 index, pointer_sized_int value, void* ptr, float opt) { if (effect != nullptr) - if (VSTPluginInstance* instance = (VSTPluginInstance*) (effect->hostSpace2)) + if (auto* instance = (VSTPluginInstance*) (effect->hostSpace2)) return instance->handleCallback (opcode, index, value, ptr, opt); return VSTPluginInstance::handleGeneralCallback (opcode, index, value, ptr, opt); @@ -2648,9 +2762,9 @@ VSTPluginFormat::~VSTPluginFormat() {} static VSTPluginInstance* createAndUpdateDesc (VSTPluginFormat& format, PluginDescription& desc) { - if (AudioPluginInstance* p = format.createInstanceFromDescription (desc, 44100.0, 512)) + if (auto* p = format.createInstanceFromDescription (desc, 44100.0, 512)) { - if (VSTPluginInstance* instance = dynamic_cast (p)) + if (auto* instance = dynamic_cast (p)) { #if JUCE_MAC if (instance->vstModule->resFileId != 0) @@ -2695,7 +2809,7 @@ void VSTPluginFormat::findAllTypesForFile (OwnedArray& result for (;;) { char shellEffectName [256] = { 0 }; - const int uid = (int) instance->dispatch (plugInOpcodeNextPlugInUniqueID, 0, 0, shellEffectName, 0); + auto uid = (int) instance->dispatch (plugInOpcodeNextPlugInUniqueID, 0, 0, shellEffectName, 0); if (uid == 0) break; @@ -2732,10 +2846,10 @@ void VSTPluginFormat::createPluginInstance (const PluginDescription& desc, { File file (desc.fileOrIdentifier); - const File previousWorkingDirectory (File::getCurrentWorkingDirectory()); + auto previousWorkingDirectory = File::getCurrentWorkingDirectory(); file.getParentDirectory().setAsCurrentWorkingDirectory(); - if (ModuleHandle::Ptr module = ModuleHandle::findOrCreateModule (file)) + if (auto module = ModuleHandle::findOrCreateModule (file)) { shellUIDToCreate = desc.uid; @@ -2763,7 +2877,7 @@ bool VSTPluginFormat::requiresUnblockedMessageThreadDuringCreation (const Plugin bool VSTPluginFormat::fileMightContainThisPluginType (const String& fileOrIdentifier) { - const File f (File::createFileWithoutCheckingPath (fileOrIdentifier)); + auto f = File::createFileWithoutCheckingPath (fileOrIdentifier); #if JUCE_MAC || JUCE_IOS return f.isDirectory() && f.hasFileExtension (".vst"); @@ -2807,7 +2921,7 @@ void VSTPluginFormat::recursiveFileSearch (StringArray& results, const File& dir while (iter.next()) { - const File f (iter.getFile()); + auto f = iter.getFile(); bool isPlugin = false; if (fileMightContainThisPluginType (f.getFullPathName())) @@ -2830,15 +2944,14 @@ FileSearchPath VSTPluginFormat::getDefaultLocationsToSearch() "/usr/lib/vst;/usr/local/lib/vst;~/.vst") .replace (":", ";")); #elif JUCE_WINDOWS - const String programFiles (File::getSpecialLocation (File::globalApplicationsDirectory).getFullPathName()); + auto programFiles = File::getSpecialLocation (File::globalApplicationsDirectory).getFullPathName(); FileSearchPath paths; - paths.add (WindowsRegistry::getValue ("HKEY_LOCAL_MACHINE\\Software\\VST\\VSTPluginsPath", - programFiles + "\\Steinberg\\VstPlugins")); + paths.add (WindowsRegistry::getValue ("HKEY_LOCAL_MACHINE\\Software\\VST\\VSTPluginsPath")); + paths.addIfNotAlreadyThere (programFiles + "\\Steinberg\\VstPlugins"); paths.removeNonExistentPaths(); - - paths.add (WindowsRegistry::getValue ("HKEY_LOCAL_MACHINE\\Software\\VST\\VSTPluginsPath", - programFiles + "\\VstPlugins")); + paths.addIfNotAlreadyThere (programFiles + "\\VstPlugins"); + paths.removeRedundantPaths(); return paths; #elif JUCE_IOS // on iOS you can only load plug-ins inside the hosts bundle folder @@ -2858,7 +2971,7 @@ FileSearchPath VSTPluginFormat::getDefaultLocationsToSearch() const XmlElement* VSTPluginFormat::getVSTXML (AudioPluginInstance* plugin) { - if (VSTPluginInstance* const vst = dynamic_cast (plugin)) + if (auto* vst = dynamic_cast (plugin)) if (vst->vstModule != nullptr) return vst->vstModule->vstXml.get(); @@ -2867,7 +2980,7 @@ const XmlElement* VSTPluginFormat::getVSTXML (AudioPluginInstance* plugin) bool VSTPluginFormat::loadFromFXBFile (AudioPluginInstance* plugin, const void* data, size_t dataSize) { - if (VSTPluginInstance* vst = dynamic_cast (plugin)) + if (auto* vst = dynamic_cast (plugin)) return vst->loadFromFXBFile (data, dataSize); return false; @@ -2875,7 +2988,7 @@ bool VSTPluginFormat::loadFromFXBFile (AudioPluginInstance* plugin, const void* bool VSTPluginFormat::saveToFXBFile (AudioPluginInstance* plugin, MemoryBlock& dest, bool asFXB) { - if (VSTPluginInstance* vst = dynamic_cast (plugin)) + if (auto* vst = dynamic_cast (plugin)) return vst->saveToFXBFile (dest, asFXB); return false; @@ -2883,7 +2996,7 @@ bool VSTPluginFormat::saveToFXBFile (AudioPluginInstance* plugin, MemoryBlock& d bool VSTPluginFormat::getChunkData (AudioPluginInstance* plugin, MemoryBlock& result, bool isPreset) { - if (VSTPluginInstance* vst = dynamic_cast (plugin)) + if (auto* vst = dynamic_cast (plugin)) return vst->getChunkData (result, isPreset, 128); return false; @@ -2891,7 +3004,7 @@ bool VSTPluginFormat::getChunkData (AudioPluginInstance* plugin, MemoryBlock& re bool VSTPluginFormat::setChunkData (AudioPluginInstance* plugin, const void* data, int size, bool isPreset) { - if (VSTPluginInstance* vst = dynamic_cast (plugin)) + if (auto* vst = dynamic_cast (plugin)) return vst->setChunkData (data, size, isPreset); return false; @@ -2903,12 +3016,9 @@ AudioPluginInstance* VSTPluginFormat::createCustomVSTFromMainCall (void* entryPo ModuleHandle::Ptr module = new ModuleHandle (File(), (MainCall) entryPointFunction); if (module->open()) - { - ScopedPointer result (VSTPluginInstance::create (module, initialSampleRate, initialBufferSize)); - - if (result != nullptr && result->initialiseEffect (initialSampleRate, initialBufferSize)) - return result.release(); - } + if (ScopedPointer result = VSTPluginInstance::create (module, initialSampleRate, initialBufferSize)) + if (result->initialiseEffect (initialSampleRate, initialBufferSize)) + return result.release(); return nullptr; } @@ -2917,14 +3027,14 @@ void VSTPluginFormat::setExtraFunctions (AudioPluginInstance* plugin, ExtraFunct { ScopedPointer f (functions); - if (VSTPluginInstance* vst = dynamic_cast (plugin)) + if (auto* vst = dynamic_cast (plugin)) vst->extraFunctions = f; } AudioPluginInstance* VSTPluginFormat::getPluginInstanceFromVstEffectInterface (void* aEffect) { - if (VstEffectInterface* vstAEffect = reinterpret_cast (aEffect)) - if (VSTPluginInstance* instanceVST = reinterpret_cast (vstAEffect->hostSpace2)) + if (auto* vstAEffect = reinterpret_cast (aEffect)) + if (auto* instanceVST = reinterpret_cast (vstAEffect->hostSpace2)) return dynamic_cast (instanceVST); return nullptr; @@ -2932,10 +3042,10 @@ AudioPluginInstance* VSTPluginFormat::getPluginInstanceFromVstEffectInterface (v pointer_sized_int JUCE_CALLTYPE VSTPluginFormat::dispatcher (AudioPluginInstance* plugin, int32 opcode, int32 index, pointer_sized_int value, void* ptr, float opt) { - if (VSTPluginInstance* vst = dynamic_cast (plugin)) + if (auto* vst = dynamic_cast (plugin)) return vst->dispatch (opcode, index, value, ptr, opt); - return 0; + return {}; } void VSTPluginFormat::aboutToScanVSTShellPlugin (const PluginDescription&) {} diff --git a/modules/juce_audio_processors/juce_audio_processors.h b/modules/juce_audio_processors/juce_audio_processors.h index 80dda8f5e7..55df4cd50b 100644 --- a/modules/juce_audio_processors/juce_audio_processors.h +++ b/modules/juce_audio_processors/juce_audio_processors.h @@ -35,7 +35,7 @@ ID: juce_audio_processors vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE audio processor classes description: Classes for loading and playing VST, AU, or internally-generated audio processors. website: http://www.juce.com/juce diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp index 3fd2e3404f..321060ba7b 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp @@ -87,17 +87,20 @@ AudioProcessor::~AudioProcessor() #endif } +//============================================================================== +StringArray AudioProcessor::getAlternateDisplayNames() const { return StringArray (getName()); } + //============================================================================== bool AudioProcessor::addBus (bool isInput) { if (! canAddBus (isInput)) return false; - BusProperties BusesProperties; - if (! canApplyBusCountChange (isInput, true, BusesProperties)) + BusProperties busesProps; + if (! canApplyBusCountChange (isInput, true, busesProps)) return false; - createBus (isInput, BusesProperties); + createBus (isInput, busesProps); return true; } @@ -110,8 +113,8 @@ bool AudioProcessor::removeBus (bool inputBus) if (! canRemoveBus (inputBus)) return false; - BusProperties BusesProperties; - if (! canApplyBusCountChange (inputBus, false, BusesProperties)) + BusProperties busesProps; + if (! canApplyBusCountChange (inputBus, false, busesProps)) return false; const int busIdx = numBuses - 1; diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 3b637d5b83..3aea53ae7a 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -96,6 +96,15 @@ public: /** Returns the name of this processor. */ virtual const String getName() const = 0; + /** Returns a list of alternative names to use for this processor. + + Some hosts truncate the name of your AudioProcessor when there isn't enough + space in the GUI to show the full name. Overriding this method, allows the host + to choose an alternative name (such as an abbreviation) to better fit the + available space. + */ + virtual StringArray getAlternateDisplayNames() const; + //============================================================================== /** Called before playback starts, to let the filter prepare itself. diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp index d41d4de2b0..295a643605 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp @@ -24,12 +24,12 @@ ============================================================================== */ -AudioProcessorEditor::AudioProcessorEditor (AudioProcessor& p) noexcept : processor (p), constrainer (nullptr) +AudioProcessorEditor::AudioProcessorEditor (AudioProcessor& p) noexcept : processor (p) { initialise(); } -AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* p) noexcept : processor (*p), constrainer (nullptr) +AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* p) noexcept : processor (*p) { // the filter must be valid.. jassert (p != nullptr); @@ -71,7 +71,7 @@ void AudioProcessorEditor::initialise() resizable = false; attachConstrainer (&defaultConstrainer); - addComponentListener (resizeListener = new AudioProcessorEditorListener (this)); + addComponentListener (resizeListener = new AudioProcessorEditorListener (*this)); } //============================================================================== @@ -85,15 +85,19 @@ void AudioProcessorEditor::setResizable (const bool shouldBeResizable, const boo { setConstrainer (&defaultConstrainer); - if (getWidth() > 0 && getHeight() > 0) + if (auto w = getWidth()) { - defaultConstrainer.setSizeLimits (getWidth(), getHeight(), getWidth(), getHeight()); - resized(); + if (auto h = getHeight()) + { + defaultConstrainer.setSizeLimits (w, h, w, h); + resized(); + } } } } - const bool shouldHaveCornerResizer = (useBottomRightCornerResizer && shouldBeResizable); + bool shouldHaveCornerResizer = (useBottomRightCornerResizer && shouldBeResizable); + if (shouldHaveCornerResizer != (resizableCorner != nullptr)) { if (shouldHaveCornerResizer) @@ -102,14 +106,16 @@ void AudioProcessorEditor::setResizable (const bool shouldBeResizable, const boo resizableCorner->setAlwaysOnTop (true); } else + { resizableCorner = nullptr; + } } } -void AudioProcessorEditor::setResizeLimits (const int newMinimumWidth, - const int newMinimumHeight, - const int newMaximumWidth, - const int newMaximumHeight) noexcept +void AudioProcessorEditor::setResizeLimits (int newMinimumWidth, + int newMinimumHeight, + int newMaximumWidth, + int newMaximumHeight) noexcept { // if you've set up a custom constrainer then these settings won't have any effect.. jassert (constrainer == &defaultConstrainer || constrainer == nullptr); @@ -160,12 +166,12 @@ void AudioProcessorEditor::editorResized (bool wasResized) { bool resizerHidden = false; - if (ComponentPeer* peer = getPeer()) + if (auto* peer = getPeer()) resizerHidden = peer->isFullScreen() || peer->isKioskMode(); if (resizableCorner != nullptr) { - resizableCorner->setVisible (! resizerHidden); + resizableCorner->setVisible (! resizerHidden); const int resizerSize = 18; resizableCorner->setBounds (getWidth() - resizerSize, @@ -173,19 +179,22 @@ void AudioProcessorEditor::editorResized (bool wasResized) resizerSize, resizerSize); } - if (! resizable) - { - if (getWidth() > 0 && getHeight() > 0) - defaultConstrainer.setSizeLimits (getWidth(), getHeight(), - getWidth(), getHeight()); - } + if (auto w = getWidth()) + if (auto h = getHeight()) + defaultConstrainer.setSizeLimits (w, h, w, h); } } void AudioProcessorEditor::updatePeer() { if (isOnDesktop()) - if (ComponentPeer* const peer = getPeer()) + if (auto* peer = getPeer()) peer->setConstrainer (constrainer); } + +void AudioProcessorEditor::setScaleFactor (float newScale) +{ + setTransform (AffineTransform::scale (newScale)); + editorResized (true); +} diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h index b13bbd4819..a69f77ee32 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h @@ -85,6 +85,11 @@ public: */ virtual int getControlParameterIndex (Component&); + /** Can be called by a host to tell the editor that it should use a non-unity + GUI scale. + */ + virtual void setScaleFactor (float newScale); + //============================================================================== /** Marks the host's editor window as resizable @@ -151,24 +156,25 @@ private: //============================================================================== struct AudioProcessorEditorListener : ComponentListener { - AudioProcessorEditorListener (AudioProcessorEditor* audioEditor) : e (audioEditor) {} + AudioProcessorEditorListener (AudioProcessorEditor& e) : ed (e) {} - void componentMovedOrResized (Component&, bool, bool wasResized) override { e->editorResized (wasResized); } - void componentParentHierarchyChanged (Component&) override { e->updatePeer(); } - AudioProcessorEditor* e; + void componentMovedOrResized (Component&, bool, bool wasResized) override { ed.editorResized (wasResized); } + void componentParentHierarchyChanged (Component&) override { ed.updatePeer(); } + + AudioProcessorEditor& ed; }; //============================================================================== void initialise(); void editorResized (bool wasResized); void updatePeer(); - void attachConstrainer (ComponentBoundsConstrainer* newConstrainer); + void attachConstrainer (ComponentBoundsConstrainer*); //============================================================================== ScopedPointer resizeListener; bool resizable; ComponentBoundsConstrainer defaultConstrainer; - ComponentBoundsConstrainer* constrainer; + ComponentBoundsConstrainer* constrainer = {}; Component::SafePointer splashScreen; JUCE_DECLARE_NON_COPYABLE (AudioProcessorEditor) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp index 3ceea8df6a..c3d7ac764a 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp @@ -351,7 +351,7 @@ private: Array channels; Array nodeIds, midiNodeIds; - enum { freeNodeID = 0xffffffff, zeroNodeID = 0xfffffffe }; + enum { freeNodeID = 0xffffffff, zeroNodeID = 0xfffffffe, anonymousNodeID = 0xfffffffd }; static bool isNodeBusy (uint32 nodeID) noexcept { return nodeID != freeNodeID && nodeID != zeroNodeID; } @@ -510,6 +510,8 @@ private: bufIndex = getFreeBuffer (false); jassert (bufIndex != 0); + markBufferAsContaining (bufIndex, static_cast (anonymousNodeID), 0); + const int srcIndex = getBufferContaining (sourceNodes.getUnchecked (0), sourceOutputChans.getUnchecked (0)); if (srcIndex < 0) diff --git a/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp b/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp index 1efbebc0cb..352b6c1c0b 100644 --- a/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp +++ b/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp @@ -31,7 +31,7 @@ void KnownPluginList::clear() { ScopedLock lock (typesArrayLock); - if (types.size() > 0) + if (! types.isEmpty()) { types.clear(); sendChangeMessage(); @@ -42,9 +42,9 @@ PluginDescription* KnownPluginList::getTypeForFile (const String& fileOrIdentifi { ScopedLock lock (typesArrayLock); - for (int i = 0; i < types.size(); ++i) - if (types.getUnchecked(i)->fileOrIdentifier == fileOrIdentifier) - return types.getUnchecked(i); + for (auto* desc : types) + if (desc->fileOrIdentifier == fileOrIdentifier) + return desc; return nullptr; } @@ -53,9 +53,9 @@ PluginDescription* KnownPluginList::getTypeForIdentifierString (const String& id { ScopedLock lock (typesArrayLock); - for (int i = 0; i < types.size(); ++i) - if (types.getUnchecked(i)->matchesIdentifierString (identifierString)) - return types.getUnchecked(i); + for (auto* desc : types) + if (desc->matchesIdentifierString (identifierString)) + return desc; return nullptr; } @@ -65,15 +65,15 @@ bool KnownPluginList::addType (const PluginDescription& type) { ScopedLock lock (typesArrayLock); - for (int i = types.size(); --i >= 0;) + for (auto* desc : types) { - if (types.getUnchecked(i)->isDuplicateOf (type)) + if (desc->isDuplicateOf (type)) { // strange - found a duplicate plugin with different info.. - jassert (types.getUnchecked(i)->name == type.name); - jassert (types.getUnchecked(i)->isInstrument == type.isInstrument); + jassert (desc->name == type.name); + jassert (desc->isInstrument == type.isInstrument); - *types.getUnchecked(i) = type; + *desc = type; return false; } } @@ -89,7 +89,6 @@ void KnownPluginList::removeType (const int index) { { ScopedLock lock (typesArrayLock); - types.remove (index); } @@ -104,14 +103,9 @@ bool KnownPluginList::isListingUpToDate (const String& fileOrIdentifier, ScopedLock lock (typesArrayLock); - for (int i = types.size(); --i >= 0;) - { - const PluginDescription* const d = types.getUnchecked(i); - - if (d->fileOrIdentifier == fileOrIdentifier - && formatToUse.pluginNeedsRescanning (*d)) + for (auto* d : types) + if (d->fileOrIdentifier == fileOrIdentifier && formatToUse.pluginNeedsRescanning (*d)) return false; - } return true; } @@ -135,10 +129,8 @@ bool KnownPluginList::scanAndAddFile (const String& fileOrIdentifier, ScopedLock lock (typesArrayLock); - for (int i = types.size(); --i >= 0;) + for (auto* d : types) { - const PluginDescription* const d = types.getUnchecked(i); - if (d->fileOrIdentifier == fileOrIdentifier && d->pluginFormatName == format.getName()) { if (format.pluginNeedsRescanning (*d)) @@ -171,30 +163,27 @@ bool KnownPluginList::scanAndAddFile (const String& fileOrIdentifier, } } - for (int i = 0; i < found.size(); ++i) + for (auto* desc : found) { - PluginDescription* const desc = found.getUnchecked(i); jassert (desc != nullptr); - addType (*desc); typesFound.add (new PluginDescription (*desc)); } - return found.size() > 0; + return ! found.isEmpty(); } void KnownPluginList::scanAndAddDragAndDroppedFiles (AudioPluginFormatManager& formatManager, const StringArray& files, OwnedArray& typesFound) { - for (int i = 0; i < files.size(); ++i) + for (const auto& filenameOrID : files) { - const String filenameOrID (files[i]); bool found = false; for (int j = 0; j < formatManager.getNumFormats(); ++j) { - AudioPluginFormat* const format = formatManager.getFormat (j); + auto* format = formatManager.getFormat (j); if (format->fileMightContainThisPluginType (filenameOrID) && scanAndAddFile (filenameOrID, true, typesFound, *format)) @@ -216,8 +205,8 @@ void KnownPluginList::scanAndAddDragAndDroppedFiles (AudioPluginFormatManager& f Array subFiles; f.findChildFiles (subFiles, File::findFilesAndDirectories, false); - for (int j = 0; j < subFiles.size(); ++j) - s.add (subFiles.getReference(j).getFullPathName()); + for (auto& subFile : subFiles) + s.add (subFile.getFullPathName()); } scanAndAddDragAndDroppedFiles (formatManager, s, typesFound); @@ -340,7 +329,7 @@ void KnownPluginList::sort (const SortMethod method, bool forwards) //============================================================================== XmlElement* KnownPluginList::createXml() const { - XmlElement* const e = new XmlElement ("KNOWNPLUGINS"); + auto e = new XmlElement ("KNOWNPLUGINS"); { ScopedLock lock (typesArrayLock); @@ -349,8 +338,8 @@ XmlElement* KnownPluginList::createXml() const e->prependChildElement (types.getUnchecked(i)->createXml()); } - for (int i = 0; i < blacklist.size(); ++i) - e->createNewChildElement ("BLACKLISTED")->setAttribute ("id", blacklist[i]); + for (auto& b : blacklist) + e->createNewChildElement ("BLACKLISTED")->setAttribute ("id", b); return e; } @@ -381,12 +370,10 @@ struct PluginTreeUtils static void buildTreeByFolder (KnownPluginList::PluginTree& tree, const Array& allPlugins) { - for (int i = 0; i < allPlugins.size(); ++i) + for (auto* pd : allPlugins) { - PluginDescription* const pd = allPlugins.getUnchecked (i); - - String path (pd->fileOrIdentifier.replaceCharacter ('\\', '/') - .upToLastOccurrenceOf ("/", false, false)); + auto path = pd->fileOrIdentifier.replaceCharacter ('\\', '/') + .upToLastOccurrenceOf ("/", false, false); if (path.substring (1, 2) == ":") path = path.substring (2); @@ -401,15 +388,13 @@ struct PluginTreeUtils { for (int i = tree.subFolders.size(); --i >= 0;) { - KnownPluginList::PluginTree& sub = *tree.subFolders.getUnchecked(i); + auto& sub = *tree.subFolders.getUnchecked(i); optimiseFolders (sub, concatenateName || (tree.subFolders.size() > 1)); - if (sub.plugins.size() == 0) + if (sub.plugins.isEmpty()) { - for (int j = 0; j < sub.subFolders.size(); ++j) + for (auto* s : sub.subFolders) { - KnownPluginList::PluginTree* const s = sub.subFolders.getUnchecked(j); - if (concatenateName) s->folder = sub.folder + "/" + s->folder; @@ -429,10 +414,9 @@ struct PluginTreeUtils String lastType; ScopedPointer current (new KnownPluginList::PluginTree()); - for (int i = 0; i < sorted.size(); ++i) + for (auto* pd : sorted) { - const PluginDescription* const pd = sorted.getUnchecked(i); - String thisType (sortMethod == KnownPluginList::sortByCategory ? pd->category + auto thisType = (sortMethod == KnownPluginList::sortByCategory ? pd->category : pd->manufacturerName); if (! thisType.containsNonWhitespaceChars()) @@ -473,8 +457,8 @@ struct PluginTreeUtils path = path.fromFirstOccurrenceOf (":", false, false); // avoid the special AU formatting nonsense on Mac.. #endif - const String firstSubFolder (path.upToFirstOccurrenceOf ("/", false, false)); - const String remainingPath (path.fromFirstOccurrenceOf ("/", false, false)); + auto firstSubFolder = path.upToFirstOccurrenceOf ("/", false, false); + auto remainingPath = path.fromFirstOccurrenceOf ("/", false, false); for (int i = tree.subFolders.size(); --i >= 0;) { @@ -487,7 +471,7 @@ struct PluginTreeUtils } } - KnownPluginList::PluginTree* const newFolder = new KnownPluginList::PluginTree(); + auto newFolder = new KnownPluginList::PluginTree(); newFolder->folder = firstSubFolder; tree.subFolders.add (newFolder); addPlugin (*newFolder, pd, remainingPath); @@ -512,22 +496,18 @@ struct PluginTreeUtils { bool isTicked = false; - for (int i = 0; i < tree.subFolders.size(); ++i) + for (auto* sub : tree.subFolders) { - const KnownPluginList::PluginTree& sub = *tree.subFolders.getUnchecked(i); - PopupMenu subMenu; - const bool isItemTicked = addToMenu (sub, subMenu, allPlugins, currentlyTickedPluginID); + const bool isItemTicked = addToMenu (*sub, subMenu, allPlugins, currentlyTickedPluginID); isTicked = isTicked || isItemTicked; - m.addSubMenu (sub.folder, subMenu, true, nullptr, isItemTicked, 0); + m.addSubMenu (sub->folder, subMenu, true, nullptr, isItemTicked, 0); } - for (int i = 0; i < tree.plugins.size(); ++i) + for (auto* plugin : tree.plugins) { - const PluginDescription* const plugin = tree.plugins.getUnchecked(i); - - String name (plugin->name); + auto name = plugin->name; if (containsDuplicateNames (tree.plugins, name)) name << " (" << plugin->pluginFormatName << ')'; @@ -550,11 +530,11 @@ KnownPluginList::PluginTree* KnownPluginList::createTree (const SortMethod sortM ScopedLock lock (typesArrayLock); PluginSorter sorter (sortMethod, true); - for (int i = 0; i < types.size(); ++i) - sorted.addSorted (sorter, types.getUnchecked(i)); + for (auto* t : types) + sorted.addSorted (sorter, t); } - PluginTree* tree = new PluginTree(); + auto* tree = new PluginTree(); if (sortMethod == sortByCategory || sortMethod == sortByManufacturer || sortMethod == sortByFormat) { @@ -566,8 +546,8 @@ KnownPluginList::PluginTree* KnownPluginList::createTree (const SortMethod sortM } else { - for (int i = 0; i < sorted.size(); ++i) - tree->plugins.add (sorted.getUnchecked(i)); + for (auto* p : sorted) + tree->plugins.add (p); } return tree; @@ -595,7 +575,7 @@ void KnownPluginList::CustomScanner::scanFinished() {} bool KnownPluginList::CustomScanner::shouldExit() const noexcept { - if (ThreadPoolJob* job = ThreadPoolJob::getCurrentThreadPoolJob()) + if (auto* job = ThreadPoolJob::getCurrentThreadPoolJob()) return job->shouldExit(); return false; diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp index c47602b02c..4c7fb00547 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp @@ -32,11 +32,13 @@ struct AudioProcessorValueTreeState::Parameter : public AudioProcessorParamete const String& parameterID, const String& paramName, const String& labelText, NormalisableRange r, float defaultVal, std::function valueToText, - std::function textToValue) + std::function textToValue, + bool meta) : AudioProcessorParameterWithID (parameterID, paramName, labelText), owner (s), valueToTextFunction (valueToText), textToValueFunction (textToValue), range (r), value (defaultVal), defaultValue (defaultVal), - listenersNeedCalling (true) + listenersNeedCalling (true), + isMeta (meta) { state.addListener (this); needsUpdate.set (1); @@ -144,6 +146,8 @@ struct AudioProcessorValueTreeState::Parameter : public AudioProcessorParamete return nullptr; } + bool isMetaParameter() const override { return isMeta; } + AudioProcessorValueTreeState& owner; ValueTree state; ListenerList listeners; @@ -153,6 +157,7 @@ struct AudioProcessorValueTreeState::Parameter : public AudioProcessorParamete float value, defaultValue; Atomic needsUpdate; bool listenersNeedCalling; + bool isMeta; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Parameter) }; @@ -175,7 +180,8 @@ AudioProcessorValueTreeState::~AudioProcessorValueTreeState() {} AudioProcessorParameterWithID* AudioProcessorValueTreeState::createAndAddParameter (const String& paramID, const String& paramName, const String& labelText, NormalisableRange r, float defaultVal, std::function valueToTextFunction, - std::function textToValueFunction) + std::function textToValueFunction, + bool isMetaParameter) { // All parameters must be created before giving this manager a ValueTree state! jassert (! state.isValid()); @@ -184,7 +190,8 @@ AudioProcessorParameterWithID* AudioProcessorValueTreeState::createAndAddParamet #endif Parameter* p = new Parameter (*this, paramID, paramName, labelText, r, - defaultVal, valueToTextFunction, textToValueFunction); + defaultVal, valueToTextFunction, textToValueFunction, + isMetaParameter); processor.addParameter (p); return p; } diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h index 481e821b23..b3a129fef3 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h @@ -75,6 +75,7 @@ public: AudioProcessorParameter::getText() method. This can be nullptr to use the default implementation @param textToValueFunction The inverse of valueToTextFunction + @param isMetaParameter Set this value to true if this should be a meta parameter @returns the parameter object that was created */ AudioProcessorParameterWithID* createAndAddParameter (const String& parameterID, @@ -83,7 +84,8 @@ public: NormalisableRange valueRange, float defaultValue, std::function valueToTextFunction, - std::function textToValueFunction); + std::function textToValueFunction, + bool isMetaParameter = false); /** Returns a parameter by its ID string. */ AudioProcessorParameterWithID* getParameter (StringRef parameterID) const noexcept; diff --git a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp index 6bb1bc19bb..526d2bf52d 100644 --- a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp @@ -563,8 +563,8 @@ private: { int y = 0; - for (int i = getNumChildComponents(); --i >= 0;) - y = jmax (y, getChildComponent (i)->getBottom()); + for (auto* c : getChildren()) + y = jmax (y, c->getBottom()); return y; } diff --git a/modules/juce_audio_utils/juce_audio_utils.h b/modules/juce_audio_utils/juce_audio_utils.h index 0d0a7453dc..0aeef2d735 100644 --- a/modules/juce_audio_utils/juce_audio_utils.h +++ b/modules/juce_audio_utils/juce_audio_utils.h @@ -35,7 +35,7 @@ ID: juce_audio_utils vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE extra audio utility classes description: Classes for audio-related GUI and miscellaneous tasks. website: http://www.juce.com/juce diff --git a/modules/juce_audio_utils/players/juce_SoundPlayer.cpp b/modules/juce_audio_utils/players/juce_SoundPlayer.cpp index f3782c177c..a6e79e7713 100644 --- a/modules/juce_audio_utils/players/juce_SoundPlayer.cpp +++ b/modules/juce_audio_utils/players/juce_SoundPlayer.cpp @@ -50,14 +50,14 @@ private: struct AutoRemovingTransportSource : public AudioTransportSource, private Timer { AutoRemovingTransportSource (MixerAudioSource& mixerToUse, AudioTransportSource* ts, bool ownSource, - int samplesPerBlock, double sampleRate) + int samplesPerBlock, double requiredSampleRate) : mixer (mixerToUse), transportSource (ts, ownSource) { jassert (ts != nullptr); setSource (transportSource); - prepareToPlay (samplesPerBlock, sampleRate); + prepareToPlay (samplesPerBlock, requiredSampleRate); start(); mixer.addInputSource (this, true); diff --git a/modules/juce_blocks_basics/LittleFootFunctions.txt b/modules/juce_blocks_basics/LittleFootFunctions.txt index 0a0f062afd..92c7ad8395 100644 --- a/modules/juce_blocks_basics/LittleFootFunctions.txt +++ b/modules/juce_blocks_basics/LittleFootFunctions.txt @@ -1,197 +1,541 @@ +/** + * @defgroup Graphics Graphics functions + * @defgroup Midi Midi functions + * @defgroup Callbacks Callbacks from the OS + * @defgroup Maths Math functions + * @defgroup Memory Memory Access functions + * @defgroup Debug Debugging functions + * @defgroup Configs Configuration functions + * @defgroup Messaging Messaging functions + * @defgroup Clustering Cluster functions + * @defgroup Topology Topology functions + * @defgroup Touch Touch functions + * @defgroup Lightpad Lightpad specific functions + * @defgroup ControlBlock Control Block specific functions + * @defgroup Seaboard Seaboard specific functions + * @defgroup Power Power functions + * @defgroup Utility Utility functions + * @defgroup Internal Internal functions (not for general usage) + */ -/** Returns the smaller of two integer values. */ + +/** Reads and returns the value of a single byte from the heap. + + @param byteIndex the index (in bytes) of the byte to read + @returns the value of the byte + + @ingroup Memory +*/ +int getHeapByte (int byteIndex); + +/** Reads 4 bytes from the heap and returns the value as an integer. + + @param byteIndex the index (in bytes) of the start of the 4 bytes to read + @returns the value of the 4 bytes as an integer + + @ingroup Memory +*/ +int getHeapInt (int byteIndex); + +/** Reads a sequence of bits from the heap and returns the value as an integer. + + @param startBitIndex the index (in bits) of the start of the sequence of bits to read + @param numBits how many bits to read + @returns the value of the sequence of bits as an integer + + @ingroup Memory +*/ +int getHeapBits (int startBitIndex, int numBits); + +/** Writes a single byte to the heap. + + @param byteIndex the index (in bytes) of the byte to set + @param newValue the new value to set this byte to + + @ingroup Memory +*/ +void setHeapByte (int byteIndex, int newValue); + +/** Writes 4 bytes to the heap. + + @param byteIndex the index (in bytes) of the start of the 4 bytes to set + @param newValue the new value to set the 4 bytes to + + @ingroup Memory +*/ +void setHeapInt (int byteIndex, int newValue); + +/** Returns the smaller of two integer values. + + @param a The first parameter + @param b The second parameter + @retval The minimum of a and b + + @ingroup Maths + */ int min (int a, int b); -/** Returns the smaller of two floating point values. */ +/** Returns the smaller of two floating point values. + + @param a The first parameter + @param b The second parameter + @retval The minimum of a and b + + @ingroup Maths + */ float min (float a, float b); -/** Returns the larger of two integer values. */ +/** Returns the larger of two integer values. + + @param a The first parameter + @param b The second parameter + @retval The maximum of a and b + + @ingroup Maths + */ int max (int a, int b); -/** Returns the larger of two floating point values. */ +/** Returns the larger of two floating point values. + + @param a The first parameter + @param b The second parameter + @retval The maximum of a and b + + @ingroup Maths + */ float max (float a, float b); /** Constrains an integer value to keep it within a given range. - - @param lowerLimit the minimum value to return - @param upperLimit the maximum value to return - @param valueToConstrain the value to try to return - - @returns the closest value to valueToConstrain which lies between lowerLimit - and upperLimit (inclusive) + + @param lowerLimit the minimum value to return + @param upperLimit the maximum value to return + @param valueToConstrain the value to try to return + @returns the closest value to valueToConstrain which lies between lowerLimit + and upperLimit (inclusive) + + @ingroup Maths */ int clamp (int lowerLimit, int upperLimit, int valueToConstrain); /** Constrains a floating point value to keep it within a given range. - - @param lowerLimit the minimum value to return - @param upperLimit the maximum value to return - @param valueToConstrain the value to try to return - - @returns the closest value to valueToConstrain which lies between lowerLimit - and upperLimit (inclusive) + + @param lowerLimit the minimum value to return + @param upperLimit the maximum value to return + @param valueToConstrain the value to try to return + @returns the closest value to valueToConstrain which lies between lowerLimit + and upperLimit (inclusive) + + @ingroup Maths */ float clamp (float lowerLimit, float upperLimit, float valueToConstrain); -/** Returns the absolute value of an integer value. */ +/** Returns the absolute value of an integer value. + + @param arg The argument to compute the absolute value of + @retval either -arg if arg is negative or arg if arg is positive + + @ingroup Maths +*/ int abs (int arg); -/** Returns the absolute value of a floating point value. */ +/** Returns the absolute value of a floating point value. + + @param arg The argument to compute the absolute value of + @retval either -arg if arg is negative or arg if arg is positive + + @ingroup Maths +*/ float abs (float arg); /** Remaps a value from a source range to a target range. - + @param value the value within the source range to map @param sourceMin the minimum value of the source range @param sourceMax the maximum value of the source range @param destMin the minumum value of the destination range @param destMax the maximum value of the destination range - - @returns the original value mapped to the destination range + @returns the original value mapped to the destination range + + @ingroup Maths */ float map (float value, float sourceMin, float sourceMax, float destMin, float destMax); /** Remaps a value from a source range to the range 0 - 1.0. - + @param value the value within the source range to map @param sourceMin the minimum value of the source range @param sourceMax the maximum value of the source range - - @returns the original value mapped to the range 0 - 1.0 + @returns the original value mapped to the range 0 - 1.0 + + @ingroup Maths */ float map (float value, float sourceMin, float sourceMax); /** Performs a modulo operation (can cope with the dividend being negative). The divisor must be greater than zero. + + @returns the result of the modulo operation + + @ingroup Maths */ int mod (int dividend, int divisor); /** Returns a random floating-point number. - @returns a random value in the range 0 (inclusive) to 1.0 (exclusive) + @returns a random value in the range 0 (inclusive) to 1.0 (exclusive) + + @ingroup Maths */ float getRandomFloat(); /** Returns a random integer, limited to a given range. - @returns a random integer between 0 (inclusive) and maxValue (exclusive). + @returns a random integer between 0 (inclusive) and maxValue (exclusive). + + @ingroup Maths */ -int getRandomInt (int maxValue) +int getRandomInt (int maxValue); /** Returns the number of milliseconds since a fixed event (usually system startup). - - This returns a monotonically increasing value which it unaffected by changes to the - system clock. It should be accurate to within a few millisecseconds. - */ + + @returns a monotonically increasing value which is unaffected by changes to the + system clock. It should be accurate to within a few millisecseconds. + + @ingroup Maths +*/ int getMillisecondCounter(); -/** Returns the current firmware version. */ -int getFirmwareVersion(); +/** Returns the length of time spent in the current function call in milliseconds. -/** Logs an integer value to the console. */ -void log (int data); + @returns the length of time spent in the current function call in milliseconds. -/** Logs a hexadecimal value to the console. */ -void logHex (int data); - -/** Returns the length of time spent in the function call in milliseconds. */ + @ingroup Maths +*/ int getTimeInCurrentFunctionCall(); -/** Returns the battery level between 0 and 1.0. */ -float getBatteryLevel(); +/** Logs an integer value to the console. -/** Returns true if the battery is charging. */ -bool isBatteryCharging(); + @param data The 32 bit signed integer to log to the topology as an integer -/** Returns true if this block is directly connected to the application, - as opposed to only being connected to a different block via a connection port. + @ingroup Debug + */ +void log (int data); + +/** Logs a hexadecimal value to the console. + + @param data The 32 bit signed integer to log to the topology as a hexidecimal int + + @ingroup Debug + */ +void logHex (int data); + +/** Sends a 1-byte short midi message. + @ingroup Midi */ -bool isMasterBlock(); +void sendMIDI (int byte0); -/** Returns true if this block is directly connected to the host computer. */ -bool isConnectedToHost(); - -/** Sets whether status overlays should be displayed. */ -void setStatusOverlayActive (bool active); - -/** Returns the number of blocks in the current topology. */ -int getNumBlocksInTopology(); - -/** Returns the ID of the block at a given index in the topology. */ -int getBlockIDForIndex (int index); - -/** Returns the ID of the block connected to a specified port. */ -int getBlockIDOnPort (int port); - -/** Returns the port number that is connected to the master block. Returns 0xFF if there is no path. */ -int getPortToMaster(); - -/** Returns the block type of the block with this ID. */ -int getBlockTypeForID (int blockID); - -/** Sends a message to the block with the specified ID. - This will be processed in the handleMessage() callback. - - @param blockID the ID of the block to send this message to - @param param1 the first chunk of data to send - @param param2 the second chunk of data to send - @param param3 the third chunk of data to send +/** Sends a 2-byte short midi message. + @ingroup Midi */ -void sendMessageToBlock (int blockID, int param1, int param2, int param3); +void sendMIDI (int byte0, int byte1); -/** Sends a message to the host. - To receive this the host will need to implement the Block::ProgramEventListener::handleProgramEvent() method. - - @param param1 the first chunk of data to send - @param param2 the second chunk of data to send - @param param3 the third chunk of data to send +/** Sends a 3-byte short midi message. + @ingroup Midi */ -void sendMessageToHost (int param1, int param2, int param3); +void sendMIDI (int byte0, int byte1, int byte2); -/** Combines a set of 8-bit ARGB values into a 32-bit colour and returns the result. */ +/** Sends a key-down message. + + @param channel the midi channel, in the range 0 to 15 + @param noteNumber the key number, in the range 0 to 127 + @param velocity the velocity, in the range 0 to 127 + + @ingroup Midi +*/ +void sendNoteOn (int channel, int noteNumber, int velocity); + +/** Sends a key-up message. + + @param channel the midi channel, in the range 0 to 15 + @param noteNumber the key number, in the range 0 to 127 + @param velocity the velocity, in the range 0 to 127 + + @ingroup Midi +*/ +void sendNoteOff (int channel, int noteNumber, int velocity); + +/** Sends an aftertouch message. + + @param channel the midi channel, in the range 0 to 15 + @param noteNumber the key number, in the range 0 to 127 + @param level the amount of aftertouch, in the range 0 to 127 + + @ingroup Midi +*/ +void sendAftertouch (int channel, int noteNumber, int level); + +/** Sends a controller message. + + @param channel the midi channel, in the range 0 to 15 + @param controller the type of controller + @param value the controller value + + @ingroup Midi +*/ +void sendCC (int channel, int controller, int value); + +/** Sends a pitch bend message. + + @param channel the midi channel, in the range 0 to 15 + @param position the wheel position, in the range 0 to 16383 + + @ingroup Midi +*/ +void sendPitchBend (int channel, int position); + +/** Sends a channel-pressure change event. + + @param channel the midi channel, in the range 0 to 15 + @param pressure the pressure, in the range 0 to 127 + + @ingroup Midi +*/ +void sendChannelPressure (int channel, int pressure); + +/** Sets the MIDI channel range. + + @param useMPE + @param lowChannel + @param highChannel + + @ingroup Midi +*/ +void setChannelRange (bool useMPE, int lowChannel, int highChannel); + +/** Assigns a MIDI channel to a note number. + + @param noteNumber the note number to assign the channel to + @returns the MIDI channel that has been assigned + + @ingroup Midi +*/ +int assignChannel (int noteNumber); + +/** Deassigns a channel from a note number. + + @param noteNumber the note number to deassign + @param channel the MIDI channel + + @ingroup Midi +*/ +void deassignChannel (int noteNumber, int channel); + +/** Returns the channel that is being used for control messages. + + @returns the channel that is being used for control messages. (If MPE is enabled then this will be the first channel.) + + @ingroup Midi +*/ +int getControlChannel(); + +/** Sets whether duplicate notes should be filtered out when MPE is enabled. + + @ingroup Midi +*/ +void useMPEDuplicateFilter (bool active); + +/** Use this method to draw the display. + The block will call this approximately 25 times per second. + + @ingroup Callbacks +*/ +void repaint() + +/** Called when a button is pushed. + + @param index the index of the button that was pushed + + @ingroup Callbacks +*/ +void handleButtonDown (int index); + +/** Called when a button is released. + + @param index the index of the button that was released + + @ingroup Callbacks +*/ +void handleButtonUp (int index); + +/** Called when a control block button is pressed. + + @param buttonIndex the index of the button + + @ingroup Callbacks + + @note Requires >= 0.2.5 firmware + @note Only valid with a control block + */ +void onControlPress (int buttonIndex); + +/** Called when a control block button is released. + + @param buttonIndex the index of the button + + @ingroup Callbacks + + @note Requires >= 0.2.5 firmware + @note Only valid with a control block + */ +void onControlRelease (int buttonIndex); + +/** Called when a touch event starts. + + @param index the touch index, which will stay constant for each finger as it is tracked + @param x the X position of this touch on the device, in block units starting from 0 (left) + @param y the Y position of this touch on the device, in block units starting from 0 (top) + @param z the current pressure of this touch, in the range 0.0 (no pressure) to 1.0 (very hard) + @param vz the rate at which pressure is currently changing, measured in units/second + + @ingroup Touch +*/ +void touchStart (int index, float x, float y, float z, float vz); + +/** Called when a touch event moves. + + @param index the touch index, which will stay constant for each finger as it is tracked + @param x the X position of this touch on the device, in block units starting from 0 (left) + @param y the Y position of this touch on the device, in block units starting from 0 (top) + @param z the current pressure of this touch, in the range 0.0 (no pressure) to 1.0 (very hard) + @param vz the rate at which pressure is currently changing, measured in units/second + + @ingroup Touch +*/ +void touchMove (int index, float x, float y, float z, float vz); + +/** Called when a touch event ends. + + @param index the touch index, which will stay constant for each finger as it is tracked + @param x the X position of this touch on the device, in block units starting from 0 (left) + @param y the Y position of this touch on the device, in block units starting from 0 (top) + @param z the current pressure of this touch, in the range 0.0 (no pressure) to 1.0 (very hard) + @param vz the rate at which pressure is currently changing, measured in units/second + + @ingroup Touch +*/ +void touchEnd (int index, float x, float y, float z, float vz); + +/** Called when a program is loaded onto the block and is about to start. Do any setup here. + + @ingroup Callbacks +*/ +void initialise(); + +/** Called when a block receives a MIDI message. + + @ingroup Midi +*/ +void handleMIDI (int byte0, int byte1, int byte2); + +/** Called when a block receives a message. + + @see sendMessageToBlock + @ingroup Messaging + */ +void handleMessage (int param1, int param2, int param3); + +/** Combines a set of 8-bit ARGB values into a 32-bit colour and returns the result. + + @return a 32-bit colour + @param alpha The alpha in range 0 - 255 inclusive + @param red The red in range 0 - 255 inclusive + @param green The green in range 0 - 255 inclusive + @param blue The blue in range 0 - 255 inclusive + + @ingroup Graphics +*/ int makeARGB (int alpha, int red, int green, int blue); -/** Blends the overlaid ARGB colour onto the base one and returns the new colour. */ +/** Blends the overlaid ARGB colour onto the base one and returns the new colour. + + @param baseColour the colour to blend on to + @param overlaidColour The colour to blend in to the baseColour + @returns The blended colour + + @ingroup Graphics +*/ int blendARGB (int baseColour, int overlaidColour); +/** Displays an animation indicating the current battery level of this block. + A control block will light up its top LEDs indicating battery level and a lightpad + block will draw the battery level on the display. + + @ingroup Graphics + + @note Requires >= 0.2.5 firmware +*/ +void displayBatteryLevel(); + +/** Clears the display and sets all the LEDs to black. + + @ingroup Graphics +*/ +void clearDisplay(); + +/** Clears the display and sets all the LEDs to a specified colour. + + @param rgb the colour to use (0xff...) + + @ingroup Graphics +*/ +void clearDisplay (int rgb); + /** Sets a pixel to a specified colour with full alpha. - + @param rgb the colour to use (0xff...) @param x the x coordinate of the pixel to fill @param y the y coordinate of the pixel to fill + + @ingroup Graphics */ void fillPixel (int rgb, int x, int y); -/** Blends a the current pixel colour with a specified colour. - +/** Blends the current pixel colour with a specified colour. + @param argb the colour to use @param x the x coordinate of the pixel to blend @param y the y coordinate of the pixel to blend + + @ingroup Graphics */ void blendPixel (int argb, int x, int y); -/** Fills a rectangle on the display with a specified colour. - +/** Fills a rectangle on the display with a specified colour. + @param rgb the colour to use (0xff...) @param x the x coordinate of the rectangle to draw @param y the y coordinate of the rectangle to draw @param width the width of the rectangle to draw @param height the height of the rectangle to draw + + @ingroup Graphics */ void fillRect (int rgb, int x, int y, int width, int height); -/** Blends a rectangle on the display with a specified colour. - +/** Blends a rectangle on the display with a specified colour. + @param argb the colour to use @param x the x coordinate of the rectangle to blend @param y the y coordinate of the rectangle to blend @param width the width of the rectangle to blend @param height the height of the rectangle to blend + + @ingroup Graphics */ void blendRect (int argb, int x, int y, int width, int height); -/** Draws a rectangle on the block display with four corner colours blended together. - +/** Fills a rectangle on the display with four corner colours blended together. + @param colourNW the colour to use in the north west corner of the rectangle @param colourNE the colour to use in the north east corner of the rectangle @param colourSE the colour to use in the south east corner of the rectangle @@ -200,151 +544,438 @@ void blendRect (int argb, int x, int y, int width, int height); @param y the y coordinate of the rectangle @param width the width of the rectangle @param height the height of the rectangle + + @ingroup Graphics */ void blendGradientRect (int colourNW, int colourNE, int colourSE, int colourSW, int x, int y, int width, int height); -/** Draws a pressure point at a given centre LED with a specified colour and pressure. - - @param argb the colour to use - @param touchX the x position of the touch - @param touchY the y position of the touch - @param touchZ the pressure value of the touch +/** Blends a circle on the display with a specified colour. + + @param argb the colour to use + @param xCentre the x position of the circle's centre in block units + @param yCentre the y position of the circle's centre in block units + @param radius the radius of the circle in block units + @param fill if true then the circle will be filled, if false the circle will be an outline + + @ingroup Graphics + + @note Requires >= 0.2.5 firmware */ -void addPressurePoint (int argb, float touchX, float touchY, float touchZ); +void blendCircle (int argb, float xCentre, float yCentre, float radius, bool fill); -/** Draws the pressure map on the block display. */ -void drawPressureMap(); +/** Draws a number on the display. -/** Fades the pressure map on the block display. */ -void fadePressureMap(); - -/** Draws a number on the block display. - @param value the number to draw between 0 and 99 @param colour the colour to use @param x the x coordinate to use @param y the y coordinate to use + + @ingroup Graphics */ void drawNumber (int value, int colour, int x, int y); -/** Clears the display setting all the LEDs to black. */ -void clearDisplay(); +/** Returns the current firmware version of this block. -/** Clears the display setting all the LEDs to a specified colour. */ -void clearDisplay (int rgb); + @returns The firmware version of the form 0xMJMIRV (where MJ = Major, MI = Minor, RV = Revision) -/** Sends a 1-byte short midi message. */ -void sendMIDI (int byte0); + @ingroup Utility -/** Sends a 2-byte short midi message. */ -void sendMIDI (int byte0, int byte1); - -/** Sends a 3-byte short midi message. */ -void sendMIDI (int byte0, int byte1, int byte2); - -/** Sends a key-down message. - - @param channel the midi channel, in the range 0 to 15 - @param noteNumber the key number, in the range 0 to 127 - @param velocity the velocity, in the range 0 to 127 + @note Requires >= 0.2.5 firmware */ -void sendNoteOn (int channel, int noteNumber, int velocity); +int getFirmwareVersion(); -/** Sends a key-up message. - - @param channel the midi channel, in the range 0 to 15 - @param noteNumber the key number, in the range 0 to 127 - @param velocity the velocity, in the range 0 to 127 +/** Returns the battery level of this block, between 0 and 1.0. + + @returns the battery level of this block, between 0 and 1.0. + + @ingroup Power + + @note Requires >= 0.2.5 firmware */ -void sendNoteOff (int channel, int noteNumber, int velocity); +float getBatteryLevel(); -/** Sends an aftertouch message. - - @param channel the midi channel, in the range 0 to 15 - @param noteNumber the key number, in the range 0 to 127 - @param level the amount of aftertouch, in the range 0 to 127 +/** Returns true if this block's battery is charging. + + @returns true if this block's battery is charging + + @ingroup Power + + @note Requires >= 0.2.5 firmware */ -void sendAftertouch (int channel, int noteNumber, int level); +bool isBatteryCharging(); -/** Sends a controller message. - - @param channel the midi channel, in the range 0 to 15 - @param controller the type of controller - @param value the controller value - */ -void sendCC (int channel, int controller, int value); +/** Sets whether status overlays should be displayed on this block. -/** Sends a pitch bend message. - - @param channel the midi channel, in the range 0 to 15 - @param position the wheel position, in the range 0 to 16383 + @ingroup Utility + + @note Requires >= 0.2.5 firmware */ -void sendPitchBend (int channel, int position); +void setStatusOverlayActive (bool active); -/** Sends a channel-pressure change event. - - @param channel the midi channel, in the range 0 to 15 - @param pressure the pressure, in the range 0 to 127 +/** Sets whether power saving mode should be enabled on this block. + + @ingroup Power + + @note Requires >= 0.2.5 firmware */ -void sendChannelPressure (int channel, int pressure); +void setPowerSavingEnabled (bool enabled); -//============================================================================== -/** - Use this method to draw the display. - The Block will call this approximately 25 times per second. +/** Returns the type of the block with a given ID. + + @returns an enum indicating the type of block @see Block::Type + + @ingroup Clustering + + @note Requires >= 0.2.5 firmware */ -void repaint() +int getBlockTypeForID (int blockID); -/** Called when a button is pushed. - - @param index the index of the button that was pushed +/** Sends a message to the block with the specified ID. + This will be processed in the handleMessage() callback. + + @param blockID the ID of the block to send this message to + @param param1 the first chunk of data to send + @param param2 the second chunk of data to send + @param param3 the third chunk of data to send + + @ingroup Messaging */ -void handleButtonDown (int index); +void sendMessageToBlock (int blockID, int param1, int param2, int param3); -/** Called when a button is released. - - @param index the index of the button that was released +/** Sends a message to the host. To receive this the host will need to implement + the Block::ProgramEventListener::handleProgramEvent() method. + + @param param1 the first chunk of data to send + @param param2 the second chunk of data to send + @param param3 the third chunk of data to send + + @ingroup Messaging */ -void handleButtonUp (int index); +void sendMessageToHost (int param1, int param2, int param3); -/** Called when a touch event starts. - - @param index the touch index, which will stay constant for each finger as it is tracked - @param x the X position of this touch on the device, in logical units starting from 0 (left) - @param y the Y position of this touch on the device, in logical units starting from 0 (top) - @param z the current pressure of this touch, in the range 0.0 (no pressure) to 1.0 (very hard) - @param vz the rate at which pressure is currently changing, measured in units/second - */ -void touchStart (int index, float x, float y, float z, float vz); +/** Draws a pressure point with a specified colour and pressure. -/** Called when a touch event moves. - - @param index the touch index, which will stay constant for each finger as it is tracked - @param x the X position of this touch on the device, in logical units starting from 0 (left) - @param y the Y position of this touch on the device, in logical units starting from 0 (top) - @param z the current pressure of this touch, in the range 0.0 (no pressure) to 1.0 (very hard) - @param vz the rate at which pressure is currently changing, measured in units/second + @param argb the colour to use + @param touchX the x position of the touch in block units + @param touchY the y position of the touch in block units + @param touchZ the pressure value of the touch + + @ingroup Lightpad */ -void touchMove (int index, float x, float y, float z, float vz); +void addPressurePoint (int argb, float touchX, float touchY, float touchZ); -/** Called when a touch event ends. - - @param index the touch index, which will stay constant for each finger as it is tracked - @param x the X position of this touch on the device, in logical units starting from 0 (left) - @param y the Y position of this touch on the device, in logical units starting from 0 (top) - @param z the current pressure of this touch, in the range 0.0 (no pressure) to 1.0 (very hard) - @param vz the rate at which pressure is currently changing, measured in units/second +/** Draws the pressure map on the display. + @ingroup Lightpad */ -void touchEnd (int index, float x, float y, float z, float vz); +void drawPressureMap(); -/** Called when a program is loaded onto the block and is about to start. Do any setup here. */ -void initialise(); - -/** Called when a block receives a MIDI message. */ -void handleMIDI (int byte0, int byte1, int byte2); - -/** Called when a block receives a message. - - @see sendMessageToBlock +/** Fades the pressure map on the display. + @ingroup Lightpad */ -void handleMessage (int param1, int param2, int param3); +void fadePressureMap(); + +/** Links a another block to this control block. + + @param blockID the ID of the block to link + + @ingroup ControlBlock + + @note Requires >= 0.2.5 firmware + @note Only valid with a control block +*/ +void linkBlockIDtoController (int blockID); + +/** Repaints the control block display. + + @ingroup ControlBlock + + @note Requires >= 0.2.5 firmware + @note Only valid with a control block +*/ +void repaintControl(); + +/** Initialises one of the control block buttons. + + @param buttonIndex the index of the button to initialise + @param modeToUse the mode to use for this button @see ControlMode + @param outputType the control type to use @see ControlType + @param val the current value to set this button to + @param min the minimum value for this button + @param max the maximum value for this button + @param index the item index + @param onColourToUse the colour to use when this button is on + @param offColourToUse the colour to use when this button is off + + @ingroup ControlBlock + + @note Requires >= 0.2.5 firmware + @note Only valid with a control block +*/ +void initControl (int buttonIndex, int modeToUse, int outputType, int val, int min, int max, + int index, int onColourToUse, int offColourToUse); + +/** Control type for use with initControl + + @see initControl + + @ingroup ControlBlock +*/ +enum ControlType +{ + internalConfig = 0, + midiCC, + sysex +}; + +/** Control mode for use with initControl + + @see initControl + + @ingroup ControlBlock +*/ +enum ControlMode +{ + toggle = 0, + togglePulse, + gate, + trigger, + cycle, + incDec, + triState +}; + +/** Forces a touch event to be handled as seaboard playing. + + @param touchIndex the index of the touch event + + @ingroup Seaboard + + @note Requires >= 0.2.5 firmware + @note Only valid on a Seaboard +*/ +void handleTouchAsSeaboard (int touchIndex); + +/** Returns the number of blocks in the current topology. + @ingroup Topology + + @note Requires >= 0.2.5 firmware +*/ +int getNumBlocksInTopology(); + +/** Returns the ID of a block at a given index in the topology. + + @param index The index of the block to find in the topology + @returns int The id of the block + + @ingroup Topology + + @note Requires >= 0.2.5 firmware +*/ +int getBlockIDForIndex (int index); + +/** Returns true if this block is directly connected to the host, + as opposed to only being connected to a different block via a connection port. + + @ingroup Topology + + @note Requires >= 0.2.5 firmware +*/ +bool isMasterBlock(); + +/** Returns true if this block is connected to the host computer, this can be + directly or through connections to other blocks. + + @ingroup Topology + + @note Requires >= 0.2.5 firmware +*/ +bool isConnectedToHost(); + +/** Returns the ID of a block connected to a specified port on this block. + @ingroup Topology + + @note Requires >= 0.2.5 firmware +*/ +int getBlockIDOnPort (int port); + +/** Returns the port number that is connected to the master block. Returns 0xFF if there is + no port connected to master. + + @returns the port number that is connected to the master block. Returns 0xFF if there is + no port connected to master. + + @ingroup Topology + + @note Requires >= 0.2.5 firmware +*/ +int getPortToMaster(); + +/** Returns the horizontal distance between this block and the master block in block units. + @ingroup Clustering + + @note Requires >= 0.2.5 firmware +*/ +int getHorizontalDistFromMaster(); + +/** Returns the vertical distance between this block and the master block in block units. + @ingroup Clustering + + @note Requires >= 0.2.5 firmware +*/ +int getVerticalDistFromMaster(); + +/** Returns the angle of this block relative to the master block in degrees. + @ingroup Clustering + + @note Requires >= 0.2.5 firmware +*/ +int getAngleFromMaster(); + +/** Sets whether this block should auto-rotate when its angle relative to the master block changes. + @ingroup Clustering + + @note Requires >= 0.2.5 firmware +*/ +void setAutoRotate (bool enabled); + +/** Returns the index of this block in the current cluster. + @ingroup Clustering + + @note Requires >= 0.2.5 firmware +*/ +int getClusterIndex(); + +/** Returns how many blocks wide the current cluster is. + + @returns the width of the cluster (note that a single block will return 1 here) + + @ingroup Clustering + + @note Requires >= 0.2.5 firmware +*/ +int getClusterWidth(); + +/** Returns how many blocks high the current cluster is. + + @returns the height of the cluster (note that a single block will return 1 here) + + @ingroup Clustering + + @note Requires >= 0.2.5 firmware +*/ +int getClusterHeight(); + +/** Returns the x index of this block in the current cluster. + + @returns int The cluster x position. (0, 0) is considered to be the top left block + + @ingroup Clustering + + @note Requires >= 0.2.5 firmware +*/ +int getClusterXpos(); + +/** Returns the y index of this block in the current cluster. + + @returns int The cluster x position. (0, 0) is considered to be the top left block + + @ingroup Clustering + + @note Requires >= 0.2.5 firmware +*/ +int getClusterYpos(); + +/** Returns the number of blocks in the current cluster. + + @returns the number of blocks in the current cluster. + + @ingroup Clustering + + @note Requires >= 0.2.5 firmware +*/ +int getNumBlocksInCurrentCluster(); + +/** Returns the block ID for a block in the current cluster. + + @param index the cluster index of the block to get the ID of + + @ingroup Clustering + + @note Requires >= 0.2.5 firmware +*/ +int getBlockIdForBlockInCluster (int index); + +/** Returns true if the master block is in the current cluster. + @ingroup Clustering + + @note Requires >= 0.2.5 firmware +*/ +bool isMasterInCurrentCluster(); + +/** Returns current value of one of the local config items. + + @param item the config item to get (see ConfigItemId enum in juce_BlocksProtocolDefinitions.h) + + @ingroup Configs + + @note Requires >= 0.2.5 firmware +*/ +int getLocalConfig (int item); + +/** Sets the current value of one of the local config items. + + @param item the config item to set the value of (see ConfigItemId enum in juce_BlocksProtocolDefinitions.h) + @param value the value to set the config to + + @ingroup Configs + + @note Requires >= 0.2.5 firmware +*/ +void setLocalConfig (int item, int value); + +/** Sets the local config of a block to the config item of a remote block. + + @param longAddress the address of the remote block + @param item the config item (see ConfigItemId enum in juce_BlocksProtocolDefinitions.h) + + @ingroup Configs + + @note Requires >= 0.2.5 firmware +*/ +void requestRemoteConfig (int longAddress, int item); + +/** Sets the config of a remote block. + + @param longAddress the address of the remote block + @param item the config item (see ConfigItemId enum in juce_BlocksProtocolDefinitions.h) + @param value the value to set the config to + + @ingroup Configs + + @note Requires >= 0.2.5 firmware +*/ +void setRemoteConfig (int longAddress, int item, int value); + +/** Sets the range of one of the local config items. + + @param item the config item to set the range of (see ConfigItemId enum in juce_BlocksProtocolDefinitions.h) + @param min the minimum value this config item should use + @param max the maximum value this config item should use + + @ingroup Configs + + @note Requires >= 0.2.5 firmware +*/ +void setLocalConfigItemRange (int item, int min, int max); + +/** Sets whether a local config item should be active. + + @param item the config item to set active (see ConfigItemId enum in juce_BlocksProtocolDefinitions.h) + @param isActive sets whether the config should be active or not + @param saveToFlash if true then this config item will be saved to the flash memory of the block + + @ingroup Configs + + @note Requires >= 0.2.5 firmware +*/ +void setLocalConfigActiveState (int item, bool isActive, bool saveToFlash); diff --git a/modules/juce_blocks_basics/blocks/juce_Block.cpp b/modules/juce_blocks_basics/blocks/juce_Block.cpp index 5a5cb14daa..6b4093899b 100644 --- a/modules/juce_blocks_basics/blocks/juce_Block.cpp +++ b/modules/juce_blocks_basics/blocks/juce_Block.cpp @@ -52,6 +52,11 @@ Block::Block (const juce::String& serial) { } +Block::Block (const juce::String& serial, const juce::String& version, const juce::String& blockName) + : serialNumber (serial), versionNumber (version), name (blockName), uid (getBlockUIDFromSerialNumber (serial)) +{ +} + Block::~Block() {} void Block::addDataInputPortListener (DataInputPortListener* listener) { dataInputPortListeners.add (listener); } diff --git a/modules/juce_blocks_basics/blocks/juce_Block.h b/modules/juce_blocks_basics/blocks/juce_Block.h index c505bc9951..1332dc3828 100644 --- a/modules/juce_blocks_basics/blocks/juce_Block.h +++ b/modules/juce_blocks_basics/blocks/juce_Block.h @@ -42,6 +42,7 @@ public: liveBlock, loopBlock, developerControlBlock, + touchBlock, seaboardBlock // on-screen seaboard view }; @@ -58,6 +59,12 @@ public: /** The Block's serial number. */ const juce::String serialNumber; + /** The Block's version number */ + juce::String versionNumber; + + /** The Block's name */ + juce::String name; + using UID = uint64; /** This Block's UID. @@ -256,13 +263,136 @@ public: /** Sets the current program as the block's default state. */ virtual void saveProgramAsDefault() = 0; + //============================================================================== + /** Metadata for a given config item */ + struct ConfigMetaData + { + static constexpr int32 numOptionNames = 8; + + ConfigMetaData() {} + + // Constructor to work around VS2015 bugs... + ConfigMetaData (uint32 itemIndex, + int32 itemValue, + juce::Range rangeToUse, + bool active, + const char* itemName, + uint32 itemType, + const char* options[ConfigMetaData::numOptionNames], + const char* groupName) + : item (itemIndex), + value (itemValue), + range (rangeToUse), + isActive (active), + name (itemName), + type (itemType), + group (groupName) + { + for (int i = 0; i < numOptionNames; ++i) + optionNames[i] = options[i]; + } + + ConfigMetaData (const ConfigMetaData& other) + { + *this = other; + } + + const ConfigMetaData& operator= (const ConfigMetaData& other) + { + if (this != &other) + { + item = other.item; + value = other.value; + range = other.range; + isActive = other.isActive; + name = other.name; + type = other.type; + group = other.group; + + for (int i = 0; i < numOptionNames; ++i) + optionNames[i] = other.optionNames[i]; + } + return *this; + } + + bool operator== (const ConfigMetaData& other) const + { + for (int32 optionIndex = 0; optionIndex < numOptionNames; ++optionIndex) + if (optionNames[optionIndex] != other.optionNames[optionIndex]) + return false; + + return item == other.item + && value == other.value + && range == other.range + && isActive == other.isActive + && name == other.name + && group == other.group; + } + + bool operator != (const ConfigMetaData& other) const + { + return ! (*this == other); + } + + uint32 item = 0; + int32 value = 0; + juce::Range range; + bool isActive = false; + juce::String name; + uint32 type = 0; + juce::String optionNames[numOptionNames] = {}; + juce::String group; + }; + + /** Returns the maximum number of config items available */ + virtual uint32 getMaxConfigIndex() = 0; + + /** Determine if this is a valid config item index */ + virtual bool isValidUserConfigIndex (uint32 item) = 0; + + /** Get local config item value */ + virtual int32 getLocalConfigValue (uint32 item) = 0; + + /** Set local config item value */ + virtual void setLocalConfigValue (uint32 item, int32 value) = 0; + + /** Set local config item range */ + virtual void setLocalConfigRange (uint32 item, int32 min, int32 max) = 0; + + /** Set if config item is active or not */ + virtual void setLocalConfigItemActive (uint32 item, bool isActive) = 0; + + /** Determine if config item is active or not */ + virtual bool isLocalConfigItemActive (uint32 item) = 0; + + /** Get config item metadata */ + virtual ConfigMetaData getLocalConfigMetaData (uint32 item) = 0; + + /** Request sync of factory config with block */ + virtual void requestFactoryConfigSync() = 0; + + /** Reset all items active status */ + virtual void resetConfigListActiveStatus() = 0; + + /** Perform factory reset on Block */ + virtual void factoryReset() = 0; + + /** Reset this Block */ + virtual void blockReset() = 0; + + /** Set Block name */ + virtual bool setName (const juce::String& name) = 0; + //============================================================================== /** Allows the user to provide a function that will receive log messages from the block. */ virtual void setLogger (std::function loggingCallback) = 0; /** Sends a firmware update packet to a block, and waits for a reply. Returns an error code. */ virtual bool sendFirmwareUpdatePacket (const uint8* data, uint8 size, - std::function packetAckCallback) = 0; + std::function packetAckCallback) = 0; + + /** Provides a callback that will be called when a config changes. */ + virtual void setConfigChangedCallback (std::function) = 0; //============================================================================== /** Interface for objects listening to input data port. */ @@ -292,6 +422,7 @@ public: protected: //============================================================================== Block (const juce::String& serialNumberToUse); + Block (const juce::String& serial, const juce::String& version, const juce::String& name); juce::ListenerList dataInputPortListeners; juce::ListenerList programEventListeners; diff --git a/modules/juce_blocks_basics/blocks/juce_BlockConfigManager.h b/modules/juce_blocks_basics/blocks/juce_BlockConfigManager.h new file mode 100644 index 0000000000..ad1d70b585 --- /dev/null +++ b/modules/juce_blocks_basics/blocks/juce_BlockConfigManager.h @@ -0,0 +1,346 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + Permission is granted to use this software under the terms of the ISC license + http://www.isc.org/downloads/software-support-policy/isc-license/ + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD + TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, + OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF + USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + OF THIS SOFTWARE. + + ----------------------------------------------------------------------------- + + To release a closed-source product which uses other parts of JUCE not + licensed under the ISC terms, commercial licenses are available: visit + www.juce.com for more information. + + ============================================================================== +*/ + +#pragma once + +// This file provides interfaces for managing the internal configuration of Blocks +// and synchronises with the connected Block + +using namespace BlocksProtocol; + +struct BlockConfigManager +{ + void setDeviceIndex (TopologyIndex newDeviceIndex) { deviceIndex = newDeviceIndex; } + void setDeviceComms (PhysicalTopologySource::DeviceConnection* newConn) { deviceConnection = newConn; } + + enum ConfigType + { + integer, + floating, + boolean, + colour, + options + }; + + static constexpr uint32 numConfigItems = 59; + + struct ConfigDescription + { + ConfigItemId item; + int32 value; + int32 min; + int32 max; + bool isActive; + const char* name; + ConfigType type; + const char* optionNames[configMaxOptions]; + const char* group; + + static_assert (configMaxOptions == Block::ConfigMetaData::numOptionNames, "Config options size and config metadata size should be the same"); + + Block::ConfigMetaData toConfigMetaData() const + { + return Block::ConfigMetaData ((uint32) item, value, { min, max }, isActive, name, (uint32) type, (const char**) optionNames, group); + } + }; + + ConfigDescription configList[numConfigItems] = + { + { midiStartChannel, 2, 1, 16, false, "MIDI Start Channel", ConfigType::integer, {}, "MIDI Settings" }, + { midiEndChannel, 16, 1, 16, false, "MIDI End Channel", ConfigType::integer, {}, "MIDI Settings" }, + { midiUseMPE, 1, 0, 1, false, "Use MPE", ConfigType::boolean, {}, "MIDI Settings" }, + { pitchBendRange, 48, 1, 96, false, "Pitch Bend Range", ConfigType::integer, {}, "MIDI Settings" }, + { octave, 0, -4, 6, false, "Octave", ConfigType::integer, {}, "Pitch" }, + { transpose, 0, -11, 11, false, "Transpose", ConfigType::integer, {}, "Pitch" }, + { slideCC, 74, 0, 127, false, "Slide CC", ConfigType::integer, {}, "Play mode" }, + { slideMode, 0, 0, 2, false, "Slide Mode", ConfigType::options, { "Absolute", + "Relative Unipolar", + "Relative Bipolar" }, "Play mode" }, + { velocitySensitivity, 100, 0, 127, false, "Strike Sensitivity", ConfigType::integer, {}, "5D Touch" }, + { glideSensitivity, 100, 0, 127, false, "Glide Sensitivity", ConfigType::integer, {}, "5D Touch" }, + { slideSensitivity, 100, 0, 127, false, "Slide Sensitivity", ConfigType::integer, {}, "5D Touch" }, + { pressureSensitivity, 100, 0, 127, false, "Pressure Sensitivity", ConfigType::integer, {}, "5D Touch" }, + { liftSensitivity, 100, 0, 127, false, "Lift Sensitivity", ConfigType::integer, {}, "5D Touch" }, + { fixedVelocity, 0, 0, 1, false, "Fixed Velocity", ConfigType::boolean, {}, "5D Touch" }, + { fixedVelocityValue, 127, 1, 127, false, "Fixed Velocity Value", ConfigType::integer, {}, "5D Touch" }, + { pianoMode, 0, 0, 1, false, "Piano Mode", ConfigType::boolean, {}, "Play mode" }, + { glideLock, 0, 0, 127, false, "Glide Rate", ConfigType::integer, {}, "Play mode" }, + { mode, 4, 1, 5, false, "Mode", ConfigType::integer, {}, "Play mode" }, + { volume, 100, 0, 127, false, "Volume", ConfigType::integer, {}, "Play mode" }, + { scale, 0, 0, 18, false, "Scale", ConfigType::integer, {}, "Play mode" }, // NOTE: Should be options + { hideMode, 0, 0, 1, false, "Hide Mode", ConfigType::boolean, {}, "Play mode" }, + { chord, 0, 0, 127, false, "Chord", ConfigType::integer, {}, "Play mode" }, // NOTE: Should be options + { arpPattern, 0, 0, 127, false, "Arp Pattern", ConfigType::integer, {}, "Play mode" }, + { tempo, 120, 1, 300, false, "Tempo", ConfigType::integer, {}, "Rhythm" }, + { xTrackingMode, 1, 0, 4, false, "Glide Tracking Mode", ConfigType::options, { "Multi-Channel", + "Last Played", + "Highest", + "Lowest", + "Disabled" }, "Play mode" }, + { yTrackingMode, 1, 0, 4, false, "Slide Tracking Mode", ConfigType::options, { "Multi-Channel", + "Last Played", + "Highest", + "Lowest", + "Disabled" }, "Play mode" }, + { zTrackingMode, 1, 0, 4, false, "Pressure Tracking Mode", ConfigType::options, { "Multi-Channel", + "Last Played", + "Highest", + "Lowest", + "Disabled", + "Hardest" }, "Play mode" }, + // These can be defined for unique usage for a given Littlefoot script + { user0, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user1, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user2, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user3, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user4, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user5, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user6, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user7, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user8, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user9, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user10, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user11, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user12, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user13, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user14, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user15, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user16, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user17, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user18, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user19, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user20, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user21, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user22, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user23, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user24, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user25, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user26, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user27, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user28, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user29, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user30, 0, 0, 127, false, {}, ConfigType::integer, {}, {} }, + { user31, 0, 0, 127, false, {}, ConfigType::integer, {}, {} } + }; + + //============================================================================== + int32 getItemValue (ConfigItemId item) + { + uint32 itemIndex; + + if (getIndexForItem (item, itemIndex)) + return configList[itemIndex].value; + + return 0; + } + + void setItemValue (ConfigItemId item, int32 value) + { + uint32 itemIndex; + + if (getIndexForItem (item, itemIndex)) + configList[itemIndex].value = value; + + setBlockConfig (item, value); + } + + int32 getItemMin (ConfigItemId item) + { + uint32 itemIndex; + + if (getIndexForItem (item, itemIndex)) + return configList[itemIndex].min; + + return 0; + } + + void setItemMin (ConfigItemId item, int32 min) + { + uint32 itemIndex; + + if (getIndexForItem (item, itemIndex)) + configList[itemIndex].min = min; + } + + int32 getItemMax (ConfigItemId item) + { + uint32 itemIndex; + + if (getIndexForItem (item, itemIndex)) + return configList[itemIndex].max; + + return 0; + } + + void setItemMax (ConfigItemId item, int32 max) + { + uint32 itemIndex; + + if (getIndexForItem (item, itemIndex)) + configList[itemIndex].max = max; + + // Send updateConfig message to Block + } + + bool getItemActive (ConfigItemId item) + { + uint32 itemIndex; + + if (getIndexForItem (item, itemIndex)) + return configList[itemIndex].isActive; + + return false; + } + + void setItemActive (ConfigItemId item, bool isActive) + { + uint32 itemIndex; + + if (getIndexForItem (item, itemIndex)) + configList[itemIndex].isActive = isActive; + + // Send setConfigState message to Block + } + + juce::String getOptionName (ConfigItemId item, uint8 optionIndex) + { + uint32 itemIndex; + + if (getIndexForItem (item, itemIndex) && optionIndex < configMaxOptions) + return configList[itemIndex].optionNames[optionIndex]; + + return {}; + } + + Block::ConfigMetaData getMetaData (ConfigItemId item) + { + uint32 itemIndex; + + if (getIndexForItem (item, itemIndex)) + return configList[itemIndex].toConfigMetaData(); + + return {}; + } + + void resetConfigListActiveStatus() + { + for (uint32 i = 0; i < numConfigItems; ++i) + configList[i].isActive = false; + } + + //============================================================================== + // Set Block Configuration + void setBlockConfig (ConfigItemId item, int32 value) + { + HostPacketBuilder<32> packet; + + packet.writePacketSysexHeaderBytes (deviceIndex); + packet.addConfigSetMessage (item, value); + packet.writePacketSysexFooter(); + + if (deviceConnection != nullptr) + deviceConnection->sendMessageToDevice (packet.getData(), (size_t) packet.size()); + } + + void requestBlockConfig (ConfigItemId item) + { + HostPacketBuilder<32> packet; + + packet.writePacketSysexHeaderBytes (deviceIndex); + packet.addRequestMessage (item); + packet.writePacketSysexFooter(); + + if (deviceConnection != nullptr) + deviceConnection->sendMessageToDevice(packet.getData(), (size_t) packet.size()); + } + + void requestFactoryConfigSync() + { + HostPacketBuilder<32> packet; + + packet.writePacketSysexHeaderBytes(deviceIndex); + packet.addRequestFactorySyncMessage(); + packet.writePacketSysexFooter(); + + if (deviceConnection != nullptr) + deviceConnection->sendMessageToDevice(packet.getData(), (size_t) packet.size()); + } + + void requestUserConfigSync() + { + HostPacketBuilder<32> packet; + + packet.writePacketSysexHeaderBytes(deviceIndex); + packet.addRequestUserSyncMessage(); + packet.writePacketSysexFooter(); + + if (deviceConnection != nullptr) + deviceConnection->sendMessageToDevice(packet.getData(), (size_t) packet.size()); + } + + void handleConfigUpdateMessage (int32 item, int32 value, int32 min, int32 max) + { + uint32 index; + + if (getIndexForItem ((ConfigItemId) item, index)) + { + configList[index].value = value; + configList[index].min = min; + configList[index].max = max; + configList[index].isActive = true; + } + } + + void handleConfigSetMessage(int32 item, int32 value) + { + uint32 index; + + if (getIndexForItem ((ConfigItemId) item, index)) + configList[index].value = value; + } + +private: + bool getIndexForItem (ConfigItemId item, uint32& index) + { + for (uint32 i = 0; i < numConfigItems; ++i) + { + if (configList[i].item == item) + { + index = i; + return true; + } + } + + return false; + } + + TopologyIndex deviceIndex; + PhysicalTopologySource::DeviceConnection* deviceConnection; +}; diff --git a/modules/juce_blocks_basics/blocks/juce_ControlButton.h b/modules/juce_blocks_basics/blocks/juce_ControlButton.h index 95f3fe26af..2117e2cb60 100644 --- a/modules/juce_blocks_basics/blocks/juce_ControlButton.h +++ b/modules/juce_blocks_basics/blocks/juce_ControlButton.h @@ -70,7 +70,17 @@ public: button4, button5, button6, - button7 + button7, + + // touch block buttons + velocitySensitivity, + glideSensitivity, + slideSensitivity, + pressSensitivity, + liftSensitivity, + fixedVelocity, + glideLock, + pianoMode }; /** Returns the button's type. */ diff --git a/modules/juce_blocks_basics/juce_blocks_basics.cpp b/modules/juce_blocks_basics/juce_blocks_basics.cpp index 477482d9a4..140a88136a 100644 --- a/modules/juce_blocks_basics/juce_blocks_basics.cpp +++ b/modules/juce_blocks_basics/juce_blocks_basics.cpp @@ -34,6 +34,7 @@ namespace juce #include "protocol/juce_BlockModels.h" } + #include "blocks/juce_BlockConfigManager.h" #include "blocks/juce_Block.cpp" #include "topology/juce_PhysicalTopologySource.cpp" #include "topology/juce_RuleBasedTopologySource.cpp" diff --git a/modules/juce_blocks_basics/juce_blocks_basics.h b/modules/juce_blocks_basics/juce_blocks_basics.h index 88b347eb35..fa31934b20 100644 --- a/modules/juce_blocks_basics/juce_blocks_basics.h +++ b/modules/juce_blocks_basics/juce_blocks_basics.h @@ -31,7 +31,7 @@ ID: juce_blocks_basics vendor: juce - version: 5.0.2 + version: 5.1.0 name: Provides low-level control over ROLI BLOCKS devices description: JUCE wrapper for low-level control over ROLI BLOCKS devices. website: http://developer.roli.com diff --git a/modules/juce_blocks_basics/littlefoot/LittleFoot Language README.txt b/modules/juce_blocks_basics/littlefoot/LittleFoot Language README.txt index 4014364ac4..4bf55970e8 100644 --- a/modules/juce_blocks_basics/littlefoot/LittleFoot Language README.txt +++ b/modules/juce_blocks_basics/littlefoot/LittleFoot Language README.txt @@ -82,8 +82,8 @@ you have the following functions available: int makeARGB (int alpha, int red, int green, int blue); // combines a set of 8-bit ARGB values into a 32-bit colour int blendARGB (int baseColour, int overlaidColour); // blends the overlaid ARGB colour onto the base one and returns the new colour - void setLED (int x, int y, int argb); // sets a LED colour on the display - void fillRect (int argb, int x, int y, int width, int height); // fills a rectangle on the display + void fillPixel (int rgb, int x, int y); // sets a LED colour on the display + void fillRect (int rgb, int x, int y, int width, int height); // fills a rectangle on the display A BLOCKs program needs to provide a repaint() function which the block will call at approximately 25Hz to draw the display. For example, here's a simple program that diff --git a/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h b/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h index 7dea7f03c5..09b79da4bf 100644 --- a/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h +++ b/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h @@ -20,6 +20,11 @@ ============================================================================== */ +#if JUCE_MSVC + #pragma warning (push) + #pragma warning (disable: 4702) +#endif + namespace littlefoot { @@ -1511,6 +1516,15 @@ private: cg.continueTarget = oldContinueTarget; } + StatementPtr simplify (SyntaxTreeBuilder& stb) override + { + initialiser = initialiser->simplify (stb); + iterator = iterator->simplify (stb); + body = body->simplify (stb); + condition = condition->simplify (stb); + return this; + } + void visitSubStatements (Statement::Visitor& visit) const override { visit (condition); visit (initialiser); visit (iterator); visit (body); @@ -1543,6 +1557,14 @@ private: bool alwaysReturns() const override { return true; } + StatementPtr simplify (SyntaxTreeBuilder& stb) override + { + if (returnValue != nullptr) + returnValue = returnValue->simplify (stb); + + return this; + } + void visitSubStatements (Statement::Visitor& visit) const override { visit (returnValue); @@ -2172,3 +2194,7 @@ private: }; } + +#if JUCE_MSVC + #pragma warning (pop) +#endif diff --git a/modules/juce_blocks_basics/littlefoot/juce_LittleFootRemoteHeap.h b/modules/juce_blocks_basics/littlefoot/juce_LittleFootRemoteHeap.h index 98dbc6fb85..143b05099c 100644 --- a/modules/juce_blocks_basics/littlefoot/juce_LittleFootRemoteHeap.h +++ b/modules/juce_blocks_basics/littlefoot/juce_LittleFootRemoteHeap.h @@ -122,12 +122,24 @@ struct LittleFootRemoteHeap return ! needsSyncing; } + static bool isAllZero (const uint8* data, size_t size) noexcept + { + for (size_t i = 0; i < size; ++i) + if (data[i] != 0) + return false; + + return true; + } + void sendChanges (ImplementationClass& bi, bool forceSend) { if ((needsSyncing && messagesSent.isEmpty()) || forceSend) { for (int maxChanges = 30; --maxChanges >= 0;) { + if (isAllZero (targetData, blockSize)) + break; + uint16 data[ImplementationClass::maxBlockSize]; auto* latestState = getLatestExpectedDataState(); @@ -216,7 +228,7 @@ struct LittleFootRemoteHeap static constexpr uint16 unknownByte = 0x100; private: - uint16 deviceState[ImplementationClass::maxBlockSize]; + uint16 deviceState[ImplementationClass::maxBlockSize] = { 0 }; uint8 targetData[ImplementationClass::maxBlockSize] = { 0 }; uint32 programSize = 0; bool needsSyncing = true, programStateKnown = true, programLoaded = false; diff --git a/modules/juce_blocks_basics/protocol/juce_BlockModels.h b/modules/juce_blocks_basics/protocol/juce_BlockModels.h index 72ef08d53d..e83b1458b3 100644 --- a/modules/juce_blocks_basics/protocol/juce_BlockModels.h +++ b/modules/juce_blocks_basics/protocol/juce_BlockModels.h @@ -32,6 +32,8 @@ struct BlockDataSheet if (serialNumber.isLiveBlock()) initialiseForControlBlockLive(); if (serialNumber.isLoopBlock()) initialiseForControlBlockLoop(); if (serialNumber.isDevCtrlBlock()) initialiseForControlBlockDeveloper(); + if (serialNumber.isTouchBlock()) initialiseForControlBlockTouch(); + if (serialNumber.isSeaboardBlock()) initialiseForSeaboardBlock(); } Block::ConnectionPort convertPortIndexToConnectorPort (BlocksProtocol::ConnectorPort port) const noexcept @@ -139,6 +141,21 @@ private: ControlButton::ButtonFunction::up); } + void initialiseForControlBlockTouch() + { + initialiseControlBlock ("Touch BLOCK", Block::Type::touchBlock, + ControlButton::ButtonFunction::velocitySensitivity, + ControlButton::ButtonFunction::glideSensitivity, + ControlButton::ButtonFunction::slideSensitivity, + ControlButton::ButtonFunction::pressSensitivity, + ControlButton::ButtonFunction::liftSensitivity, + ControlButton::ButtonFunction::fixedVelocity, + ControlButton::ButtonFunction::glideLock, + ControlButton::ButtonFunction::pianoMode, + ControlButton::ButtonFunction::down, + ControlButton::ButtonFunction::up); + } + void initialiseControlBlock (const char* name, Block::Type type, ControlButton::ButtonFunction b1, ControlButton::ButtonFunction b2, ControlButton::ButtonFunction b3, ControlButton::ButtonFunction b4, @@ -179,6 +196,29 @@ private: numLEDRowLEDs = 15; } + void initialiseForSeaboardBlock() + { + apiType = Block::Type::seaboardBlock; + + description = "Seaboard BLOCK (6x3)"; + + widthUnits = 6; + heightUnits = 3; + + lightGridWidth = 0; + lightGridHeight = 0; + numKeywaves = 24; + + addPortsSW (Block::ConnectionPort::DeviceEdge::west, 1); + addPortsNE (Block::ConnectionPort::DeviceEdge::north, 2); + addPortsNE (Block::ConnectionPort::DeviceEdge::east, 1); + + hasTouchSurface = true; + programAndHeapSize = BlocksProtocol::padBlockProgramAndHeapSize; + + addModeButton(); + } + //============================================================================== void addStatusLED (const char* name, float x, float y) { @@ -258,6 +298,15 @@ static const char* getButtonNameForFunction (ControlButton::ButtonFunction fn) n case BF::button5: return "5"; case BF::button6: return "6"; case BF::button7: return "7"; + + case BF::velocitySensitivity: return "Velocity Sensitivity"; + case BF::glideSensitivity: return "Glide Sensitivity"; + case BF::slideSensitivity: return "Slide Sensitivity"; + case BF::pressSensitivity: return "Press Sensitivity"; + case BF::liftSensitivity: return "Lift Sensitivity"; + case BF::fixedVelocity: return "Fixed Velocity"; + case BF::glideLock: return "Glide Lock"; + case BF::pianoMode: return "Piano Mode"; } jassertfalse; diff --git a/modules/juce_blocks_basics/protocol/juce_BlocksProtocolDefinitions.h b/modules/juce_blocks_basics/protocol/juce_BlocksProtocolDefinitions.h index 9fa3079476..36b53bc5b6 100644 --- a/modules/juce_blocks_basics/protocol/juce_BlocksProtocolDefinitions.h +++ b/modules/juce_blocks_basics/protocol/juce_BlocksProtocolDefinitions.h @@ -47,6 +47,8 @@ enum class MessageFromDevice firmwareUpdateACK = 0x03, deviceTopologyExtend = 0x04, deviceTopologyEnd = 0x05, + deviceVersionList = 0x06, + deviceNameList = 0x07, touchStart = 0x10, touchMove = 0x11, @@ -56,6 +58,8 @@ enum class MessageFromDevice touchMoveWithVelocity = 0x14, touchEndWithVelocity = 0x15, + configMessage = 0x18, + controlButtonDown = 0x20, controlButtonUp = 0x21, @@ -70,7 +74,13 @@ enum class MessageFromHost deviceCommandMessage = 0x01, sharedDataChange = 0x02, programEventMessage = 0x03, - firmwareUpdatePacket = 0x04 + firmwareUpdatePacket = 0x04, + + configMessage = 0x10, + factoryReset = 0x11, + blockReset = 0x12, + + setName = 0x20 }; @@ -120,19 +130,33 @@ struct BlockSerialNumber if (c == 0) return false; - return isAnyControlBlock() || isPadBlock(); + return isAnyControlBlock() || isPadBlock() || isSeaboardBlock(); } bool isPadBlock() const noexcept { return hasPrefix ("LPB"); } bool isLiveBlock() const noexcept { return hasPrefix ("LIC"); } bool isLoopBlock() const noexcept { return hasPrefix ("LOC"); } bool isDevCtrlBlock() const noexcept { return hasPrefix ("DCB"); } + bool isTouchBlock() const noexcept { return hasPrefix ("TCB"); } + bool isSeaboardBlock() const noexcept { return hasPrefix ("SBB"); } - bool isAnyControlBlock() const noexcept { return isLiveBlock() || isLoopBlock() || isDevCtrlBlock(); } + bool isAnyControlBlock() const noexcept { return isLiveBlock() || isLoopBlock() || isDevCtrlBlock() || isTouchBlock(); } bool hasPrefix (const char* prefix) const noexcept { return memcmp (serial, prefix, 3) == 0; } }; +struct VersionNumber +{ + uint8 version[21] = {}; + uint8 length = 0; +}; + +struct BlockName +{ + uint8 name[33] = {}; + uint8 length = 0; +}; + struct DeviceStatus { BlockSerialNumber serialNumber; @@ -147,9 +171,99 @@ struct DeviceConnection ConnectorPort port1, port2; }; +struct DeviceVersion +{ + TopologyIndex index; + VersionNumber version; +}; + +struct DeviceName +{ + TopologyIndex index; + BlockName name; +}; + static constexpr uint8 maxBlocksInTopologyPacket = 6; static constexpr uint8 maxConnectionsInTopologyPacket = 24; +//============================================================================== +/** Configuration Item Identifiers. */ +enum ConfigItemId +{ + // MIDI + midiStartChannel = 0, + midiEndChannel = 1, + midiUseMPE = 2, + pitchBendRange = 3, + octave = 4, + transpose = 5, + slideCC = 6, + slideMode = 7, + octaveTopology = 8, + // Touch + velocitySensitivity = 10, + glideSensitivity = 11, + slideSensitivity = 12, + pressureSensitivity = 13, + liftSensitivity = 14, + fixedVelocity = 15, + fixedVelocityValue = 16, + pianoMode = 17, + glideLock = 18, + // Live + mode = 20, + volume = 21, + scale = 22, + hideMode = 23, + chord = 24, + arpPattern = 25, + tempo = 26, + // Tracking + xTrackingMode = 30, + yTrackingMode = 31, + zTrackingMode = 32, + // User + user0 = 64, + user1 = 65, + user2 = 66, + user3 = 67, + user4 = 68, + user5 = 69, + user6 = 70, + user7 = 71, + user8 = 72, + user9 = 73, + user10 = 74, + user11 = 75, + user12 = 76, + user13 = 77, + user14 = 78, + user15 = 79, + user16 = 80, + user17 = 81, + user18 = 82, + user19 = 83, + user20 = 84, + user21 = 85, + user22 = 86, + user23 = 87, + user24 = 88, + user25 = 89, + user26 = 90, + user27 = 91, + user28 = 92, + user29 = 93, + user30 = 94, + user31 = 95 +}; + +static constexpr uint8 numberOfUserConfigs = 32; +static constexpr uint8 maxConfigIndex = uint8 (ConfigItemId::user0) + numberOfUserConfigs; + +static constexpr uint8 configUserConfigNameLength = 32; +static constexpr uint8 configMaxOptions = 8; +static constexpr uint8 configOptionNameLength = 16; + //============================================================================== /** The coordinates of a touch. */ struct TouchPosition @@ -197,6 +311,24 @@ enum DeviceCommands using DeviceCommand = IntegerWithBitSize<9>; +//============================================================================== +enum ConfigCommands +{ + setConfig = 0x00, + requestConfig = 0x01, // Request a config update + requestFactorySync = 0x02, // Requests all active factory config data + requestUserSync = 0x03, // Requests all active user config data + updateConfig = 0x04, // Set value, min and max + updateUserConfig = 0x05, // As above but contains user config metadata + setConfigState = 0x06, // Set config activation state and whether it is saved in flash + factorySyncEnd = 0x07, + clusterConfigSync = 0x08 +}; + +using ConfigCommand = IntegerWithBitSize<4>; +using ConfigItemIndex = IntegerWithBitSize<8>; +using ConfigItemValue = IntegerWithBitSize<32>; + //============================================================================== /** An ID for a control-block button type */ using ControlButtonID = IntegerWithBitSize<12>; @@ -227,6 +359,7 @@ using ByteValue = IntegerWithBitSize<8>; using ByteSequenceContinues = IntegerWithBitSize<1>; using FirmwareUpdateACKCode = IntegerWithBitSize<7>; +using FirmwareUpdateACKDetail = IntegerWithBitSize<32>; using FirmwareUpdatePacketSize = IntegerWithBitSize<7>; static constexpr uint32 numProgramMessageInts = 3; @@ -256,9 +389,13 @@ enum BitSizes programEventMessage = MessageType::bits + 32 * numProgramMessageInts, packetACK = MessageType::bits + PacketCounter::bits, - firmwareUpdateACK = MessageType::bits + FirmwareUpdateACKCode::bits, + firmwareUpdateACK = MessageType::bits + FirmwareUpdateACKCode::bits + FirmwareUpdateACKDetail::bits, controlButtonMessage = typeDeviceAndTime + ControlButtonID::bits, + + configSetMessage = MessageType::bits + ConfigCommand::bits + ConfigItemIndex::bits + ConfigItemValue::bits, + configRespMessage = MessageType::bits + ConfigCommand::bits + ConfigItemIndex::bits + (ConfigItemValue::bits * 3), + configSyncEndMessage = MessageType::bits + ConfigCommand::bits, }; //============================================================================== @@ -299,10 +436,15 @@ static constexpr const char* ledProgramLittleFootFunctions[] = "getVerticalDistFromMaster/i", "getAngleFromMaster/i", "setAutoRotate/vb", + "getClusterIndex/i", "getClusterWidth/i", "getClusterHeight/i", "getClusterXpos/i", "getClusterYpos/i", + "getNumBlocksInCurrentCluster/i", + "getBlockIdForBlockInCluster/ii", + "isMasterInCurrentCluster/b", + "setClusteringActive/vb", "makeARGB/iiiii", "blendARGB/iii", "fillPixel/viii", @@ -317,6 +459,7 @@ static constexpr const char* ledProgramLittleFootFunctions[] = "drawNumber/viiii", "clearDisplay/v", "clearDisplay/vi", + "displayBatteryLevel/v", "sendMIDI/vi", "sendMIDI/vii", "sendMIDI/viii", @@ -325,11 +468,26 @@ static constexpr const char* ledProgramLittleFootFunctions[] = "sendAftertouch/viii", "sendCC/viii", "sendPitchBend/vii", + "sendPitchBend/viii", "sendChannelPressure/vii", "setChannelRange/vbii", "assignChannel/ii", "deassignChannel/vii", "getControlChannel/i", "useMPEDuplicateFilter/vb", + "getSensorValue/iii", + "handleTouchAsSeaboard/vi", + "setPowerSavingEnabled/vb", + "getLocalConfig/ii", + "setLocalConfig/vii", + "requestRemoteConfig/vii", + "setRemoteConfig/viii", + "setLocalConfigItemRange/viii", + "setLocalConfigActiveState/vibb", + "linkBlockIDtoController/vi", + "repaintControl/v", + "onControlPress/vi", + "onControlRelease/vi", + "initControl/viiiiiiiii", nullptr }; diff --git a/modules/juce_blocks_basics/protocol/juce_HostPacketBuilder.h b/modules/juce_blocks_basics/protocol/juce_HostPacketBuilder.h index afeaf63e77..84f9bf4963 100644 --- a/modules/juce_blocks_basics/protocol/juce_HostPacketBuilder.h +++ b/modules/juce_blocks_basics/protocol/juce_HostPacketBuilder.h @@ -224,6 +224,87 @@ struct HostPacketBuilder return true; } + //============================================================================== + bool addConfigSetMessage (int32 item, int32 value) + { + if (! data.hasCapacity (BitSizes::configSetMessage)) + return false; + + writeMessageType(MessageFromHost::configMessage); + ConfigCommand type = ConfigCommands::setConfig; + data << type << IntegerWithBitSize<8> ((uint32) item) << IntegerWithBitSize<32>((uint32) value); + return true; + } + + bool addRequestMessage (int32 item) + { + if (! data.hasCapacity (BitSizes::configSetMessage)) + return false; + + writeMessageType(MessageFromHost::configMessage); + ConfigCommand type = ConfigCommands::requestConfig; + data << type << IntegerWithBitSize<32> (0) << IntegerWithBitSize<8> ((uint32) item); + return true; + } + + bool addRequestFactorySyncMessage() + { + if (! data.hasCapacity (MessageType::bits + ConfigCommand::bits)) + return false; + + writeMessageType (MessageFromHost::configMessage); + ConfigCommand type = ConfigCommands::requestFactorySync; + data << type; + return true; + } + + bool addRequestUserSyncMessage() + { + if (! data.hasCapacity (MessageType::bits + ConfigCommand::bits)) + return false; + + writeMessageType (MessageFromHost::configMessage); + ConfigCommand type = ConfigCommands::requestUserSync; + data << type; + return true; + } + + //============================================================================== + bool addFactoryReset() + { + if (! data.hasCapacity (MessageType::bits)) + return false; + + writeMessageType(MessageFromHost::factoryReset); + return true; + } + + bool addBlockReset() + { + if (! data.hasCapacity (MessageType::bits)) + return false; + + writeMessageType(MessageFromHost::blockReset); + return true; + } + + bool addSetBlockName (const juce::String& name) + { + if (name.length() > 32 || ! data.hasCapacity (MessageType::bits + 7 + (7 * name.length()))) + return false; + + writeMessageType (MessageFromHost::setName); + + data << IntegerWithBitSize<7> ((uint32) name.length()); + + for (auto i = 0; i < name.length(); ++i) + data << IntegerWithBitSize<7> ((uint32) name.toRawUTF8()[i]); + + data << IntegerWithBitSize<7> (0); + + return true; + } + //============================================================================== private: Packed7BitArrayBuilder data; diff --git a/modules/juce_blocks_basics/protocol/juce_HostPacketDecoder.h b/modules/juce_blocks_basics/protocol/juce_HostPacketDecoder.h index e985289c00..cd1b39c023 100644 --- a/modules/juce_blocks_basics/protocol/juce_HostPacketDecoder.h +++ b/modules/juce_blocks_basics/protocol/juce_HostPacketDecoder.h @@ -64,6 +64,8 @@ struct HostPacketDecoder case MessageFromDevice::deviceTopology: return handleTopology (handler, reader, true); case MessageFromDevice::deviceTopologyExtend: return handleTopology (handler, reader, false); case MessageFromDevice::deviceTopologyEnd: return handleTopologyEnd (handler, reader); + case MessageFromDevice::deviceVersionList: return handleVersion (handler, reader); + case MessageFromDevice::deviceNameList: return handleName (handler, reader); case MessageFromDevice::touchStart: return handleTouch (handler, reader, deviceIndex, packetTimestamp, true, false); case MessageFromDevice::touchMove: return handleTouch (handler, reader, deviceIndex, packetTimestamp, false, false); case MessageFromDevice::touchEnd: return handleTouch (handler, reader, deviceIndex, packetTimestamp, false, true); @@ -75,6 +77,7 @@ struct HostPacketDecoder case MessageFromDevice::programEventMessage: return handleCustomMessage (handler, reader, deviceIndex, packetTimestamp); case MessageFromDevice::packetACK: return handlePacketACK (handler, reader, deviceIndex); case MessageFromDevice::firmwareUpdateACK: return handleFirmwareUpdateACK (handler, reader, deviceIndex); + case MessageFromDevice::configMessage: return handleConfigMessage (handler, reader, deviceIndex); case MessageFromDevice::logMessage: return handleLogMessage (handler, reader, deviceIndex); default: @@ -112,6 +115,8 @@ struct HostPacketDecoder if (newTopology) handler.beginTopology ((int) numDevices, (int) numConnections); + else + handler.extendTopology ((int) numDevices, (int) numConnections); for (uint32 i = 0; i < numDevices; ++i) handleTopologyDevice (handler, reader); @@ -166,6 +171,34 @@ struct HostPacketDecoder handler.handleTopologyConnection (connection); } + static bool handleVersion (Handler& handler, Packed7BitArrayReader& reader) + { + DeviceVersion version; + + version.index = (TopologyIndex) reader.readBits (topologyIndexBits); + version.version.length = (uint8) reader.readBits (7); + + for (uint32 i = 0; i < version.version.length; ++i) + version.version.version[i] = (uint8) reader.readBits (7); + + handler.handleVersion (version); + return true; + } + + static bool handleName (Handler& handler, Packed7BitArrayReader& reader) + { + DeviceName name; + + name.index = (TopologyIndex) reader.readBits (topologyIndexBits); + name.name.length = (uint8) reader.readBits (7); + + for (uint32 i = 0; i < name.name.length; ++i) + name.name.name[i] = (uint8) reader.readBits (7); + + handler.handleName (name); + return true; + } + static bool handleTouch (Handler& handler, Packed7BitArrayReader& reader, TopologyIndex deviceIndex, PacketTimestamp packetTimestamp, bool isStart, bool isEnd) { @@ -269,7 +302,39 @@ struct HostPacketDecoder return false; } - handler.handleFirmwareUpdateACK (deviceIndex, reader.read()); + handler.handleFirmwareUpdateACK (deviceIndex, reader.read(), reader.read()); + return true; + } + + static bool handleConfigMessage (Handler& handler, Packed7BitArrayReader& reader, TopologyIndex deviceIndex) + { + ConfigCommand type = reader.read().get(); + + if (type == updateConfig) + { + auto item = (int32) reader.read>().get(); + auto value = (int32) reader.read>().get(); + auto min = (int32) reader.read>().get(); + auto max = (int32) reader.read>().get(); + + handler.handleConfigUpdateMessage (deviceIndex, item, value, min, max); + return true; + } + + if (type == setConfig) + { + auto item = (int32) reader.read>().get(); + auto value = (int32) reader.read>().get(); + + handler.handleConfigSetMessage (deviceIndex, item, value); + return true; + } + + if (type == factorySyncEnd) + { + handler.handleConfigFactorySyncEndMessage (deviceIndex); + } + return true; } diff --git a/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp b/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp index fc7b3817fe..b7a5b8593f 100644 --- a/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp +++ b/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp @@ -309,6 +309,8 @@ struct PhysicalTopologySource::Internal Block::UID uid; BlocksProtocol::TopologyIndex index; BlocksProtocol::BlockSerialNumber serial; + BlocksProtocol::VersionNumber version; + BlocksProtocol::BlockName name; bool isMaster; }; @@ -324,9 +326,14 @@ struct PhysicalTopologySource::Internal for (auto& device : devices) { + BlocksProtocol::VersionNumber version; + BlocksProtocol::BlockName name; + result.add ({ getBlockUIDFromSerialNumber (device.serialNumber), device.index, device.serialNumber, + version, + name, isFirst }); isFirst = false; @@ -353,6 +360,39 @@ struct PhysicalTopologySource::Internal return false; } + static bool versionNumberAddedToBlock (const juce::Array& devices, Block::UID uid, juce::String version) noexcept + { + if (version.length() == 0) + for (auto&& d : devices) + if (d.uid == uid && d.version.length) + return true; + + return false; + } + + static bool nameAddedToBlock (const juce::Array& devices, Block::UID uid) noexcept + { + for (auto&& d : devices) + if (d.uid == uid && d.name.length) + return true; + + return false; + } + + static void setVersionNumberForBlock (const juce::Array& devices, Block& block) noexcept + { + for (auto&& d : devices) + if (d.uid == block.uid) + block.versionNumber = juce::String ((const char*) d.version.version, d.version.length); + } + + static void setNameForBlock (const juce::Array& devices, Block& block) noexcept + { + for (auto&& d : devices) + if (d.uid == block.uid) + block.name = juce::String ((const char*) d.name.name, d.name.length); + } + //============================================================================== struct ConnectedDeviceGroup : private juce::AsyncUpdater, private juce::Timer @@ -468,6 +508,12 @@ struct PhysicalTopologySource::Internal incomingTopologyConnections.ensureStorageAllocated (numConnections); } + void extendTopology (int numDevices, int numConnections) + { + incomingTopologyDevices.ensureStorageAllocated (incomingTopologyDevices.size() + numDevices); + incomingTopologyConnections.ensureStorageAllocated (incomingTopologyConnections.size() + numConnections); + } + void handleTopologyDevice (BlocksProtocol::DeviceStatus status) { incomingTopologyDevices.add (status); @@ -490,6 +536,36 @@ struct PhysicalTopologySource::Internal blockPings.clear(); } + void handleVersion (BlocksProtocol::DeviceVersion version) + { + for (auto i = 0; i < currentDeviceInfo.size(); ++i) + { + if (currentDeviceInfo[i].index == version.index && version.version.length > 1) + { + if (memcmp (currentDeviceInfo.getReference (i).version.version, version.version.version, sizeof (version.version))) + { + currentDeviceInfo.getReference(i).version = version.version; + detector.handleTopologyChange(); + } + } + } + } + + void handleName (BlocksProtocol::DeviceName name) + { + for (auto i = 0; i < currentDeviceInfo.size(); ++i) + { + if (currentDeviceInfo[i].index == name.index && name.name.length > 1) + { + if (memcmp (currentDeviceInfo.getReference (i).name.name, name.name.name, sizeof (name.name))) + { + currentDeviceInfo.getReference (i).name = name.name; + detector.handleTopologyChange(); + } + } + } + } + void handleControlButtonUpDown (BlocksProtocol::TopologyIndex deviceIndex, uint32 timestamp, BlocksProtocol::ControlButtonID buttonID, bool isDown) { @@ -549,10 +625,28 @@ struct PhysicalTopologySource::Internal detector.handleSharedDataACK (deviceID, counter); } - void handleFirmwareUpdateACK (BlocksProtocol::TopologyIndex deviceIndex, BlocksProtocol::FirmwareUpdateACKCode resultCode) + void handleFirmwareUpdateACK (BlocksProtocol::TopologyIndex deviceIndex, BlocksProtocol::FirmwareUpdateACKCode resultCode, BlocksProtocol::FirmwareUpdateACKDetail resultDetail) { if (auto deviceID = getDeviceIDFromMessageIndex (deviceIndex)) - detector.handleFirmwareUpdateACK (deviceID, (uint8) resultCode.get()); + detector.handleFirmwareUpdateACK (deviceID, (uint8) resultCode.get(), (uint32) resultDetail.get()); + } + + void handleConfigUpdateMessage (BlocksProtocol::TopologyIndex deviceIndex, int32 item, int32 value, int32 min, int32 max) + { + if (auto deviceID = getDeviceIDFromMessageIndex (deviceIndex)) + detector.handleConfigUpdateMessage (deviceID, item, value, min, max); + } + + void handleConfigSetMessage (BlocksProtocol::TopologyIndex deviceIndex, int32 item, int32 value) + { + if (auto deviceID = getDeviceIDFromMessageIndex (deviceIndex)) + detector.handleConfigSetMessage (deviceID, item, value); + } + + void handleConfigFactorySyncEndMessage (BlocksProtocol::TopologyIndex deviceIndex) + { + if (auto deviceID = getDeviceIDFromMessageIndex (deviceIndex)) + detector.handleConfigFactorySyncEndMessage (deviceID); } void handleLogMessage (BlocksProtocol::TopologyIndex deviceIndex, const String& message) @@ -828,12 +922,20 @@ struct PhysicalTopologySource::Internal currentTopology.blocks.remove (i); } + else + { + if (versionNumberAddedToBlock (newDeviceInfo, block->uid, block->versionNumber)) + setVersionNumberForBlock (newDeviceInfo, *block); + + if (nameAddedToBlock (newDeviceInfo, block->uid)) + setNameForBlock (newDeviceInfo, *block); + } } for (auto& info : newDeviceInfo) if (info.serial.isValid()) if (! containsBlockWithUID (currentTopology.blocks, getBlockUIDFromSerialNumber (info.serial))) - currentTopology.blocks.add (new BlockImplementation (info.serial, *this, info.isMaster)); + currentTopology.blocks.add (new BlockImplementation (info.serial, *this, info.version, info.name, info.isMaster)); currentTopology.connections.swapWith (newDeviceConnections); } @@ -856,12 +958,54 @@ struct PhysicalTopologySource::Internal bi->handleSharedDataACK (packetCounter); } - void handleFirmwareUpdateACK (Block::UID deviceID, uint8 resultCode) + void handleFirmwareUpdateACK (Block::UID deviceID, uint8 resultCode, uint32 resultDetail) { for (auto&& b : currentTopology.blocks) if (b->uid == deviceID) if (auto bi = BlockImplementation::getFrom (*b)) - bi->handleFirmwareUpdateACK (resultCode); + bi->handleFirmwareUpdateACK (resultCode, resultDetail); + } + + void handleConfigUpdateMessage (Block::UID deviceID, int32 item, int32 value, int32 min, int32 max) + { + for (auto&& b : currentTopology.blocks) + if (b->uid == deviceID) + if (auto bi = BlockImplementation::getFrom (*b)) + bi->handleConfigUpdateMessage (item, value, min, max); + } + + void notifyBlockOfConfigChange (BlockImplementation& bi, uint32 item) + { + if (auto configChangedCallback = bi.configChangedCallback) + { + if (item >= bi.getMaxConfigIndex()) + configChangedCallback (bi, {}, item); + else + configChangedCallback (bi, bi.getLocalConfigMetaData (item), item); + } + } + + void handleConfigSetMessage (Block::UID deviceID, int32 item, int32 value) + { + for (auto&& b : currentTopology.blocks) + { + if (b->uid == deviceID) + { + if (auto bi = BlockImplementation::getFrom (*b)) + { + bi->handleConfigSetMessage (item, value); + notifyBlockOfConfigChange (*bi, uint32 (item)); + } + } + } + } + + void handleConfigFactorySyncEndMessage (Block::UID deviceID) + { + for (auto&& b : currentTopology.blocks) + if (b->uid == deviceID) + if (auto bi = BlockImplementation::getFrom (*b)) + notifyBlockOfConfigChange (*bi, bi->getMaxConfigIndex()); } void handleLogMessage (Block::UID deviceID, const String& message) const @@ -930,9 +1074,9 @@ struct PhysicalTopologySource::Internal //============================================================================== int getIndexFromDeviceID (Block::UID deviceID) const noexcept { - for (auto c : connectedDeviceGroups) + for (auto* c : connectedDeviceGroups) { - const int index = c->getIndexFromDeviceID (deviceID); + auto index = c->getIndexFromDeviceID (deviceID); if (index >= 0) return index; @@ -944,7 +1088,7 @@ struct PhysicalTopologySource::Internal template bool sendMessageToDevice (Block::UID deviceID, const PacketBuilder& builder) const { - for (auto c : connectedDeviceGroups) + for (auto* c : connectedDeviceGroups) if (c->getIndexFromDeviceID (deviceID) >= 0) return c->sendMessageToDevice (builder); @@ -953,7 +1097,7 @@ struct PhysicalTopologySource::Internal static Detector* getFrom (Block& b) noexcept { - if (auto bi = BlockImplementation::getFrom (b)) + if (auto* bi = BlockImplementation::getFrom (b)) return &(bi->detector); jassertfalse; @@ -1050,9 +1194,14 @@ struct PhysicalTopologySource::Internal private MIDIDeviceConnection::Listener, private Timer { - BlockImplementation (const BlocksProtocol::BlockSerialNumber& serial, Detector& detectorToUse, bool master) - : Block (juce::String ((const char*) serial.serial, sizeof (serial.serial))), modelData (serial), - remoteHeap (modelData.programAndHeapSize), detector (detectorToUse), isMaster (master) + BlockImplementation (const BlocksProtocol::BlockSerialNumber& serial, Detector& detectorToUse, BlocksProtocol::VersionNumber version, BlocksProtocol::BlockName name, bool master) + : Block (juce::String ((const char*) serial.serial, sizeof (serial.serial)), + juce::String ((const char*) version.version, version.length), + juce::String ((const char*) name.name, name.length)), + modelData (serial), + remoteHeap (modelData.programAndHeapSize), + detector (detectorToUse), + isMaster (master) { sendCommandMessage (BlocksProtocol::beginAPIMode); @@ -1060,27 +1209,33 @@ struct PhysicalTopologySource::Internal touchSurface.reset (new TouchSurfaceImplementation (*this)); int i = 0; - for (auto b : modelData.buttons) + for (auto&& b : modelData.buttons) controlButtons.add (new ControlButtonImplementation (*this, i++, b)); if (modelData.lightGridWidth > 0 && modelData.lightGridHeight > 0) ledGrid.reset (new LEDGridImplementation (*this)); - for (auto s : modelData.statusLEDs) + for (auto&& s : modelData.statusLEDs) statusLights.add (new StatusLightImplementation (*this, s)); if (modelData.numLEDRowLEDs > 0) ledRow.reset (new LEDRowImplementation (*this)); listenerToMidiConnection = dynamic_cast (detector.getDeviceConnectionFor (*this)); + if (listenerToMidiConnection != nullptr) listenerToMidiConnection->addListener (this); + + config.setDeviceComms (listenerToMidiConnection); } ~BlockImplementation() { if (listenerToMidiConnection != nullptr) + { + config.setDeviceComms (nullptr); listenerToMidiConnection->removeListener (this); + } } void invalidate() @@ -1189,6 +1344,7 @@ struct PhysicalTopologySource::Internal return type == Block::Type::liveBlock || type == Block::Type::loopBlock + || type == Block::Type::touchBlock || type == Block::Type::developerControlBlock; } @@ -1242,7 +1398,7 @@ struct PhysicalTopologySource::Internal if (compiler.getCompiledProgram().getTotalSpaceNeeded() > getMemorySize()) return Result::fail ("Program too large!"); - size_t size = (size_t) compiler.compiledObjectCode.size(); + auto size = (size_t) compiler.compiledObjectCode.size(); programSize = (uint32) size; remoteHeap.resetDataRangeToUnknown (0, remoteHeap.blockSize); @@ -1252,6 +1408,11 @@ struct PhysicalTopologySource::Internal remoteHeap.resetDataRangeToUnknown (0, (uint32) size); remoteHeap.setBytes (0, compiler.compiledObjectCode.begin(), size); remoteHeap.sendChanges (*this, true); + + this->resetConfigListActiveStatus(); + + if (auto changeCallback = this->configChangedCallback) + changeCallback (*this, {}, this->getMaxConfigIndex()); } else { @@ -1344,7 +1505,7 @@ struct PhysicalTopologySource::Internal remoteHeap.handleACKFromDevice (*this, packetCounter); } - bool sendFirmwareUpdatePacket (const uint8* data, uint8 size, std::function callback) override + bool sendFirmwareUpdatePacket (const uint8* data, uint8 size, std::function callback) override { firmwarePacketAckCallback = {}; @@ -1374,15 +1535,25 @@ struct PhysicalTopologySource::Internal return false; } - void handleFirmwareUpdateACK (uint8 resultCode) + void handleFirmwareUpdateACK (uint8 resultCode, uint32 resultDetail) { if (firmwarePacketAckCallback != nullptr) { - firmwarePacketAckCallback (resultCode); + firmwarePacketAckCallback (resultCode, resultDetail); firmwarePacketAckCallback = {}; } } + void handleConfigUpdateMessage (int32 item, int32 value, int32 min, int32 max) + { + config.handleConfigUpdateMessage (item, value, min, max); + } + + void handleConfigSetMessage(int32 item, int32 value) + { + config.handleConfigSetMessage (item, value); + } + void pingFromDevice() { lastMessageReceiveTime = juce::Time::getCurrentTime(); @@ -1423,6 +1594,132 @@ struct PhysicalTopologySource::Internal sendCommandMessage (BlocksProtocol::ping); } + //============================================================================== + int32 getLocalConfigValue (uint32 item) override + { + initialiseDeviceIndexAndConnection(); + return config.getItemValue ((BlocksProtocol::ConfigItemId) item); + } + + void setLocalConfigValue (uint32 item, int32 value) override + { + initialiseDeviceIndexAndConnection(); + config.setItemValue ((BlocksProtocol::ConfigItemId) item, value); + } + + void setLocalConfigRange (uint32 item, int32 min, int32 max) override + { + initialiseDeviceIndexAndConnection(); + config.setItemMin ((BlocksProtocol::ConfigItemId) item, min); + config.setItemMax ((BlocksProtocol::ConfigItemId) item, max); + } + + void setLocalConfigItemActive (uint32 item, bool isActive) override + { + initialiseDeviceIndexAndConnection(); + config.setItemActive ((BlocksProtocol::ConfigItemId) item, isActive); + } + + bool isLocalConfigItemActive (uint32 item) override + { + initialiseDeviceIndexAndConnection(); + return config.getItemActive ((BlocksProtocol::ConfigItemId) item); + } + + uint32 getMaxConfigIndex () override + { + return uint32 (BlocksProtocol::maxConfigIndex); + } + + bool isValidUserConfigIndex (uint32 item) override + { + return item >= (uint32) BlocksProtocol::ConfigItemId::user0 + && item < (uint32) (BlocksProtocol::ConfigItemId::user0 + numberOfUserConfigs); + } + + ConfigMetaData getLocalConfigMetaData (uint32 item) override + { + initialiseDeviceIndexAndConnection(); + return config.getMetaData ((BlocksProtocol::ConfigItemId) item); + } + + void requestFactoryConfigSync() override + { + initialiseDeviceIndexAndConnection(); + config.requestFactoryConfigSync(); + } + + void resetConfigListActiveStatus() override + { + config.resetConfigListActiveStatus(); + } + + void setConfigChangedCallback (std::function configChanged) override + { + configChangedCallback = configChanged; + } + + void factoryReset() override + { + auto index = getDeviceIndex(); + + if (index >= 0) + { + BlocksProtocol::HostPacketBuilder<32> p; + p.writePacketSysexHeaderBytes ((BlocksProtocol::TopologyIndex) index); + p.addFactoryReset(); + p.writePacketSysexFooter(); + sendMessageToDevice (p); + } + else + { + jassertfalse; + } + } + + void blockReset() override + { + auto index = getDeviceIndex(); + + if (index >= 0) + { + BlocksProtocol::HostPacketBuilder<32> p; + p.writePacketSysexHeaderBytes ((BlocksProtocol::TopologyIndex) index); + p.addBlockReset(); + p.writePacketSysexFooter(); + sendMessageToDevice (p); + } + else + { + jassertfalse; + } + } + + bool setName (const juce::String& newName) override + { + auto index = getDeviceIndex(); + + if (index >= 0) + { + BlocksProtocol::HostPacketBuilder<128> p; + p.writePacketSysexHeaderBytes ((BlocksProtocol::TopologyIndex) index); + + if (p.addSetBlockName (newName)) + { + p.writePacketSysexFooter(); + + if (sendMessageToDevice (p)) + return true; + } + } + else + { + jassertfalse; + } + + return false; + } + //============================================================================== std::unique_ptr touchSurface; juce::OwnedArray controlButtons; @@ -1448,16 +1745,25 @@ struct PhysicalTopologySource::Internal Detector& detector; juce::Time lastMessageSendTime, lastMessageReceiveTime; + BlockConfigManager config; + std::function configChangedCallback; + private: std::unique_ptr program; uint32 programSize = 0; - std::function firmwarePacketAckCallback; + std::function firmwarePacketAckCallback; uint32 resetMessagesSent = 0; bool isStillConnected = true; bool isMaster = false; + void initialiseDeviceIndexAndConnection() + { + config.setDeviceIndex ((TopologyIndex) getDeviceIndex()); + config.setDeviceComms (listenerToMidiConnection); + } + const juce::MidiInput* getMidiInput() const { if (auto c = dynamic_cast (detector.getDeviceConnectionFor (*this))) @@ -1498,6 +1804,7 @@ struct PhysicalTopologySource::Internal juce::ignoreUnused (c); listenerToMidiConnection->removeListener (this); listenerToMidiConnection = nullptr; + config.setDeviceComms (nullptr); } JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BlockImplementation) @@ -1657,6 +1964,11 @@ struct PhysicalTopologySource::Internal det->activeTouchSurfaces.removeFirstMatchingValue (this); } + int getNumberOfKeywaves() const noexcept override + { + return blockImpl.modelData.numKeywaves; + } + void broadcastTouchChange (const TouchSurface::Touch& touchEvent) { auto& status = touches.getValue (touchEvent); diff --git a/modules/juce_blocks_basics/visualisers/juce_BitmapLEDProgram.cpp b/modules/juce_blocks_basics/visualisers/juce_BitmapLEDProgram.cpp index e6154182fe..fa2e89b244 100644 --- a/modules/juce_blocks_basics/visualisers/juce_BitmapLEDProgram.cpp +++ b/modules/juce_blocks_basics/visualisers/juce_BitmapLEDProgram.cpp @@ -64,10 +64,10 @@ juce::String BitmapLEDProgram::getLittleFootProgram() { int bit = (x + y * NUM_COLUMNS) * 16; - setLED (x, y, makeARGB (255, - getHeapBits (bit, 5) << 3, - getHeapBits (bit + 5, 6) << 2, - getHeapBits (bit + 11, 5) << 3)); + fillPixel (makeARGB (255, + getHeapBits (bit, 5) << 3, + getHeapBits (bit + 5, 6) << 2, + getHeapBits (bit + 11, 5) << 3), x, y); } } } diff --git a/modules/juce_blocks_basics/visualisers/juce_DrumPadLEDProgram.cpp b/modules/juce_blocks_basics/visualisers/juce_DrumPadLEDProgram.cpp index 33fa367f71..263561a066 100644 --- a/modules/juce_blocks_basics/visualisers/juce_DrumPadLEDProgram.cpp +++ b/modules/juce_blocks_basics/visualisers/juce_DrumPadLEDProgram.cpp @@ -160,6 +160,402 @@ void DrumPadGridProgram::resumeAnimations() //============================================================================== juce::String DrumPadGridProgram::getLittleFootProgram() { + if (block.versionNumber.isEmpty() || block.versionNumber.compare ("0.2.5") < 0) + return getLittleFootProgramPre25(); + + return getLittleFootProgramPost25(); +} + +juce::String DrumPadGridProgram::getLittleFootProgramPre25() const +{ + // Uses its own heatmap, not the one provided in newer firmware + // Also can't use blocks config, introduced in 2.5. + + return R"littlefoot( + + #heapsize: 1351 + + int dimFactor; + int dimDelay; + int slideAnimationProgress; + int lastVisiblePads; + + int getGridColour (int index, int colourMapOffset) + { + int bit = (2 + colourMapOffset) * 8 + index * 16; + + return makeARGB (255, + getHeapBits (bit, 5) << 3, + getHeapBits (bit + 5, 6) << 2, + getHeapBits (bit + 11, 5) << 3); + } + + // Returns the current progress and also increments it for next frame + int getAnimationProgress (int index) + { + // Only 16 animated pads supported + if (index > 15) + return 0; + + int offsetBits = 162 * 8 + index * 32; + + int currentProgress = getHeapBits (offsetBits, 16); + int increment = getHeapBits (offsetBits + 16, 16); + int nextFrame = currentProgress + increment; + + // Set incremented 16 bit number. + setHeapByte (162 + index * 4, nextFrame & 0xff); + setHeapByte (163 + index * 4, nextFrame >> 8); + + return currentProgress; + } + + void outlineRect (int colour, int x, int y, int w) + { + fillRect (colour, x, y, w, 1); + fillRect (colour, x, y + w - 1, w, 1); + fillRect (colour, x, y + 1, 1, w - 1); + fillRect (colour, x + w - 1, y + 1, 1, w - 1); + } + + void drawPlus (int colour, int x, int y, int w) + { + fillRect (colour, x, y + (w / 2), w, 1); + fillRect (colour, x + (w / 2), y, 1, w); + } + + void fillGradientRect (int colour, int x, int y, int w) + { + if (colour != 0xff000000) + { + int divisor = w + w - 1; + + for (int yy = 0; yy < w; ++yy) + { + for (int xx = yy; xx < w; ++xx) + { + int gradColour = blendARGB (colour, makeARGB (((xx + yy) * 250) / divisor, 0, 0, 0)); + + setLED (x + xx, y + yy, gradColour); + setLED (x + yy, y + xx, gradColour); + } + } + } + } + + // TODO: Tom M: This is massaged to work with 3x3 pads and for dots to sync + // with Apple POS loop length. Rework to be more robust & flexible. + void drawPizzaLED (int colour, int x, int y, int w, int progress) + { + --w; + x += 1; + + int numToDo = ((8 * progress) / 255) + 1; + int totalLen = w * 4; + + for (int i = 1; i <= numToDo; ++i) + { + setLED (x, y, colour); + + if (i < w) + ++x; + else if (i < (w * 2)) + ++y; + else if (i < (w * 3)) + --x; + else if (i < totalLen) + --y; + } + } + + void drawPad (int padX, int padY, int padW, + int colour, int fill, int animateProgress) + { + animateProgress >>= 8; // 16 bit to 8 bit + int halfW = padW / 2; + + if (fill == 0) // Gradient fill + { + fillGradientRect (colour, padX, padY, padW); + } + + else if (fill == 1) // Filled + { + fillRect (colour, padX, padY, padW, padW); + } + + else if (fill == 2) // Hollow + { + outlineRect (colour, padX, padY, padW); + } + + else if (fill == 3) // Hollow with plus + { + outlineRect (colour, padX, padY, padW); + drawPlus (0xffffffff, padX, padY, padW); + } + + else if (fill == 4) // Pulsing dot + { + int pulseCol = blendARGB (colour, makeARGB (animateProgress, 0, 0, 0)); + + setLED (padX + halfW, padY + halfW, pulseCol); + } + + else if (fill == 5) // Blinking dot + { + int blinkCol = animateProgress > 64 ? makeARGB (255, 0, 0, 0) : colour; + + setLED (padX + halfW, padY + halfW, blinkCol); + } + + else if (fill == 6) // Pizza filled + { + outlineRect (blendARGB (colour, makeARGB (220, 0, 0, 0)), padX, padY, padW); // Dim outline + setLED (padX + halfW, padY + halfW, colour); // Bright centre + + drawPizzaLED (colour, padX, padY, padW, animateProgress); + } + + else if (fill == 7) // Pizza hollow + { + outlineRect (blendARGB (colour, makeARGB (220, 0, 0, 0)), padX, padY, padW); // Dim outline + + drawPizzaLED (colour, padX, padY, padW, animateProgress); + return; + } + } + + void fadeHeatMap() + { + for (int i = 0; i < 225; ++i) + { + int colourOffset = 226 + i * 4; + int colour = getHeapInt (colourOffset); + int alpha = (colour >> 24) & 0xff; + + if (alpha > 0) + { + alpha -= getHeapByte (1126 + i); + setHeapInt (colourOffset, alpha < 0 ? 0 : ((alpha << 24) | (colour & 0xffffff))); + } + } + } + + void addToHeatMap (int x, int y, int colour) + { + if (x >= 0 && y >= 0 && x < 15 && y < 15) + { + int offset = 226 + 4 * (x + y * 15); + colour = blendARGB (getHeapInt (offset), colour); + setHeapInt (offset, colour); + + int decay = ((colour >> 24) & 0xff) / 14; // change divisor to change trail times + offset = 1126 + (x + y * 15); + setHeapByte (offset, decay > 0 ? decay : 1); + } + } + + int getHeatmapColour (int x, int y) + { + return getHeapInt (226 + 4 * (x + y * 15)); + } + + int isPadActive (int index) + { + if (getHeapInt (158) == 0) // None active + return 0; + + ++index; + + return index == getHeapByte (158) || + index == getHeapByte (159) || + index == getHeapByte (160) || + index == getHeapByte (161); + } + + void updateDimFactor() + { + if (getHeapInt (158) == 0) + { + if (--dimDelay <= 0) + { + dimFactor -= 12; + + if (dimFactor < 0) + dimFactor = 0; + } + } + else + { + dimFactor = 180; + dimDelay = 12; + } + } + + void drawPads (int offsetX, int offsetY, int colourMapOffset) + { + int padsPerSide = getHeapByte (0 + colourMapOffset); + + if (padsPerSide < 2) + return; + + int blockW = 15 / padsPerSide; + int blockPlusGapW = blockW + (15 - padsPerSide * blockW) / (padsPerSide - 1); + + for (int padY = 0; padY < padsPerSide; ++padY) + { + for (int padX = 0; padX < padsPerSide; ++padX) + { + int ledX = offsetX + padX * blockPlusGapW; + int ledY = offsetY + padY * blockPlusGapW; + + if (ledX < 15 && + ledY < 15 && + (ledX + blockW) >= 0 && + (ledY + blockW) >= 0) + { + int padIdx = padX + padY * padsPerSide; + bool padActive = isPadActive (padIdx); + + int blendCol = padActive ? 255 : 0; + int blendAmt = padActive ? dimFactor >> 1 : dimFactor; + + int colour = blendARGB (getGridColour (padIdx, colourMapOffset), + makeARGB (blendAmt, blendCol, blendCol, blendCol)); + int fillType = getHeapByte (colourMapOffset + 52 + padIdx); + int animate = getAnimationProgress (padIdx); + + drawPad (ledX, ledY, blockW, colour, fillType, animate); + } + } + } + } + + void slideAnimatePads() + { + int nowVisible = getHeapByte (155); + + if (lastVisiblePads != nowVisible) + { + lastVisiblePads = nowVisible; + + if (slideAnimationProgress <= 0) + slideAnimationProgress = 15; + } + + // If animation is complete, draw normally. + if (slideAnimationProgress <= 0) + { + drawPads (0, 0, 78 * nowVisible); + slideAnimationProgress = 0; + } + else + { + int direction = getHeapByte (156); + slideAnimationProgress -= 1; + + int inPos = nowVisible == 0 ? 0 : 78; + int outPos = nowVisible == 0 ? 78 : 0; + + if (direction == 0) // Up + { + drawPads (0, slideAnimationProgress - 16, outPos); + drawPads (0, slideAnimationProgress, inPos); + } + else if (direction == 1) // Down + { + drawPads (0, 16 - slideAnimationProgress, outPos); + drawPads (0, 0 - slideAnimationProgress, inPos); + } + else if (direction == 2) // Left + { + drawPads (16 - slideAnimationProgress, 0, outPos); + drawPads (slideAnimationProgress, 0, inPos); + } + else if (direction == 3) // Right + { + drawPads (16 - slideAnimationProgress, 0, outPos); + drawPads (0 - slideAnimationProgress, 0, inPos); + } + else // None + { + drawPads (0, 0, 78 * nowVisible); + slideAnimationProgress = 0; + } + } + } + + void repaint() + { + // showErrorOnFail, showRepaintTime, showMovingDot + //enableDebug (true, true, false); + + // Clear LEDs to black, update dim animation + fillRect (0xff000000, 0, 0, 15, 15); + updateDimFactor(); + + // Does the main painting of pads + slideAnimatePads(); + + // Overlay heatmap + for (int y = 0; y < 15; ++y) + for (int x = 0; x < 15; ++x) + blendLED (x, y, getHeatmapColour (x, y)); + + fadeHeatMap(); + } + + // DrumPadGridProgram::sendTouch results in this callback, giving + // us more touch updates per frame and therefore smoother trails. + void handleMessage (int pos, int colour, int xx) + { + handleMessage (pos, colour); + } + + void handleMessage (int pos, int colour) + { + if ((pos >> 24) != 0x20) + return; + + int tx = ((pos >> 16) & 0xff) - 13; + int ty = ((pos >> 8) & 0xff) - 13; + + int tz = pos & 0xff; + tz = tz > 30 ? tz : 30; + + int ledCentreX = tx >> 4; + int ledCentreY = ty >> 4; + int adjustX = (tx - (ledCentreX << 4)) >> 2; + int adjustY = (ty - (ledCentreY << 4)) >> 2; + + for (int dy = -2; dy <= 2; ++dy) + { + for (int dx = -2; dx <= 2; ++dx) + { + int distance = dx * dx + dy * dy; + int level = distance == 0 ? 255 : (distance == 1 ? 132 : (distance < 5 ? 9 : (distance == 5 ? 2 : 0))); + + level += (dx * adjustX); + level += (dy * adjustY); + + level = (tz * level) >> 8; + + if (level > 0) + addToHeatMap (ledCentreX + dx, ledCentreY + dy, + makeARGB (level, colour >> 16, colour >> 8, colour)); + } + } + } + + )littlefoot"; +} + +juce::String DrumPadGridProgram::getLittleFootProgramPost25() const +{ + // Uses heatmap provided in firmware (so the program's smaller) + // Initialises config items introduced in firmware 2.5 + return R"littlefoot( #heapsize: 256 @@ -169,6 +565,12 @@ juce::String DrumPadGridProgram::getLittleFootProgram() int slideAnimationProgress; int lastVisiblePads; + void initialise() + { + for (int i = 0; i < 32; ++i) + setLocalConfigActiveState (i, true, true); + } + int getGridColour (int index, int colourMapOffset) { int bit = (2 + colourMapOffset) * 8 + index * 16; diff --git a/modules/juce_blocks_basics/visualisers/juce_DrumPadLEDProgram.h b/modules/juce_blocks_basics/visualisers/juce_DrumPadLEDProgram.h index a182bf8e3a..a92e82e635 100644 --- a/modules/juce_blocks_basics/visualisers/juce_DrumPadLEDProgram.h +++ b/modules/juce_blocks_basics/visualisers/juce_DrumPadLEDProgram.h @@ -115,4 +115,6 @@ private: void setGridFills (int numColumns, int numRows, const juce::Array& fills, uint32 byteOffset); juce::String getLittleFootProgram() override; + juce::String getLittleFootProgramPre25() const; + juce::String getLittleFootProgramPost25() const; }; diff --git a/modules/juce_box2d/juce_box2d.cpp b/modules/juce_box2d/juce_box2d.cpp index be378888f7..e3ab3e0ec4 100644 --- a/modules/juce_box2d/juce_box2d.cpp +++ b/modules/juce_box2d/juce_box2d.cpp @@ -33,6 +33,12 @@ #error "Incorrect use of JUCE cpp file" #endif +#ifdef __clang__ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wsign-conversion" + #pragma clang diagnostic ignored "-Wfloat-conversion" +#endif + #include "juce_box2d.h" #include "box2d/Collision/b2BroadPhase.cpp" @@ -85,3 +91,7 @@ namespace juce { #include "utils/juce_Box2DRenderer.cpp" } + +#if JUCE_CLANG + #pragma clang diagnostic pop +#endif diff --git a/modules/juce_box2d/juce_box2d.h b/modules/juce_box2d/juce_box2d.h index f8f3fd66b7..4087817146 100644 --- a/modules/juce_box2d/juce_box2d.h +++ b/modules/juce_box2d/juce_box2d.h @@ -35,7 +35,7 @@ ID: juce_box2d vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE wrapper for the Box2D physics engine description: The Box2D physics engine and some utility classes. website: http://www.juce.com/juce @@ -54,8 +54,17 @@ //============================================================================== #include +#if __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" +#endif + #include "box2d/Box2D.h" +#if __GNUC__ + #pragma GCC diagnostic pop +#endif + #ifndef DOXYGEN // for some reason, Doxygen sees this as a re-definition of Box2DRenderer namespace juce { diff --git a/modules/juce_core/containers/juce_AbstractFifo.cpp b/modules/juce_core/containers/juce_AbstractFifo.cpp index decb2b9b4e..03d61396b5 100644 --- a/modules/juce_core/containers/juce_AbstractFifo.cpp +++ b/modules/juce_core/containers/juce_AbstractFifo.cpp @@ -130,7 +130,7 @@ void AbstractFifo::finishedRead (int numRead) noexcept class AbstractFifoTests : public UnitTest { public: - AbstractFifoTests() : UnitTest ("Abstract Fifo") {} + AbstractFifoTests() : UnitTest ("Abstract Fifo", "Containers") {} class WriteThread : public Thread { diff --git a/modules/juce_core/containers/juce_Array.h b/modules/juce_core/containers/juce_Array.h index ca024a9c2c..4e66a70eaa 100644 --- a/modules/juce_core/containers/juce_Array.h +++ b/modules/juce_core/containers/juce_Array.h @@ -204,6 +204,15 @@ public: numUsed = 0; } + /** Fills the Array with the provided value. */ + void fill (const ParameterType& newValue) noexcept + { + const ScopedLockType lock (getLock()); + + for (auto& e : *this) + e = newValue; + } + //============================================================================== /** Returns the current number of elements in the array. */ inline int size() const noexcept @@ -379,7 +388,6 @@ public: //============================================================================== /** Appends a new element at the end of the array. - @param newElement the new object to add to the array @see set, insert, addIfNotAlreadyThere, addSorted, addUsingDefaultSort, addArray */ @@ -391,7 +399,6 @@ public: } /** Appends a new element at the end of the array. - @param newElement the new object to add to the array @see set, insert, addIfNotAlreadyThere, addSorted, addUsingDefaultSort, addArray */ @@ -402,6 +409,24 @@ public: new (data.elements + numUsed++) ElementType (static_cast (newElement)); } + /** Appends multiple new elements at the end of the array. */ + template + void add (const ElementType& firstNewElement, OtherElements... otherElements) + { + const ScopedLockType lock (getLock()); + data.ensureAllocatedSize (numUsed + 1 + (int) sizeof... (otherElements)); + addAssumingCapacityIsReady (firstNewElement, otherElements...); + } + + /** Appends multiple new elements at the end of the array. */ + template + void add (ElementType&& firstNewElement, OtherElements... otherElements) + { + const ScopedLockType lock (getLock()); + data.ensureAllocatedSize (numUsed + 1 + (int) sizeof... (otherElements)); + addAssumingCapacityIsReady (static_cast (firstNewElement), otherElements...); + } + /** Inserts a new element into the array at a given position. If the index is less than 0 or greater than the size of the array, the @@ -1222,4 +1247,21 @@ private: if (data.numAllocated > jmax (minimumAllocatedSize, numUsed * 2)) data.shrinkToNoMoreThan (jmax (numUsed, jmax (minimumAllocatedSize, 64 / (int) sizeof (ElementType)))); } + + void addAssumingCapacityIsReady (const ElementType& e) { new (data.elements + numUsed++) ElementType (e); } + void addAssumingCapacityIsReady (ElementType&& e) { new (data.elements + numUsed++) ElementType (static_cast (e)); } + + template + void addAssumingCapacityIsReady (const ElementType& firstNewElement, OtherElements... otherElements) + { + addAssumingCapacityIsReady (firstNewElement); + addAssumingCapacityIsReady (otherElements...); + } + + template + void addAssumingCapacityIsReady (ElementType&& firstNewElement, OtherElements... otherElements) + { + addAssumingCapacityIsReady (static_cast (firstNewElement)); + addAssumingCapacityIsReady (otherElements...); + } }; diff --git a/modules/juce_core/containers/juce_HashMap.h b/modules/juce_core/containers/juce_HashMap.h index 350944a192..e44a182493 100644 --- a/modules/juce_core/containers/juce_HashMap.h +++ b/modules/juce_core/containers/juce_HashMap.h @@ -130,9 +130,9 @@ public: { const ScopedLockType sl (getLock()); - for (int i = hashSlots.size(); --i >= 0;) + for (auto i = hashSlots.size(); --i >= 0;) { - HashEntry* h = hashSlots.getUnchecked(i); + auto* h = hashSlots.getUnchecked(i); while (h != nullptr) { @@ -161,24 +161,44 @@ public: { const ScopedLockType sl (getLock()); - for (const HashEntry* entry = hashSlots.getUnchecked (generateHashFor (keyToLookFor)); entry != nullptr; entry = entry->nextEntry) - if (entry->key == keyToLookFor) - return entry->value; + if (auto* entry = getEntry (getSlot (keyToLookFor), keyToLookFor)) + return entry->value; return ValueType(); } + /** Returns a reference to the value corresponding to a given key. + If the map doesn't contain the key, a default instance of the value type is + added to the map and a reference to this is returned. + @param keyToLookFor the key of the item being requested + */ + inline ValueType& getReference (KeyTypeParameter keyToLookFor) + { + const ScopedLockType sl (getLock()); + auto hashIndex = generateHashFor (keyToLookFor, getNumSlots()); + + auto* firstEntry = hashSlots.getUnchecked (hashIndex); + + if (auto* entry = getEntry (firstEntry, keyToLookFor)) + return entry->value; + + auto* entry = new HashEntry (keyToLookFor, ValueType(), firstEntry); + hashSlots.set (hashIndex, entry); + ++totalNumItems; + + if (totalNumItems > (getNumSlots() * 3) / 2) + remapTable (getNumSlots() * 2); + + return entry->value; + } + //============================================================================== /** Returns true if the map contains an item with the specied key. */ bool contains (KeyTypeParameter keyToLookFor) const { const ScopedLockType sl (getLock()); - for (const HashEntry* entry = hashSlots.getUnchecked (generateHashFor (keyToLookFor)); entry != nullptr; entry = entry->nextEntry) - if (entry->key == keyToLookFor) - return true; - - return false; + return (getEntry (getSlot (keyToLookFor), keyToLookFor) != nullptr); } /** Returns true if the hash contains at least one occurrence of a given value. */ @@ -186,8 +206,8 @@ public: { const ScopedLockType sl (getLock()); - for (int i = getNumSlots(); --i >= 0;) - for (const HashEntry* entry = hashSlots.getUnchecked(i); entry != nullptr; entry = entry->nextEntry) + for (auto i = getNumSlots(); --i >= 0;) + for (auto* entry = hashSlots.getUnchecked(i); entry != nullptr; entry = entry->nextEntry) if (entry->value == valueToLookFor) return true; @@ -199,35 +219,14 @@ public: If there's already an item with the given key, this will replace its value. Otherwise, a new item will be added to the map. */ - void set (KeyTypeParameter newKey, ValueTypeParameter newValue) - { - const ScopedLockType sl (getLock()); - const int hashIndex = generateHashFor (newKey); - - HashEntry* const firstEntry = hashSlots.getUnchecked (hashIndex); - - for (HashEntry* entry = firstEntry; entry != nullptr; entry = entry->nextEntry) - { - if (entry->key == newKey) - { - entry->value = newValue; - return; - } - } - - hashSlots.set (hashIndex, new HashEntry (newKey, newValue, firstEntry)); - ++totalNumItems; - - if (totalNumItems > (getNumSlots() * 3) / 2) - remapTable (getNumSlots() * 2); - } + void set (KeyTypeParameter newKey, ValueTypeParameter newValue) { getReference (newKey) = newValue; } /** Removes an item with the given key. */ void remove (KeyTypeParameter keyToRemove) { const ScopedLockType sl (getLock()); - const int hashIndex = generateHashFor (keyToRemove); - HashEntry* entry = hashSlots.getUnchecked (hashIndex); + auto hashIndex = generateHashFor (keyToRemove, getNumSlots()); + auto* entry = hashSlots.getUnchecked (hashIndex); HashEntry* previous = nullptr; while (entry != nullptr) @@ -258,9 +257,9 @@ public: { const ScopedLockType sl (getLock()); - for (int i = getNumSlots(); --i >= 0;) + for (auto i = getNumSlots(); --i >= 0;) { - HashEntry* entry = hashSlots.getUnchecked(i); + auto* entry = hashSlots.getUnchecked(i); HashEntry* previous = nullptr; while (entry != nullptr) @@ -293,13 +292,27 @@ public: */ void remapTable (int newNumberOfSlots) { - HashMap newTable (newNumberOfSlots); + const ScopedLockType sl (getLock()); - for (int i = getNumSlots(); --i >= 0;) - for (const HashEntry* entry = hashSlots.getUnchecked(i); entry != nullptr; entry = entry->nextEntry) - newTable.set (entry->key, entry->value); + Array newSlots; + newSlots.insertMultiple (0, nullptr, newNumberOfSlots); - swapWith (newTable); + for (auto i = getNumSlots(); --i >= 0;) + { + HashEntry* nextEntry = nullptr; + + for (auto* entry = hashSlots.getUnchecked(i); entry != nullptr; entry = nextEntry) + { + auto hashIndex = generateHashFor (entry->key, newNumberOfSlots); + + nextEntry = entry->nextEntry; + entry->nextEntry = newSlots.getUnchecked (hashIndex); + + newSlots.set (hashIndex, entry); + } + } + + hashSlots.swapWith (newSlots); } /** Returns the number of slots which are available for hashing. @@ -459,12 +472,23 @@ private: int totalNumItems; TypeOfCriticalSectionToUse lock; - int generateHashFor (KeyTypeParameter key) const + int generateHashFor (KeyTypeParameter key, int numSlots) const { - const int hash = hashFunctionToUse.generateHash (key, getNumSlots()); - jassert (isPositiveAndBelow (hash, getNumSlots())); // your hash function is generating out-of-range numbers! + const int hash = hashFunctionToUse.generateHash (key, numSlots); + jassert (isPositiveAndBelow (hash, numSlots)); // your hash function is generating out-of-range numbers! return hash; } + static inline HashEntry* getEntry (HashEntry* firstEntry, KeyType keyToLookFor) noexcept + { + for (auto* entry = firstEntry; entry != nullptr; entry = entry->nextEntry) + if (entry->key == keyToLookFor) + return entry; + + return nullptr; + } + + inline HashEntry* getSlot (KeyType key) const noexcept { return hashSlots.getUnchecked (generateHashFor (key, getNumSlots())); } + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (HashMap) }; diff --git a/modules/juce_core/containers/juce_HashMap_test.cpp b/modules/juce_core/containers/juce_HashMap_test.cpp new file mode 100644 index 0000000000..428bdc8071 --- /dev/null +++ b/modules/juce_core/containers/juce_HashMap_test.cpp @@ -0,0 +1,271 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + The code included in this file is provided under the terms of the ISC license + http://www.isc.org/downloads/software-support-policy/isc-license. Permission + To use, copy, modify, and/or distribute this software for any purpose with or + without fee is hereby granted provided that the above copyright notice and + this permission notice appear in all copies. + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +struct HashMapTest : public UnitTest +{ + HashMapTest() : UnitTest ("HashMap", "Containers") {} + + void runTest() override + { + doTest ("AddElementsTest"); + doTest ("AccessTest"); + doTest ("RemoveTest"); + doTest ("PersistantMemoryLocationOfValues"); + } + + //============================================================================== + struct AddElementsTest + { + template + static void run (UnitTest& u) + { + AssociativeMap groundTruth; + HashMap hashMap; + + RandomKeys keyOracle (300, 3827829); + Random valueOracle (48735); + + int totalValues = 0; + for (int i = 0; i < 10000; ++i) + { + auto key = keyOracle.next(); + auto value = valueOracle.nextInt(); + + bool contains = (groundTruth.find (key) != nullptr); + u.expectEquals ((int) contains, (int) hashMap.contains (key)); + + groundTruth.add (key, value); + hashMap.set (key, value); + + if (! contains) totalValues++; + + u.expectEquals (hashMap.size(), totalValues); + } + } + }; + + struct AccessTest + { + template + static void run (UnitTest& u) + { + AssociativeMap groundTruth; + HashMap hashMap; + + fillWithRandomValues (hashMap, groundTruth); + + for (auto pair : groundTruth.pairs) + u.expectEquals (hashMap[pair.key], pair.value); + } + }; + + struct RemoveTest + { + template + static void run (UnitTest& u) + { + AssociativeMap groundTruth; + HashMap hashMap; + + fillWithRandomValues (hashMap, groundTruth); + auto n = groundTruth.size(); + + Random r (3827387); + + for (int i = 0; i < 100; ++i) + { + auto idx = r.nextInt (n-- - 1); + auto key = groundTruth.pairs.getReference (idx).key; + + groundTruth.pairs.remove (idx); + hashMap.remove (key); + + u.expect (! hashMap.contains (key)); + + for (auto pair : groundTruth.pairs) + u.expectEquals (hashMap[pair.key], pair.value); + } + } + }; + + // ensure that the addresses of object references don't change + struct PersistantMemoryLocationOfValues + { + struct AddressAndValue { int value; const int* valueAddress; }; + + template + static void run (UnitTest& u) + { + AssociativeMap groundTruth; + HashMap hashMap; + + RandomKeys keyOracle (300, 3827829); + Random valueOracle (48735); + + for (int i = 0; i < 1000; ++i) + { + auto key = keyOracle.next(); + auto value = valueOracle.nextInt(); + + hashMap.set (key, value); + + if (auto* existing = groundTruth.find (key)) + { + // don't change the address: only the value + existing->value = value; + } + else + { + groundTruth.add (key, { value, &hashMap.getReference (key) }); + } + + for (auto pair : groundTruth.pairs) + { + const auto& hashMapValue = hashMap.getReference (pair.key); + + u.expectEquals (hashMapValue, pair.value.value); + u.expect (&hashMapValue == pair.value.valueAddress); + } + } + + auto n = groundTruth.size(); + Random r (3827387); + + for (int i = 0; i < 100; ++i) + { + auto idx = r.nextInt (n-- - 1); + auto key = groundTruth.pairs.getReference (idx).key; + + groundTruth.pairs.remove (idx); + hashMap.remove (key); + + for (auto pair : groundTruth.pairs) + { + const auto& hashMapValue = hashMap.getReference (pair.key); + + u.expectEquals (hashMapValue, pair.value.value); + u.expect (&hashMapValue == pair.value.valueAddress); + } + } + } + }; + + //============================================================================== + template + void doTest (const String& testName) + { + beginTest (testName); + + Test::template run (*this); + Test::template run (*this); + Test::template run (*this); + } + + //============================================================================== + template + struct AssociativeMap + { + struct KeyValuePair { KeyType key; ValueType value; }; + + ValueType* find (KeyType key) + { + auto n = pairs.size(); + + for (int i = 0; i < n; ++i) + { + auto& pair = pairs.getReference (i); + + if (pair.key == key) + return &pair.value; + } + + return nullptr; + } + + void add (KeyType key, ValueType value) + { + if (ValueType* v = find (key)) + *v = value; + else + pairs.add ({key, value}); + } + + int size() const { return pairs.size(); } + + Array pairs; + }; + + template + static void fillWithRandomValues (HashMap& hashMap, AssociativeMap& groundTruth) + { + RandomKeys keyOracle (300, 3827829); + Random valueOracle (48735); + + for (int i = 0; i < 10000; ++i) + { + auto key = keyOracle.next(); + auto value = valueOracle.nextInt(); + + groundTruth.add (key, value); + hashMap.set (key, value); + } + } + + //============================================================================== + template + class RandomKeys + { + public: + RandomKeys (int maxUniqueKeys, int seed) : r (seed) + { + for (int i = 0; i < maxUniqueKeys; ++i) + keys.add (generateRandomKey (r)); + } + + const KeyType& next() + { + int i = r.nextInt (keys.size() - 1); + return keys.getReference (i); + } + private: + static KeyType generateRandomKey (Random&); + + Random r; + Array keys; + }; +}; + +template <> int HashMapTest::RandomKeys ::generateRandomKey (Random& rnd) { return rnd.nextInt(); } +template <> void* HashMapTest::RandomKeys::generateRandomKey (Random& rnd) { return reinterpret_cast (rnd.nextInt64()); } + +template <> String HashMapTest::RandomKeys::generateRandomKey (Random& rnd) +{ + String str; + + int len = rnd.nextInt (8)+1; + for (int i = 0; i < len; ++i) + str += static_cast (rnd.nextInt (95) + 32); + + return str; +} + +static HashMapTest hashMapTest; diff --git a/modules/juce_core/containers/juce_ListenerList.cpp b/modules/juce_core/containers/juce_ListenerList.cpp index 983b301180..f0885171b0 100644 --- a/modules/juce_core/containers/juce_ListenerList.cpp +++ b/modules/juce_core/containers/juce_ListenerList.cpp @@ -76,7 +76,7 @@ struct Listener2 : public ListenerBase class ListenerListTests : public UnitTest { public: - ListenerListTests() : UnitTest ("ListenerList") {} + ListenerListTests() : UnitTest ("ListenerList", "Containers") {} template void callHelper (std::vector& expectedCounterValues) @@ -144,6 +144,8 @@ public: void runTest() override { + counter = 0; + beginTest ("Call single listener"); listeners.add (&listener1); std::vector expectedCounterValues; @@ -166,6 +168,9 @@ public: expectedCounterValues.push_back (i); callExcludingHelper (&listener2, expectedCounterValues, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); + + listeners.remove (&listener1); + listeners.remove (&listener2); } int counter = 0; diff --git a/modules/juce_core/files/juce_File.cpp b/modules/juce_core/files/juce_File.cpp index e6ed109022..c5bd5b8be6 100644 --- a/modules/juce_core/files/juce_File.cpp +++ b/modules/juce_core/files/juce_File.cpp @@ -1004,7 +1004,7 @@ MemoryMappedFile::MemoryMappedFile (const File& file, const Range& fileRa class FileTests : public UnitTest { public: - FileTests() : UnitTest ("Files") {} + FileTests() : UnitTest ("Files", "Files") {} void runTest() override { diff --git a/modules/juce_core/javascript/juce_JSON.cpp b/modules/juce_core/javascript/juce_JSON.cpp index 1f31c6a2e0..fcaace7629 100644 --- a/modules/juce_core/javascript/juce_JSON.cpp +++ b/modules/juce_core/javascript/juce_JSON.cpp @@ -529,7 +529,7 @@ Result JSON::parseQuotedString (String::CharPointerType& t, var& result) class JSONTests : public UnitTest { public: - JSONTests() : UnitTest ("JSON") {} + JSONTests() : UnitTest ("JSON", "JSON") {} static String createRandomWideCharString (Random& r) { @@ -565,17 +565,11 @@ public: return CharPointer_ASCII (buffer); } - // (creates a random double that can be easily stringified, to avoid - // false failures when decimal places are rounded or truncated slightly) + // Creates a random double that can be easily stringified, to avoid + // false failures when decimal places are rounded or truncated slightly static var createRandomDouble (Random& r) { - for (;;) - { - var v (String (r.nextDouble() * 1000.0, 20).getDoubleValue()); - - if (v.toString() == String (static_cast (v), 20)) - return v; - } + return var ((r.nextDouble() * 1000.0) + 0.1); } static var createRandomVar (Random& r, int depth) diff --git a/modules/juce_core/javascript/juce_Javascript.h b/modules/juce_core/javascript/juce_Javascript.h index e5a5859b30..93a55a405f 100644 --- a/modules/juce_core/javascript/juce_Javascript.h +++ b/modules/juce_core/javascript/juce_Javascript.h @@ -20,6 +20,10 @@ ============================================================================== */ +#pragma once + + +//============================================================================== /** A simple javascript interpreter! diff --git a/modules/juce_core/juce_core.cpp b/modules/juce_core/juce_core.cpp index 6a4fa7547a..7d10dfa25e 100644 --- a/modules/juce_core/juce_core.cpp +++ b/modules/juce_core/juce_core.cpp @@ -232,6 +232,11 @@ namespace juce #include "network/juce_URL.cpp" #include "network/juce_WebInputStream.cpp" +//============================================================================== +#if JUCE_UNIT_TESTS +#include "containers/juce_HashMap_test.cpp" +#endif + //============================================================================== /* As the very long class names here try to explain, the purpose of this code is to cause diff --git a/modules/juce_core/juce_core.h b/modules/juce_core/juce_core.h index 14514f50cb..004560f208 100644 --- a/modules/juce_core/juce_core.h +++ b/modules/juce_core/juce_core.h @@ -32,7 +32,7 @@ ID: juce_core vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE core classes description: The essential set of basic JUCE classes, as required by all the other JUCE modules. Includes text, container, memory, threading and i/o functionality. website: http://www.juce.com/juce diff --git a/modules/juce_core/maths/juce_BigInteger.cpp b/modules/juce_core/maths/juce_BigInteger.cpp index a82d025f99..14a9354394 100644 --- a/modules/juce_core/maths/juce_BigInteger.cpp +++ b/modules/juce_core/maths/juce_BigInteger.cpp @@ -1291,7 +1291,7 @@ uint32 readLittleEndianBitsInBuffer (const void* buffer, uint32 startBit, uint32 class BigIntegerTests : public UnitTest { public: - BigIntegerTests() : UnitTest ("BigInteger") {} + BigIntegerTests() : UnitTest ("BigInteger", "Maths") {} static BigInteger getBigRandom (Random& r) { diff --git a/modules/juce_core/maths/juce_MathsFunctions.h b/modules/juce_core/maths/juce_MathsFunctions.h index 27458c5fe3..aecfbb54b2 100644 --- a/modules/juce_core/maths/juce_MathsFunctions.h +++ b/modules/juce_core/maths/juce_MathsFunctions.h @@ -337,15 +337,27 @@ inline int64 abs64 (const int64 n) noexcept #endif //============================================================================== + +/** Commonly used mathematical constants */ +template +struct MathConstants +{ + /** A predefined value for Pi */ + static constexpr FloatType pi = static_cast (3.141592653589793238L); + + /** A predfined value for Euler's number */ + static constexpr FloatType euler = static_cast (2.71828182845904523536L); +}; + /** A predefined value for Pi, at double-precision. @see float_Pi */ -const double double_Pi = 3.1415926535897932384626433832795; +const double double_Pi = MathConstants::pi; /** A predefined value for Pi, at single-precision. @see double_Pi */ -const float float_Pi = 3.14159265358979323846f; +const float float_Pi = MathConstants::pi; /** Converts an angle in degrees to radians. */ @@ -483,6 +495,22 @@ inline int roundFloatToInt (float value) noexcept return roundToInt (value); } +//============================================================================== +/** Truncates a positive floating-point number to an unsigned int. + + This is generally faster than static_cast (std::floor (x)) + but it only works for positive numbers small enough to be represented as an + unsigned int. +*/ +template +unsigned int truncatePositiveToUnsignedInt (FloatType value) noexcept +{ + jassert (value >= static_cast (0)); + jassert (static_cast (value) <= std::numeric_limits::max()); + + return static_cast (value); +} + //============================================================================== /** Returns true if the specified integer is a power-of-two. */ template diff --git a/modules/juce_core/maths/juce_NormalisableRange.h b/modules/juce_core/maths/juce_NormalisableRange.h index 22a41c3c8d..3f3794e151 100644 --- a/modules/juce_core/maths/juce_NormalisableRange.h +++ b/modules/juce_core/maths/juce_NormalisableRange.h @@ -47,12 +47,10 @@ public: NormalisableRange (const NormalisableRange& other) noexcept : start (other.start), end (other.end), interval (other.interval), skew (other.skew), - symmetricSkew (other.symmetricSkew) - #if JUCE_COMPILER_SUPPORTS_LAMBDAS - , convertFrom0To1Function (other.convertFrom0To1Function) - , convertTo0To1Function (other.convertTo0To1Function) - , snapToLegalValueFunction (other.snapToLegalValueFunction) - #endif + symmetricSkew (other.symmetricSkew), + convertFrom0To1Function (other.convertFrom0To1Function), + convertTo0To1Function (other.convertTo0To1Function), + snapToLegalValueFunction (other.snapToLegalValueFunction) { checkInvariants(); } @@ -65,11 +63,9 @@ public: interval = other.interval; skew = other.skew; symmetricSkew = other.symmetricSkew; - #if JUCE_COMPILER_SUPPORTS_LAMBDAS - convertFrom0To1Function = other.convertFrom0To1Function; - convertTo0To1Function = other.convertTo0To1Function; + convertFrom0To1Function = other.convertFrom0To1Function; + convertTo0To1Function = other.convertTo0To1Function; snapToLegalValueFunction = other.snapToLegalValueFunction; - #endif checkInvariants(); diff --git a/modules/juce_core/maths/juce_Random.cpp b/modules/juce_core/maths/juce_Random.cpp index 0c2d1ec72b..5d83f718aa 100644 --- a/modules/juce_core/maths/juce_Random.cpp +++ b/modules/juce_core/maths/juce_Random.cpp @@ -154,7 +154,7 @@ void Random::fillBitsRandomly (BigInteger& arrayToChange, int startBit, int numB class RandomTests : public UnitTest { public: - RandomTests() : UnitTest ("Random") {} + RandomTests() : UnitTest ("Random", "Maths") {} void runTest() override { diff --git a/modules/juce_core/memory/juce_Atomic.h b/modules/juce_core/memory/juce_Atomic.h index a1273f4d9e..65408b4c01 100644 --- a/modules/juce_core/memory/juce_Atomic.h +++ b/modules/juce_core/memory/juce_Atomic.h @@ -22,408 +22,453 @@ #pragma once +#ifndef DOXYGEN + namespace AtomicHelpers + { + template struct DiffTypeHelper { typedef T Type; }; + template struct DiffTypeHelper { typedef std::ptrdiff_t Type; }; + } +#endif -//============================================================================== -/** - Simple class to hold a primitive value and perform atomic operations on it. +#if JUCE_ATOMIC_AVAILABLE + //============================================================================== + /** + A simple wrapper around std::atomic. + */ + template + struct Atomic + { + typedef typename AtomicHelpers::DiffTypeHelper::Type DiffType; - The type used must be a 32 or 64 bit primitive, like an int, pointer, etc. - There are methods to perform most of the basic atomic operations. -*/ -template -class Atomic -{ -public: - /** Creates a new value, initialised to zero. */ - inline Atomic() noexcept - : value (0) - { - } + /** Creates a new value, initialised to zero. */ + Atomic() noexcept : value (0) {} - /** Creates a new value, with a given initial value. */ - inline explicit Atomic (const Type initialValue) noexcept - : value (initialValue) - { - } + /** Creates a new value, with a given initial value. */ + Atomic (const Type initialValue) noexcept : value (initialValue) {} - /** Copies another value (atomically). */ - inline Atomic (const Atomic& other) noexcept - : value (other.get()) - { - } + /** Copies another value (atomically). */ + Atomic (const Atomic& other) noexcept : value (other.get()) {} - /** Destructor. */ - inline ~Atomic() noexcept - { - static_assert (sizeof (Type) == 4 || sizeof (Type) == 8, - "Atomic can only be used for types which are 32 or 64 bits in size"); - } + /** Destructor. */ + ~Atomic() noexcept + { + #if __cpp_lib_atomic_is_always_lock_free + static_assert (std::atomic::is_always_lock_free(), + "This class can only be used for lock-free types"); + #endif + } - /** Atomically reads and returns the current value. */ - Type get() const noexcept; + /** Atomically reads and returns the current value. */ + Type get() const noexcept { return value.load(); } - /** Copies another value onto this one (atomically). */ - inline Atomic& operator= (const Atomic& other) noexcept { exchange (other.get()); return *this; } + /** Atomically sets the current value. */ + void set (Type newValue) noexcept { value = newValue; } - /** Copies another value onto this one (atomically). */ - inline Atomic& operator= (const Type newValue) noexcept { exchange (newValue); return *this; } + /** Atomically sets the current value, returning the value that was replaced. */ + Type exchange (Type newValue) noexcept { return value.exchange (newValue); } - /** Atomically sets the current value. */ - void set (Type newValue) noexcept { exchange (newValue); } + /** Atomically compares this value with a target value, and if it is equal, sets + this to be equal to a new value. - /** Atomically sets the current value, returning the value that was replaced. */ - Type exchange (Type value) noexcept; + This operation is the atomic equivalent of doing this: + @code + bool compareAndSetBool (Type newValue, Type valueToCompare) + { + if (get() == valueToCompare) + { + set (newValue); + return true; + } - /** Atomically adds a number to this value, returning the new value. */ - Type operator+= (Type amountToAdd) noexcept; + return false; + } + @endcode - /** Atomically subtracts a number from this value, returning the new value. */ - Type operator-= (Type amountToSubtract) noexcept; + Internally, this method calls std::atomic::compare_exchange_strong with + memory_order_seq_cst (the strictest std::memory_order). - /** Atomically increments this value, returning the new value. */ - Type operator++() noexcept; + @returns true if the comparison was true and the value was replaced; false if + the comparison failed and the value was left unchanged. + @see compareAndSetValue + */ + bool compareAndSetBool (Type newValue, Type valueToCompare) noexcept + { + return value.compare_exchange_strong (valueToCompare, newValue); + } - /** Atomically decrements this value, returning the new value. */ - Type operator--() noexcept; + /** Copies another value into this one (atomically). */ + Atomic& operator= (const Atomic& other) noexcept + { + value = other.value.load(); + return *this; + } - /** Atomically compares this value with a target value, and if it is equal, sets - this to be equal to a new value. + /** Copies another value into this one (atomically). */ + Atomic& operator= (const Type newValue) noexcept + { + value = newValue; + return *this; + } - This operation is the atomic equivalent of doing this: - @code - bool compareAndSetBool (Type newValue, Type valueToCompare) - { - if (get() == valueToCompare) - { - set (newValue); - return true; - } + /** Atomically adds a number to this value, returning the new value. */ + Type operator+= (DiffType amountToAdd) noexcept { return value += amountToAdd; } - return false; - } - @endcode + /** Atomically subtracts a number from this value, returning the new value. */ + Type operator-= (DiffType amountToSubtract) noexcept { return value -= amountToSubtract; } - @returns true if the comparison was true and the value was replaced; false if - the comparison failed and the value was left unchanged. - @see compareAndSetValue - */ - bool compareAndSetBool (Type newValue, Type valueToCompare) noexcept; + /** Atomically increments this value, returning the new value. */ + Type operator++() noexcept { return ++value; } - /** Atomically compares this value with a target value, and if it is equal, sets - this to be equal to a new value. + /** Atomically decrements this value, returning the new value. */ + Type operator--() noexcept { return --value; } - This operation is the atomic equivalent of doing this: - @code - Type compareAndSetValue (Type newValue, Type valueToCompare) - { - Type oldValue = get(); - if (oldValue == valueToCompare) - set (newValue); + /** Implements a memory read/write barrier. - return oldValue; - } - @endcode + Internally this calls std::atomic_thread_fence with + memory_order_seq_cst (the strictest std::memory_order). + */ + void memoryBarrier() noexcept { atomic_thread_fence (std::memory_order_seq_cst); } - @returns the old value before it was changed. - @see compareAndSetBool - */ - Type compareAndSetValue (Type newValue, Type valueToCompare) noexcept; + /** The std::atomic object that this class operates on. */ + std::atomic value; - /** Implements a memory read/write barrier. */ - static void memoryBarrier() noexcept; - - //============================================================================== - #if JUCE_64BIT - JUCE_ALIGN (8) - #else - JUCE_ALIGN (4) - #endif - - /** The raw value that this class operates on. - This is exposed publicly in case you need to manipulate it directly - for performance reasons. - */ - volatile Type value; - -private: - template - static inline Dest castTo (Source value) noexcept { union { Dest d; Source s; } u; u.s = value; return u.d; } - - static inline Type castFrom32Bit (int32 value) noexcept { return castTo (value); } - static inline Type castFrom64Bit (int64 value) noexcept { return castTo (value); } - static inline int32 castTo32Bit (Type value) noexcept { return castTo (value); } - static inline int64 castTo64Bit (Type value) noexcept { return castTo (value); } - - Type operator++ (int); // better to just use pre-increment with atomics.. - Type operator-- (int); - - /** This templated negate function will negate pointers as well as integers */ - template - inline ValueType negateValue (ValueType n) noexcept - { - return sizeof (ValueType) == 1 ? (ValueType) -(signed char) n - : (sizeof (ValueType) == 2 ? (ValueType) -(short) n - : (sizeof (ValueType) == 4 ? (ValueType) -(int) n - : ((ValueType) -(int64) n))); - } - - /** This templated negate function will negate pointers as well as integers */ - template - inline PointerType* negateValue (PointerType* n) noexcept - { - return reinterpret_cast (-reinterpret_cast (n)); - } -}; - - -//============================================================================== -/* - The following code is in the header so that the atomics can be inlined where possible... -*/ -#if JUCE_MAC && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)) - #define JUCE_ATOMICS_MAC_LEGACY 1 // Older OSX builds using gcc4.1 or earlier - -//============================================================================== -#elif JUCE_GCC || JUCE_CLANG - #define JUCE_ATOMICS_GCC 1 // GCC with intrinsics - - #if JUCE_IOS || JUCE_ANDROID // (64-bit ops will compile but not link on these mobile OSes) - #define JUCE_64BIT_ATOMICS_UNAVAILABLE 1 - #endif - -//============================================================================== -#else - #define JUCE_ATOMICS_WINDOWS 1 // Windows with intrinsics - - #ifndef __INTEL_COMPILER - #pragma intrinsic (_InterlockedExchange, _InterlockedIncrement, _InterlockedDecrement, _InterlockedCompareExchange, \ - _InterlockedCompareExchange64, _InterlockedExchangeAdd, _ReadWriteBarrier) - #endif - #define juce_InterlockedExchange(a, b) _InterlockedExchange(a, b) - #define juce_InterlockedIncrement(a) _InterlockedIncrement(a) - #define juce_InterlockedDecrement(a) _InterlockedDecrement(a) - #define juce_InterlockedExchangeAdd(a, b) _InterlockedExchangeAdd(a, b) - #define juce_InterlockedCompareExchange(a, b, c) _InterlockedCompareExchange(a, b, c) - #define juce_InterlockedCompareExchange64(a, b, c) _InterlockedCompareExchange64(a, b, c) - #define juce_MemoryBarrier _ReadWriteBarrier - - #if JUCE_64BIT - #ifndef __INTEL_COMPILER - #pragma intrinsic (_InterlockedExchangeAdd64, _InterlockedExchange64, _InterlockedIncrement64, _InterlockedDecrement64) + //============================================================================== + #ifndef DOXYGEN + // This method has been deprecated as there is no equivalent method in std::atomic. + JUCE_DEPRECATED (Type compareAndSetValue (Type, Type) noexcept); #endif - #define juce_InterlockedExchangeAdd64(a, b) _InterlockedExchangeAdd64(a, b) - #define juce_InterlockedExchange64(a, b) _InterlockedExchange64(a, b) - #define juce_InterlockedIncrement64(a) _InterlockedIncrement64(a) - #define juce_InterlockedDecrement64(a) _InterlockedDecrement64(a) - #else - // None of these atomics are available in a 32-bit Windows build!! - template static Type juce_InterlockedExchangeAdd64 (volatile Type* a, Type b) noexcept { jassertfalse; Type old = *a; *a += b; return old; } - template static Type juce_InterlockedExchange64 (volatile Type* a, Type b) noexcept { jassertfalse; Type old = *a; *a = b; return old; } - template static Type juce_InterlockedIncrement64 (volatile Type* a) noexcept { jassertfalse; return ++*a; } - template static Type juce_InterlockedDecrement64 (volatile Type* a) noexcept { jassertfalse; return --*a; } + }; + +#else + + #ifndef DOXYGEN + template class AtomicBase; + #endif + + //============================================================================== + /** + Simple class to hold a primitive value and perform atomic operations on it. + + The type used must be a 32 or 64 bit primitive, like an int, pointer, etc. + There are methods to perform most of the basic atomic operations. + */ + template + class Atomic : public AtomicBase + { + public: + /** Resulting type when subtracting the underlying Type. */ + typedef typename AtomicBase::DiffType DiffType; + + /** Creates a new value, initialised to zero. */ + inline Atomic() noexcept {} + + /** Creates a new value, with a given initial value. */ + inline explicit Atomic (const Type initialValue) noexcept : AtomicBase (initialValue) {} + + /** Copies another value (atomically). */ + inline Atomic (const Atomic& other) noexcept : AtomicBase (other) {} + + /** Destructor. */ + inline ~Atomic() noexcept + { + static_assert (sizeof (Type) == 4 || sizeof (Type) == 8, + "Atomic can only be used for types which are 32 or 64 bits in size"); + } + + /** Atomically reads and returns the current value. */ + inline Type get() const noexcept { return AtomicBase::get(); } + + /** Copies another value into this one (atomically). */ + inline Atomic& operator= (const Atomic& other) noexcept { AtomicBase::operator= (other); return *this; } + + /** Copies another value into this one (atomically). */ + inline Atomic& operator= (const Type newValue) noexcept { AtomicBase::operator= (newValue); return *this; } + + /** Atomically sets the current value. */ + inline void set (Type newValue) noexcept { exchange (newValue); } + + /** Atomically sets the current value, returning the value that was replaced. */ + inline Type exchange (Type v) noexcept { return AtomicBase::exchange (v); } + + /** Atomically adds a number to this value, returning the new value. */ + Type operator+= (DiffType amountToAdd) noexcept; + + /** Atomically subtracts a number from this value, returning the new value. */ + Type operator-= (DiffType amountToSubtract) noexcept; + + /** Atomically increments this value, returning the new value. */ + Type operator++() noexcept; + + /** Atomically decrements this value, returning the new value. */ + Type operator--() noexcept; + + /** Atomically compares this value with a target value, and if it is equal, sets + this to be equal to a new value. + + This operation is the atomic equivalent of doing this: + @code + bool compareAndSetBool (Type newValue, Type valueToCompare) + { + if (get() == valueToCompare) + { + set (newValue); + return true; + } + + return false; + } + @endcode + + @returns true if the comparison was true and the value was replaced; false if + the comparison failed and the value was left unchanged. + @see compareAndSetValue + */ + inline bool compareAndSetBool (Type newValue, Type valueToCompare) noexcept { return AtomicBase::compareAndSetBool (newValue, valueToCompare); } + + /** Atomically compares this value with a target value, and if it is equal, sets + this to be equal to a new value. + + This operation is the atomic equivalent of doing this: + @code + Type compareAndSetValue (Type newValue, Type valueToCompare) + { + Type oldValue = get(); + if (oldValue == valueToCompare) + set (newValue); + + return oldValue; + } + @endcode + + @returns the old value before it was changed. + @see compareAndSetBool + */ + inline Type compareAndSetValue (Type newValue, Type valueToCompare) noexcept { return AtomicBase::compareAndSetValue (newValue, valueToCompare); } + + /** Implements a memory read/write barrier. */ + static inline void memoryBarrier() noexcept { AtomicBase::memoryBarrier (); } + }; + + #ifndef DOXYGEN + + //============================================================================== + // Internal implementation follows + //============================================================================== + template + class AtomicBase + { + public: + typedef typename AtomicHelpers::DiffTypeHelper::Type DiffType; + + inline AtomicBase() noexcept : value (0) {} + inline explicit AtomicBase (const Type v) noexcept : value (v) {} + inline AtomicBase (const AtomicBase& other) noexcept : value (other.get()) {} + Type get() const noexcept; + inline AtomicBase& operator= (const AtomicBase& other) noexcept { exchange (other.get()); return *this; } + inline AtomicBase& operator= (const Type newValue) noexcept { exchange (newValue); return *this; } + void set (Type newValue) noexcept { exchange (newValue); } + Type exchange (Type) noexcept; + bool compareAndSetBool (Type, Type) noexcept; + Type compareAndSetValue (Type, Type) noexcept; + static void memoryBarrier() noexcept; + + //============================================================================== + #if JUCE_64BIT + JUCE_ALIGN (8) + #else + JUCE_ALIGN (4) + #endif + + /** The raw value that this class operates on. + This is exposed publicly in case you need to manipulate it directly + for performance reasons. + */ + volatile Type value; + + protected: + template + static inline Dest castTo (Source value) noexcept { union { Dest d; Source s; } u; u.s = value; return u.d; } + + static inline Type castFrom32Bit (int32 value) noexcept { return castTo (value); } + static inline Type castFrom64Bit (int64 value) noexcept { return castTo (value); } + static inline int32 castTo32Bit (Type value) noexcept { return castTo (value); } + static inline int64 castTo64Bit (Type value) noexcept { return castTo (value); } + + Type operator++ (int); // better to just use pre-increment with atomics.. + Type operator-- (int); + + /** This templated negate function will negate pointers as well as integers */ + template + inline ValueType negateValue (ValueType n) noexcept + { + return sizeof (ValueType) == 1 ? (ValueType) -(signed char) n + : (sizeof (ValueType) == 2 ? (ValueType) -(short) n + : (sizeof (ValueType) == 4 ? (ValueType) -(int) n + : ((ValueType) -(int64) n))); + } + + /** This templated negate function will negate pointers as well as integers */ + template + inline PointerType* negateValue (PointerType* n) noexcept + { + return reinterpret_cast (-reinterpret_cast (n)); + } + }; + + //============================================================================== + // Specialisation for void* which does not include the pointer arithmetic + template <> + class Atomic : public AtomicBase + { + public: + inline Atomic() noexcept {} + inline explicit Atomic (void* const initialValue) noexcept : AtomicBase (initialValue) {} + inline Atomic (const Atomic& other) noexcept : AtomicBase (other) {} + inline void* get() const noexcept { return AtomicBase::get(); } + inline Atomic& operator= (const Atomic& other) noexcept { AtomicBase::operator= (other); return *this; } + inline Atomic& operator= (void* const newValue) noexcept { AtomicBase::operator= (newValue); return *this; } + inline void set (void* newValue) noexcept { exchange (newValue); } + inline void* exchange (void* v) noexcept { return AtomicBase::exchange (v); } + inline bool compareAndSetBool (void* newValue, void* valueToCompare) noexcept { return AtomicBase::compareAndSetBool (newValue, valueToCompare); } + inline void* compareAndSetValue (void* newValue, void* valueToCompare) noexcept { return AtomicBase::compareAndSetValue (newValue, valueToCompare); } + static inline void memoryBarrier() noexcept { AtomicBase::memoryBarrier(); } + }; + + //============================================================================== + /* + The following code is in the header so that the atomics can be inlined where possible... + */ + #if JUCE_MAC && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)) + #define JUCE_ATOMICS_MAC_LEGACY 1 // Older OSX builds using gcc4.1 or earlier + #elif JUCE_GCC || JUCE_CLANG + #define JUCE_ATOMICS_GCC 1 // GCC with intrinsics + #if JUCE_IOS || JUCE_ANDROID // (64-bit ops will compile but not link on these mobile OSes) #define JUCE_64BIT_ATOMICS_UNAVAILABLE 1 + #endif #endif - template - struct WindowsInterlockedHelpersBase - {}; - template - struct WindowsInterlockedHelpersBase + struct AtomicIncrementDecrement { - static inline Type exchange (volatile Type* value, Type other) noexcept + static inline Type inc (AtomicBase& a) noexcept { - return castFrom (juce_InterlockedExchange (reinterpret_cast (value), castTo (other))); + #if JUCE_ATOMICS_MAC_LEGACY + return sizeof (Type) == 4 ? (Type) OSAtomicIncrement32Barrier ((volatile int32_t*) &a.value) + : (Type) OSAtomicIncrement64Barrier ((volatile int64_t*) &a.value); + #elif JUCE_ATOMICS_GCC + return sizeof (Type) == 4 ? (Type) __sync_add_and_fetch (& (a.value), (Type) 1) + : (Type) __sync_add_and_fetch ((int64_t*) & (a.value), 1); + #endif } - static inline Type add (volatile Type* value, Type other) noexcept + static inline Type dec (AtomicBase& a) noexcept { - return castFrom (juce_InterlockedExchangeAdd (reinterpret_cast (value), castTo (other)) + castTo (other)); + #if JUCE_ATOMICS_MAC_LEGACY + return sizeof (Type) == 4 ? (Type) OSAtomicDecrement32Barrier ((volatile int32_t*) &a.value) + : (Type) OSAtomicDecrement64Barrier ((volatile int64_t*) &a.value); + #elif JUCE_ATOMICS_GCC + return sizeof (Type) == 4 ? (Type) __sync_add_and_fetch (& (a.value), (Type) -1) + : (Type) __sync_add_and_fetch ((int64_t*) & (a.value), -1); + #endif } - - static inline Type inc (volatile Type* value) noexcept - { - return castFrom (juce_InterlockedIncrement (reinterpret_cast (value))); - } - - static inline Type dec (volatile Type* value) noexcept - { - return castFrom (juce_InterlockedDecrement (reinterpret_cast (value))); - } - - static inline Type cmp (volatile Type* value, Type other, Type comparand) noexcept - { - return castFrom (juce_InterlockedCompareExchange (reinterpret_cast (value), castTo (other), castTo (comparand))); - } - - static inline Type castFrom (long value) { union { long in; Type out; } u; u.in = value; return u.out; } - static inline long castTo (Type value) { union { Type in; long out; } u; u.in = value; return u.out; } }; template - struct WindowsInterlockedHelpersBase + struct AtomicIncrementDecrement { - static inline Type exchange (volatile Type* value, Type other) noexcept - { - return castFrom (juce_InterlockedExchange64 (reinterpret_cast (value), castTo (other))); - } - - static inline Type add (volatile Type* value, Type other) noexcept - { - return castFrom (juce_InterlockedExchangeAdd64 (reinterpret_cast (value), castTo (other)) + castTo (other)); - } - - static inline Type inc (volatile Type* value) noexcept - { - return castFrom (juce_InterlockedIncrement64 (reinterpret_cast (value))); - } - - static inline Type dec (volatile Type* value) noexcept - { - return castFrom (juce_InterlockedDecrement64 (reinterpret_cast (value))); - } - - static inline Type cmp (volatile Type* value, Type other, Type comparand) noexcept - { - return castFrom (juce_InterlockedCompareExchange64 (reinterpret_cast (value), castTo (other), castTo (comparand))); - } - - static inline Type castFrom (__int64 value) { union { __int64 in; Type out; } u; u.in = value; return u.out; } - static inline __int64 castTo (Type value) { union { Type in; __int64 out; } u; u.in = value; return u.out; } + static inline Type* inc (Atomic& a) noexcept { return a.operator+= (1); } + static inline Type* dec (Atomic& a) noexcept { return a.operator-= (1); } }; + //============================================================================== template - struct WindowsInterlockedHelpers : WindowsInterlockedHelpersBase {}; -#endif - - -#if JUCE_MSVC - #pragma warning (push) - #pragma warning (disable: 4311) // (truncation warning) -#endif - -//============================================================================== -template -inline Type Atomic::get() const noexcept -{ - #if JUCE_ATOMICS_MAC_LEGACY - return sizeof (Type) == 4 ? castFrom32Bit ((int32) OSAtomicAdd32Barrier ((int32_t) 0, (volatile int32_t*) &value)) - : castFrom64Bit ((int64) OSAtomicAdd64Barrier ((int64_t) 0, (volatile int64_t*) &value)); - #elif JUCE_ATOMICS_WINDOWS - return WindowsInterlockedHelpers::add (const_cast (&value), (Type) 0); - #elif JUCE_ATOMICS_GCC - return sizeof (Type) == 4 ? castFrom32Bit ((int32) __sync_add_and_fetch ((volatile int32*) &value, 0)) - : castFrom64Bit ((int64) __sync_add_and_fetch ((volatile int64*) &value, 0)); - #endif -} - -template -inline Type Atomic::exchange (const Type newValue) noexcept -{ - #if JUCE_ATOMICS_MAC_LEGACY || JUCE_ATOMICS_GCC - Type currentVal = value; - while (! compareAndSetBool (newValue, currentVal)) { currentVal = value; } - return currentVal; - #elif JUCE_ATOMICS_WINDOWS - return WindowsInterlockedHelpers::exchange (&value, newValue); - #endif -} - -template -inline Type Atomic::operator+= (const Type amountToAdd) noexcept -{ - #if JUCE_ATOMICS_MAC_LEGACY - return sizeof (Type) == 4 ? (Type) OSAtomicAdd32Barrier ((int32_t) castTo32Bit (amountToAdd), (volatile int32_t*) &value) - : (Type) OSAtomicAdd64Barrier ((int64_t) amountToAdd, (volatile int64_t*) &value); - #elif JUCE_ATOMICS_WINDOWS - return WindowsInterlockedHelpers::add (&value, amountToAdd); - #elif JUCE_ATOMICS_GCC - return (Type) __sync_add_and_fetch (&value, amountToAdd); - #endif -} - -template -inline Type Atomic::operator-= (const Type amountToSubtract) noexcept -{ - return operator+= (negateValue (amountToSubtract)); -} - -template -inline Type Atomic::operator++() noexcept -{ - #if JUCE_ATOMICS_MAC_LEGACY - return sizeof (Type) == 4 ? (Type) OSAtomicIncrement32Barrier ((volatile int32_t*) &value) - : (Type) OSAtomicIncrement64Barrier ((volatile int64_t*) &value); - #elif JUCE_ATOMICS_WINDOWS - return WindowsInterlockedHelpers::inc (&value); - #elif JUCE_ATOMICS_GCC - return sizeof (Type) == 4 ? (Type) __sync_add_and_fetch (&value, (Type) 1) - : (Type) __sync_add_and_fetch ((int64_t*) &value, 1); - #endif -} - -template -inline Type Atomic::operator--() noexcept -{ - #if JUCE_ATOMICS_MAC_LEGACY - return sizeof (Type) == 4 ? (Type) OSAtomicDecrement32Barrier ((volatile int32_t*) &value) - : (Type) OSAtomicDecrement64Barrier ((volatile int64_t*) &value); - #elif JUCE_ATOMICS_WINDOWS - return WindowsInterlockedHelpers::dec (&value); - #elif JUCE_ATOMICS_GCC - return sizeof (Type) == 4 ? (Type) __sync_add_and_fetch (&value, (Type) -1) - : (Type) __sync_add_and_fetch ((int64_t*) &value, -1); - #endif -} - -template -inline bool Atomic::compareAndSetBool (const Type newValue, const Type valueToCompare) noexcept -{ - #if JUCE_ATOMICS_MAC_LEGACY - return sizeof (Type) == 4 ? OSAtomicCompareAndSwap32Barrier ((int32_t) castTo32Bit (valueToCompare), (int32_t) castTo32Bit (newValue), (volatile int32_t*) &value) - : OSAtomicCompareAndSwap64Barrier ((int64_t) castTo64Bit (valueToCompare), (int64_t) castTo64Bit (newValue), (volatile int64_t*) &value); - #elif JUCE_ATOMICS_WINDOWS - return compareAndSetValue (newValue, valueToCompare) == valueToCompare; - #elif JUCE_ATOMICS_GCC - return sizeof (Type) == 4 ? __sync_bool_compare_and_swap ((volatile int32*) &value, castTo32Bit (valueToCompare), castTo32Bit (newValue)) - : __sync_bool_compare_and_swap ((volatile int64*) &value, castTo64Bit (valueToCompare), castTo64Bit (newValue)); - #endif -} - -template -inline Type Atomic::compareAndSetValue (const Type newValue, const Type valueToCompare) noexcept -{ - #if JUCE_ATOMICS_MAC_LEGACY - for (;;) // Annoying workaround for only having a bool CAS operation.. - { - if (compareAndSetBool (newValue, valueToCompare)) - return valueToCompare; - - const Type result = value; - if (result != valueToCompare) - return result; - } - - #elif JUCE_ATOMICS_WINDOWS - return WindowsInterlockedHelpers::cmp (&value, newValue, valueToCompare); - #elif JUCE_ATOMICS_GCC - return sizeof (Type) == 4 ? castFrom32Bit ((int32) __sync_val_compare_and_swap ((volatile int32*) &value, castTo32Bit (valueToCompare), castTo32Bit (newValue))) - : castFrom64Bit ((int64) __sync_val_compare_and_swap ((volatile int64*) &value, castTo64Bit (valueToCompare), castTo64Bit (newValue))); - #endif -} - -template -inline void Atomic::memoryBarrier() noexcept -{ - #if JUCE_ATOMICS_MAC_LEGACY - OSMemoryBarrier(); - #elif JUCE_ATOMICS_GCC - __sync_synchronize(); - #elif JUCE_ATOMICS_WINDOWS - juce_MemoryBarrier(); - #endif -} - -#if JUCE_MSVC - #pragma warning (pop) + inline Type AtomicBase::get() const noexcept + { + #if JUCE_ATOMICS_MAC_LEGACY + return sizeof (Type) == 4 ? castFrom32Bit ((int32) OSAtomicAdd32Barrier ((int32_t) 0, (volatile int32_t*) &value)) + : castFrom64Bit ((int64) OSAtomicAdd64Barrier ((int64_t) 0, (volatile int64_t*) &value)); + #elif JUCE_ATOMICS_GCC + return sizeof (Type) == 4 ? castFrom32Bit ((int32) __sync_add_and_fetch ((volatile int32*) &value, 0)) + : castFrom64Bit ((int64) __sync_add_and_fetch ((volatile int64*) &value, 0)); + #endif + } + + template + inline Type AtomicBase::exchange (const Type newValue) noexcept + { + #if JUCE_ATOMICS_MAC_LEGACY || JUCE_ATOMICS_GCC + Type currentVal = value; + while (! compareAndSetBool (newValue, currentVal)) { currentVal = value; } + return currentVal; + #endif + } + + template + inline Type Atomic::operator+= (const DiffType amountToAdd) noexcept + { + Type amount = (Type() + amountToAdd); + + #if JUCE_ATOMICS_MAC_LEGACY + return sizeof (Type) == 4 ? (Type) OSAtomicAdd32Barrier ((int32_t) castTo32Bit (amount), (volatile int32_t*) &AtomicBase::value) + : (Type) OSAtomicAdd64Barrier ((int64_t) amount, (volatile int64_t*) &AtomicBase::value); + #elif JUCE_ATOMICS_GCC + return (Type) __sync_add_and_fetch (& (AtomicBase::value), amount); + #endif + } + + template + inline Type Atomic::operator-= (const DiffType amountToSubtract) noexcept + { + return operator+= (AtomicBase::negateValue (amountToSubtract)); + } + + template + inline Type Atomic::operator++() noexcept { return AtomicIncrementDecrement::inc (*this); } + + template + inline Type Atomic::operator--() noexcept { return AtomicIncrementDecrement::dec (*this); } + + template + inline bool AtomicBase::compareAndSetBool (const Type newValue, const Type valueToCompare) noexcept + { + #if JUCE_ATOMICS_MAC_LEGACY + return sizeof (Type) == 4 ? OSAtomicCompareAndSwap32Barrier ((int32_t) castTo32Bit (valueToCompare), (int32_t) castTo32Bit (newValue), (volatile int32_t*) &value) + : OSAtomicCompareAndSwap64Barrier ((int64_t) castTo64Bit (valueToCompare), (int64_t) castTo64Bit (newValue), (volatile int64_t*) &value); + #elif JUCE_ATOMICS_GCC + return sizeof (Type) == 4 ? __sync_bool_compare_and_swap ((volatile int32*) &value, castTo32Bit (valueToCompare), castTo32Bit (newValue)) + : __sync_bool_compare_and_swap ((volatile int64*) &value, castTo64Bit (valueToCompare), castTo64Bit (newValue)); + #endif + } + + template + inline Type AtomicBase::compareAndSetValue (const Type newValue, const Type valueToCompare) noexcept + { + #if JUCE_ATOMICS_MAC_LEGACY + for (;;) // Annoying workaround for only having a bool CAS operation.. + { + if (compareAndSetBool (newValue, valueToCompare)) + return valueToCompare; + + const Type result = value; + if (result != valueToCompare) + return result; + } + #elif JUCE_ATOMICS_GCC + return sizeof (Type) == 4 ? castFrom32Bit ((int32) __sync_val_compare_and_swap ((volatile int32*) &value, castTo32Bit (valueToCompare), castTo32Bit (newValue))) + : castFrom64Bit ((int64) __sync_val_compare_and_swap ((volatile int64*) &value, castTo64Bit (valueToCompare), castTo64Bit (newValue))); + #endif + } + + template + inline void AtomicBase::memoryBarrier() noexcept + { + #if JUCE_ATOMICS_MAC_LEGACY + OSMemoryBarrier(); + #elif JUCE_ATOMICS_GCC + __sync_synchronize(); + #endif + } + + #endif + #endif diff --git a/modules/juce_core/memory/juce_Memory.h b/modules/juce_core/memory/juce_Memory.h index 90cd3e9a7c..ab9d833082 100644 --- a/modules/juce_core/memory/juce_Memory.h +++ b/modules/juce_core/memory/juce_Memory.h @@ -45,6 +45,14 @@ inline void deleteAndZero (Type& pointer) { delete poi template inline Type* addBytesToPointer (Type* basePointer, IntegerType bytes) noexcept { return (Type*) (((char*) basePointer) + bytes); } +/** A handy function to round up a pointer to the nearest multiple of a given number of bytes. + alignmentBytes must be a power of two. */ +template +inline Type* snapPointerToAlignment (Type* basePointer, IntegerType alignmentBytes) noexcept +{ + return (Type*) ((((size_t) basePointer) + (alignmentBytes - 1)) & ~(alignmentBytes - 1)); +} + /** A handy function which returns the difference between any two pointers, in bytes. The address of the second pointer is subtracted from the first, and the difference in bytes is returned. */ diff --git a/modules/juce_core/memory/juce_SharedResourcePointer.h b/modules/juce_core/memory/juce_SharedResourcePointer.h index ee75cf661c..181f93fc6f 100644 --- a/modules/juce_core/memory/juce_SharedResourcePointer.h +++ b/modules/juce_core/memory/juce_SharedResourcePointer.h @@ -126,7 +126,7 @@ public: int getReferenceCount() const noexcept { return getSharedObjectHolder().refCount; } private: - struct SharedObjectHolder : public ReferenceCountedObject + struct SharedObjectHolder { SpinLock lock; ScopedPointer sharedInstance; @@ -154,7 +154,7 @@ private: // There's no need to assign to a SharedResourcePointer because every // instance of the class is exactly the same! - SharedResourcePointer& operator= (const SharedResourcePointer&) JUCE_DELETED_FUNCTION; + SharedResourcePointer& operator= (const SharedResourcePointer&) = delete; JUCE_LEAK_DETECTOR (SharedResourcePointer) }; diff --git a/modules/juce_core/misc/juce_RuntimePermissions.h b/modules/juce_core/misc/juce_RuntimePermissions.h index 06ebb415a4..bb170eea33 100644 --- a/modules/juce_core/misc/juce_RuntimePermissions.h +++ b/modules/juce_core/misc/juce_RuntimePermissions.h @@ -75,6 +75,12 @@ public: otherwise no devices will be found. */ bluetoothMidi = 2, + + /** Permission to read from external storage such as SD cards */ + readExternalStorage = 3, + + /** Permission to write to external storage such as SD cards */ + writeExternalStorage = 4 }; //============================================================================== diff --git a/modules/juce_core/misc/juce_StdFunctionCompat.cpp b/modules/juce_core/misc/juce_StdFunctionCompat.cpp index 035aeeeeed..cf548ef609 100644 --- a/modules/juce_core/misc/juce_StdFunctionCompat.cpp +++ b/modules/juce_core/misc/juce_StdFunctionCompat.cpp @@ -75,7 +75,7 @@ namespace FunctionTestsHelpers class FunctionTests : public UnitTest { public: - FunctionTests() : UnitTest ("Function") {} + FunctionTests() : UnitTest ("Function", "Function") {} void runTest() override { @@ -225,8 +225,8 @@ public: if (f1) expect (false); - std::function f2 ([]() { return 11; }); - f2 = nullptr; + std::function f2 ([]() { return 11; }); + f2 = nullptr; if (f2) expect (false); } diff --git a/modules/juce_core/misc/juce_StdFunctionCompat.h b/modules/juce_core/misc/juce_StdFunctionCompat.h index 7aadfdac55..f1b262b760 100644 --- a/modules/juce_core/misc/juce_StdFunctionCompat.h +++ b/modules/juce_core/misc/juce_StdFunctionCompat.h @@ -124,7 +124,7 @@ namespace std template struct FunctorHolderBase { - virtual ~FunctorHolderBase() {}; + virtual ~FunctorHolderBase() {} virtual int getSize() const noexcept = 0; virtual void copy (void*) const = 0; virtual ReturnType operator()(Args...) = 0; diff --git a/modules/juce_core/native/java/JuceAppActivity.java b/modules/juce_core/native/java/JuceAppActivity.java index d51f96838b..aad23e8c91 100644 --- a/modules/juce_core/native/java/JuceAppActivity.java +++ b/modules/juce_core/native/java/JuceAppActivity.java @@ -58,6 +58,16 @@ import android.media.AudioManager; import android.media.MediaScannerConnection; import android.media.MediaScannerConnection.MediaScannerConnectionClient; import android.Manifest; +import java.util.concurrent.CancellationException; +import java.util.concurrent.Future; +import java.util.concurrent.Executors; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.Callable; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.locks.ReentrantLock; +import java.util.concurrent.atomic.*; $$JuceAndroidMidiImports$$ // If you get an error here, you need to re-save your project with the Projucer! @@ -97,13 +107,18 @@ public class JuceAppActivity extends Activity // these have to match the values of enum PermissionID in C++ class RuntimePermissions: private static final int JUCE_PERMISSIONS_RECORD_AUDIO = 1; private static final int JUCE_PERMISSIONS_BLUETOOTH_MIDI = 2; + private static final int JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE = 3; + private static final int JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 4; private static String getAndroidPermissionName (int permissionID) { switch (permissionID) { - case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO; - case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION; + case JUCE_PERMISSIONS_RECORD_AUDIO: return Manifest.permission.RECORD_AUDIO; + case JUCE_PERMISSIONS_BLUETOOTH_MIDI: return Manifest.permission.ACCESS_COARSE_LOCATION; + // use string value as this is not defined in SDKs < 16 + case JUCE_PERMISSIONS_READ_EXTERNAL_STORAGE: return "android.permission.READ_EXTERNAL_STORAGE"; + case JUCE_PERMISSIONS_WRITE_EXTERNAL_STORAGE: return Manifest.permission.WRITE_EXTERNAL_STORAGE; } // unknown permission ID! @@ -616,6 +631,7 @@ public class JuceAppActivity extends Activity //============================================================================== private native void handleKeyDown (long host, int keycode, int textchar); private native void handleKeyUp (long host, int keycode, int textchar); + private native void handleBackButton (long host); public void showKeyboard (String type) { @@ -643,8 +659,14 @@ public class JuceAppActivity extends Activity case KeyEvent.KEYCODE_VOLUME_UP: case KeyEvent.KEYCODE_VOLUME_DOWN: return super.onKeyDown (keyCode, event); + case KeyEvent.KEYCODE_BACK: + { + handleBackButton (host); + return true; + } - default: break; + default: + break; } handleKeyDown (host, keyCode, event.getUnicodeChar()); @@ -864,43 +886,136 @@ public class JuceAppActivity extends Activity public static class HTTPStream { public HTTPStream (HttpURLConnection connection_, - int[] statusCode, StringBuffer responseHeaders) throws IOException + int[] statusCode_, + StringBuffer responseHeaders_) { connection = connection_; + statusCode = statusCode_; + responseHeaders = responseHeaders_; + } + + private final InputStream getCancellableStream (final boolean isInput) throws ExecutionException + { + synchronized (createFutureLock) + { + if (hasBeenCancelled.get()) + return null; + + streamFuture = executor.submit (new Callable() + { + @Override + public BufferedInputStream call() throws IOException + { + return new BufferedInputStream (isInput ? connection.getInputStream() + : connection.getErrorStream()); + } + }); + } try { - inputStream = new BufferedInputStream (connection.getInputStream()); + if (connection.getConnectTimeout() > 0) + return streamFuture.get (connection.getConnectTimeout(), TimeUnit.MILLISECONDS); + else + return streamFuture.get(); + } + catch (InterruptedException e) + { + return null; + } + catch (TimeoutException e) + { + return null; + } + catch (CancellationException e) + { + return null; + } + } + + public final boolean connect() + { + try + { + try + { + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + inputStream = getCancellableStream (true); + } + } + catch (ExecutionException e) + { + if (connection.getResponseCode() < 400) + { + statusCode[0] = connection.getResponseCode(); + connection.disconnect(); + return false; + } + } + finally + { + statusCode[0] = connection.getResponseCode(); + } + + synchronized (createStreamLock) + { + if (hasBeenCancelled.get()) + return false; + + try + { + if (statusCode[0] >= 400) + inputStream = getCancellableStream (false); + else + inputStream = getCancellableStream (true); + } + 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) { - if (connection.getResponseCode() < 400) - throw e; + return false; } - finally - { - statusCode[0] = connection.getResponseCode(); - } - - if (statusCode[0] >= 400) - inputStream = connection.getErrorStream(); - else - inputStream = connection.getInputStream(); - - 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"); } public final void release() { + hasBeenCancelled.set (true); + try { - inputStream.close(); + if (! createStreamLock.tryLock()) + { + synchronized (createFutureLock) + { + if (streamFuture != null) + streamFuture.cancel (true); + } + + createStreamLock.lock(); + } + + if (inputStream != null) + inputStream.close(); } catch (IOException e) {} + finally + { + createStreamLock.unlock(); + } connection.disconnect(); } @@ -911,7 +1026,11 @@ public class JuceAppActivity extends Activity try { - num = inputStream.read (buffer, 0, numBytes); + synchronized (createStreamLock) + { + if (inputStream != null) + num = inputStream.read (buffer, 0, numBytes); + } } catch (IOException e) {} @@ -928,8 +1047,16 @@ public class JuceAppActivity extends Activity public final boolean setPosition (long newPos) { return false; } private HttpURLConnection connection; + private int[] statusCode; + private StringBuffer responseHeaders; private InputStream inputStream; private long position; + private final ReentrantLock createStreamLock = new ReentrantLock(); + private final Object createFutureLock = new Object(); + private AtomicBoolean hasBeenCancelled = new AtomicBoolean(); + + private final ExecutorService executor = Executors.newCachedThreadPool (Executors.defaultThreadFactory()); + Future streamFuture; } public static final HTTPStream createHTTPStream (String address, boolean isPost, byte[] postData, diff --git a/modules/juce_core/native/juce_android_JNIHelpers.h b/modules/juce_core/native/juce_android_JNIHelpers.h index d2cfefa227..a7742dcd7d 100644 --- a/modules/juce_core/native/juce_android_JNIHelpers.h +++ b/modules/juce_core/native/juce_android_JNIHelpers.h @@ -33,6 +33,9 @@ extern JNIEnv* getEnv() noexcept; // on a java thread which you did not create yourself. extern void setEnv (JNIEnv* env) noexcept; +/* @internal */ +extern JNIEnv* attachAndroidJNI() noexcept; + //============================================================================== class GlobalRef { @@ -219,7 +222,7 @@ private: JNI_CLASS_MEMBERS (CREATE_JNI_METHOD, CREATE_JNI_STATICMETHOD, CREATE_JNI_FIELD, CREATE_JNI_STATICFIELD); \ } \ \ - JNI_CLASS_MEMBERS (DECLARE_JNI_METHOD, DECLARE_JNI_METHOD, DECLARE_JNI_FIELD, DECLARE_JNI_FIELD); \ + JNI_CLASS_MEMBERS (DECLARE_JNI_METHOD, DECLARE_JNI_METHOD, DECLARE_JNI_FIELD, DECLARE_JNI_FIELD) \ }; \ static CppClassName ## _Class CppClassName; diff --git a/modules/juce_core/native/juce_android_Network.cpp b/modules/juce_core/native/juce_android_Network.cpp index 6781086ef8..76b3780a44 100644 --- a/modules/juce_core/native/juce_android_Network.cpp +++ b/modules/juce_core/native/juce_android_Network.cpp @@ -30,6 +30,7 @@ DECLARE_JNI_CLASS (StringBuffer, "java/lang/StringBuffer"); //============================================================================== #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \ + METHOD (connect, "connect", "()Z") \ METHOD (release, "release", "()V") \ METHOD (read, "read", "([BI)I") \ METHOD (getPosition, "getPosition", "()J") \ @@ -57,20 +58,13 @@ JUCE_API bool JUCE_CALLTYPE Process::openEmailWithAttachments (const String& /*t return false; } -/* Pimpl (String address, bool isPost, const MemoryBlock& postData, - URL::OpenStreamProgressCallback* progressCallback, void* progressCallbackContext, - const String& headers, int timeOutMs, StringPairArray* responseHeaders, - const int numRedirectsToFollow, const String& httpRequest) - : statusCode (0) - -*/ //============================================================================== class WebInputStream::Pimpl { public: - Pimpl (WebInputStream& pimplOwner, const URL& urlToCopy, bool shouldBePost) - : statusCode (0), owner (pimplOwner), url (urlToCopy), isPost (shouldBePost), - numRedirectsToFollow (5), timeOutMs (0), httpRequest (isPost ? "POST" : "GET") + Pimpl (WebInputStream&, const URL& urlToCopy, bool shouldBePost) + : url (urlToCopy), isPost (shouldBePost), + httpRequest (isPost ? "POST" : "GET") {} ~Pimpl() @@ -80,11 +74,15 @@ public: void cancel() { + const ScopedLock lock (createStreamLock); + if (stream != 0) { stream.callVoidMethod (HTTPStream.release); stream.clear(); } + + hasBeenCancelled = true; } bool connect (WebInputStream::Listener* /*listener*/) @@ -117,17 +115,25 @@ public: jintArray statusCodeArray = env->NewIntArray (1); jassert (statusCodeArray != 0); - stream = GlobalRef (env->CallStaticObjectMethod (JuceAppActivity, - JuceAppActivity.createHTTPStream, - javaString (address).get(), - (jboolean) isPost, - postDataArray, - javaString (headers).get(), - (jint) timeOutMs, - statusCodeArray, - responseHeaderBuffer.get(), - (jint) numRedirectsToFollow, - javaString (httpRequest).get())); + { + const ScopedLock lock (createStreamLock); + + if (! hasBeenCancelled) + stream = GlobalRef (env->CallStaticObjectMethod (JuceAppActivity, + JuceAppActivity.createHTTPStream, + javaString (address).get(), + (jboolean) isPost, + postDataArray, + javaString (headers).get(), + (jint) timeOutMs, + statusCodeArray, + responseHeaderBuffer.get(), + (jint) numRedirectsToFollow, + javaString (httpRequest).get())); + } + + if (stream != 0) + stream.callBooleanMethod (HTTPStream.connect); jint* const statusCodeElements = env->GetIntArrayElements (statusCodeArray, 0); statusCode = statusCodeElements[0]; @@ -212,15 +218,16 @@ public: } //============================================================================== - int statusCode; + int statusCode = 0; private: - WebInputStream& owner; const URL url; bool isPost; - int numRedirectsToFollow, timeOutMs; + int numRedirectsToFollow = 5, timeOutMs = 0; String httpRequest, headers; StringPairArray responseHeaders; + CriticalSection createStreamLock; + bool hasBeenCancelled = false; GlobalRef stream; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl) diff --git a/modules/juce_core/native/juce_android_SystemStats.cpp b/modules/juce_core/native/juce_android_SystemStats.cpp index 073e1a2eaa..8a8e772913 100644 --- a/modules/juce_core/native/juce_android_SystemStats.cpp +++ b/modules/juce_core/native/juce_android_SystemStats.cpp @@ -116,16 +116,7 @@ public: return *instance; } - static JNIEnv* getEnv() - { - JNIEnv* env = reinterpret_cast (pthread_getspecific (getInstance().threadKey)); - - // You are trying to use a JUCE function on a thread that was not created by JUCE. - // You need to first call setEnv on this thread before using JUCE - jassert (env != nullptr); - - return env; - } + static JNIEnv* getEnv() { return reinterpret_cast (pthread_getspecific (getInstance().threadKey)); } static void setEnv (JNIEnv* env) { @@ -167,7 +158,30 @@ private: JniEnvThreadHolder* JniEnvThreadHolder::instance = nullptr; //============================================================================== -JNIEnv* getEnv() noexcept { return JniEnvThreadHolder::getEnv(); } +JNIEnv* attachAndroidJNI() noexcept +{ + auto* env = JniEnvThreadHolder::getEnv(); + + if (env == nullptr) + { + androidJNIJavaVM->AttachCurrentThread (&env, nullptr); + setEnv (env); + } + + return env; +} + +JNIEnv* getEnv() noexcept +{ + auto* env = JniEnvThreadHolder::getEnv(); + + // You are trying to use a JUCE function on a thread that was not created by JUCE. + // You need to first call setEnv on this thread before using JUCE + jassert (env != nullptr); + + return env; +} + void setEnv (JNIEnv* env) noexcept { JniEnvThreadHolder::setEnv (env); } extern "C" jint JNI_OnLoad (JavaVM* vm, void*) diff --git a/modules/juce_core/native/juce_curl_Network.cpp b/modules/juce_core/native/juce_curl_Network.cpp index 03a164dac9..50c192e1c2 100644 --- a/modules/juce_core/native/juce_curl_Network.cpp +++ b/modules/juce_core/native/juce_curl_Network.cpp @@ -24,16 +24,21 @@ class WebInputStream::Pimpl { public: Pimpl (WebInputStream& ownerStream, const URL& urlToCopy, bool shouldUsePost) - : owner (ownerStream), url (urlToCopy), - multi (nullptr), curl (nullptr), headerList (nullptr), lastError (CURLE_OK), - timeOutMs (0), maxRedirects (5), isPost (shouldUsePost), - httpRequest (isPost ? "POST" : "GET"), - contentLength (-1), streamPos (0), statusCode (-1), - finished (false), skipBytes (0), - postBuffer (nullptr), postPosition (0), listener (nullptr) + : owner (ownerStream), url (urlToCopy), isPost (shouldUsePost), + httpRequest (isPost ? "POST" : "GET") { - if (! init()) - cleanup(); + multi = curl_multi_init(); + + if (multi != nullptr) + { + curl = curl_easy_init(); + + if (curl != nullptr) + if (curl_multi_add_handle (multi, curl) == CURLM_OK) + return; + } + + cleanup(); } ~Pimpl() @@ -89,25 +94,10 @@ public: int getStatusCode() const { return statusCode; } //============================================================================== - bool init() - { - multi = curl_multi_init(); - - if (multi != nullptr) - { - curl = curl_easy_init(); - - if (curl != nullptr) - if (curl_multi_add_handle (multi, curl) == CURLM_OK) - return true; - } - - cleanup(); - return false; - } - void cleanup() { + const ScopedLock lock (cleanupLock); + if (curl != nullptr) { curl_multi_remove_handle (multi, curl); @@ -201,38 +191,45 @@ public: bool connect (WebInputStream::Listener* webInputListener) { - if (! setOptions()) { - cleanup(); - return false; + const ScopedLock lock (cleanupLock); + + if (curl == nullptr) + return false; + + if (! setOptions()) + { + cleanup(); + return false; + } + + if (requestHeaders.isNotEmpty()) + { + const StringArray headerLines = StringArray::fromLines (requestHeaders); + + // fromLines will always return at least one line if the string is not empty + jassert (headerLines.size() > 0); + headerList = curl_slist_append (headerList, headerLines [0].toRawUTF8()); + + for (int i = 1; (i < headerLines.size() && headerList != nullptr); ++i) + headerList = curl_slist_append (headerList, headerLines [i].toRawUTF8()); + + if (headerList == nullptr) + { + cleanup(); + return false; + } + + if (curl_easy_setopt (curl, CURLOPT_HTTPHEADER, headerList) != CURLE_OK) + { + cleanup(); + return false; + } + } } listener = webInputListener; - if (requestHeaders.isNotEmpty()) - { - const StringArray headerLines = StringArray::fromLines (requestHeaders); - - // fromLines will always return at least one line if the string is not empty - jassert (headerLines.size() > 0); - headerList = curl_slist_append (headerList, headerLines [0].toRawUTF8()); - - for (int i = 1; (i < headerLines.size() && headerList != nullptr); ++i) - headerList = curl_slist_append (headerList, headerLines [i].toRawUTF8()); - - if (headerList == nullptr) - { - cleanup(); - return false; - } - - if (curl_easy_setopt (curl, CURLOPT_HTTPHEADER, headerList) != CURLE_OK) - { - cleanup(); - return false; - } - } - if (isPost) postBuffer = &headersAndPostData; @@ -240,8 +237,15 @@ public: // step until either: 1) there is an error 2) the transaction is complete // or 3) data is in the in buffer - while ((! finished) && curlBuffer.getSize() == 0 && curl != nullptr) + while ((! finished) && curlBuffer.getSize() == 0) { + { + const ScopedLock lock (cleanupLock); + + if (curl == nullptr) + return false; + } + singleStep(); // call callbacks if this is a post request @@ -258,20 +262,29 @@ public: } } - long responseCode; - if (curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE, &responseCode) == CURLE_OK) - statusCode = static_cast (responseCode); + { + const ScopedLock lock (cleanupLock); - // get content length size - double curlLength; - if (curl_easy_getinfo (curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &curlLength) == CURLE_OK) - contentLength = static_cast (curlLength); + if (curl == nullptr) + return false; + + long responseCode; + if (curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE, &responseCode) == CURLE_OK) + statusCode = static_cast (responseCode); + + // get content length size + double curlLength; + if (curl_easy_getinfo (curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &curlLength) == CURLE_OK) + contentLength = static_cast (curlLength); + } return true; } void finish() { + const ScopedLock lock (cleanupLock); + if (curl == nullptr) return; @@ -299,15 +312,22 @@ public: //============================================================================== void singleStep() { - if (curl == nullptr || lastError != CURLE_OK) + if (lastError != CURLE_OK) return; fd_set fdread, fdwrite, fdexcep; int maxfd = -1; long curl_timeo; - if ((lastError = (int) curl_multi_timeout (multi, &curl_timeo)) != CURLM_OK) - return; + { + const ScopedLock lock (cleanupLock); + + if (multi == nullptr) + return; + + if ((lastError = (int) curl_multi_timeout (multi, &curl_timeo)) != CURLM_OK) + return; + } // why 980? see http://curl.haxx.se/libcurl/c/curl_multi_timeout.html if (curl_timeo < 0) @@ -321,9 +341,15 @@ public: FD_ZERO (&fdwrite); FD_ZERO (&fdexcep); + { + const ScopedLock lock (cleanupLock); - if ((lastError = (int) curl_multi_fdset (multi, &fdread, &fdwrite, &fdexcep, &maxfd)) != CURLM_OK) - return; + if (multi == nullptr) + return; + + if ((lastError = (int) curl_multi_fdset (multi, &fdread, &fdwrite, &fdexcep, &maxfd)) != CURLM_OK) + return; + } if (maxfd != -1) { @@ -342,8 +368,12 @@ public: int still_running = 0; int curlRet; - while ((curlRet = (int) curl_multi_perform (multi, &still_running)) == CURLM_CALL_MULTI_PERFORM) - {} + { + const ScopedLock lock (cleanupLock); + + while ((curlRet = (int) curl_multi_perform (multi, &still_running)) == CURLM_CALL_MULTI_PERFORM) + {} + } if ((lastError = curlRet) != CURLM_OK) return; @@ -368,8 +398,12 @@ public: if (bufferBytes == 0) { // do not call curl again if we are finished - if (finished || curl == nullptr) - return static_cast (pos); + { + const ScopedLock lock (cleanupLock); + + if (finished || curl == nullptr) + return static_cast (pos); + } skipBytes = skip ? len : 0; singleStep(); @@ -476,38 +510,40 @@ public: //============================================================================== // curl stuff - CURLM* multi; - CURL* curl; - struct curl_slist* headerList; - int lastError; + CURLM* multi = nullptr; + CURL* curl = nullptr; + struct curl_slist* headerList = nullptr; + int lastError = CURLE_OK; //============================================================================== // Options - int timeOutMs; - int maxRedirects; + int timeOutMs = 0; + int maxRedirects = 5; const bool isPost; String httpRequest; //============================================================================== // internal buffers and buffer positions - int64 contentLength, streamPos; + int64 contentLength = -1, streamPos = 0; MemoryBlock curlBuffer; MemoryBlock headersAndPostData; String responseHeaders, requestHeaders; - int statusCode; + int statusCode = -1; //============================================================================== - bool finished; - size_t skipBytes; + bool finished = false; + size_t skipBytes = 0; //============================================================================== // Http POST variables - const MemoryBlock* postBuffer; - size_t postPosition; + const MemoryBlock* postBuffer = nullptr; + size_t postPosition = 0; //============================================================================== - WebInputStream::Listener* listener; + WebInputStream::Listener* listener = nullptr; + //============================================================================== + CriticalSection cleanupLock; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl) }; diff --git a/modules/juce_core/native/juce_linux_Network.cpp b/modules/juce_core/native/juce_linux_Network.cpp index 7fc3d35552..c8154f96b2 100644 --- a/modules/juce_core/native/juce_linux_Network.cpp +++ b/modules/juce_core/native/juce_linux_Network.cpp @@ -47,7 +47,7 @@ void MACAddress::findAllAddresses (Array& result) freeifaddrs (addrs); } - close (s); + ::close (s); } } @@ -66,19 +66,9 @@ bool JUCE_CALLTYPE Process::openEmailWithAttachments (const String& /* targetEma class WebInputStream::Pimpl { public: - /* WebInputStream (const String& address_, bool isPost_, const MemoryBlock& postData_, - URL::OpenStreamProgressCallback* progressCallback, void* progressCallbackContext, - const String& headers_, int timeOutMs_, StringPairArray* responseHeaders, - const int maxRedirects, const String& httpRequestCmd_) - : statusCode (0), socketHandle (-1), levelsOfRedirection (0), - address (address_), headers (headers_), postData (postData_), contentLength (-1), position (0), - finished (false), isPost (isPost_), timeOutMs (timeOutMs_), numRedirectsToFollow (maxRedirects), - httpRequestCmd (httpRequestCmd_), chunkEnd (0), isChunked (false), readingChunk (false)*/ Pimpl (WebInputStream& pimplOwner, const URL& urlToCopy, const bool shouldUsePost) - : statusCode (0), owner (pimplOwner), url (urlToCopy), socketHandle (-1), levelsOfRedirection (0), - contentLength (-1), position (0), finished (false), isPost (shouldUsePost), timeOutMs (0), - numRedirectsToFollow (5), httpRequestCmd (shouldUsePost ? "POST" : "GET"), chunkEnd (0), - isChunked (false), readingChunk (false) + : owner (pimplOwner), url (urlToCopy), + isPost (shouldUsePost), httpRequestCmd (shouldUsePost ? "POST" : "GET") {} ~Pimpl() @@ -126,6 +116,13 @@ public: bool connect (WebInputStream::Listener* listener) { + { + const ScopedLock lock (createSocketLock); + + if (hasBeenCancelled) + return false; + } + address = url.toString (! isPost); statusCode = createConnection (listener, numRedirectsToFollow); @@ -134,13 +131,17 @@ public: void cancel() { + const ScopedLock lock (createSocketLock); + + hasBeenCancelled = true; + statusCode = -1; finished = true; closeSocket(); } - //==============================================================================w + //============================================================================== bool isError() const { return socketHandle < 0; } bool isExhausted() { return finished; } int64 getPosition() { return position; } @@ -246,30 +247,38 @@ public: } //============================================================================== - int statusCode; + int statusCode = 0; private: WebInputStream& owner; URL url; - int socketHandle, levelsOfRedirection; + int socketHandle = -1, levelsOfRedirection = 0; StringArray headerLines; String address, headers; MemoryBlock postData; - int64 contentLength, position; - bool finished; + int64 contentLength = -1, position = 0; + bool finished = false; const bool isPost; - int timeOutMs; - int numRedirectsToFollow; + int timeOutMs = 0; + int numRedirectsToFollow = 5; String httpRequestCmd; - int64 chunkEnd; - bool isChunked, readingChunk; + int64 chunkEnd = 0; + bool isChunked = false, readingChunk = false; + CriticalSection closeSocketLock, createSocketLock; + bool hasBeenCancelled = false; void closeSocket (bool resetLevelsOfRedirection = true) { + const ScopedLock lock (closeSocketLock); + if (socketHandle >= 0) - close (socketHandle); + { + ::shutdown (socketHandle, SHUT_RDWR); + ::close (socketHandle); + } socketHandle = -1; + if (resetLevelsOfRedirection) levelsOfRedirection = 0; } @@ -326,7 +335,12 @@ private: if (getaddrinfo (serverName.toUTF8(), String (port).toUTF8(), &hints, &result) != 0 || result == 0) return 0; - socketHandle = socket (result->ai_family, result->ai_socktype, 0); + { + const ScopedLock lock (createSocketLock); + + socketHandle = hasBeenCancelled ? -1 + : socket (result->ai_family, result->ai_socktype, 0); + } if (socketHandle == -1) { @@ -478,7 +492,7 @@ private: if (userHeaders.isNotEmpty()) header << "\r\n" << userHeaders; - header << "\r\n"; + header << "\r\n\r\n"; if (isPost) header << postData; diff --git a/modules/juce_core/native/juce_mac_Files.mm b/modules/juce_core/native/juce_mac_Files.mm index 994c11fba3..36df598804 100644 --- a/modules/juce_core/native/juce_mac_Files.mm +++ b/modules/juce_core/native/juce_mac_Files.mm @@ -78,9 +78,8 @@ namespace MacFileHelpers NSNumber* hidden = nil; NSError* err = nil; - return [[NSURL fileURLWithPath: juceStringToNS (path)] - getResourceValue: &hidden forKey: NSURLIsHiddenKey error: &err] - && [hidden boolValue]; + return [createNSURLFromFile (path) getResourceValue: &hidden forKey: NSURLIsHiddenKey error: &err] + && [hidden boolValue]; } #elif JUCE_IOS return File (path).getFileName().startsWithChar ('.'); @@ -212,7 +211,7 @@ File File::getSpecialLocation (const SpecialLocationType type) case invokedExecutableFile: if (juce_argv != nullptr && juce_argc > 0) - return File::getCurrentWorkingDirectory().getChildFile (CharPointer_UTF8 (juce_argv[0])); + return File::getCurrentWorkingDirectory().getChildFile (String (juce_argv[0])); // deliberate fall-through... case currentExecutableFile: @@ -298,7 +297,7 @@ bool File::moveToTrash() const #else JUCE_AUTORELEASEPOOL { - NSURL* url = [NSURL fileURLWithPath: juceStringToNS (getFullPathName())]; + NSURL* url = createNSURLFromFile (*this); [[NSWorkspace sharedWorkspace] recycleURLs: [NSArray arrayWithObject: url] completionHandler: nil]; diff --git a/modules/juce_core/native/juce_mac_Network.mm b/modules/juce_core/native/juce_mac_Network.mm index 81e6c445a3..5bfe1e0d21 100644 --- a/modules/juce_core/native/juce_mac_Network.mm +++ b/modules/juce_core/native/juce_mac_Network.mm @@ -146,12 +146,25 @@ public: void cancel() { + { + const ScopedLock lock (createTaskLock); + + hasBeenCancelled = true; + } + signalThreadShouldExit(); stopThread (10000); } bool start (WebInputStream& inputStream, WebInputStream::Listener* listener) { + { + const ScopedLock lock (createTaskLock); + + if (hasBeenCancelled) + return false; + } + startThread(); while (isThreadRunning() && ! initialised) @@ -282,7 +295,12 @@ public: delegate: delegate delegateQueue: [NSOperationQueue currentQueue]] retain]; - task = [session dataTaskWithRequest: request]; + { + const ScopedLock lock (createTaskLock); + + if (! hasBeenCancelled) + task = [session dataTaskWithRequest: request]; + } if (task == nil) return; @@ -310,6 +328,8 @@ public: const int numRedirectsToFollow; int numRedirects = 0; int64 latestTotalBytes = 0; + CriticalSection createTaskLock; + bool hasBeenCancelled = false; private: //============================================================================== @@ -483,7 +503,7 @@ struct BackgroundDownloadTask : public URL::DownloadTask { NSFileManager* fileManager = [[NSFileManager alloc] init]; error = ([fileManager moveItemAtURL: location - toURL: [NSURL fileURLWithPath:juceStringToNS (targetLocation.getFullPathName())] + toURL: createNSURLFromFile (targetLocation) error: nil] == NO); httpCode = 200; finished = true; @@ -660,6 +680,7 @@ public: ~URLConnectionState() { stop(); + [connection release]; [request release]; [headers release]; @@ -686,8 +707,13 @@ public: void stop() { { - const ScopedLock sl (dataLock); - [connection cancel]; + const ScopedLock dLock (dataLock); + const ScopedLock connectionLock (createConnectionLock); + + hasBeenCancelled = true; + + if (connection != nil) + [connection cancel]; } stopThread (10000); @@ -768,8 +794,7 @@ public: { DBG (nsStringToJuce ([error description])); ignoreUnused (error); nsUrlErrorCode = [error code]; - hasFailed = true; - initialised = true; + hasFailed = initialised = true; signalThreadShouldExit(); } @@ -787,15 +812,22 @@ public: void finishedLoading() { - hasFinished = true; - initialised = true; + hasFinished = initialised = true; signalThreadShouldExit(); } void run() override { - connection = [[NSURLConnection alloc] initWithRequest: request - delegate: delegate]; + { + const ScopedLock lock (createConnectionLock); + + if (hasBeenCancelled) + return; + + connection = [[NSURLConnection alloc] initWithRequest: request + delegate: delegate]; + } + while (! threadShouldExit()) { JUCE_AUTORELEASEPOOL @@ -818,12 +850,14 @@ public: const int numRedirectsToFollow; int numRedirects = 0; int latestTotalBytes = 0; + CriticalSection createConnectionLock; + bool hasBeenCancelled = false; private: //============================================================================== struct DelegateClass : public ObjCClass { - DelegateClass() : ObjCClass ("JUCEAppDelegate_") + DelegateClass() : ObjCClass ("JUCENetworkDelegate_") { addIvar ("state"); @@ -891,9 +925,8 @@ class WebInputStream::Pimpl { public: Pimpl (WebInputStream& pimplOwner, const URL& urlToUse, bool shouldBePost) - : statusCode (0), owner (pimplOwner), url (urlToUse), position (0), - finished (false), isPost (shouldBePost), timeOutMs (0), - numRedirectsToFollow (5), httpRequestCmd (shouldBePost ? "POST" : "GET") + : owner (pimplOwner), url (urlToUse), isPost (shouldBePost), + httpRequestCmd (shouldBePost ? "POST" : "GET") { } @@ -905,7 +938,15 @@ public: bool connect (WebInputStream::Listener* webInputListener, int numRetries = 0) { ignoreUnused (numRetries); - createConnection(); + + { + const ScopedLock lock (createConnectionLock); + + if (hasBeenCancelled) + return false; + + createConnection(); + } if (! connection->start (owner, webInputListener)) { @@ -938,6 +979,18 @@ public: return false; } + void cancel() + { + { + const ScopedLock lock (createConnectionLock); + + if (connection != nullptr) + connection->cancel(); + + hasBeenCancelled = true; + } + } + //============================================================================== // WebInputStream methods void withExtraHeaders (const String& extraHeaders) @@ -1004,13 +1057,7 @@ public: return true; } - void cancel() - { - if (connection != nullptr) - connection->cancel(); - } - - int statusCode; + int statusCode = 0; private: WebInputStream& owner; @@ -1018,13 +1065,15 @@ private: ScopedPointer connection; String headers; MemoryBlock postData; - int64 position; - bool finished; + int64 position = 0; + bool finished = false; const bool isPost; - int timeOutMs; - int numRedirectsToFollow; + int timeOutMs = 0; + int numRedirectsToFollow = 5; String httpRequestCmd; StringPairArray responseHeaders; + CriticalSection createConnectionLock; + bool hasBeenCancelled = false; void createConnection() { diff --git a/modules/juce_core/native/juce_osx_ObjCHelpers.h b/modules/juce_core/native/juce_osx_ObjCHelpers.h index c0ce2e4b8d..767bcf49de 100644 --- a/modules/juce_core/native/juce_osx_ObjCHelpers.h +++ b/modules/juce_core/native/juce_osx_ObjCHelpers.h @@ -49,6 +49,16 @@ namespace return [NSString string]; } + static inline NSURL* createNSURLFromFile (const String& f) + { + return [NSURL fileURLWithPath: juceStringToNS (f)]; + } + + static inline NSURL* createNSURLFromFile (const File& f) + { + return createNSURLFromFile (f.getFullPathName()); + } + #if JUCE_MAC template static NSRect makeNSRect (const RectangleType& r) noexcept @@ -205,8 +215,8 @@ public: ObjCBlock (C* _this, R (C::*fn)(P...)) : block (CreateObjCBlock (_this, fn)) {} ObjCBlock (BlockType b) : block ([b copy]) {} ObjCBlock& operator= (const BlockType& other) { if (block != nullptr) { [block release]; } block = [other copy]; return *this; } - bool operator== (const void* ptr) const { return (block == ptr); } - bool operator!= (const void* ptr) const { return (block != ptr); } + bool operator== (const void* ptr) const { return ((const void*) block == ptr); } + bool operator!= (const void* ptr) const { return ((const void*) block != ptr); } ~ObjCBlock() { if (block != nullptr) [block release]; } operator BlockType() { return block; } diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h index 6183f86bdd..ea007b1f06 100644 --- a/modules/juce_core/native/juce_posix_SharedCode.h +++ b/modules/juce_core/native/juce_posix_SharedCode.h @@ -925,8 +925,30 @@ extern "C" void* threadEntryProc (void* userData) return nullptr; } +#if JUCE_ANDROID && JUCE_MODULE_AVAILABLE_juce_audio_devices && (JUCE_USE_ANDROID_OPENSLES || (! defined(JUCE_USE_ANDROID_OPENSLES) && JUCE_ANDROID_API_VERSION > 8)) +#define JUCE_ANDROID_REALTIME_THREAD_AVAILABLE 1 +#endif + +#if JUCE_ANDROID_REALTIME_THREAD_AVAILABLE +extern pthread_t juce_createRealtimeAudioThread (void* (*entry) (void*), void* userPtr); +#endif + void Thread::launchThread() { + #if JUCE_ANDROID + if (isAndroidRealtimeThread) + { + #if JUCE_ANDROID_REALTIME_THREAD_AVAILABLE + threadHandle = (void*) juce_createRealtimeAudioThread (threadEntryProc, this); + threadId = (ThreadID) threadHandle; + + return; + #else + jassertfalse; + #endif + } + #endif + threadHandle = 0; pthread_t handle = 0; pthread_attr_t attr; diff --git a/modules/juce_core/native/juce_win32_ComSmartPtr.h b/modules/juce_core/native/juce_win32_ComSmartPtr.h index e0a77e8f3f..09bfd5b7b5 100644 --- a/modules/juce_core/native/juce_win32_ComSmartPtr.h +++ b/modules/juce_core/native/juce_win32_ComSmartPtr.h @@ -23,40 +23,56 @@ #pragma once #if JUCE_MINGW || (! (defined (_MSC_VER) || defined (__uuidof))) -#ifdef __uuidof - #undef __uuidof -#endif + #ifdef __uuidof + #undef __uuidof + #endif -template struct UUIDGetter { static CLSID get() { jassertfalse; return CLSID(); } }; -#define __uuidof(x) UUIDGetter::get() + template struct UUIDGetter { static CLSID get() { jassertfalse; return {}; } }; + #define __uuidof(x) UUIDGetter::get() template <> struct UUIDGetter<::IUnknown> { - static CLSID get() - { - GUID g = { 0, 0, 0, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } }; - return g; - } + static CLSID get() { return { 0, 0, 0, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } }; } }; + + #define JUCE_DECLARE_UUID_GETTER(name, uuid) \ + template<> struct UUIDGetter { static CLSID get() { return uuidFromString (uuid); } }; + + #define JUCE_COMCLASS(name, guid) \ + struct name; \ + JUCE_DECLARE_UUID_GETTER (name, guid) \ + struct name + +#else + #define JUCE_DECLARE_UUID_GETTER(name, uuid) + #define JUCE_COMCLASS(name, guid) struct __declspec (uuid (guid)) name #endif -inline GUID uuidFromString (const char* const s) noexcept +inline GUID uuidFromString (const char* s) noexcept { - unsigned long p0; - unsigned int p1, p2, p3, p4, p5, p6, p7, p8, p9, p10; + uint32 ints[4] = {}; - #ifndef _MSC_VER - sscanf - #else - sscanf_s - #endif - (s, "%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", - &p0, &p1, &p2, &p3, &p4, &p5, &p6, &p7, &p8, &p9, &p10); + for (uint32 digitIndex = 0; digitIndex < 32;) + { + auto c = *s++; + uint32 digit; - GUID g = { p0, (uint16) p1, (uint16) p2, { (uint8) p3, (uint8) p4, (uint8) p5, (uint8) p6, - (uint8) p7, (uint8) p8, (uint8) p9, (uint8) p10 }}; - return g; + if (c >= '0' && c <= '9') digit = c - '0'; + else if (c >= 'a' && c <= 'f') digit = c - 'a' + 10; + else if (c >= 'A' && c <= 'F') digit = c - 'A' + 10; + else if (c == '-') continue; + else break; + + ints[digitIndex / 8] |= (digit << 4 * (7 - (digitIndex & 7))); + ++digitIndex; + } + + return { ints[0], + (uint16) (ints[1] >> 16), + (uint16) ints[1], + { (uint8) (ints[2] >> 24), (uint8) (ints[2] >> 16), (uint8) (ints[2] >> 8), (uint8) ints[2], + (uint8) (ints[3] >> 24), (uint8) (ints[3] >> 16), (uint8) (ints[3] >> 8), (uint8) ints[3] }}; } //============================================================================== @@ -66,36 +82,36 @@ template class ComSmartPtr { public: - ComSmartPtr() throw() : p (0) {} - ComSmartPtr (ComClass* const obj) : p (obj) { if (p) p->AddRef(); } - ComSmartPtr (const ComSmartPtr& other) : p (other.p) { if (p) p->AddRef(); } - ~ComSmartPtr() { release(); } + ComSmartPtr() noexcept {} + ComSmartPtr (ComClass* obj) : p (obj) { if (p) p->AddRef(); } + ComSmartPtr (const ComSmartPtr& other) : p (other.p) { if (p) p->AddRef(); } + ~ComSmartPtr() { release(); } - operator ComClass*() const throw() { return p; } - ComClass& operator*() const throw() { return *p; } - ComClass* operator->() const throw() { return p; } + operator ComClass*() const noexcept { return p; } + ComClass& operator*() const noexcept { return *p; } + ComClass* operator->() const noexcept { return p; } ComSmartPtr& operator= (ComClass* const newP) { - if (newP != 0) newP->AddRef(); + if (newP != nullptr) newP->AddRef(); release(); p = newP; return *this; } - ComSmartPtr& operator= (const ComSmartPtr& newP) { return operator= (newP.p); } + ComSmartPtr& operator= (const ComSmartPtr& newP) { return operator= (newP.p); } // Releases and nullifies this pointer and returns its address ComClass** resetAndGetPointerAddress() { release(); - p = 0; + p = nullptr; return &p; } HRESULT CoCreateInstance (REFCLSID classUUID, DWORD dwClsContext = CLSCTX_INPROC_SERVER) { - HRESULT hr = ::CoCreateInstance (classUUID, 0, dwClsContext, __uuidof (ComClass), (void**) resetAndGetPointerAddress()); + auto hr = ::CoCreateInstance (classUUID, 0, dwClsContext, __uuidof (ComClass), (void**) resetAndGetPointerAddress()); jassert (hr != CO_E_NOTINITIALIZED); // You haven't called CoInitialize for the current thread! return hr; } @@ -103,7 +119,7 @@ public: template HRESULT QueryInterface (REFCLSID classUUID, ComSmartPtr& destObject) const { - if (p == 0) + if (p == nullptr) return E_POINTER; return p->QueryInterface (classUUID, (void**) destObject.resetAndGetPointerAddress()); @@ -116,11 +132,11 @@ public: } private: - ComClass* p; + ComClass* p = nullptr; - void release() { if (p != 0) p->Release(); } + void release() { if (p != nullptr) p->Release(); } - ComClass** operator&() throw(); // private to avoid it being used accidentally + ComClass** operator&() noexcept; // private to avoid it being used accidentally }; //============================================================================== @@ -135,7 +151,7 @@ public: virtual ~ComBaseClassHelperBase() {} ULONG __stdcall AddRef() { return ++refCount; } - ULONG __stdcall Release() { const ULONG r = --refCount; if (r == 0) delete this; return r; } + ULONG __stdcall Release() { auto r = --refCount; if (r == 0) delete this; return r; } protected: ULONG refCount; @@ -143,9 +159,9 @@ protected: JUCE_COMRESULT QueryInterface (REFIID refId, void** result) { if (refId == __uuidof (IUnknown)) - return castToType (result); + return castToType (result); - *result = 0; + *result = nullptr; return E_NOINTERFACE; } @@ -159,17 +175,17 @@ protected: /** Handy base class for writing COM objects, providing ref-counting and a basic QueryInterface method. */ template -class ComBaseClassHelper : public ComBaseClassHelperBase +class ComBaseClassHelper : public ComBaseClassHelperBase { public: - ComBaseClassHelper (unsigned int initialRefCount = 1) : ComBaseClassHelperBase (initialRefCount) {} + ComBaseClassHelper (unsigned int initialRefCount = 1) : ComBaseClassHelperBase (initialRefCount) {} ~ComBaseClassHelper() {} JUCE_COMRESULT QueryInterface (REFIID refId, void** result) { if (refId == __uuidof (ComClass)) - return this->template castToType (result); + return this->template castToType (result); - return ComBaseClassHelperBase ::QueryInterface (refId, result); + return ComBaseClassHelperBase::QueryInterface (refId, result); } }; diff --git a/modules/juce_core/native/juce_win32_Network.cpp b/modules/juce_core/native/juce_win32_Network.cpp index 0a77ad327d..3aa2e2a7ae 100644 --- a/modules/juce_core/native/juce_win32_Network.cpp +++ b/modules/juce_core/native/juce_win32_Network.cpp @@ -33,14 +33,13 @@ class WebInputStream::Pimpl { public: Pimpl (WebInputStream& pimplOwner, const URL& urlToCopy, bool shouldBePost) - : statusCode (0), owner (pimplOwner), url (urlToCopy), connection (0), request (0), - position (0), finished (false), isPost (shouldBePost), timeOutMs (0), - httpRequestCmd (isPost ? "POST" : "GET"), numRedirectsToFollow (5) + : statusCode (0), owner (pimplOwner), url (urlToCopy), isPost (shouldBePost), + httpRequestCmd (isPost ? "POST" : "GET") {} ~Pimpl() { - close(); + closeConnection(); } //============================================================================== @@ -66,6 +65,13 @@ public: //============================================================================== bool connect (WebInputStream::Listener* listener) { + { + const ScopedLock lock (createConnectionLock); + + if (hasBeenCancelled) + return false; + } + String address = url.toString (! isPost); while (numRedirectsToFollow-- >= 0) @@ -181,7 +187,13 @@ public: void cancel() { - close(); + { + const ScopedLock lock (createConnectionLock); + + hasBeenCancelled = true; + + closeConnection(); + } } bool setPosition (int64 wantedPos) @@ -217,22 +229,25 @@ private: //============================================================================== WebInputStream& owner; const URL url; - HINTERNET connection, request; + HINTERNET connection = 0, request = 0; String headers; MemoryBlock postData; - int64 position; - bool finished; + int64 position = 0; + bool finished = false; const bool isPost; - int timeOutMs; + int timeOutMs = 0; String httpRequestCmd; - int numRedirectsToFollow; + int numRedirectsToFollow = 5; StringPairArray responseHeaders; + CriticalSection createConnectionLock; + bool hasBeenCancelled = false; - void close() + void closeConnection() { HINTERNET requestCopy = request; request = 0; + if (requestCopy != 0) InternetCloseHandle (requestCopy); @@ -247,7 +262,7 @@ private: { static HINTERNET sessionHandle = InternetOpen (_T("juce"), INTERNET_OPEN_TYPE_PRECONFIG, 0, 0, 0); - close(); + closeConnection(); if (sessionHandle != 0) { @@ -298,11 +313,18 @@ private: const bool isFtp = address.startsWithIgnoreCase ("ftp:"); - connection = InternetConnect (sessionHandle, uc.lpszHostName, uc.nPort, - uc.lpszUserName, uc.lpszPassword, - isFtp ? (DWORD) INTERNET_SERVICE_FTP - : (DWORD) INTERNET_SERVICE_HTTP, - 0, 0); + { + const ScopedLock lock (createConnectionLock); + + connection = hasBeenCancelled ? 0 + : InternetConnect (sessionHandle, + uc.lpszHostName, uc.nPort, + uc.lpszUserName, uc.lpszPassword, + isFtp ? (DWORD) INTERNET_SERVICE_FTP + : (DWORD) INTERNET_SERVICE_HTTP, + 0, 0); + } + if (connection != 0) { if (isFtp) @@ -323,19 +345,22 @@ private: const TCHAR* mimeTypes[] = { _T("*/*"), nullptr }; DWORD flags = INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_NO_COOKIES - | INTERNET_FLAG_NO_AUTO_REDIRECT | SECURITY_SET_MASK; + | INTERNET_FLAG_NO_AUTO_REDIRECT; if (address.startsWithIgnoreCase ("https:")) flags |= INTERNET_FLAG_SECURE; // (this flag only seems necessary if the OS is running IE6 - // IE7 seems to automatically work out when it's https) - request = HttpOpenRequest (connection, httpRequestCmd.toWideCharPointer(), - uc.lpszUrlPath, 0, 0, mimeTypes, flags, 0); + { + const ScopedLock lock (createConnectionLock); + + request = hasBeenCancelled ? 0 + : HttpOpenRequest (connection, httpRequestCmd.toWideCharPointer(), + uc.lpszUrlPath, 0, 0, mimeTypes, flags, 0); + } if (request != 0) { - setSecurityFlags(); - INTERNET_BUFFERS buffers = { 0 }; buffers.dwStructSize = sizeof (INTERNET_BUFFERS); buffers.lpcszHeader = headers.toWideCharPointer(); @@ -376,15 +401,7 @@ private: } } - close(); - } - - void setSecurityFlags() - { - DWORD dwFlags = 0, dwBuffLen = sizeof (DWORD); - InternetQueryOption (request, INTERNET_OPTION_SECURITY_FLAGS, &dwFlags, &dwBuffLen); - dwFlags |= SECURITY_FLAG_IGNORE_UNKNOWN_CA | SECURITY_SET_MASK; - InternetSetOption (request, INTERNET_OPTION_SECURITY_FLAGS, &dwFlags, sizeof (dwFlags)); + closeConnection(); } JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl) diff --git a/modules/juce_core/native/juce_win32_SystemStats.cpp b/modules/juce_core/native/juce_win32_SystemStats.cpp index 80473183c3..7931d9cbaa 100644 --- a/modules/juce_core/native/juce_win32_SystemStats.cpp +++ b/modules/juce_core/native/juce_win32_SystemStats.cpp @@ -20,6 +20,11 @@ ============================================================================== */ +#if ! JUCE_MINGW + #pragma intrinsic (__cpuid) + #pragma intrinsic (__rdtsc) +#endif + void Logger::outputDebugString (const String& text) { OutputDebugString ((text + "\n").toWideCharPointer()); @@ -32,8 +37,6 @@ void Logger::outputDebugString (const String& text) #endif //============================================================================== -#pragma intrinsic (__cpuid) -#pragma intrinsic (__rdtsc) #if JUCE_MINGW static void callCPUID (int result[4], uint32 type) @@ -84,7 +87,7 @@ String SystemStats::getCpuModel() const int numExtIDs = info[0]; - if (numExtIDs < 0x80000004) // if brand string is unsupported + if ((unsigned) numExtIDs < 0x80000004) // if brand string is unsupported return {}; callCPUID (info, 0x80000002); @@ -161,59 +164,45 @@ static DebugFlagsInitialiser debugFlagsInitialiser; #endif //============================================================================== -static bool isWindowsVersionOrLater (SystemStats::OperatingSystemType target) +static uint32 getWindowsVersion() { - OSVERSIONINFOEX info; - zerostruct (info); - info.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX); + auto filename = _T("kernel32.dll"); + DWORD handle = 0; - if (target >= SystemStats::Windows10) + if (auto size = GetFileVersionInfoSize (filename, &handle)) { - info.dwMajorVersion = 10; - info.dwMinorVersion = 0; - } - else if (target >= SystemStats::WinVista) - { - info.dwMajorVersion = 6; + HeapBlock data (size); - switch (target) + if (GetFileVersionInfo (filename, handle, size, data)) { - case SystemStats::WinVista: break; - case SystemStats::Windows7: info.dwMinorVersion = 1; break; - case SystemStats::Windows8_0: info.dwMinorVersion = 2; break; - case SystemStats::Windows8_1: info.dwMinorVersion = 3; break; - default: jassertfalse; break; + VS_FIXEDFILEINFO* info = nullptr; + UINT verSize = 0; + + if (VerQueryValue (data, (LPCTSTR) _T("\\"), (void**) &info, &verSize)) + if (size > 0 && info != nullptr && info->dwSignature == 0xfeef04bd) + return (uint32) info->dwFileVersionMS; } } - else - { - info.dwMajorVersion = 5; - info.dwMinorVersion = target >= SystemStats::WinXP ? 1 : 0; - } - DWORDLONG mask = 0; - - VER_SET_CONDITION (mask, VER_MAJORVERSION, VER_GREATER_EQUAL); - VER_SET_CONDITION (mask, VER_MINORVERSION, VER_GREATER_EQUAL); - VER_SET_CONDITION (mask, VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL); - VER_SET_CONDITION (mask, VER_SERVICEPACKMINOR, VER_GREATER_EQUAL); - - return VerifyVersionInfo (&info, - VER_MAJORVERSION | VER_MINORVERSION - | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - mask) != FALSE; + return 0; } SystemStats::OperatingSystemType SystemStats::getOperatingSystemType() { - const SystemStats::OperatingSystemType types[] - = { Windows10, Windows8_1, Windows8_0, Windows7, WinVista, WinXP, Win2000 }; + auto v = getWindowsVersion(); + auto major = (v >> 16); - for (int i = 0; i < numElementsInArray (types); ++i) - if (isWindowsVersionOrLater (types[i])) - return types[i]; + jassert (major <= 10); // need to add support for new version! - jassertfalse; // need to support whatever new version is running! + if (major == 10) return Windows10; + if (v == 0x00060003) return Windows8_1; + if (v == 0x00060002) return Windows8_0; + if (v == 0x00060001) return Windows7; + if (v == 0x00060000) return WinVista; + if (v == 0x00050000) return Win2000; + if (major == 5) return WinXP; + + jassertfalse; return UnknownOS; } diff --git a/modules/juce_core/network/juce_Socket.cpp b/modules/juce_core/network/juce_Socket.cpp index 1ece6a1303..19723b69b4 100644 --- a/modules/juce_core/network/juce_Socket.cpp +++ b/modules/juce_core/network/juce_Socket.cpp @@ -100,7 +100,7 @@ namespace SocketHelpers #if JUCE_WINDOWS ignoreUnused (portNumber, isListener, readLock); - if (h != SOCKET_ERROR || connected) + if (h != (unsigned) SOCKET_ERROR || connected) closesocket (h); // make sure any read process finishes before we delete the socket diff --git a/modules/juce_core/network/juce_URL.cpp b/modules/juce_core/network/juce_URL.cpp index 78b598a931..05ace94262 100644 --- a/modules/juce_core/network/juce_URL.cpp +++ b/modules/juce_core/network/juce_URL.cpp @@ -142,18 +142,15 @@ URL::URL (const String& u) : url (u) const int nextAmp = url.indexOfChar (i + 1, '&'); const int equalsPos = url.indexOfChar (i + 1, '='); - if (equalsPos > i + 1) + if (nextAmp < 0) { - if (nextAmp < 0) - { - addParameter (removeEscapeChars (url.substring (i + 1, equalsPos)), - removeEscapeChars (url.substring (equalsPos + 1))); - } - else if (nextAmp > 0 && equalsPos < nextAmp) - { - addParameter (removeEscapeChars (url.substring (i + 1, equalsPos)), - removeEscapeChars (url.substring (equalsPos + 1, nextAmp))); - } + addParameter (removeEscapeChars (equalsPos < 0 ? url.substring (i + 1) : url.substring (i + 1, equalsPos)), + equalsPos < 0 ? String() : removeEscapeChars (url.substring (equalsPos + 1))); + } + else if (nextAmp > 0 && equalsPos < nextAmp) + { + addParameter (removeEscapeChars (equalsPos < 0 ? url.substring (i + 1, nextAmp) : url.substring (i + 1, equalsPos)), + equalsPos < 0 ? String() : removeEscapeChars (url.substring (equalsPos + 1, nextAmp))); } i = nextAmp; @@ -221,9 +218,12 @@ namespace URLHelpers if (i > 0) p << '&'; - p << URL::addEscapeChars (url.getParameterNames()[i], true) - << '=' - << URL::addEscapeChars (url.getParameterValues()[i], true); + auto val = url.getParameterValues()[i]; + + p << URL::addEscapeChars (url.getParameterNames()[i], true); + + if (val.isNotEmpty()) + p << '=' << URL::addEscapeChars (val, true); } return p; diff --git a/modules/juce_core/network/juce_WebInputStream.cpp b/modules/juce_core/network/juce_WebInputStream.cpp index 9016044838..4a7aafc1f9 100644 --- a/modules/juce_core/network/juce_WebInputStream.cpp +++ b/modules/juce_core/network/juce_WebInputStream.cpp @@ -21,7 +21,7 @@ */ WebInputStream::WebInputStream (const URL& url, const bool usePost) - : pimpl (new Pimpl(*this, url, usePost)), hasCalledConnect (false) + : pimpl (new Pimpl (*this, url, usePost)), hasCalledConnect (false) {} WebInputStream::~WebInputStream() @@ -29,7 +29,7 @@ WebInputStream::~WebInputStream() delete pimpl; } -WebInputStream& WebInputStream::withExtraHeaders (const String& extra) { pimpl->withExtraHeaders (extra); return *this; } +WebInputStream& WebInputStream::withExtraHeaders (const String& extra) { pimpl->withExtraHeaders (extra); return *this; } WebInputStream& WebInputStream::withCustomRequestCommand (const String& cmd) { pimpl->withCustomRequestCommand(cmd); return *this; } WebInputStream& WebInputStream::withConnectionTimeout (int t) { pimpl->withConnectionTimeout (t); return *this; } WebInputStream& WebInputStream::withNumRedirectsToFollow (int num) { pimpl->withNumRedirectsToFollow (num); return *this; } @@ -65,7 +65,7 @@ StringPairArray WebInputStream::parseHttpHeaders (const String& headerData) if (headersEntry.isNotEmpty()) { - const String key (headersEntry.upToFirstOccurrenceOf (": ", false, false)); + const String key (headersEntry.upToFirstOccurrenceOf (": ", false, false)); const String value (headersEntry.fromFirstOccurrenceOf (": ", false, false)); const String previousValue (headerPairs [key]); headerPairs.set (key, previousValue.isEmpty() ? value : (previousValue + "," + value)); diff --git a/modules/juce_core/network/juce_WebInputStream.h b/modules/juce_core/network/juce_WebInputStream.h index 5a20e02732..5d013ea4a4 100644 --- a/modules/juce_core/network/juce_WebInputStream.h +++ b/modules/juce_core/network/juce_WebInputStream.h @@ -122,7 +122,7 @@ class JUCE_API WebInputStream : public InputStream an error has occurred. Note that most methods will call connect internally if they are called without - an established connection. Therefore, it is not necessary to explicitely + an established connection. Therefore, it is not necessary to explicitly call connect unless you would like to use a custom listener. After a successful call to connect, getResponseHeaders, getTotalLength and @@ -135,10 +135,10 @@ class JUCE_API WebInputStream : public InputStream */ bool connect (Listener* listener); - /** Returns true if there was an error during the connection attempt */ + /** Returns true if there was an error during the connection attempt. */ bool isError() const; - /** Will cancel a blocking read. */ + /** Will cancel a blocking read and prevent any subsequent connection attempts. */ void cancel(); //============================================================================== diff --git a/modules/juce_core/streams/juce_BufferedInputStream.cpp b/modules/juce_core/streams/juce_BufferedInputStream.cpp index 6c986f0446..b17c526915 100644 --- a/modules/juce_core/streams/juce_BufferedInputStream.cpp +++ b/modules/juce_core/streams/juce_BufferedInputStream.cpp @@ -20,45 +20,33 @@ ============================================================================== */ -namespace +static inline int calcBufferStreamBufferSize (int requestedSize, InputStream* source) noexcept { - int calcBufferStreamBufferSize (int requestedSize, InputStream* const source) noexcept - { - // You need to supply a real stream when creating a BufferedInputStream - jassert (source != nullptr); + // You need to supply a real stream when creating a BufferedInputStream + jassert (source != nullptr); - requestedSize = jmax (256, requestedSize); + requestedSize = jmax (256, requestedSize); + auto sourceSize = source->getTotalLength(); - const int64 sourceSize = source->getTotalLength(); - if (sourceSize >= 0 && sourceSize < requestedSize) - requestedSize = jmax (32, (int) sourceSize); + if (sourceSize >= 0 && sourceSize < requestedSize) + return jmax (32, (int) sourceSize); - return requestedSize; - } + return requestedSize; } //============================================================================== -BufferedInputStream::BufferedInputStream (InputStream* const sourceStream, const int bufferSize_, - const bool deleteSourceWhenDestroyed) - : source (sourceStream, deleteSourceWhenDestroyed), - bufferSize (calcBufferStreamBufferSize (bufferSize_, sourceStream)), +BufferedInputStream::BufferedInputStream (InputStream* sourceStream, int size, bool takeOwnership) + : source (sourceStream, takeOwnership), + bufferSize (calcBufferStreamBufferSize (size, sourceStream)), position (sourceStream->getPosition()), - lastReadPos (0), - bufferStart (position), - bufferOverlap (128) + bufferStart (position) { buffer.malloc ((size_t) bufferSize); } -BufferedInputStream::BufferedInputStream (InputStream& sourceStream, const int bufferSize_) - : source (&sourceStream, false), - bufferSize (calcBufferStreamBufferSize (bufferSize_, &sourceStream)), - position (sourceStream.getPosition()), - lastReadPos (0), - bufferStart (position), - bufferOverlap (128) +BufferedInputStream::BufferedInputStream (InputStream& sourceStream, int size) + : BufferedInputStream (&sourceStream, size, false) { - buffer.malloc ((size_t) bufferSize); } BufferedInputStream::~BufferedInputStream() @@ -66,6 +54,12 @@ BufferedInputStream::~BufferedInputStream() } //============================================================================== +char BufferedInputStream::peekByte() +{ + ensureBuffered(); + return position < lastReadPos ? *(buffer + (int) (position - bufferStart)) : 0; +} + int64 BufferedInputStream::getTotalLength() { return source->getTotalLength(); @@ -89,7 +83,7 @@ bool BufferedInputStream::isExhausted() void BufferedInputStream::ensureBuffered() { - const int64 bufferEndOverlap = lastReadPos - bufferOverlap; + auto bufferEndOverlap = lastReadPos - bufferOverlap; if (position < bufferStart || position >= bufferEndOverlap) { @@ -99,7 +93,7 @@ void BufferedInputStream::ensureBuffered() && position >= bufferEndOverlap && position >= bufferStart) { - const int bytesToKeep = (int) (lastReadPos - position); + auto bytesToKeep = (int) (lastReadPos - position); memmove (buffer, buffer + (int) (position - bufferStart), (size_t) bytesToKeep); bufferStart = position; @@ -132,41 +126,38 @@ int BufferedInputStream::read (void* destBuffer, int maxBytesToRead) { memcpy (destBuffer, buffer + (int) (position - bufferStart), (size_t) maxBytesToRead); position += maxBytesToRead; - return maxBytesToRead; } - else + + if (position < bufferStart || position >= lastReadPos) + ensureBuffered(); + + int bytesRead = 0; + + while (maxBytesToRead > 0) { - if (position < bufferStart || position >= lastReadPos) - ensureBuffered(); + auto numToRead = jmin (maxBytesToRead, (int) (lastReadPos - position)); - int bytesRead = 0; - - while (maxBytesToRead > 0) + if (numToRead > 0) { - const int bytesAvailable = jmin (maxBytesToRead, (int) (lastReadPos - position)); - - if (bytesAvailable > 0) - { - memcpy (destBuffer, buffer + (int) (position - bufferStart), (size_t) bytesAvailable); - maxBytesToRead -= bytesAvailable; - bytesRead += bytesAvailable; - position += bytesAvailable; - destBuffer = static_cast (destBuffer) + bytesAvailable; - } - - const int64 oldLastReadPos = lastReadPos; - ensureBuffered(); - - if (oldLastReadPos == lastReadPos) - break; // if ensureBuffered() failed to read any more data, bail out - - if (isExhausted()) - break; + memcpy (destBuffer, buffer + (int) (position - bufferStart), (size_t) numToRead); + maxBytesToRead -= numToRead; + bytesRead += numToRead; + position += numToRead; + destBuffer = static_cast (destBuffer) + numToRead; } - return bytesRead; + auto oldLastReadPos = lastReadPos; + ensureBuffered(); + + if (oldLastReadPos == lastReadPos) + break; // if ensureBuffered() failed to read any more data, bail out + + if (isExhausted()) + break; } + + return bytesRead; } String BufferedInputStream::readString() @@ -174,9 +165,8 @@ String BufferedInputStream::readString() if (position >= bufferStart && position < lastReadPos) { - const int maxChars = (int) (lastReadPos - position); - - const char* const src = buffer + (int) (position - bufferStart); + auto maxChars = (int) (lastReadPos - position); + auto* src = buffer + (int) (position - bufferStart); for (int i = 0; i < maxChars; ++i) { diff --git a/modules/juce_core/streams/juce_BufferedInputStream.h b/modules/juce_core/streams/juce_BufferedInputStream.h index 27d2c26665..5a51053858 100644 --- a/modules/juce_core/streams/juce_BufferedInputStream.h +++ b/modules/juce_core/streams/juce_BufferedInputStream.h @@ -63,6 +63,9 @@ public: //============================================================================== + /** Returns the next byte that would be read by a call to readByte() */ + char peekByte(); + int64 getTotalLength() override; int64 getPosition() override; bool setPosition (int64 newPosition) override; @@ -75,7 +78,7 @@ private: //============================================================================== OptionalScopedPointer source; int bufferSize; - int64 position, lastReadPos, bufferStart, bufferOverlap; + int64 position, lastReadPos = 0, bufferStart, bufferOverlap = 128; HeapBlock buffer; void ensureBuffered(); diff --git a/modules/juce_core/streams/juce_MemoryInputStream.cpp b/modules/juce_core/streams/juce_MemoryInputStream.cpp index 6c57981761..3dfb1237c6 100644 --- a/modules/juce_core/streams/juce_MemoryInputStream.cpp +++ b/modules/juce_core/streams/juce_MemoryInputStream.cpp @@ -98,7 +98,7 @@ int64 MemoryInputStream::getPosition() class MemoryStreamTests : public UnitTest { public: - MemoryStreamTests() : UnitTest ("MemoryInputStream & MemoryOutputStream") {} + MemoryStreamTests() : UnitTest ("MemoryInputStream & MemoryOutputStream", "Memory Streams") {} void runTest() override { diff --git a/modules/juce_core/system/juce_CompilerSupport.h b/modules/juce_core/system/juce_CompilerSupport.h index 6195e99e40..3a9dda8157 100644 --- a/modules/juce_core/system/juce_CompilerSupport.h +++ b/modules/juce_core/system/juce_CompilerSupport.h @@ -42,9 +42,9 @@ #define JUCE_DELETED_FUNCTION = delete #endif - #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && ! defined (JUCE_COMPILER_SUPPORTS_LAMBDAS) - #define JUCE_COMPILER_SUPPORTS_LAMBDAS 1 + #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 #define JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT 1 + #define JUCE_COMPILER_SUPPORTS_THREAD_LOCAL 1 #endif #ifndef JUCE_EXCEPTIONS_DISABLED @@ -66,12 +66,12 @@ #define JUCE_DELETED_FUNCTION = delete #endif - #if __has_feature (cxx_lambdas) - #define JUCE_COMPILER_SUPPORTS_LAMBDAS 1 - #endif - #if (defined (_LIBCPP_VERSION) || ! (JUCE_MAC || JUCE_IOS)) #define JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT 1 + + #if ! JUCE_PROJUCER_LIVE_BUILD + #define JUCE_COMPILER_SUPPORTS_THREAD_LOCAL 1 + #endif #endif #if __has_feature (cxx_generalized_initializers) && (defined (_LIBCPP_VERSION) || ! (JUCE_MAC || JUCE_IOS)) @@ -104,7 +104,6 @@ #if _MSC_VER >= 1700 #define JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL 1 - #define JUCE_COMPILER_SUPPORTS_LAMBDAS 1 #endif #if _MSC_VER >= 1800 @@ -112,6 +111,7 @@ #define JUCE_COMPILER_SUPPORTS_VARIADIC_TEMPLATES 1 #define JUCE_DELETED_FUNCTION = delete #define JUCE_STDLIB_HAS_STD_FUNCTION_SUPPORT 1 + #define JUCE_COMPILER_SUPPORTS_THREAD_LOCAL 1 #endif #if _MSC_VER >= 1900 @@ -153,3 +153,16 @@ #define override #endif #endif + +//============================================================================== +#if JUCE_ANDROID + #define JUCE_ATOMIC_AVAILABLE 0 +#elif defined(_LIBCPP_VERSION) + #define JUCE_ATOMIC_AVAILABLE (_LIBCPP_VERSION >= 3700) +#elif defined (__GLIBCXX__) + #define JUCE_ATOMIC_AVAILABLE (__GLIBCXX__ >= 20130322) // GCC versions 4.8 and later +#elif defined (_MSC_VER) + #define JUCE_ATOMIC_AVAILABLE 1 // Visual Studio 2013 and later +#else + #define JUCE_ATOMIC_AVAILABLE 0 +#endif diff --git a/modules/juce_core/system/juce_StandardHeader.h b/modules/juce_core/system/juce_StandardHeader.h index baba6e5f32..cea97c6124 100644 --- a/modules/juce_core/system/juce_StandardHeader.h +++ b/modules/juce_core/system/juce_StandardHeader.h @@ -28,8 +28,8 @@ See also SystemStats::getJUCEVersion() for a string version. */ #define JUCE_MAJOR_VERSION 5 -#define JUCE_MINOR_VERSION 0 -#define JUCE_BUILDNUMBER 2 +#define JUCE_MINOR_VERSION 1 +#define JUCE_BUILDNUMBER 0 /** Current Juce version number. @@ -113,6 +113,11 @@ #include "../misc/juce_StdFunctionCompat.h" #endif +// Include std::atomic if it's supported by the compiler +#if JUCE_ATOMIC_AVAILABLE + #include +#endif + //============================================================================== // DLL building settings on Windows #if JUCE_MSVC diff --git a/modules/juce_core/text/juce_Base64.cpp b/modules/juce_core/text/juce_Base64.cpp index b49f443e73..bda7c3b669 100644 --- a/modules/juce_core/text/juce_Base64.cpp +++ b/modules/juce_core/text/juce_Base64.cpp @@ -124,7 +124,7 @@ String Base64::toBase64 (const String& text) class Base64Tests : public UnitTest { public: - Base64Tests() : UnitTest ("Base64 class") {} + Base64Tests() : UnitTest ("Base64 class", "Text") {} static MemoryBlock createRandomData (Random& r) { diff --git a/modules/juce_core/text/juce_CharPointer_ASCII.h b/modules/juce_core/text/juce_CharPointer_ASCII.h index b18ff4122f..0c9ed44ac7 100644 --- a/modules/juce_core/text/juce_CharPointer_ASCII.h +++ b/modules/juce_core/text/juce_CharPointer_ASCII.h @@ -37,7 +37,7 @@ class CharPointer_ASCII public: typedef char CharType; - inline explicit CharPointer_ASCII (const CharType* const rawPointer) noexcept + inline explicit CharPointer_ASCII (const CharType* rawPointer) noexcept : data (const_cast (rawPointer)) { } @@ -76,6 +76,9 @@ public: /** Returns true if this pointer is pointing to a null character. */ inline bool isEmpty() const noexcept { return *data == 0; } + /** Returns true if this pointer is not pointing to a null character. */ + inline bool isNotEmpty() const noexcept { return *data != 0; } + /** Returns the unicode character that this pointer is pointing to. */ inline juce_wchar operator*() const noexcept { return (juce_wchar) (uint8) *data; } @@ -100,7 +103,7 @@ public: /** Moves this pointer along to the next character in the string. */ CharPointer_ASCII operator++ (int) noexcept { - CharPointer_ASCII temp (*this); + auto temp (*this); ++data; return temp; } @@ -119,7 +122,7 @@ public: /** Returns the character at a given character index from the start of the string. */ inline juce_wchar operator[] (const int characterIndex) const noexcept { - return (juce_wchar) (unsigned char) data [characterIndex]; + return (juce_wchar) (uint8) data [characterIndex]; } /** Returns a pointer which is moved forwards from this one by the specified number of characters. */ @@ -310,25 +313,25 @@ public: } /** Returns true if the first character of this string is whitespace. */ - bool isWhitespace() const { return CharacterFunctions::isWhitespace (*data) != 0; } + bool isWhitespace() const { return CharacterFunctions::isWhitespace (*data) != 0; } /** Returns true if the first character of this string is a digit. */ - bool isDigit() const { return CharacterFunctions::isDigit (*data) != 0; } + bool isDigit() const { return CharacterFunctions::isDigit (*data) != 0; } /** Returns true if the first character of this string is a letter. */ - bool isLetter() const { return CharacterFunctions::isLetter (*data) != 0; } + bool isLetter() const { return CharacterFunctions::isLetter (*data) != 0; } /** Returns true if the first character of this string is a letter or digit. */ - bool isLetterOrDigit() const { return CharacterFunctions::isLetterOrDigit (*data) != 0; } + bool isLetterOrDigit() const { return CharacterFunctions::isLetterOrDigit (*data) != 0; } /** Returns true if the first character of this string is upper-case. */ - bool isUpperCase() const { return CharacterFunctions::isUpperCase ((juce_wchar) (uint8) *data) != 0; } + bool isUpperCase() const { return CharacterFunctions::isUpperCase ((juce_wchar) (uint8) *data) != 0; } /** Returns true if the first character of this string is lower-case. */ - bool isLowerCase() const { return CharacterFunctions::isLowerCase ((juce_wchar) (uint8) *data) != 0; } + bool isLowerCase() const { return CharacterFunctions::isLowerCase ((juce_wchar) (uint8) *data) != 0; } /** Returns an upper-case version of the first character of this string. */ - juce_wchar toUpperCase() const noexcept { return CharacterFunctions::toUpperCase ((juce_wchar) (uint8) *data); } + juce_wchar toUpperCase() const noexcept { return CharacterFunctions::toUpperCase ((juce_wchar) (uint8) *data); } /** Returns a lower-case version of the first character of this string. */ - juce_wchar toLowerCase() const noexcept { return CharacterFunctions::toLowerCase ((juce_wchar) (uint8) *data); } + juce_wchar toLowerCase() const noexcept { return CharacterFunctions::toLowerCase ((juce_wchar) (uint8) *data); } /** Parses this string as a 32-bit integer. */ - int getIntValue32() const noexcept { return atoi (data); } + int getIntValue32() const noexcept { return atoi (data); } /** Parses this string as a 64-bit integer. */ int64 getIntValue64() const noexcept @@ -343,10 +346,10 @@ public: } /** Parses this string as a floating point double. */ - double getDoubleValue() const noexcept { return CharacterFunctions::getDoubleValue (*this); } + double getDoubleValue() const noexcept { return CharacterFunctions::getDoubleValue (*this); } /** Returns the first non-whitespace character in the string. */ - CharPointer_ASCII findEndOfWhitespace() const noexcept { return CharacterFunctions::findEndOfWhitespace (*this); } + CharPointer_ASCII findEndOfWhitespace() const noexcept { return CharacterFunctions::findEndOfWhitespace (*this); } /** Returns true if the given unicode character can be represented in this encoding. */ static bool canRepresent (juce_wchar character) noexcept diff --git a/modules/juce_core/text/juce_CharPointer_UTF16.h b/modules/juce_core/text/juce_CharPointer_UTF16.h index ed78910474..7d45f95208 100644 --- a/modules/juce_core/text/juce_CharPointer_UTF16.h +++ b/modules/juce_core/text/juce_CharPointer_UTF16.h @@ -38,7 +38,7 @@ public: typedef int16 CharType; #endif - inline explicit CharPointer_UTF16 (const CharType* const rawPointer) noexcept + inline explicit CharPointer_UTF16 (const CharType* rawPointer) noexcept : data (const_cast (rawPointer)) { } @@ -77,10 +77,13 @@ public: /** Returns true if this pointer is pointing to a null character. */ inline bool isEmpty() const noexcept { return *data == 0; } + /** Returns true if this pointer is not pointing to a null character. */ + inline bool isNotEmpty() const noexcept { return *data != 0; } + /** Returns the unicode character that this pointer is pointing to. */ juce_wchar operator*() const noexcept { - uint32 n = (uint32) (uint16) *data; + auto n = (uint32) (uint16) *data; if (n >= 0xd800 && n <= 0xdfff && ((uint32) (uint16) data[1]) >= 0xdc00) n = 0x10000 + (((n - 0xd800) << 10) | (((uint32) (uint16) data[1]) - 0xdc00)); @@ -91,7 +94,7 @@ public: /** Moves this pointer along to the next character in the string. */ CharPointer_UTF16 operator++() noexcept { - const juce_wchar n = static_cast (*data++); + auto n = (uint32) (uint16) *data++; if (n >= 0xd800 && n <= 0xdfff && ((uint32) (uint16) *data) >= 0xdc00) ++data; @@ -102,7 +105,7 @@ public: /** Moves this pointer back to the previous character in the string. */ CharPointer_UTF16 operator--() noexcept { - const juce_wchar n = static_cast (*--data); + auto n = (uint32) (uint16) (*--data); if (n >= 0xdc00 && n <= 0xdfff) --data; @@ -114,7 +117,7 @@ public: advances the pointer to point to the next character. */ juce_wchar getAndAdvance() noexcept { - uint32 n = (uint32) (uint16) *data++; + auto n = (uint32) (uint16) *data++; if (n >= 0xd800 && n <= 0xdfff && ((uint32) (uint16) *data) >= 0xdc00) n = 0x10000 + ((((n - 0xd800) << 10) | (((uint32) (uint16) *data++) - 0xdc00))); @@ -125,7 +128,7 @@ public: /** Moves this pointer along to the next character in the string. */ CharPointer_UTF16 operator++ (int) noexcept { - CharPointer_UTF16 temp (*this); + auto temp (*this); ++*this; return temp; } @@ -152,25 +155,25 @@ public: } /** Returns the character at a given character index from the start of the string. */ - juce_wchar operator[] (const int characterIndex) const noexcept + juce_wchar operator[] (int characterIndex) const noexcept { - CharPointer_UTF16 p (*this); + auto p (*this); p += characterIndex; return *p; } /** Returns a pointer which is moved forwards from this one by the specified number of characters. */ - CharPointer_UTF16 operator+ (const int numToSkip) const noexcept + CharPointer_UTF16 operator+ (int numToSkip) const noexcept { - CharPointer_UTF16 p (*this); + auto p (*this); p += numToSkip; return p; } /** Returns a pointer which is moved backwards from this one by the specified number of characters. */ - CharPointer_UTF16 operator- (const int numToSkip) const noexcept + CharPointer_UTF16 operator- (int numToSkip) const noexcept { - CharPointer_UTF16 p (*this); + auto p (*this); p += -numToSkip; return p; } @@ -199,12 +202,12 @@ public: /** Returns the number of characters in this string. */ size_t length() const noexcept { - const CharType* d = data; + auto* d = data; size_t count = 0; for (;;) { - const int n = *d++; + auto n = (uint32) (uint16) *d++; if (n >= 0xd800 && n <= 0xdfff) { @@ -221,13 +224,13 @@ public: } /** Returns the number of characters in this string, or the given value, whichever is lower. */ - size_t lengthUpTo (const size_t maxCharsToCount) const noexcept + size_t lengthUpTo (size_t maxCharsToCount) const noexcept { return CharacterFunctions::lengthUpTo (*this, maxCharsToCount); } /** Returns the number of characters in this string, or up to the given end pointer, whichever is lower. */ - size_t lengthUpTo (const CharPointer_UTF16 end) const noexcept + size_t lengthUpTo (CharPointer_UTF16 end) const noexcept { return CharacterFunctions::lengthUpTo (*this, end); } @@ -243,7 +246,7 @@ public: /** Returns the number of bytes that would be needed to represent the given unicode character in this encoding format. */ - static size_t getBytesRequiredFor (const juce_wchar charToWrite) noexcept + static size_t getBytesRequiredFor (juce_wchar charToWrite) noexcept { return (charToWrite >= 0x10000) ? (sizeof (CharType) * 2) : sizeof (CharType); } @@ -267,7 +270,7 @@ public: /** Returns a pointer to the null character that terminates this string. */ CharPointer_UTF16 findTerminatingNull() const noexcept { - const CharType* t = data; + auto* t = data; while (*t != 0) ++t; @@ -277,15 +280,15 @@ public: /** Copies a source string to this pointer, advancing this pointer as it goes. */ template - void writeAll (const CharPointer src) noexcept + void writeAll (CharPointer src) noexcept { CharacterFunctions::copyAll (*this, src); } /** Copies a source string to this pointer, advancing this pointer as it goes. */ - void writeAll (const CharPointer_UTF16 src) noexcept + void writeAll (CharPointer_UTF16 src) noexcept { - const CharType* s = src.data; + auto* s = src.data; while ((*data = *s) != 0) { @@ -299,7 +302,7 @@ public: to the destination buffer before stopping. */ template - size_t writeWithDestByteLimit (const CharPointer src, const size_t maxDestBytes) noexcept + size_t writeWithDestByteLimit (CharPointer src, size_t maxDestBytes) noexcept { return CharacterFunctions::copyWithDestByteLimit (*this, src, maxDestBytes); } @@ -309,51 +312,51 @@ public: written to the destination buffer before stopping (including the terminating null). */ template - void writeWithCharLimit (const CharPointer src, const int maxChars) noexcept + void writeWithCharLimit (CharPointer src, int maxChars) noexcept { CharacterFunctions::copyWithCharLimit (*this, src, maxChars); } /** Compares this string with another one. */ template - int compare (const CharPointer other) const noexcept + int compare (CharPointer other) const noexcept { return CharacterFunctions::compare (*this, other); } /** Compares this string with another one, up to a specified number of characters. */ template - int compareUpTo (const CharPointer other, const int maxChars) const noexcept + int compareUpTo (CharPointer other, int maxChars) const noexcept { return CharacterFunctions::compareUpTo (*this, other, maxChars); } /** Compares this string with another one. */ template - int compareIgnoreCase (const CharPointer other) const noexcept + int compareIgnoreCase (CharPointer other) const noexcept { return CharacterFunctions::compareIgnoreCase (*this, other); } /** Compares this string with another one, up to a specified number of characters. */ template - int compareIgnoreCaseUpTo (const CharPointer other, const int maxChars) const noexcept + int compareIgnoreCaseUpTo (CharPointer other, int maxChars) const noexcept { return CharacterFunctions::compareIgnoreCaseUpTo (*this, other, maxChars); } #if JUCE_MSVC && ! DOXYGEN - int compareIgnoreCase (const CharPointer_UTF16 other) const noexcept + int compareIgnoreCase (CharPointer_UTF16 other) const noexcept { return _wcsicmp (data, other.data); } - int compareIgnoreCaseUpTo (const CharPointer_UTF16 other, int maxChars) const noexcept + int compareIgnoreCaseUpTo (CharPointer_UTF16 other, int maxChars) const noexcept { return _wcsnicmp (data, other.data, (size_t) maxChars); } - int indexOf (const CharPointer_UTF16 stringToFind) const noexcept + int indexOf (CharPointer_UTF16 stringToFind) const noexcept { const CharType* const t = wcsstr (data, stringToFind.getAddress()); return t == nullptr ? -1 : (int) (t - data); @@ -362,41 +365,41 @@ public: /** Returns the character index of a substring, or -1 if it isn't found. */ template - int indexOf (const CharPointer stringToFind) const noexcept + int indexOf (CharPointer stringToFind) const noexcept { return CharacterFunctions::indexOf (*this, stringToFind); } /** Returns the character index of a unicode character, or -1 if it isn't found. */ - int indexOf (const juce_wchar charToFind) const noexcept + int indexOf (juce_wchar charToFind) const noexcept { return CharacterFunctions::indexOfChar (*this, charToFind); } /** Returns the character index of a unicode character, or -1 if it isn't found. */ - int indexOf (const juce_wchar charToFind, const bool ignoreCase) const noexcept + int indexOf (juce_wchar charToFind, bool ignoreCase) const noexcept { return ignoreCase ? CharacterFunctions::indexOfCharIgnoreCase (*this, charToFind) : CharacterFunctions::indexOfChar (*this, charToFind); } /** Returns true if the first character of this string is whitespace. */ - bool isWhitespace() const noexcept { return CharacterFunctions::isWhitespace (operator*()) != 0; } + bool isWhitespace() const noexcept { return CharacterFunctions::isWhitespace (operator*()) != 0; } /** Returns true if the first character of this string is a digit. */ - bool isDigit() const noexcept { return CharacterFunctions::isDigit (operator*()) != 0; } + bool isDigit() const noexcept { return CharacterFunctions::isDigit (operator*()) != 0; } /** Returns true if the first character of this string is a letter. */ - bool isLetter() const noexcept { return CharacterFunctions::isLetter (operator*()) != 0; } + bool isLetter() const noexcept { return CharacterFunctions::isLetter (operator*()) != 0; } /** Returns true if the first character of this string is a letter or digit. */ - bool isLetterOrDigit() const noexcept { return CharacterFunctions::isLetterOrDigit (operator*()) != 0; } + bool isLetterOrDigit() const noexcept { return CharacterFunctions::isLetterOrDigit (operator*()) != 0; } /** Returns true if the first character of this string is upper-case. */ - bool isUpperCase() const noexcept { return CharacterFunctions::isUpperCase (operator*()) != 0; } + bool isUpperCase() const noexcept { return CharacterFunctions::isUpperCase (operator*()) != 0; } /** Returns true if the first character of this string is lower-case. */ - bool isLowerCase() const noexcept { return CharacterFunctions::isLowerCase (operator*()) != 0; } + bool isLowerCase() const noexcept { return CharacterFunctions::isLowerCase (operator*()) != 0; } /** Returns an upper-case version of the first character of this string. */ - juce_wchar toUpperCase() const noexcept { return CharacterFunctions::toUpperCase (operator*()); } + juce_wchar toUpperCase() const noexcept { return CharacterFunctions::toUpperCase (operator*()); } /** Returns a lower-case version of the first character of this string. */ - juce_wchar toLowerCase() const noexcept { return CharacterFunctions::toLowerCase (operator*()); } + juce_wchar toLowerCase() const noexcept { return CharacterFunctions::toLowerCase (operator*()); } /** Parses this string as a 32-bit integer. */ int getIntValue32() const noexcept @@ -404,7 +407,7 @@ public: #if JUCE_MSVC return _wtoi (data); #else - return CharacterFunctions::getIntValue (*this); + return CharacterFunctions::getIntValue (*this); #endif } @@ -414,21 +417,21 @@ public: #if JUCE_MSVC return _wtoi64 (data); #else - return CharacterFunctions::getIntValue (*this); + return CharacterFunctions::getIntValue (*this); #endif } /** Parses this string as a floating point double. */ - double getDoubleValue() const noexcept { return CharacterFunctions::getDoubleValue (*this); } + double getDoubleValue() const noexcept { return CharacterFunctions::getDoubleValue (*this); } /** Returns the first non-whitespace character in the string. */ - CharPointer_UTF16 findEndOfWhitespace() const noexcept { return CharacterFunctions::findEndOfWhitespace (*this); } + CharPointer_UTF16 findEndOfWhitespace() const noexcept { return CharacterFunctions::findEndOfWhitespace (*this); } /** Returns true if the given unicode character can be represented in this encoding. */ static bool canRepresent (juce_wchar character) noexcept { - return ((unsigned int) character) < (unsigned int) 0x10ffff - && (((unsigned int) character) < 0xd800 || ((unsigned int) character) > 0xdfff); + auto n = (uint32) character; + return n < 0x10ffff && (n < 0xd800 || n > 0xdfff); } /** Returns true if this data contains a valid string in this encoding. */ @@ -438,7 +441,7 @@ public: while (--maxBytesToRead >= 0 && *dataToTest != 0) { - const uint32 n = (uint32) (uint16) *dataToTest++; + auto n = (uint32) (uint16) *dataToTest++; if (n >= 0xd800) { @@ -450,7 +453,7 @@ public: if (n > 0xdc00) return false; - const uint32 nextChar = (uint32) (uint16) *dataToTest++; + auto nextChar = (uint32) (uint16) *dataToTest++; if (nextChar < 0xdc00 || nextChar > 0xdfff) return false; @@ -462,7 +465,7 @@ public: } /** Atomically swaps this pointer for a new value, returning the previous value. */ - CharPointer_UTF16 atomicSwap (const CharPointer_UTF16 newValue) + CharPointer_UTF16 atomicSwap (CharPointer_UTF16 newValue) { return CharPointer_UTF16 (reinterpret_cast&> (data).exchange (newValue.data)); } @@ -482,7 +485,7 @@ public: static bool isByteOrderMarkBigEndian (const void* possibleByteOrder) noexcept { jassert (possibleByteOrder != nullptr); - const uint8* const c = static_cast (possibleByteOrder); + auto c = static_cast (possibleByteOrder); return c[0] == (uint8) byteOrderMarkBE1 && c[1] == (uint8) byteOrderMarkBE2; @@ -494,7 +497,7 @@ public: static bool isByteOrderMarkLittleEndian (const void* possibleByteOrder) noexcept { jassert (possibleByteOrder != nullptr); - const uint8* const c = static_cast (possibleByteOrder); + auto c = static_cast (possibleByteOrder); return c[0] == (uint8) byteOrderMarkLE1 && c[1] == (uint8) byteOrderMarkLE2; @@ -503,7 +506,7 @@ public: private: CharType* data; - static unsigned int findNullIndex (const CharType* const t) noexcept + static unsigned int findNullIndex (const CharType* t) noexcept { unsigned int n = 0; diff --git a/modules/juce_core/text/juce_CharPointer_UTF32.h b/modules/juce_core/text/juce_CharPointer_UTF32.h index 021d4f419a..5367fbec84 100644 --- a/modules/juce_core/text/juce_CharPointer_UTF32.h +++ b/modules/juce_core/text/juce_CharPointer_UTF32.h @@ -34,7 +34,7 @@ class CharPointer_UTF32 public: typedef juce_wchar CharType; - inline explicit CharPointer_UTF32 (const CharType* const rawPointer) noexcept + inline explicit CharPointer_UTF32 (const CharType* rawPointer) noexcept : data (const_cast (rawPointer)) { } @@ -73,6 +73,9 @@ public: /** Returns true if this pointer is pointing to a null character. */ inline bool isEmpty() const noexcept { return *data == 0; } + /** Returns true if this pointer is not pointing to a null character. */ + inline bool isNotEmpty() const noexcept { return *data != 0; } + /** Returns the unicode character that this pointer is pointing to. */ inline juce_wchar operator*() const noexcept { return *data; } @@ -97,47 +100,47 @@ public: /** Moves this pointer along to the next character in the string. */ CharPointer_UTF32 operator++ (int) noexcept { - CharPointer_UTF32 temp (*this); + auto temp (*this); ++data; return temp; } /** Moves this pointer forwards by the specified number of characters. */ - inline void operator+= (const int numToSkip) noexcept + inline void operator+= (int numToSkip) noexcept { data += numToSkip; } - inline void operator-= (const int numToSkip) noexcept + inline void operator-= (int numToSkip) noexcept { data -= numToSkip; } /** Returns the character at a given character index from the start of the string. */ - inline juce_wchar& operator[] (const int characterIndex) const noexcept + inline juce_wchar& operator[] (int characterIndex) const noexcept { return data [characterIndex]; } /** Returns a pointer which is moved forwards from this one by the specified number of characters. */ - CharPointer_UTF32 operator+ (const int numToSkip) const noexcept + CharPointer_UTF32 operator+ (int numToSkip) const noexcept { return CharPointer_UTF32 (data + numToSkip); } /** Returns a pointer which is moved backwards from this one by the specified number of characters. */ - CharPointer_UTF32 operator- (const int numToSkip) const noexcept + CharPointer_UTF32 operator- (int numToSkip) const noexcept { return CharPointer_UTF32 (data - numToSkip); } /** Writes a unicode character to this string, and advances this pointer to point to the next position. */ - inline void write (const juce_wchar charToWrite) noexcept + inline void write (juce_wchar charToWrite) noexcept { *data++ = charToWrite; } - inline void replaceChar (const juce_wchar newChar) noexcept + inline void replaceChar (juce_wchar newChar) noexcept { *data = newChar; } @@ -162,13 +165,13 @@ public: } /** Returns the number of characters in this string, or the given value, whichever is lower. */ - size_t lengthUpTo (const size_t maxCharsToCount) const noexcept + size_t lengthUpTo (size_t maxCharsToCount) const noexcept { return CharacterFunctions::lengthUpTo (*this, maxCharsToCount); } /** Returns the number of characters in this string, or up to the given end pointer, whichever is lower. */ - size_t lengthUpTo (const CharPointer_UTF32 end) const noexcept + size_t lengthUpTo (CharPointer_UTF32 end) const noexcept { return CharacterFunctions::lengthUpTo (*this, end); } @@ -184,7 +187,7 @@ public: /** Returns the number of bytes that would be needed to represent the given unicode character in this encoding format. */ - static inline size_t getBytesRequiredFor (const juce_wchar) noexcept + static inline size_t getBytesRequiredFor (juce_wchar) noexcept { return sizeof (CharType); } @@ -194,7 +197,7 @@ public: The value returned does NOT include the terminating null character. */ template - static size_t getBytesRequiredFor (const CharPointer text) noexcept + static size_t getBytesRequiredFor (CharPointer text) noexcept { return sizeof (CharType) * text.length(); } @@ -207,15 +210,15 @@ public: /** Copies a source string to this pointer, advancing this pointer as it goes. */ template - void writeAll (const CharPointer src) noexcept + void writeAll (CharPointer src) noexcept { CharacterFunctions::copyAll (*this, src); } /** Copies a source string to this pointer, advancing this pointer as it goes. */ - void writeAll (const CharPointer_UTF32 src) noexcept + void writeAll (CharPointer_UTF32 src) noexcept { - const CharType* s = src.data; + auto* s = src.data; while ((*data = *s) != 0) { @@ -229,7 +232,7 @@ public: to the destination buffer before stopping. */ template - size_t writeWithDestByteLimit (const CharPointer src, const size_t maxDestBytes) noexcept + size_t writeWithDestByteLimit (CharPointer src, size_t maxDestBytes) noexcept { return CharacterFunctions::copyWithDestByteLimit (*this, src, maxDestBytes); } @@ -239,21 +242,21 @@ public: written to the destination buffer before stopping (including the terminating null). */ template - void writeWithCharLimit (const CharPointer src, const int maxChars) noexcept + void writeWithCharLimit (CharPointer src, int maxChars) noexcept { CharacterFunctions::copyWithCharLimit (*this, src, maxChars); } /** Compares this string with another one. */ template - int compare (const CharPointer other) const noexcept + int compare (CharPointer other) const noexcept { return CharacterFunctions::compare (*this, other); } #if JUCE_NATIVE_WCHAR_IS_UTF32 && ! JUCE_ANDROID /** Compares this string with another one. */ - int compare (const CharPointer_UTF32 other) const noexcept + int compare (CharPointer_UTF32 other) const noexcept { return wcscmp (data, other.data); } @@ -261,34 +264,34 @@ public: /** Compares this string with another one, up to a specified number of characters. */ template - int compareUpTo (const CharPointer other, const int maxChars) const noexcept + int compareUpTo (CharPointer other, int maxChars) const noexcept { return CharacterFunctions::compareUpTo (*this, other, maxChars); } /** Compares this string with another one. */ template - int compareIgnoreCase (const CharPointer other) const + int compareIgnoreCase (CharPointer other) const { return CharacterFunctions::compareIgnoreCase (*this, other); } /** Compares this string with another one, up to a specified number of characters. */ template - int compareIgnoreCaseUpTo (const CharPointer other, const int maxChars) const noexcept + int compareIgnoreCaseUpTo (CharPointer other, int maxChars) const noexcept { return CharacterFunctions::compareIgnoreCaseUpTo (*this, other, maxChars); } /** Returns the character index of a substring, or -1 if it isn't found. */ template - int indexOf (const CharPointer stringToFind) const noexcept + int indexOf (CharPointer stringToFind) const noexcept { return CharacterFunctions::indexOf (*this, stringToFind); } /** Returns the character index of a unicode character, or -1 if it isn't found. */ - int indexOf (const juce_wchar charToFind) const noexcept + int indexOf (juce_wchar charToFind) const noexcept { int i = 0; @@ -304,37 +307,37 @@ public: } /** Returns the character index of a unicode character, or -1 if it isn't found. */ - int indexOf (const juce_wchar charToFind, const bool ignoreCase) const noexcept + int indexOf (juce_wchar charToFind, bool ignoreCase) const noexcept { return ignoreCase ? CharacterFunctions::indexOfCharIgnoreCase (*this, charToFind) : CharacterFunctions::indexOfChar (*this, charToFind); } /** Returns true if the first character of this string is whitespace. */ - bool isWhitespace() const { return CharacterFunctions::isWhitespace (*data) != 0; } + bool isWhitespace() const { return CharacterFunctions::isWhitespace (*data) != 0; } /** Returns true if the first character of this string is a digit. */ - bool isDigit() const { return CharacterFunctions::isDigit (*data) != 0; } + bool isDigit() const { return CharacterFunctions::isDigit (*data) != 0; } /** Returns true if the first character of this string is a letter. */ - bool isLetter() const { return CharacterFunctions::isLetter (*data) != 0; } + bool isLetter() const { return CharacterFunctions::isLetter (*data) != 0; } /** Returns true if the first character of this string is a letter or digit. */ - bool isLetterOrDigit() const { return CharacterFunctions::isLetterOrDigit (*data) != 0; } + bool isLetterOrDigit() const { return CharacterFunctions::isLetterOrDigit (*data) != 0; } /** Returns true if the first character of this string is upper-case. */ - bool isUpperCase() const { return CharacterFunctions::isUpperCase (*data) != 0; } + bool isUpperCase() const { return CharacterFunctions::isUpperCase (*data) != 0; } /** Returns true if the first character of this string is lower-case. */ - bool isLowerCase() const { return CharacterFunctions::isLowerCase (*data) != 0; } + bool isLowerCase() const { return CharacterFunctions::isLowerCase (*data) != 0; } /** Returns an upper-case version of the first character of this string. */ - juce_wchar toUpperCase() const noexcept { return CharacterFunctions::toUpperCase (*data); } + juce_wchar toUpperCase() const noexcept { return CharacterFunctions::toUpperCase (*data); } /** Returns a lower-case version of the first character of this string. */ - juce_wchar toLowerCase() const noexcept { return CharacterFunctions::toLowerCase (*data); } + juce_wchar toLowerCase() const noexcept { return CharacterFunctions::toLowerCase (*data); } /** Parses this string as a 32-bit integer. */ - int getIntValue32() const noexcept { return CharacterFunctions::getIntValue (*this); } + int getIntValue32() const noexcept { return CharacterFunctions::getIntValue (*this); } /** Parses this string as a 64-bit integer. */ - int64 getIntValue64() const noexcept { return CharacterFunctions::getIntValue (*this); } + int64 getIntValue64() const noexcept { return CharacterFunctions::getIntValue (*this); } /** Parses this string as a floating point double. */ - double getDoubleValue() const noexcept { return CharacterFunctions::getDoubleValue (*this); } + double getDoubleValue() const noexcept { return CharacterFunctions::getDoubleValue (*this); } /** Returns the first non-whitespace character in the string. */ CharPointer_UTF32 findEndOfWhitespace() const noexcept { return CharacterFunctions::findEndOfWhitespace (*this); } @@ -342,7 +345,7 @@ public: /** Returns true if the given unicode character can be represented in this encoding. */ static bool canRepresent (juce_wchar character) noexcept { - return ((unsigned int) character) < (unsigned int) 0x10ffff; + return ((uint32) character) < (uint32) 0x10ffff; } /** Returns true if this data contains a valid string in this encoding. */ @@ -358,7 +361,7 @@ public: } /** Atomically swaps this pointer for a new value, returning the previous value. */ - CharPointer_UTF32 atomicSwap (const CharPointer_UTF32 newValue) + CharPointer_UTF32 atomicSwap (CharPointer_UTF32 newValue) { return CharPointer_UTF32 (reinterpret_cast&> (data).exchange (newValue.data)); } diff --git a/modules/juce_core/text/juce_CharPointer_UTF8.h b/modules/juce_core/text/juce_CharPointer_UTF8.h index b9b862472e..1fe844e095 100644 --- a/modules/juce_core/text/juce_CharPointer_UTF8.h +++ b/modules/juce_core/text/juce_CharPointer_UTF8.h @@ -33,7 +33,7 @@ class CharPointer_UTF8 public: typedef char CharType; - inline explicit CharPointer_UTF8 (const CharType* const rawPointer) noexcept + inline explicit CharPointer_UTF8 (const CharType* rawPointer) noexcept : data (const_cast (rawPointer)) { } @@ -72,10 +72,13 @@ public: /** Returns true if this pointer is pointing to a null character. */ inline bool isEmpty() const noexcept { return *data == 0; } + /** Returns true if this pointer is not pointing to a null character. */ + inline bool isNotEmpty() const noexcept { return *data != 0; } + /** Returns the unicode character that this pointer is pointing to. */ juce_wchar operator*() const noexcept { - const signed char byte = (signed char) *data; + auto byte = (signed char) *data; if (byte >= 0) return (juce_wchar) (uint8) byte; @@ -96,7 +99,7 @@ public: for (int i = 1; i <= numExtraValues; ++i) { - const uint32 nextByte = (uint32) (uint8) data[i]; + auto nextByte = (uint32) (uint8) data[i]; if ((nextByte & 0xc0) != 0x80) break; @@ -112,7 +115,7 @@ public: CharPointer_UTF8& operator++() noexcept { jassert (*data != 0); // trying to advance past the end of the string? - const signed char n = (signed char) *data++; + auto n = (signed char) *data++; if (n < 0) { @@ -143,7 +146,7 @@ public: advances the pointer to point to the next character. */ juce_wchar getAndAdvance() noexcept { - const signed char byte = (signed char) *data++; + auto byte = (signed char) *data++; if (byte >= 0) return (juce_wchar) (uint8) byte; @@ -164,7 +167,7 @@ public: while (--numExtraValues >= 0) { - const uint32 nextByte = (uint32) (uint8) *data; + auto nextByte = (uint32) (uint8) *data; if ((nextByte & 0xc0) != 0x80) break; @@ -209,7 +212,7 @@ public: /** Returns the character at a given character index from the start of the string. */ juce_wchar operator[] (int characterIndex) const noexcept { - CharPointer_UTF8 p (*this); + auto p (*this); p += characterIndex; return *p; } @@ -217,7 +220,7 @@ public: /** Returns a pointer which is moved forwards from this one by the specified number of characters. */ CharPointer_UTF8 operator+ (int numToSkip) const noexcept { - CharPointer_UTF8 p (*this); + auto p (*this); p += numToSkip; return p; } @@ -225,7 +228,7 @@ public: /** Returns a pointer which is moved backwards from this one by the specified number of characters. */ CharPointer_UTF8 operator- (int numToSkip) const noexcept { - CharPointer_UTF8 p (*this); + auto p (*this); p += -numToSkip; return p; } @@ -233,12 +236,12 @@ public: /** Returns the number of characters in this string. */ size_t length() const noexcept { - const CharType* d = data; + auto* d = data; size_t count = 0; for (;;) { - const uint32 n = (uint32) (uint8) *d++; + auto n = (uint32) (uint8) *d++; if ((n & 0x80) != 0) { @@ -281,7 +284,7 @@ public: static size_t getBytesRequiredFor (const juce_wchar charToWrite) noexcept { size_t num = 1; - const uint32 c = (uint32) charToWrite; + auto c = (uint32) charToWrite; if (c >= 0x80) { @@ -306,7 +309,7 @@ public: { size_t count = 0; - while (juce_wchar n = text.getAndAdvance()) + while (auto n = text.getAndAdvance()) count += getBytesRequiredFor (n); return count; @@ -321,7 +324,7 @@ public: /** Writes a unicode character to this string, and advances this pointer to point to the next position. */ void write (const juce_wchar charToWrite) noexcept { - const uint32 c = (uint32) charToWrite; + auto c = (uint32) charToWrite; if (c >= 0x80) { @@ -360,7 +363,7 @@ public: /** Copies a source string to this pointer, advancing this pointer as it goes. */ void writeAll (const CharPointer_UTF8 src) noexcept { - const CharType* s = src.data; + auto* s = src.data; while ((*data = *s) != 0) { @@ -444,25 +447,25 @@ public: } /** Returns true if the first character of this string is whitespace. */ - bool isWhitespace() const noexcept { const CharType c = *data; return c == ' ' || (c <= 13 && c >= 9); } + bool isWhitespace() const noexcept { const CharType c = *data; return c == ' ' || (c <= 13 && c >= 9); } /** Returns true if the first character of this string is a digit. */ - bool isDigit() const noexcept { const CharType c = *data; return c >= '0' && c <= '9'; } + bool isDigit() const noexcept { const CharType c = *data; return c >= '0' && c <= '9'; } /** Returns true if the first character of this string is a letter. */ - bool isLetter() const noexcept { return CharacterFunctions::isLetter (operator*()) != 0; } + bool isLetter() const noexcept { return CharacterFunctions::isLetter (operator*()) != 0; } /** Returns true if the first character of this string is a letter or digit. */ - bool isLetterOrDigit() const noexcept { return CharacterFunctions::isLetterOrDigit (operator*()) != 0; } + bool isLetterOrDigit() const noexcept { return CharacterFunctions::isLetterOrDigit (operator*()) != 0; } /** Returns true if the first character of this string is upper-case. */ - bool isUpperCase() const noexcept { return CharacterFunctions::isUpperCase (operator*()) != 0; } + bool isUpperCase() const noexcept { return CharacterFunctions::isUpperCase (operator*()) != 0; } /** Returns true if the first character of this string is lower-case. */ - bool isLowerCase() const noexcept { return CharacterFunctions::isLowerCase (operator*()) != 0; } + bool isLowerCase() const noexcept { return CharacterFunctions::isLowerCase (operator*()) != 0; } /** Returns an upper-case version of the first character of this string. */ - juce_wchar toUpperCase() const noexcept { return CharacterFunctions::toUpperCase (operator*()); } + juce_wchar toUpperCase() const noexcept { return CharacterFunctions::toUpperCase (operator*()); } /** Returns a lower-case version of the first character of this string. */ - juce_wchar toLowerCase() const noexcept { return CharacterFunctions::toLowerCase (operator*()); } + juce_wchar toLowerCase() const noexcept { return CharacterFunctions::toLowerCase (operator*()); } /** Parses this string as a 32-bit integer. */ - int getIntValue32() const noexcept { return atoi (data); } + int getIntValue32() const noexcept { return atoi (data); } /** Parses this string as a 64-bit integer. */ int64 getIntValue64() const noexcept @@ -477,15 +480,15 @@ public: } /** Parses this string as a floating point double. */ - double getDoubleValue() const noexcept { return CharacterFunctions::getDoubleValue (*this); } + double getDoubleValue() const noexcept { return CharacterFunctions::getDoubleValue (*this); } /** Returns the first non-whitespace character in the string. */ - CharPointer_UTF8 findEndOfWhitespace() const noexcept { return CharacterFunctions::findEndOfWhitespace (*this); } + CharPointer_UTF8 findEndOfWhitespace() const noexcept { return CharacterFunctions::findEndOfWhitespace (*this); } /** Returns true if the given unicode character can be represented in this encoding. */ static bool canRepresent (juce_wchar character) noexcept { - return ((unsigned int) character) < (unsigned int) 0x10ffff; + return ((uint32) character) < (uint32) 0x10ffff; } /** Returns true if this data contains a valid string in this encoding. */ @@ -493,7 +496,7 @@ public: { while (--maxBytesToRead >= 0 && *dataToTest != 0) { - const signed char byte = (signed char) *dataToTest++; + auto byte = (signed char) *dataToTest++; if (byte < 0) { @@ -549,7 +552,7 @@ public: static bool isByteOrderMark (const void* possibleByteOrder) noexcept { jassert (possibleByteOrder != nullptr); - const uint8* const c = static_cast (possibleByteOrder); + auto c = static_cast (possibleByteOrder); return c[0] == (uint8) byteOrderMark1 && c[1] == (uint8) byteOrderMark2 diff --git a/modules/juce_core/text/juce_CharacterFunctions.cpp b/modules/juce_core/text/juce_CharacterFunctions.cpp index 359bfcc464..cd81957d95 100644 --- a/modules/juce_core/text/juce_CharacterFunctions.cpp +++ b/modules/juce_core/text/juce_CharacterFunctions.cpp @@ -114,15 +114,18 @@ bool CharacterFunctions::isPrintable (const juce_wchar character) noexcept int CharacterFunctions::getHexDigitValue (const juce_wchar digit) noexcept { - unsigned int d = (unsigned int) digit - '0'; + auto d = (unsigned int) (digit - '0'); + if (d < (unsigned int) 10) return (int) d; d += (unsigned int) ('0' - 'a'); + if (d < (unsigned int) 6) return (int) d + 10; d += (unsigned int) ('a' - 'A'); + if (d < (unsigned int) 6) return (int) d + 10; @@ -138,19 +141,23 @@ double CharacterFunctions::mulexp10 (const double value, int exponent) noexcept return 0; const bool negative = (exponent < 0); + if (negative) exponent = -exponent; double result = 1.0, power = 10.0; + for (int bit = 1; exponent != 0; bit <<= 1) { if ((exponent & bit) != 0) { exponent ^= bit; result *= power; + if (exponent == 0) break; } + power *= power; } @@ -169,3 +176,107 @@ juce_wchar CharacterFunctions::getUnicodeCharFromWindows1252Codepage (const uint return (juce_wchar) lookup[c - 0x80]; } + +//============================================================================== +#if JUCE_UNIT_TESTS + +#define QUOTE(x) #x +#define STR(value) QUOTE(value) +#define ASYM_STRING_DOUBLE_PAIR(str, value) std::pair (STR(str), value) +#define STRING_DOUBLE_PAIR(value) ASYM_STRING_DOUBLE_PAIR(value, value) +#define STRING_DOUBLE_PAIR_COMBOS(value) \ + STRING_DOUBLE_PAIR(value), \ + STRING_DOUBLE_PAIR(-value), \ + ASYM_STRING_DOUBLE_PAIR(+value, value), \ + ASYM_STRING_DOUBLE_PAIR(000000 ## value, value), \ + ASYM_STRING_DOUBLE_PAIR(+000 ## value, value), \ + ASYM_STRING_DOUBLE_PAIR(-0 ## value, -value) + +class CharacterFunctionsTests : public UnitTest +{ +public: + CharacterFunctionsTests() : UnitTest ("CharacterFunctions", "Text") {} + + void runTest() override + { + beginTest ("readDoubleValue"); + + static const std::pair testValues[] = + { + // Integers + STRING_DOUBLE_PAIR_COMBOS (0), + STRING_DOUBLE_PAIR_COMBOS (3), + STRING_DOUBLE_PAIR_COMBOS (4931), + STRING_DOUBLE_PAIR_COMBOS (5000), + STRING_DOUBLE_PAIR_COMBOS (9862097), + + // Floating point numbers + STRING_DOUBLE_PAIR_COMBOS (7.000), + STRING_DOUBLE_PAIR_COMBOS (0.2), + STRING_DOUBLE_PAIR_COMBOS (.298630), + STRING_DOUBLE_PAIR_COMBOS (1.118), + STRING_DOUBLE_PAIR_COMBOS (0.9000), + STRING_DOUBLE_PAIR_COMBOS (0.0000001), + STRING_DOUBLE_PAIR_COMBOS (500.0000001), + STRING_DOUBLE_PAIR_COMBOS (9862098.2398604), + + // Exponents + STRING_DOUBLE_PAIR_COMBOS (0e0), + STRING_DOUBLE_PAIR_COMBOS (0.e0), + STRING_DOUBLE_PAIR_COMBOS (0.00000e0), + STRING_DOUBLE_PAIR_COMBOS (.0e7), + STRING_DOUBLE_PAIR_COMBOS (0e-5), + STRING_DOUBLE_PAIR_COMBOS (2E0), + STRING_DOUBLE_PAIR_COMBOS (4.E0), + STRING_DOUBLE_PAIR_COMBOS (1.2000000E0), + STRING_DOUBLE_PAIR_COMBOS (1.2000000E6), + STRING_DOUBLE_PAIR_COMBOS (.398e3), + STRING_DOUBLE_PAIR_COMBOS (10e10), + STRING_DOUBLE_PAIR_COMBOS (1.4962e+2), + STRING_DOUBLE_PAIR_COMBOS (3198693.0973e4), + STRING_DOUBLE_PAIR_COMBOS (10973097.2087e-4), + STRING_DOUBLE_PAIR_COMBOS (1.3986e00006), + STRING_DOUBLE_PAIR_COMBOS (2087.3087e+00006), + STRING_DOUBLE_PAIR_COMBOS (6.0872e-00006), + + // Too many sig figs + STRING_DOUBLE_PAIR_COMBOS (1.23456789012345678901234567890), + STRING_DOUBLE_PAIR_COMBOS (1.23456789012345678901234567890e-111) + + #if ! JUCE_LINUX + // Limits + , STRING_DOUBLE_PAIR (DBL_MAX), + STRING_DOUBLE_PAIR (-DBL_MAX), + STRING_DOUBLE_PAIR (DBL_MIN) + #endif + }; + + for (auto trial : testValues) + { + auto charPtr = trial.first.getCharPointer(); + expectEquals (CharacterFunctions::readDoubleValue (charPtr), trial.second); + } + + { + String nans[] = { "NaN", "-nan", "+NAN", "1.0E1024", "-1.0E-999", "1.23456789012345678901234567890e123456789"}; + for (auto nan : nans) + { + auto charPtr = nan.getCharPointer(); + expect (std::isnan (CharacterFunctions::readDoubleValue (charPtr))); + } + } + + { + String infs[] = { "Inf", "-inf", "INF"}; + for (auto inf : infs) + { + auto charPtr = inf.getCharPointer(); + expect (std::isinf (CharacterFunctions::readDoubleValue (charPtr))); + } + } + } +}; + +static CharacterFunctionsTests characterFunctionsTests; + +#endif diff --git a/modules/juce_core/text/juce_CharacterFunctions.h b/modules/juce_core/text/juce_CharacterFunctions.h index 25d9a065a7..77f4dcd748 100644 --- a/modules/juce_core/text/juce_CharacterFunctions.h +++ b/modules/juce_core/text/juce_CharacterFunctions.h @@ -127,19 +127,19 @@ public: template static double readDoubleValue (CharPointerType& text) noexcept { - double result[3] = { 0 }, accumulator[2] = { 0 }; - int exponentAdjustment[2] = { 0 }, exponentAccumulator[2] = { -1, -1 }; - int exponent = 0, decPointIndex = 0, digit = 0; - int lastDigit = 0, numSignificantDigits = 0; - bool isNegative = false, digitsFound = false; - const int maxSignificantDigits = 15 + 2; + const int maxSignificantDigits = 17 + 1; // An additional digit for rounding + const int bufferSize = maxSignificantDigits + 7 + 1; // -.E-XXX and a trailing null-terminator + char buffer[bufferSize] = {}; + char* currentCharacter = &(buffer[0]); + int numSigFigs = 0; + bool decimalPointFound = false; text = text.findEndOfWhitespace(); - juce_wchar c = *text; + auto c = *text; switch (c) { - case '-': isNegative = true; // fall-through.. + case '-': *currentCharacter++ = '-'; // Fall-through.. case '+': c = *++text; } @@ -162,61 +162,20 @@ public: { if (text.isDigit()) { - lastDigit = digit; - digit = (int) text.getAndAdvance() - '0'; - digitsFound = true; + int digit = (int) text.getAndAdvance() - '0'; - if (decPointIndex != 0) - exponentAdjustment[1]++; - - if (numSignificantDigits == 0 && digit == 0) + if (numSigFigs >= maxSignificantDigits + || ((numSigFigs == 0 && (! decimalPointFound)) && digit == 0)) continue; - if (++numSignificantDigits > maxSignificantDigits) - { - if (digit > 5) - ++accumulator [decPointIndex]; - else if (digit == 5 && (lastDigit & 1) != 0) - ++accumulator [decPointIndex]; - - if (decPointIndex > 0) - exponentAdjustment[1]--; - else - exponentAdjustment[0]++; - - while (text.isDigit()) - { - ++text; - if (decPointIndex == 0) - exponentAdjustment[0]++; - } - } - else - { - const double maxAccumulatorValue = (double) ((std::numeric_limits::max() - 9) / 10); - if (accumulator [decPointIndex] > maxAccumulatorValue) - { - result [decPointIndex] = mulexp10 (result [decPointIndex], exponentAccumulator [decPointIndex]) - + accumulator [decPointIndex]; - accumulator [decPointIndex] = 0; - exponentAccumulator [decPointIndex] = 0; - } - - accumulator [decPointIndex] = accumulator[decPointIndex] * 10 + digit; - exponentAccumulator [decPointIndex]++; - } + *currentCharacter++ = '0' + (char) digit; + numSigFigs++; } - else if (decPointIndex == 0 && *text == '.') + else if ((! decimalPointFound) && *text == '.') { ++text; - decPointIndex = 1; - - if (numSignificantDigits > maxSignificantDigits) - { - while (text.isDigit()) - ++text; - break; - } + *currentCharacter++ = '.'; + decimalPointFound = true; } else { @@ -224,34 +183,39 @@ public: } } - result[0] = mulexp10 (result[0], exponentAccumulator[0]) + accumulator[0]; - - if (decPointIndex != 0) - result[1] = mulexp10 (result[1], exponentAccumulator[1]) + accumulator[1]; - c = *text; - if ((c == 'e' || c == 'E') && digitsFound) + + if ((c == 'e' || c == 'E') && numSigFigs > 0) { - bool negativeExponent = false; + *currentCharacter++ = 'e'; switch (*++text) { - case '-': negativeExponent = true; // fall-through.. + case '-': *currentCharacter++ = '-'; // Fall-through.. case '+': ++text; } - while (text.isDigit()) - exponent = (exponent * 10) + ((int) text.getAndAdvance() - '0'); + int exponentMagnitude = 0; - if (negativeExponent) - exponent = -exponent; + while (text.isDigit()) + { + if (currentCharacter == &buffer[bufferSize - 1]) + return std::numeric_limits::quiet_NaN(); + + auto digit = (int) text.getAndAdvance() - '0'; + + if (digit != 0 || exponentMagnitude != 0) + { + *currentCharacter++ = '0' + (char) digit; + exponentMagnitude = (exponentMagnitude * 10) + digit; + } + } + + if (exponentMagnitude > std::numeric_limits::max_exponent10) + return std::numeric_limits::quiet_NaN(); } - double r = mulexp10 (result[0], exponent + exponentAdjustment[0]); - if (decPointIndex != 0) - r += mulexp10 (result[1], exponent - exponentAdjustment[1]); - - return isNegative ? -r : r; + return strtod (&buffer[0], nullptr); } /** Parses a character string, to read a floating-point value. */ @@ -267,15 +231,15 @@ public: static IntType getIntValue (const CharPointerType text) noexcept { IntType v = 0; - CharPointerType s (text.findEndOfWhitespace()); - + auto s = text.findEndOfWhitespace(); const bool isNeg = *s == '-'; + if (isNeg) ++s; for (;;) { - const juce_wchar c = s.getAndAdvance(); + auto c = s.getAndAdvance(); if (c >= '0' && c <= '9') v = v * 10 + (IntType) (c - '0'); @@ -296,7 +260,7 @@ public: while (! t.isEmpty()) { - const int hexValue = CharacterFunctions::getHexDigitValue (t.getAndAdvance()); + auto hexValue = CharacterFunctions::getHexDigitValue (t.getAndAdvance()); if (hexValue >= 0) result = (result << 4) | hexValue; @@ -348,16 +312,16 @@ public: template static size_t copyWithDestByteLimit (DestCharPointerType& dest, SrcCharPointerType src, size_t maxBytesToWrite) noexcept { - typename DestCharPointerType::CharType const* const startAddress = dest.getAddress(); - ssize_t maxBytes = (ssize_t) maxBytesToWrite; + auto startAddress = dest.getAddress(); + auto maxBytes = (ssize_t) maxBytesToWrite; maxBytes -= sizeof (typename DestCharPointerType::CharType); // (allow for a terminating null) for (;;) { - const juce_wchar c = src.getAndAdvance(); - const size_t bytesNeeded = DestCharPointerType::getBytesRequiredFor (c); - + auto c = src.getAndAdvance(); + auto bytesNeeded = DestCharPointerType::getBytesRequiredFor (c); maxBytes -= bytesNeeded; + if (c == 0 || maxBytes < 0) break; @@ -377,7 +341,8 @@ public: { while (--maxChars > 0) { - const juce_wchar c = src.getAndAdvance(); + auto c = src.getAndAdvance(); + if (c == 0) break; @@ -390,7 +355,7 @@ public: /** Compares two characters. */ static inline int compare (juce_wchar char1, juce_wchar char2) noexcept { - if (int diff = static_cast (char1) - static_cast (char2)) + if (auto diff = static_cast (char1) - static_cast (char2)) return diff < 0 ? -1 : 1; return 0; @@ -402,9 +367,9 @@ public: { for (;;) { - const juce_wchar c1 = s1.getAndAdvance(); + auto c1 = s1.getAndAdvance(); - if (int diff = compare (c1, s2.getAndAdvance())) + if (auto diff = compare (c1, s2.getAndAdvance())) return diff; if (c1 == 0) @@ -420,9 +385,9 @@ public: { while (--maxChars >= 0) { - const juce_wchar c1 = s1.getAndAdvance(); + auto c1 = s1.getAndAdvance(); - if (int diff = compare (c1, s2.getAndAdvance())) + if (auto diff = compare (c1, s2.getAndAdvance())) return diff; if (c1 == 0) @@ -444,9 +409,9 @@ public: { for (;;) { - const juce_wchar c1 = s1.getAndAdvance(); + auto c1 = s1.getAndAdvance(); - if (int diff = compareIgnoreCase (c1, s2.getAndAdvance())) + if (auto diff = compareIgnoreCase (c1, s2.getAndAdvance())) return diff; if (c1 == 0) @@ -462,9 +427,9 @@ public: { while (--maxChars >= 0) { - const juce_wchar c1 = s1.getAndAdvance(); + auto c1 = s1.getAndAdvance(); - if (int diff = compareIgnoreCase (c1, s2.getAndAdvance())) + if (auto diff = compareIgnoreCase (c1, s2.getAndAdvance())) return diff; if (c1 == 0) @@ -481,7 +446,7 @@ public: static int indexOf (CharPointerType1 textToSearch, const CharPointerType2 substringToLookFor) noexcept { int index = 0; - const int substringLength = (int) substringToLookFor.length(); + auto substringLength = (int) substringToLookFor.length(); for (;;) { @@ -502,7 +467,7 @@ public: template static CharPointerType1 find (CharPointerType1 textToSearch, const CharPointerType2 substringToLookFor) noexcept { - const int substringLength = (int) substringToLookFor.length(); + auto substringLength = (int) substringToLookFor.length(); while (textToSearch.compareUpTo (substringToLookFor, substringLength) != 0 && ! textToSearch.isEmpty()) @@ -520,7 +485,7 @@ public: { for (;; ++textToSearch) { - const juce_wchar c = *textToSearch; + auto c = *textToSearch; if (c == charToLookFor || c == 0) break; @@ -537,7 +502,7 @@ public: static int indexOfIgnoreCase (CharPointerType1 haystack, const CharPointerType2 needle) noexcept { int index = 0; - const int needleLength = (int) needle.length(); + auto needleLength = (int) needle.length(); for (;;) { @@ -609,13 +574,13 @@ public: the breakCharacters string. */ template - static Type findEndOfToken (Type text, const BreakType breakCharacters, const Type quoteCharacters) + static Type findEndOfToken (Type text, BreakType breakCharacters, Type quoteCharacters) { juce_wchar currentQuoteChar = 0; while (! text.isEmpty()) { - const juce_wchar c = text.getAndAdvance(); + auto c = text.getAndAdvance(); if (currentQuoteChar == 0 && breakCharacters.indexOf (c) >= 0) { @@ -636,5 +601,5 @@ public: } private: - static double mulexp10 (const double value, int exponent) noexcept; + static double mulexp10 (double value, int exponent) noexcept; }; diff --git a/modules/juce_core/text/juce_String.cpp b/modules/juce_core/text/juce_String.cpp index b67fcea45b..d835bfc26a 100644 --- a/modules/juce_core/text/juce_String.cpp +++ b/modules/juce_core/text/juce_String.cpp @@ -2223,7 +2223,7 @@ StringRef::StringRef (const String& string) noexcept : text (string.getCharPoin class StringTests : public UnitTest { public: - StringTests() : UnitTest ("String class") {} + StringTests() : UnitTest ("String class", "Text") {} template struct TestUTFConversion diff --git a/modules/juce_core/text/juce_TextDiff.cpp b/modules/juce_core/text/juce_TextDiff.cpp index 19ec187f30..35b13f7a48 100644 --- a/modules/juce_core/text/juce_TextDiff.cpp +++ b/modules/juce_core/text/juce_TextDiff.cpp @@ -220,7 +220,7 @@ String TextDiff::Change::appliedTo (const String& text) const noexcept class DiffTests : public UnitTest { public: - DiffTests() : UnitTest ("TextDiff class") {} + DiffTests() : UnitTest ("TextDiff class", "Text") {} static String createString (Random& r) { diff --git a/modules/juce_core/threads/juce_ChildProcess.cpp b/modules/juce_core/threads/juce_ChildProcess.cpp index 50a11244b7..5648c5d673 100644 --- a/modules/juce_core/threads/juce_ChildProcess.cpp +++ b/modules/juce_core/threads/juce_ChildProcess.cpp @@ -81,7 +81,7 @@ String ChildProcess::readAllProcessOutput() class ChildProcessTests : public UnitTest { public: - ChildProcessTests() : UnitTest ("ChildProcess") {} + ChildProcessTests() : UnitTest ("ChildProcess", "Threads") {} void runTest() override { diff --git a/modules/juce_core/threads/juce_DynamicLibrary.h b/modules/juce_core/threads/juce_DynamicLibrary.h index 4eaa18c0b7..0d07839997 100644 --- a/modules/juce_core/threads/juce_DynamicLibrary.h +++ b/modules/juce_core/threads/juce_DynamicLibrary.h @@ -41,6 +41,12 @@ public: */ DynamicLibrary (const String& name) : handle (nullptr) { open (name); } + /** Move constructor */ + DynamicLibrary (DynamicLibrary&& other) noexcept : handle (nullptr) + { + std::swap (handle, other.handle); + } + /** Destructor. If a library is currently open, it will be closed when this object is destroyed. */ diff --git a/modules/juce_core/threads/juce_Thread.cpp b/modules/juce_core/threads/juce_Thread.cpp index 64f50a4630..28b7cf40b9 100644 --- a/modules/juce_core/threads/juce_Thread.cpp +++ b/modules/juce_core/threads/juce_Thread.cpp @@ -20,14 +20,8 @@ ============================================================================== */ -Thread::Thread (const String& threadName_, const size_t stackSize) - : threadName (threadName_), - threadHandle (nullptr), - threadId (0), - threadPriority (5), - threadStackSize (stackSize), - affinityMask (0), - shouldExit (false) +Thread::Thread (const String& name, const size_t stackSize) + : threadName (name), threadStackSize (stackSize) { } @@ -126,12 +120,21 @@ void Thread::startThread() } } -void Thread::startThread (const int priority) +void Thread::startThread (int priority) { const ScopedLock sl (startStopLock); if (threadHandle == nullptr) { + auto isRealtime = (priority == realtimeAudioPriority); + + #if JUCE_ANDROID + isAndroidRealtimeThread = isRealtime; + #endif + + if (isRealtime) + priority = 9; + threadPriority = priority; startThread(); } @@ -218,8 +221,13 @@ bool Thread::stopThread (const int timeOutMilliseconds) } //============================================================================== -bool Thread::setPriority (const int newPriority) +bool Thread::setPriority (int newPriority) { + bool isRealtime = (newPriority == realtimeAudioPriority); + + if (isRealtime) + newPriority = 9; + // NB: deadlock possible if you try to set the thread prio from the thread itself, // so using setCurrentThreadPriority instead in that case. if (getCurrentThreadId() == getThreadId()) @@ -227,6 +235,14 @@ bool Thread::setPriority (const int newPriority) const ScopedLock sl (startStopLock); + #if JUCE_ANDROID + // you cannot switch from or to an Android realtime thread once the + // thread is already running! + jassert (isThreadRunning() && (isRealtime == isAndroidRealtimeThread)); + + isAndroidRealtimeThread = isRealtime; + #endif + if ((! isThreadRunning()) || setThreadPriority (threadHandle, newPriority)) { threadPriority = newPriority; @@ -277,13 +293,13 @@ bool JUCE_CALLTYPE Process::isRunningUnderDebugger() noexcept return juce_isRunningUnderDebugger(); } -//============================================================================== #if JUCE_UNIT_TESTS +//============================================================================== class AtomicTests : public UnitTest { public: - AtomicTests() : UnitTest ("Atomics") {} + AtomicTests() : UnitTest ("Atomics", "Threads") {} void runTest() override { @@ -308,8 +324,6 @@ public: AtomicTester ::testInteger (*this); beginTest ("Atomic long"); AtomicTester ::testInteger (*this); - beginTest ("Atomic void*"); - AtomicTester ::testInteger (*this); beginTest ("Atomic int*"); AtomicTester ::testInteger (*this); beginTest ("Atomic float"); @@ -322,6 +336,21 @@ public: beginTest ("Atomic double"); AtomicTester ::testFloat (*this); #endif + beginTest ("Atomic pointer increment/decrement"); + Atomic a (a2); int* b (a2); + expect (++a == ++b); + + { + beginTest ("Atomic void*"); + Atomic atomic; + void* c; + + atomic.set ((void*) 10); + c = (void*) 10; + + expect (atomic.value == c); + expect (atomic.get() == c); + } } template @@ -333,36 +362,44 @@ public: static void testInteger (UnitTest& test) { Atomic a, b; + Type c; + a.set ((Type) 10); - test.expect (a.value == (Type) 10); - test.expect (a.get() == (Type) 10); - a += (Type) 15; - test.expect (a.get() == (Type) 25); + c = (Type) 10; + + test.expect (a.value == c); + test.expect (a.get() == c); + + a += 15; + c += 15; + test.expect (a.get() == c); a.memoryBarrier(); - a -= (Type) 5; - test.expect (a.get() == (Type) 20); - test.expect (++a == (Type) 21); + + a -= 5; + c -= 5; + test.expect (a.get() == c); + + test.expect (++a == ++c); ++a; - test.expect (--a == (Type) 21); - test.expect (a.get() == (Type) 21); + ++c; + test.expect (--a == --c); + test.expect (a.get() == c); a.memoryBarrier(); testFloat (test); } + + static void testFloat (UnitTest& test) { Atomic a, b; - a = (Type) 21; + a = (Type) 101; a.memoryBarrier(); /* These are some simple test cases to check the atomics - let me know if any of these assertions fail on your system! */ - test.expect (a.get() == (Type) 21); - test.expect (a.compareAndSetValue ((Type) 100, (Type) 50) == (Type) 21); - test.expect (a.get() == (Type) 21); - test.expect (a.compareAndSetValue ((Type) 101, a.get()) == (Type) 21); test.expect (a.get() == (Type) 101); test.expect (! a.compareAndSetBool ((Type) 300, (Type) 200)); test.expect (a.get() == (Type) 101); @@ -380,4 +417,60 @@ public: static AtomicTests atomicUnitTests; +//============================================================================== +class ThreadLocalValueUnitTest : public UnitTest, private Thread +{ +public: + ThreadLocalValueUnitTest() + : UnitTest ("ThreadLocalValue", "Threads"), + Thread ("ThreadLocalValue Thread") + {} + + void runTest() override + { + beginTest ("values are thread local"); + + { + ThreadLocalValue threadLocal; + + sharedThreadLocal = &threadLocal; + + sharedThreadLocal.get()->get() = 1; + + startThread(); + signalThreadShouldExit(); + waitForThreadToExit (-1); + + mainThreadResult = sharedThreadLocal.get()->get(); + + expectEquals (mainThreadResult.get(), 1); + expectEquals (auxThreadResult.get(), 2); + } + + beginTest ("values are per-instance"); + + { + ThreadLocalValue a, b; + + a.get() = 1; + b.get() = 2; + + expectEquals (a.get(), 1); + expectEquals (b.get(), 2); + } + } + +private: + Atomic mainThreadResult, auxThreadResult; + Atomic*> sharedThreadLocal; + + void run() override + { + sharedThreadLocal.get()->get() = 2; + auxThreadResult = sharedThreadLocal.get()->get(); + } +}; + +ThreadLocalValueUnitTest threadLocalValueUnitTest; + #endif diff --git a/modules/juce_core/threads/juce_Thread.h b/modules/juce_core/threads/juce_Thread.h index fc84bce9d7..e3f177c588 100644 --- a/modules/juce_core/threads/juce_Thread.h +++ b/modules/juce_core/threads/juce_Thread.h @@ -92,7 +92,7 @@ public: Launches the thread with a given priority, where 0 = lowest, 10 = highest. If the thread is already running, its priority will be changed. - @see startThread, setPriority + @see startThread, setPriority, realtimeAudioPriority */ void startThread (int priority); @@ -164,11 +164,38 @@ public: bool waitForThreadToExit (int timeOutMilliseconds) const; //============================================================================== + /** Special realtime audio thread priority + + This priority will create a high-priority thread which is best suited + for realtime audio processing. + + Currently, this priority is identical to priority 9, except when building + for Android with OpenSL support. + + In this case, JUCE will ask OpenSL to consturct a super high priority thread + specifically for realtime audio processing. + + Note that this priority can only be set **before** the thread has + started. Switching to this priority, or from this priority to a different + priority, is not supported under Android and will assert. + + For best performance this thread should yield at regular intervals + and not call any blocking APIS. + + @see startThread, setPriority, sleep, WaitableEvent + */ + enum + { + realtimeAudioPriority = -1 + }; + /** Changes the thread's priority. May return false if for some reason the priority can't be changed. @param priority the new priority, in the range 0 (lowest) to 10 (highest). A priority of 5 is normal. + + @see realtimeAudioPriority */ bool setPriority (int priority); @@ -272,14 +299,18 @@ public: private: //============================================================================== const String threadName; - void* volatile threadHandle; - ThreadID threadId; + void* volatile threadHandle = nullptr; + ThreadID threadId = {}; CriticalSection startStopLock; WaitableEvent startSuspensionEvent, defaultEvent; - int threadPriority; + int threadPriority = 5; size_t threadStackSize; - uint32 affinityMask; - bool volatile shouldExit; + uint32 affinityMask = 0; + bool volatile shouldExit = false; + + #if JUCE_ANDROID + bool isAndroidRealtimeThread = false; + #endif #ifndef DOXYGEN friend void JUCE_API juce_threadEntryPoint (void*); diff --git a/modules/juce_core/threads/juce_ThreadLocalValue.h b/modules/juce_core/threads/juce_ThreadLocalValue.h index 64ce6a5b31..2b6d4fe028 100644 --- a/modules/juce_core/threads/juce_ThreadLocalValue.h +++ b/modules/juce_core/threads/juce_ThreadLocalValue.h @@ -22,13 +22,6 @@ #pragma once -// (NB: on win32, native thread-locals aren't possible in a dynamically loaded DLL in XP). -#if ! ((JUCE_MSVC && (JUCE_64BIT || ! defined (JucePlugin_PluginCode))) \ - || (JUCE_MAC && JUCE_CLANG && defined (MAC_OS_X_VERSION_10_7) \ - && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)) - #define JUCE_NO_COMPILER_THREAD_LOCAL 1 -#endif - //============================================================================== /** Provides cross-platform support for thread-local objects. @@ -61,14 +54,12 @@ public: */ ~ThreadLocalValue() { - #if JUCE_NO_COMPILER_THREAD_LOCAL - for (ObjectHolder* o = first.value; o != nullptr;) + for (auto* o = first.get(); o != nullptr;) { - ObjectHolder* const next = o->next; + auto* next = o->next; delete o; o = next; } - #endif } /** Returns a reference to this thread's instance of the value. @@ -102,47 +93,25 @@ public: */ Type& get() const noexcept { - #if JUCE_NO_COMPILER_THREAD_LOCAL - const Thread::ThreadID threadId = Thread::getCurrentThreadId(); + auto threadId = Thread::getCurrentThreadId(); + ObjectHolder* o = nullptr; - for (ObjectHolder* o = first.get(); o != nullptr; o = o->next) - if (o->threadId == threadId) + for (o = first.get(); o != nullptr; o = o->next) + if (o->threadId.get() == threadId) return o->object; - for (ObjectHolder* o = first.get(); o != nullptr; o = o->next) - { - if (o->threadId == nullptr) - { - { - SpinLock::ScopedLockType sl (lock); + for (o = first.get(); o != nullptr; o = o->next) + if (o->threadId.compareAndSetBool (threadId, nullptr)) + break; - if (o->threadId != nullptr) - continue; + if (o != nullptr) + o->object = Type(); + else + for (o = new ObjectHolder (threadId, first.get()); + ! first.compareAndSetBool (o, o->next); + o->next = first.get()); - o->threadId = threadId; - } - - o->object = Type(); - return o->object; - } - } - - ObjectHolder* const newObject = new ObjectHolder (threadId); - - do - { - newObject->next = first.get(); - } - while (! first.compareAndSetBool (newObject, newObject->next)); - - return newObject->object; - #elif JUCE_MAC - static __thread Type object; - return object; - #elif JUCE_MSVC - static __declspec(thread) Type object; - return object; - #endif + return o->object; } /** Called by a thread before it terminates, to allow this class to release @@ -150,30 +119,20 @@ public: */ void releaseCurrentThreadStorage() { - #if JUCE_NO_COMPILER_THREAD_LOCAL - const Thread::ThreadID threadId = Thread::getCurrentThreadId(); + auto threadId = Thread::getCurrentThreadId(); - for (ObjectHolder* o = first.get(); o != nullptr; o = o->next) - { - if (o->threadId == threadId) - { - SpinLock::ScopedLockType sl (lock); - o->threadId = nullptr; - } - } - #endif + for (auto* o = first.get(); o != nullptr; o = o->next) + if (o->threadId.compareAndSetBool (nullptr, threadId)) + return; } private: //============================================================================== - #if JUCE_NO_COMPILER_THREAD_LOCAL struct ObjectHolder { - ObjectHolder (const Thread::ThreadID& tid) - : threadId (tid), next (nullptr), object() - {} + ObjectHolder (Thread::ThreadID idToUse, ObjectHolder* n) : threadId (idToUse), next (n), object() {} - Thread::ThreadID threadId; + Atomic threadId; ObjectHolder* next; Type object; @@ -181,8 +140,6 @@ private: }; mutable Atomic first; - SpinLock lock; - #endif JUCE_DECLARE_NON_COPYABLE (ThreadLocalValue) }; diff --git a/modules/juce_core/time/juce_PerformanceCounter.h b/modules/juce_core/time/juce_PerformanceCounter.h index e201dbc97f..ed908e5e32 100644 --- a/modules/juce_core/time/juce_PerformanceCounter.h +++ b/modules/juce_core/time/juce_PerformanceCounter.h @@ -115,3 +115,43 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PerformanceCounter) }; + + +//============================================================================== +/** + Simple RAII class for measuring the time spent in a scope. + + Example: + + { + double timeSec; + + { + ScopedTimeMeasurement m (timeSec); + doSomething(); + } + + Logger::writeToLog (String ("doSomething() took ") + String (timeSec) + "seconds"); + } + + @param resultInSeconds The result of the measurement will be stored in this variable. +*/ +class JUCE_API ScopedTimeMeasurement +{ +public: + ScopedTimeMeasurement (double& resultInSeconds) + : result (resultInSeconds) + { + result = 0.0; + } + + ~ScopedTimeMeasurement() + { + static auto scaler = 1.0 / static_cast (Time::getHighResolutionTicksPerSecond()); + result = static_cast (Time::getHighResolutionTicks() - startTimeTicks) * scaler; + } + +private: + int64 startTimeTicks = Time::getHighResolutionTicks(); + double& result; +}; diff --git a/modules/juce_core/time/juce_Time.cpp b/modules/juce_core/time/juce_Time.cpp index b7045e28d4..2e78b58edb 100644 --- a/modules/juce_core/time/juce_Time.cpp +++ b/modules/juce_core/time/juce_Time.cpp @@ -506,7 +506,19 @@ Time Time::fromISO8601 (StringRef iso) noexcept if (minutes < 0) return {}; - milliseconds = (int) (1000.0 * CharacterFunctions::readDoubleValue (t)); + auto seconds = parseFixedSizeIntAndSkip (t, 2, 0); + if (seconds < 0) + return {}; + + if (*t == '.') + { + ++t; + milliseconds = parseFixedSizeIntAndSkip (t, 3, 0); + if (milliseconds < 0) + return {}; + } + + milliseconds += 1000 * seconds; } const juce_wchar nextChar = t.getAndAdvance(); @@ -616,7 +628,7 @@ Time Time::getCompilationDate() class TimeTests : public UnitTest { public: - TimeTests() : UnitTest ("Time") {} + TimeTests() : UnitTest ("Time", "Time") {} void runTest() override { diff --git a/modules/juce_core/time/juce_Time.h b/modules/juce_core/time/juce_Time.h index ee9b7671a7..c38321b5a0 100644 --- a/modules/juce_core/time/juce_Time.h +++ b/modules/juce_core/time/juce_Time.h @@ -300,7 +300,7 @@ public: /** Returns the number of millisecs since a fixed event (usually system startup). - This returns a monotonically increasing value which it unaffected by changes to the + This returns a monotonically increasing value which is unaffected by changes to the system clock. It should be accurate to within a few millisecs, depending on platform, hardware, etc. diff --git a/modules/juce_core/unit_tests/juce_UnitTest.cpp b/modules/juce_core/unit_tests/juce_UnitTest.cpp index ea7d2f0096..2ed41b9813 100644 --- a/modules/juce_core/unit_tests/juce_UnitTest.cpp +++ b/modules/juce_core/unit_tests/juce_UnitTest.cpp @@ -20,8 +20,8 @@ ============================================================================== */ -UnitTest::UnitTest (const String& nm) - : name (nm), runner (nullptr) +UnitTest::UnitTest (const String& nm, const String& ctg) + : name (nm), category (ctg), runner (nullptr) { getAllTests().add (this); } @@ -37,6 +37,31 @@ Array& UnitTest::getAllTests() return tests; } +Array UnitTest::getTestsInCategory (const String& category) +{ + if (category.isEmpty()) + return getAllTests(); + + Array unitTests; + + for (auto* test : getAllTests()) + if (test->getCategory() == category) + unitTests.add (test); + + return unitTests; +} + +StringArray UnitTest::getAllCategories() +{ + StringArray categories; + + for (auto* test : getAllTests()) + if (test->getCategory().isNotEmpty()) + categories.addIfNotAlreadyThere (test->getCategory()); + + return categories; +} + void UnitTest::initialise() {} void UnitTest::shutdown() {} @@ -159,6 +184,11 @@ void UnitTestRunner::runAllTests (int64 randomSeed) runTests (UnitTest::getAllTests(), randomSeed); } +void UnitTestRunner::runTestsInCategory (const String& category, int64 randomSeed) +{ + runTests (UnitTest::getTestsInCategory (category), randomSeed); +} + void UnitTestRunner::logMessage (const String& message) { Logger::writeToLog (message); diff --git a/modules/juce_core/unit_tests/juce_UnitTest.h b/modules/juce_core/unit_tests/juce_UnitTest.h index b431943e29..68c4459818 100644 --- a/modules/juce_core/unit_tests/juce_UnitTest.h +++ b/modules/juce_core/unit_tests/juce_UnitTest.h @@ -67,8 +67,8 @@ class JUCE_API UnitTest { public: //============================================================================== - /** Creates a test with the given name. */ - explicit UnitTest (const String& name); + /** Creates a test with the given name and optionally places it in a category. */ + explicit UnitTest (const String& name, const String& category = String()); /** Destructor. */ virtual ~UnitTest(); @@ -76,6 +76,9 @@ public: /** Returns the name of the test. */ const String& getName() const noexcept { return name; } + /** Returns the category of the test. */ + const String& getCategory() const noexcept { return category; } + /** Runs the test, using the specified UnitTestRunner. You shouldn't need to call this method directly - use UnitTestRunner::runTests() instead. @@ -85,6 +88,12 @@ public: /** Returns the set of all UnitTest objects that currently exist. */ static Array& getAllTests(); + /** Returns the set of UnitTests in a specified category. */ + static Array getTestsInCategory (const String& category); + + /** Returns a StringArray containing all of the categories of UnitTests that have been registered. */ + static StringArray getAllCategories(); + //============================================================================== /** You can optionally implement this method to set up your test. This method will be called before runTest(). @@ -289,6 +298,7 @@ private: //============================================================================== const String name; + const String category; UnitTestRunner* runner; JUCE_DECLARE_NON_COPYABLE (UnitTest) @@ -335,6 +345,14 @@ public: */ void runAllTests (int64 randomSeed = 0); + /** Runs all the UnitTest objects within a specified category. + This calls runTests() for all the objects listed in UnitTest::getTestsInCategory(). + + If you want to run the tests with a predetermined seed, you can pass that into + the randomSeed argument, or pass 0 to have a randomly-generated seed chosen. + */ + void runTestsInCategory (const String& category, int64 randomSeed = 0); + /** Sets a flag to indicate whether an assertion should be triggered if a test fails. This is true by default. */ diff --git a/modules/juce_core/xml/juce_XmlElement.h b/modules/juce_core/xml/juce_XmlElement.h index 68fc5a4ecd..5c1b90fe34 100644 --- a/modules/juce_core/xml/juce_XmlElement.h +++ b/modules/juce_core/xml/juce_XmlElement.h @@ -167,9 +167,9 @@ public: ~XmlElement() noexcept; //============================================================================== - /** Compares two XmlElements to see if they contain the same text and attiributes. + /** Compares two XmlElements to see if they contain the same text and attributes. - The elements are only considered equivalent if they contain the same attiributes + The elements are only considered equivalent if they contain the same attributes with the same values, and have the same sub-nodes. @param other the other element to compare to diff --git a/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp b/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp index 19da1f08f5..d8c46bc009 100644 --- a/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp +++ b/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp @@ -158,7 +158,7 @@ bool GZIPCompressorOutputStream::setPosition (int64 /*newPosition*/) class GZIPTests : public UnitTest { public: - GZIPTests() : UnitTest ("GZIP") {} + GZIPTests() : UnitTest ("GZIP", "Compression") {} void runTest() override { diff --git a/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp b/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp index a20adbe581..35e7a15042 100644 --- a/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp +++ b/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp @@ -33,6 +33,9 @@ namespace zlibNamespace #pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wshadow" #pragma clang diagnostic ignored "-Wdeprecated-register" + #if __has_warning("-Wcomma") + #pragma clang diagnostic ignored "-Wcomma" + #endif #endif #undef OS_CODE diff --git a/modules/juce_cryptography/encryption/juce_BlowFish.cpp b/modules/juce_cryptography/encryption/juce_BlowFish.cpp index 987caaa614..cc16b5c9bc 100644 --- a/modules/juce_cryptography/encryption/juce_BlowFish.cpp +++ b/modules/juce_cryptography/encryption/juce_BlowFish.cpp @@ -311,7 +311,7 @@ int BlowFish::decrypt (void* data, size_t size) const noexcept return -1; } -bool BlowFish::apply (void* data, size_t size, void (BlowFish::*op) (uint32&, uint32&) const noexcept) const +bool BlowFish::apply (void* data, size_t size, void (BlowFish::*op) (uint32&, uint32&) const) const { union AlignedAccessHelper { @@ -368,7 +368,7 @@ int BlowFish::unpad (const void* data, size_t size) noexcept class BlowFishTests : public UnitTest { public: - BlowFishTests() : UnitTest ("BlowFish") {} + BlowFishTests() : UnitTest ("BlowFish", "Cryptography") {} static void fillMemoryBlockWithRandomData (MemoryBlock& block, Random& random) { diff --git a/modules/juce_cryptography/encryption/juce_BlowFish.h b/modules/juce_cryptography/encryption/juce_BlowFish.h index a377030e0a..dfa50dd88d 100644 --- a/modules/juce_cryptography/encryption/juce_BlowFish.h +++ b/modules/juce_cryptography/encryption/juce_BlowFish.h @@ -97,7 +97,7 @@ private: static int pad (void*, size_t, size_t) noexcept; static int unpad (const void*, size_t) noexcept; - bool apply (void*, size_t, void (BlowFish::*op) (uint32&, uint32&) const noexcept) const; + bool apply (void*, size_t, void (BlowFish::*op) (uint32&, uint32&) const) const; //============================================================================== uint32 p[18]; diff --git a/modules/juce_cryptography/hashing/juce_MD5.cpp b/modules/juce_cryptography/hashing/juce_MD5.cpp index 648d799484..c4f7f86393 100644 --- a/modules/juce_cryptography/hashing/juce_MD5.cpp +++ b/modules/juce_cryptography/hashing/juce_MD5.cpp @@ -307,7 +307,7 @@ bool MD5::operator!= (const MD5& other) const noexcept { return ! operator== ( class MD5Tests : public UnitTest { public: - MD5Tests() : UnitTest ("MD5") {} + MD5Tests() : UnitTest ("MD5", "Cryptography") {} void test (const char* input, const char* expected) { diff --git a/modules/juce_cryptography/hashing/juce_SHA256.cpp b/modules/juce_cryptography/hashing/juce_SHA256.cpp index 8d90c9aeb6..4173e4c644 100644 --- a/modules/juce_cryptography/hashing/juce_SHA256.cpp +++ b/modules/juce_cryptography/hashing/juce_SHA256.cpp @@ -240,7 +240,7 @@ bool SHA256::operator!= (const SHA256& other) const noexcept { return ! operato class SHA256Tests : public UnitTest { public: - SHA256Tests() : UnitTest ("SHA-256") {} + SHA256Tests() : UnitTest ("SHA-256", "Cryptography") {} void test (const char* input, const char* expected) { diff --git a/modules/juce_cryptography/hashing/juce_Whirlpool.cpp b/modules/juce_cryptography/hashing/juce_Whirlpool.cpp index 6ece8d7cb0..de4474fbbd 100644 --- a/modules/juce_cryptography/hashing/juce_Whirlpool.cpp +++ b/modules/juce_cryptography/hashing/juce_Whirlpool.cpp @@ -626,7 +626,7 @@ bool Whirlpool::operator!= (const Whirlpool& other) const noexcept { return ! o class WhirlpoolTests : public UnitTest { public: - WhirlpoolTests() : UnitTest ("Whirlpool") {} + WhirlpoolTests() : UnitTest ("Whirlpool", "Cryptography") {} void test (const char* input, const char* expected) { diff --git a/modules/juce_cryptography/juce_cryptography.h b/modules/juce_cryptography/juce_cryptography.h index 3b3c9ceda0..ff597eaa64 100644 --- a/modules/juce_cryptography/juce_cryptography.h +++ b/modules/juce_cryptography/juce_cryptography.h @@ -35,7 +35,7 @@ ID: juce_cryptography vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE cryptography classes description: Classes for various basic cryptography functions, including RSA, Blowfish, MD5, SHA, etc. website: http://www.juce.com/juce diff --git a/modules/juce_data_structures/juce_data_structures.h b/modules/juce_data_structures/juce_data_structures.h index e0e3d4dc87..1a99879adb 100644 --- a/modules/juce_data_structures/juce_data_structures.h +++ b/modules/juce_data_structures/juce_data_structures.h @@ -35,7 +35,7 @@ ID: juce_data_structures vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE data model helper classes description: Classes for undo/redo management, and smart data structures. website: http://www.juce.com/juce diff --git a/modules/juce_data_structures/values/juce_CachedValue.cpp b/modules/juce_data_structures/values/juce_CachedValue.cpp index c96de9b8bd..b8ecbcc34d 100644 --- a/modules/juce_data_structures/values/juce_CachedValue.cpp +++ b/modules/juce_data_structures/values/juce_CachedValue.cpp @@ -29,7 +29,7 @@ class CachedValueTests : public UnitTest { public: - CachedValueTests() : UnitTest ("CachedValues") {} + CachedValueTests() : UnitTest ("CachedValues", "Values") {} void runTest() override { diff --git a/modules/juce_data_structures/values/juce_ValueTree.cpp b/modules/juce_data_structures/values/juce_ValueTree.cpp index 525101871d..afe068d16d 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.cpp +++ b/modules/juce_data_structures/values/juce_ValueTree.cpp @@ -1057,7 +1057,7 @@ void ValueTree::Listener::valueTreeRedirected (ValueTree&) {} class ValueTreeTests : public UnitTest { public: - ValueTreeTests() : UnitTest ("ValueTrees") {} + ValueTreeTests() : UnitTest ("ValueTrees", "Values") {} static String createRandomIdentifier (Random& r) { diff --git a/modules/juce_dsp/containers/juce_AudioBlock.h b/modules/juce_dsp/containers/juce_AudioBlock.h new file mode 100644 index 0000000000..5681d75110 --- /dev/null +++ b/modules/juce_dsp/containers/juce_AudioBlock.h @@ -0,0 +1,541 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#ifndef DOXYGEN +namespace SampleTypeHelpers // Internal classes needed for handling sample type classes +{ + template struct ElementType { using Type = typename Container::value_type; }; + template <> struct ElementType { using Type = float; }; + template <> struct ElementType { using Type = double; }; + template <> struct ElementType { using Type = long double; }; +} +#endif + +//============================================================================== +/** + Minimal and lightweight data-structure which contains a list of pointers to + channels containing some kind of sample data. + + This class doesn't own any of the data which it points to, it's simply a view + into data that is owned elsewhere. You can construct one from some raw data + that you've allocated yourself, or give it a HeapBlock to use, or give it + an AudioSampleBuffer which it can refer to, but in all cases the user is + responsible for making sure that the data doesn't get deleted while there's + still an AudioBlock using it. +*/ +template +class AudioBlock +{ +public: + //============================================================================== + using NumericType = typename SampleTypeHelpers::ElementType::Type; + + //============================================================================== + /** Create a zero-sized AudioBlock. */ + forcedinline AudioBlock() noexcept {} + + /** Creates an AudioBlock from a pointer to an array of channels. + AudioBlock does not copy nor own the memory pointed to by dataToUse. + Therefore it is the user's responsibility to ensure that the memory is retained + throughout the life-time of the AudioBlock and released when no longer needed. + */ + forcedinline AudioBlock (SampleType* const* channelData, + size_t numberOfChannels, size_t numberOfSamples) noexcept + : channels (channelData), + numChannels (static_cast (numberOfChannels)), + numSamples (numberOfSamples) + { + } + + /** Creates an AudioBlock from a pointer to an array of channels. + AudioBlock does not copy nor own the memory pointed to by dataToUse. + Therefore it is the user's responsibility to ensure that the memory is retained + throughout the life-time of the AudioBlock and released when no longer needed. + */ + forcedinline AudioBlock (SampleType* const* channelData, size_t numberOfChannels, + size_t startSampleIndex, size_t numberOfSamples) noexcept + : channels (channelData), + numChannels (static_cast (numberOfChannels)), + startSample (startSampleIndex), + numSamples (numberOfSamples) + { + } + + /** Allocates a suitable amount of space in a HeapBlock, and initialises this object + to point into it. + The HeapBlock must of course not be freed or re-allocated while this object is still in + use, because it will be referencing its data. + */ + AudioBlock (HeapBlock& heapBlockToUseForAllocation, + size_t numberOfChannels, size_t numberOfSamples) noexcept + : numChannels (static_cast (numberOfChannels)), + numSamples (numberOfSamples) + { + auto roundedUpNumSamples = (numberOfSamples + elementMask) & ~elementMask; + auto channelSize = sizeof (SampleType) * roundedUpNumSamples; + auto channelListBytes = sizeof (SampleType*) * numberOfChannels; + auto extraBytes = sizeof (SampleType) - 1; + + heapBlockToUseForAllocation.malloc (channelListBytes + extraBytes + channelSize * numberOfChannels); + + auto* chanArray = reinterpret_cast (heapBlockToUseForAllocation.getData()); + channels = chanArray; + + auto* data = reinterpret_cast (addBytesToPointer (chanArray, channelListBytes)); + data = snapPointerToAlignment (data, sizeof (SampleType)); + + for (ChannelCountType i = 0; i < numChannels; ++i) + { + chanArray[i] = data; + data += roundedUpNumSamples; + } + } + + /** Creates an AudioBlock that points to the data in an AudioBuffer. + AudioBlock does not copy nor own the memory pointed to by dataToUse. + Therefore it is the user's responsibility to ensure that the buffer is retained + throughout the life-time of the AudioBlock without being modified. + */ + AudioBlock (AudioBuffer& buffer) noexcept + : channels (buffer.getArrayOfWritePointers()), + numChannels (static_cast (buffer.getNumChannels())), + numSamples (static_cast (buffer.getNumSamples())) + { + } + + /** Creates an AudioBlock that points to the data in an AudioBuffer. + AudioBlock does not copy nor own the memory pointed to by dataToUse. + Therefore it is the user's responsibility to ensure that the buffer is retained + throughout the life-time of the AudioBlock without being modified. + */ + AudioBlock (AudioBuffer& buffer, size_t startSampleIndex) noexcept + : channels (buffer.getArrayOfWritePointers()), + numChannels (static_cast (buffer.getNumChannels())), + startSample (startSampleIndex), + numSamples (static_cast (buffer.getNumSamples())) + { + jassert (startSample < numSamples); + } + + AudioBlock (const AudioBlock& other) noexcept = default; + AudioBlock& operator= (const AudioBlock& other) noexcept = default; + + //============================================================================== + forcedinline size_t getNumSamples() const noexcept { return numSamples; } + forcedinline size_t getNumChannels() const noexcept { return static_cast (numChannels); } + + /** Returns a raw pointer into one of the channels in this block. */ + forcedinline const SampleType* getChannelPointer (size_t channel) const noexcept + { + jassert (channel < numChannels); + jassert (numSamples > 0); + return *(channels + channel) + startSample; + } + + /** Returns a raw pointer into one of the channels in this block. */ + forcedinline SampleType* getChannelPointer (size_t channel) noexcept + { + jassert (channel < numChannels); + jassert (numSamples > 0); + return *(channels + channel) + startSample; + } + + /** Returns an AudioBlock that represents one of the channels in this block. */ + forcedinline AudioBlock getSingleChannelBlock (size_t channel) const noexcept + { + jassert (channel < numChannels); + return AudioBlock (channels + channel, 1, startSample, numSamples); + } + + /** Returns a subset of continguous channels + @param channelStart First channel of the subset + @param channelCount Count of channels in the subset + */ + forcedinline AudioBlock getSubsetChannelBlock (size_t channelStart, size_t numChannelsToUse) noexcept + { + jassert (channelStart < numChannels); + jassert ((channelStart + numChannelsToUse) <= numChannels); + + return AudioBlock (channels + channelStart, numChannelsToUse, startSample, numSamples); + } + + //============================================================================== + /** Clear the memory described by this AudioBlock. */ + forcedinline AudioBlock& clear() noexcept + { + auto n = static_cast (numSamples * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::clear (channelPtr (ch), n); + + return *this; + } + + /** Fill memory with value. */ + forcedinline AudioBlock& JUCE_VECTOR_CALLTYPE fill (SampleType value) noexcept + { + auto n = static_cast (numSamples * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::fill (channelPtr (ch), value, n); + + return *this; + } + + /** Copy the values in src to the receiver. */ + forcedinline AudioBlock& copy (const AudioBlock& src) noexcept + { + auto maxChannels = jmin (src.numChannels, numChannels); + auto n = static_cast (jmin (src.numSamples, numSamples) * sizeFactor); + + for (size_t ch = 0; ch < maxChannels; ++ch) + FloatVectorOperations::copy (channelPtr (ch), src.channelPtr (ch), n); + + return *this; + } + + /** Move memory within the receiver from the position srcPos to the position dstPos. + If numElements is not specified then move will move the maximum amount of memory. + */ + forcedinline AudioBlock& move (size_t srcPos, size_t dstPos, + size_t numElements = std::numeric_limits::max()) noexcept + { + jassert (srcPos <= numSamples && dstPos <= numSamples); + auto len = jmin (numSamples - srcPos, numSamples - dstPos, numElements) * sizeof (SampleType); + + if (len != 0) + for (size_t ch = 0; ch < numChannels; ++ch) + ::memmove (getChannelPointer (ch) + dstPos, + getChannelPointer (ch) + srcPos, len); + + return *this; + } + + //============================================================================== + /** Return a new AudioBlock pointing to a sub-block inside the receiver. This + function does not copy the memory and you must ensure that the original memory + pointed to by the receiver remains valid through-out the life-time of the + returned sub-block. + + @param newOffset The index of an element inside the reciever which will + will become the first element of the return value. + @param newLength The number of elements of the newly created sub-block. + */ + inline AudioBlock getSubBlock (size_t newOffset, size_t newLength) const noexcept + { + jassert (newOffset < numSamples); + jassert (newOffset + newLength <= numSamples); + + return AudioBlock (channels, numChannels, startSample + newOffset, newLength); + } + + /** Return a new AudioBlock pointing to a sub-block inside the receiver. This + function does not copy the memory and you must ensure that the original memory + pointed to by the receiver remains valid through-out the life-time of the + returned sub-block. + + @param newOffset The index of an element inside the reciever which will + will become the first element of the return value. + The return value will include all subsequent elements + of the receiver. + */ + inline AudioBlock getSubBlock (size_t newOffset) const noexcept + { + return getSubBlock (newOffset, getNumSamples() - newOffset); + } + + //============================================================================== + /** Adds a fixed value to the receiver. */ + forcedinline AudioBlock& JUCE_VECTOR_CALLTYPE add (SampleType value) noexcept + { + auto n = static_cast (numSamples * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::add (channelPtr (ch), value, n); + + return *this; + } + + /** Adds the source values to the receiver. */ + forcedinline AudioBlock& add (const AudioBlock& src) noexcept + { + jassert (numChannels == src.numChannels); + auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::add (channelPtr (ch), src.channelPtr (ch), n); + + return *this; + } + + /** Adds a fixed value to each source value and stores it in the destination array of the receiver. */ + forcedinline AudioBlock& JUCE_VECTOR_CALLTYPE add (const AudioBlock& src, SampleType value) noexcept + { + jassert (numChannels == src.numChannels); + auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::add (channelPtr (ch), src.channelPtr (ch), value, n); + + return *this; + } + + /** Adds each source1 value to the corresponding source2 value and stores it in the destination array of the receiver. */ + forcedinline AudioBlock& add (const AudioBlock& src1, const AudioBlock& src2) noexcept + { + jassert (numChannels == src1.numChannels && src1.numChannels == src2.numChannels); + auto n = static_cast (jmin (numSamples, src1.numSamples, src2.numSamples) * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::add (channelPtr (ch), src1.channelPtr (ch), src2.getChannelPointer (ch), n); + + return *this; + } + + /** Subtracts a fixed value from the receiver. */ + forcedinline AudioBlock& JUCE_VECTOR_CALLTYPE subtract (SampleType value) noexcept + { + return add (value * static_cast (-1.0)); + } + + /** Subtracts the source values from the receiver. */ + forcedinline AudioBlock& subtract (const AudioBlock& src) noexcept + { + jassert (numChannels == src.numChannels); + auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::subtract (channelPtr (ch), src.channelPtr (ch), n); + + return *this; + } + + /** Subtracts a fixed value from each source value and stores it in the destination array of the receiver. */ + forcedinline AudioBlock& JUCE_VECTOR_CALLTYPE subtract (const AudioBlock& src, SampleType value) noexcept + { + return add (src, static_cast (-1.0) * value); + } + + /** Subtracts each source2 value from the corresponding source1 value and stores it in the destination array of the receiver. */ + forcedinline AudioBlock& subtract (const AudioBlock& src1, const AudioBlock& src2) noexcept + { + jassert (numChannels == src1.numChannels && src1.numChannels == src2.numChannels); + auto n = static_cast (jmin (numSamples, src1.numSamples, src2.numSamples) * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::subtract (channelPtr (ch), src1.channelPtr (ch), src2.channelPtr (ch), n); + return *this; + } + + /** Multiplies a fixed value to the receiver. */ + forcedinline AudioBlock& JUCE_VECTOR_CALLTYPE multiply (SampleType value) noexcept + { + auto n = static_cast (numSamples * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::multiply (channelPtr (ch), value, n); + + return *this; + } + + /** Multiplies the source values to the receiver. */ + forcedinline AudioBlock& multiply (const AudioBlock& src) noexcept + { + jassert (numChannels == src.numChannels); + auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::multiply (channelPtr (ch), src.channelPtr (ch), n); + + return *this; + } + + /** Multiplies a fixed value to each source value and stores it in the destination array of the receiver. */ + forcedinline AudioBlock& JUCE_VECTOR_CALLTYPE multiply (const AudioBlock& src, SampleType value) noexcept + { + jassert (numChannels == src.numChannels); + auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::multiply (channelPtr (ch), src.channelPtr (ch), value, n); + + return *this; + } + + /** Multiplies each source1 value to the corresponding source2 value and stores it in the destination array of the receiver. */ + forcedinline AudioBlock& multiply (const AudioBlock& src1, const AudioBlock& src2) noexcept + { + jassert (numChannels == src1.numChannels && src1.numChannels == src2.numChannels); + auto n = static_cast (jmin (numSamples, src1.numSamples, src2.numSamples) * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::multiply (channelPtr (ch), src1.channelPtr (ch), src2.channelPtr (ch), n); + return *this; + } + + /** Multiplies each value in src with factor and adds the result to the receiver. */ + forcedinline AudioBlock& JUCE_VECTOR_CALLTYPE addWithMultiply (const AudioBlock& src, SampleType factor) noexcept + { + jassert (numChannels == src.numChannels); + auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::addWithMultiply (channelPtr (ch), src.channelPtr (ch), factor, n); + + return *this; + } + + /** Multiplies each value in srcA with the corresponding value in srcB and adds the result to the receiver. */ + forcedinline AudioBlock& addWithMultiply (const AudioBlock& src1, const AudioBlock& src2) noexcept + { + jassert (numChannels == src1.numChannels && src1.numChannels == src2.numChannels); + auto n = static_cast (jmin (numSamples, src1.numSamples, src2.numSamples) * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::addWithMultiply (channelPtr (ch), src1.channelPtr (ch), src2.channelPtr (ch), n); + + return *this; + } + + /* negates each value of the receiver */ + forcedinline AudioBlock& negate() noexcept + { + return multiply (static_cast (-1.0)); + } + + /* Negates each value of source and stores it in the receiver */ + forcedinline AudioBlock& replaceWithNegativeOf (const AudioBlock& src) noexcept + { + jassert (numChannels == src.numChannels); + auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::negate (channelPtr (ch), src.channelPtr (ch), n); + + return *this; + } + + /* takes the absolute value of each element of src and stores it inside the receiver. */ + forcedinline AudioBlock& replaceWithAbsoluteValueOf (const AudioBlock& src) noexcept + { + jassert (numChannels == src.numChannels); + auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::abs (channelPtr (ch), src.channelPtr (ch), n); + + return *this; + } + + /** Each element of receiver will be the minimum of the corresponding element of the source arrays. */ + forcedinline AudioBlock& min (const AudioBlock& src1, const AudioBlock& src2) noexcept + { + jassert (numChannels == src1.numChannels && src1.numChannels == src2.numChannels); + auto n = static_cast (jmin (src1.numSamples, src2.numSamples, numSamples) * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::min (channelPtr (ch), src1.channelPtr (ch), src2.channelPtr (ch), n); + + return *this; + } + + /** Each element of receiver will be the maximum of the corresponding element of the source arrays. */ + forcedinline AudioBlock& max (AudioBlock src1, AudioBlock src2) noexcept + { + jassert (numChannels == src1.numChannels && src1.numChannels == src2.numChannels); + auto n = static_cast (jmin (src1.numSamples, src2.numSamples, numSamples) * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + FloatVectorOperations::max (channelPtr (ch), src1.channelPtr (ch), src2.channelPtr (ch), n); + + return *this; + } + + /** Find minimum and maximum value of the buffer. */ + forcedinline Range findMinAndMax() const noexcept + { + Range minmax; + auto n = static_cast (numSamples * sizeFactor); + + for (size_t ch = 0; ch < numChannels; ++ch) + minmax = minmax.getUnionWith (FloatVectorOperations::findMinAndMax (channelPtr (ch), n)); + + return minmax; + } + + //============================================================================== + // convenient operator wrappers + forcedinline AudioBlock& JUCE_VECTOR_CALLTYPE operator+= (SampleType src) noexcept { return add (src); } + forcedinline AudioBlock& operator+= (AudioBlock src) noexcept { return add (src); } + forcedinline AudioBlock& JUCE_VECTOR_CALLTYPE operator-= (SampleType src) noexcept { return subtract (src); } + forcedinline AudioBlock& operator-= (AudioBlock src) noexcept { return subtract (src); } + forcedinline AudioBlock& JUCE_VECTOR_CALLTYPE operator*= (SampleType src) noexcept { return multiply (src); } + forcedinline AudioBlock& operator*= (AudioBlock src) noexcept { return multiply (src); } + + //============================================================================== + // This class can only be used with floating point types + static_assert (std::is_same::value || std::is_same::value + #if JUCE_USE_SIMD + || std::is_same >::value || std::is_same >::value + #endif + , "AudioBlock only supports single or double precision floating point types"); + + //============================================================================== + template + static void process (const AudioBlock& inBlock, + AudioBlock& outBlock, + const FunctionType& function) + { + auto len = inBlock.getNumSamples(); + auto numChans = inBlock.getNumChannels(); + + for (ChannelCountType c = 0; c < numChans; ++c) + { + auto* src = inBlock.getChannelPointer(c); + auto* dst = outBlock.getChannelPointer(c); + + for (size_t i = 0; i < len; ++i) + dst[i] = function (src[i]); + } + } + +private: + //============================================================================== + NumericType* channelPtr (size_t ch) noexcept { return reinterpret_cast (getChannelPointer (ch)); } + const NumericType* channelPtr (size_t ch) const noexcept { return reinterpret_cast (getChannelPointer (ch)); } + + //============================================================================== + using ChannelCountType = unsigned int; + + //============================================================================== + static constexpr size_t sizeFactor = sizeof (SampleType) / sizeof (NumericType); + static constexpr size_t elementMask = sizeFactor - 1; + static constexpr size_t byteMask = (sizeFactor * sizeof (NumericType)) - 1; + + SampleType* const* channels; + ChannelCountType numChannels = 0; + size_t startSample = 0, numSamples = 0; +}; diff --git a/modules/juce_dsp/containers/juce_SIMDRegister.h b/modules/juce_dsp/containers/juce_SIMDRegister.h new file mode 100644 index 0000000000..4ea8950e79 --- /dev/null +++ b/modules/juce_dsp/containers/juce_SIMDRegister.h @@ -0,0 +1,398 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#ifndef DOXYGEN + // This class is needed internally. + template + struct CmplxSIMDOps; +#endif + +//============================================================================== +/** + A wrapper around the platform's native SIMD register type. + + This class is only availabe on SIMD machines. Use JUCE_USE_SIMD to query + if SIMD is avaialble for your system. + + SIMDRegister is a templated class representing the native + vectorized version of FloatingType. SIMDRegister supports all numerical + primitive types and std:complex and std::complex supports + and most operations of the corresponding primitive + type. Additionally, SIMDRegister can be accessed like an array to extract + the individual elements. + + If you are using SIMDRegister as a pointer, then you must ensure that the + memory is suffeciently aligned for SIMD vector operations. Failing to do so + will result in crashes or very slow code. Use SIMDRegister::isSIMDAligned + to query if a pointer is suffeciently aligned for SIMD vector operations. + + Note that using SIMDRegister without enabling optimizations will result + in code with very poor performance. +*/ +template +struct SIMDRegister +{ + //============================================================================== + /** The corresponding primitive integer type, for example, this will be int32_t + if type is a float. */ + typedef typename SIMDInternal::MaskTypeFor::type MaskType; + + //============================================================================== + // Here are some types which are needed internally + + /** The native primitive type (used internally). */ + typedef typename SIMDInternal::PrimitiveType::type ElementType; + + /** STL compatible value_type definition. */ + typedef typename SIMDInternal::PrimitiveType::type value_type; + + /** The native operations for this platform and type combination (used internally) */ + typedef SIMDNativeOps NativeOps; + + /** The native type (used internally). */ + typedef typename NativeOps::vSIMDType vSIMDType; + + /** The corresponding integer SIMDRegister type (used internally). */ + typedef SIMDRegister vMaskType; + + /** The internal native type for the corresponding mask type (used internally). */ + typedef typename vMaskType::vSIMDType vMaskSIMDType; + + /** Wrapper for operations which need to be handled differently for complex + and scalar types (used internally). */ + typedef CmplxSIMDOps CmplxOps; + + //============================================================================== + /** The size in bytes of this register. */ + static constexpr size_t SIMDRegisterSize = sizeof (vSIMDType); + + /** The number of elements that this vector can hold. */ + static constexpr size_t SIMDNumElements = SIMDRegisterSize / sizeof (Type); + + vSIMDType value; + + //============================================================================== + /** Returns the number of elements in this vector */ + static constexpr size_t size() noexcept { return SIMDNumElements; } + + //============================================================================== + /** Creates a new SIMDRegister from the corresponding scalar primitive. + The scalar is extended to all elements of the vector. */ + inline static SIMDRegister JUCE_VECTOR_CALLTYPE expand (Type s) noexcept { return {CmplxOps::expand (s)}; } + + /** Creates a new SIMDRegister from the internal SIMD type (for example + __mm128 for single-precision floating point on SSE architectures). */ + inline static SIMDRegister JUCE_VECTOR_CALLTYPE fromNative (vSIMDType a) noexcept { return {a}; } + + //============================================================================== + /** Return the idx-th element of the receiver. Note that this does not check if idx + is larger than the native register size. */ + inline Type JUCE_VECTOR_CALLTYPE operator[] (size_t idx) const noexcept + { + jassert (idx < SIMDNumElements); + return reinterpret_cast (&value) [idx]; + } + + /** Return the idx-th element of the receiver. Note that this does not check if idx + is larger than the native register size. */ + inline Type& JUCE_VECTOR_CALLTYPE operator[] (size_t idx) noexcept + { + jassert (idx < SIMDNumElements); + return reinterpret_cast (&value) [idx]; + } + + //============================================================================== + /** Add another SIMDRegister to the receiver. */ + inline SIMDRegister& JUCE_VECTOR_CALLTYPE operator+= (SIMDRegister v) noexcept { value = NativeOps::add (value, v.value); return *this; } + + /** Subtract another SIMDRegister to the receiver. */ + inline SIMDRegister& JUCE_VECTOR_CALLTYPE operator-= (SIMDRegister v) noexcept { value = NativeOps::sub (value, v.value); return *this; } + + /** Subtract another SIMDRegister to the receiver. */ + inline SIMDRegister& JUCE_VECTOR_CALLTYPE operator*= (SIMDRegister v) noexcept { value = CmplxOps::mul (value, v.value); return *this; } + + //============================================================================== + /** Broadcasts the scalar to all elements of the receiver. */ + inline SIMDRegister& JUCE_VECTOR_CALLTYPE operator= (Type s) noexcept { value = CmplxOps::expand (s); return *this; } + + /** Add a scalar to the receiver. */ + inline SIMDRegister& JUCE_VECTOR_CALLTYPE operator+= (Type s) noexcept { value = NativeOps::add (value, CmplxOps::expand (s)); return *this; } + + /** Subtract a scalar to the receiver. */ + inline SIMDRegister& JUCE_VECTOR_CALLTYPE operator-= (Type s) noexcept { value = NativeOps::sub (value, CmplxOps::expand (s)); return *this; } + + /** Multiply a scalar to the receiver. */ + inline SIMDRegister& JUCE_VECTOR_CALLTYPE operator*= (Type s) noexcept { value = CmplxOps::mul (value, CmplxOps::expand (s)); return *this; } + + //============================================================================== + /** Bit-and the reciver with SIMDRegister v and store the result in the receiver. */ + inline SIMDRegister& JUCE_VECTOR_CALLTYPE operator&= (vMaskType v) noexcept { value = NativeOps::bit_and (value, toVecType (v.value)); return *this; } + + /** Bit-or the reciver with SIMDRegister v and store the result in the receiver. */ + inline SIMDRegister& JUCE_VECTOR_CALLTYPE operator|= (vMaskType v) noexcept { value = NativeOps::bit_or (value, toVecType (v.value)); return *this; } + + /** Bit-xor the reciver with SIMDRegister v and store the result in the receiver. */ + inline SIMDRegister& JUCE_VECTOR_CALLTYPE operator^= (vMaskType v) noexcept { value = NativeOps::bit_xor (value, toVecType (v.value)); return *this; } + + //============================================================================== + /** Bit-and each element of the reciver with the scalar s and store the result in the receiver.*/ + inline SIMDRegister& JUCE_VECTOR_CALLTYPE operator&= (MaskType s) noexcept { value = NativeOps::bit_and (value, toVecType (s)); return *this; } + + /** Bit-or each element of the reciver with the scalar s and store the result in the receiver.*/ + inline SIMDRegister& JUCE_VECTOR_CALLTYPE operator|= (MaskType s) noexcept { value = NativeOps::bit_or (value, toVecType (s)); return *this; } + + /** Bit-xor each element of the reciver with the scalar s and store the result in the receiver.*/ + inline SIMDRegister& JUCE_VECTOR_CALLTYPE operator^= (MaskType s) noexcept { value = NativeOps::bit_xor (value, toVecType (s)); return *this; } + + //============================================================================== + /** Return the sum of the receiver and v.*/ + inline SIMDRegister JUCE_VECTOR_CALLTYPE operator+ (SIMDRegister v) const noexcept { return { NativeOps::add (value, v.value) }; } + + /** Return the difference of the receiver and v.*/ + inline SIMDRegister JUCE_VECTOR_CALLTYPE operator- (SIMDRegister v) const noexcept { return { NativeOps::sub (value, v.value) }; } + + /** Return the product of the receiver and v.*/ + inline SIMDRegister JUCE_VECTOR_CALLTYPE operator* (SIMDRegister v) const noexcept { return { CmplxOps::mul (value, v.value) }; } + + //============================================================================== + /** Return a vector where each element is the sum of the corresponding element in the receiver and the scalar s.*/ + inline SIMDRegister JUCE_VECTOR_CALLTYPE operator+ (Type s) const noexcept { return { NativeOps::add (value, CmplxOps::expand (s)) }; } + + /** Return a vector where each element is the difference of the corresponding element in the receiver and the scalar s.*/ + inline SIMDRegister JUCE_VECTOR_CALLTYPE operator- (Type s) const noexcept { return { NativeOps::sub (value, CmplxOps::expand (s)) }; } + + /** Return a vector where each element is the difference of the corresponding element in the receiver and the scalar s.*/ + inline SIMDRegister JUCE_VECTOR_CALLTYPE operator* (Type s) const noexcept { return { CmplxOps::mul (value, CmplxOps::expand (s)) }; } + + //============================================================================== + /** Return the bit-and of the receiver and v. */ + inline SIMDRegister JUCE_VECTOR_CALLTYPE operator& (vMaskType v) const noexcept { return { NativeOps::bit_and (value, toVecType (v.value)) }; } + + /** Return the bit-or of the receiver and v. */ + inline SIMDRegister JUCE_VECTOR_CALLTYPE operator| (vMaskType v) const noexcept { return { NativeOps::bit_or (value, toVecType (v.value)) }; } + + /** Return the bit-xor of the receiver and v. */ + inline SIMDRegister JUCE_VECTOR_CALLTYPE operator^ (vMaskType v) const noexcept { return { NativeOps::bit_xor (value, toVecType (v.value)) }; } + + /** Return a vector where each element is the bit-inverted value of the corresponding element in the receiver.*/ + inline SIMDRegister JUCE_VECTOR_CALLTYPE operator~ () const noexcept { return { NativeOps::bit_not (value) }; } + + //============================================================================== + /** Return a vector where each element is the bit-and'd value of the corresponding element in the receiver and the scalar s.*/ + inline SIMDRegister JUCE_VECTOR_CALLTYPE operator& (MaskType s) const noexcept { return { NativeOps::bit_and (value, toVecType (s)) }; } + + /** Return a vector where each element is the bit-or'd value of the corresponding element in the receiver and the scalar s.*/ + inline SIMDRegister JUCE_VECTOR_CALLTYPE operator| (MaskType s) const noexcept { return { NativeOps::bit_or (value, toVecType (s)) }; } + + /** Return a vector where each element is the bit-xor'd value of the corresponding element in the receiver and the scalar s.*/ + inline SIMDRegister JUCE_VECTOR_CALLTYPE operator^ (MaskType s) const noexcept { return { NativeOps::bit_xor (value, toVecType (s)) }; } + + //============================================================================== + /** Returns a SIMDRegister of the corresponding integral type where each element has each bit set + if the corresponding element of a is equal to the corresponding element of b, or zero otherwise. + The result can then be used in bit operations defined above to avoid branches in vector SIMD code. */ + static inline vMaskType JUCE_VECTOR_CALLTYPE equal (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::equal (a.value, b.value)); } + + /** Returns a SIMDRegister of the corresponding integral type where each element has each bit set + if the corresponding element of a is not equal to the corresponding element of b, or zero otherwise. + The result can then be used in bit operations defined above to avoid branches in vector SIMD code. */ + static inline vMaskType JUCE_VECTOR_CALLTYPE notEqual (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::notEqual (a.value, b.value)); } + + /** Returns a SIMDRegister of the corresponding integral type where each element has each bit set + if the corresponding element of a is less than to the corresponding element of b, or zero otherwise. + The result can then be used in bit operations defined above to avoid branches in vector SIMD code. */ + static inline vMaskType JUCE_VECTOR_CALLTYPE lessThan (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::greaterThan (b.value, a.value)); } + + /** Returns a SIMDRegister of the corresponding integral type where each element has each bit set + if the corresponding element of a is than or equal to the corresponding element of b, or zero otherwise. + The result can then be used in bit operations defined above to avoid branches in vector SIMD code. */ + static inline vMaskType JUCE_VECTOR_CALLTYPE lessThanOrEqual (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::greaterThanOrEqual (b.value, a.value)); } + + /** Returns a SIMDRegister of the corresponding integral type where each element has each bit set + if the corresponding element of a is greater than to the corresponding element of b, or zero otherwise. + The result can then be used in bit operations defined above to avoid branches in vector SIMD code. */ + static inline vMaskType JUCE_VECTOR_CALLTYPE greaterThan (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::greaterThan (a.value, b.value)); } + + /** Returns a SIMDRegister of the corresponding integral type where each element has each bit set + if the corresponding element of a is greater than or equal to the corresponding element of b, or zero otherwise. + The result can then be used in bit operations defined above to avoid branches in vector SIMD code. */ + static inline vMaskType JUCE_VECTOR_CALLTYPE greaterThanOrEqual (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::greaterThanOrEqual (a.value, b.value)); } + + //============================================================================== + /** Returns a new vector where each element is the minimum of the corresponding element of a and b. */ + static inline SIMDRegister JUCE_VECTOR_CALLTYPE min (SIMDRegister a, SIMDRegister b) noexcept { return { NativeOps::min (a.value, b.value) }; } + + /** Returns a new vector where each element is the maximum of the corresponding element of a and b. */ + static inline SIMDRegister JUCE_VECTOR_CALLTYPE max (SIMDRegister a, SIMDRegister b) noexcept { return { NativeOps::max (a.value, b.value) }; } + + //============================================================================== + /** Multiplies a and b and adds the result to c. */ + static inline SIMDRegister JUCE_VECTOR_CALLTYPE multiplyAdd (SIMDRegister a, const SIMDRegister b, SIMDRegister c) noexcept + { + return { CmplxOps::muladd (a.value, b.value, c.value) }; + } + + //============================================================================== + /** Returns a scalar which is the sum of all elements of the receiver. */ + inline Type sum() const noexcept { return CmplxOps::sum (value); } + + //============================================================================== + /** Checks if the given pointer is suffeciently aligned for using SIMD operations. */ + static inline bool isSIMDAligned (Type* ptr) noexcept + { + uintptr_t bitmask = SIMDRegisterSize - 1; + return (reinterpret_cast (ptr) & bitmask) == 0; + } + + /** Returns the next position in memory where isSIMDAligned returns true. + + If the current position in memory is already aligned then this method + will simply return the pointer. + */ + static inline Type* getNextSIMDAlignedPtr (Type* ptr) noexcept + { + return snapPointerToAlignment (ptr, SIMDRegisterSize); + } + +private: + static inline vMaskType JUCE_VECTOR_CALLTYPE toMaskType (vSIMDType a) noexcept + { + union + { + vSIMDType in; + vMaskSIMDType out; + } u; + + u.in = a; + return vMaskType::fromNative (u.out); + } + + static inline vSIMDType JUCE_VECTOR_CALLTYPE toVecType (vMaskSIMDType a) noexcept + { + union + { + vMaskSIMDType in; + vSIMDType out; + } u; + + u.in = a; + return u.out; + } + + static inline vSIMDType JUCE_VECTOR_CALLTYPE toVecType (MaskType a) noexcept + { + union + { + vMaskSIMDType in; + vSIMDType out; + } u; + + u.in = CmplxSIMDOps::expand (a); + return u.out; + } +}; + +//============================================================================== +/* This class is used internally by SIMDRegister to abstract away differences + in operations which are different for complex and pure floating point types. */ +// the pure floating-point version +template +struct CmplxSIMDOps +{ + typedef typename SIMDNativeOps::vSIMDType vSIMDType; + + static inline vSIMDType JUCE_VECTOR_CALLTYPE expand (Scalar s) noexcept + { + return SIMDNativeOps::expand (s); + } + + static inline Scalar JUCE_VECTOR_CALLTYPE sum (vSIMDType a) noexcept + { + return SIMDNativeOps::sum (a); + } + + static inline vSIMDType JUCE_VECTOR_CALLTYPE mul (vSIMDType a, vSIMDType b) noexcept + { + return SIMDNativeOps::mul (a, b); + } + + static inline vSIMDType JUCE_VECTOR_CALLTYPE muladd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept + { + return SIMDNativeOps::multiplyAdd (a, b, c); + } +}; + +// the pure complex version +template +struct CmplxSIMDOps > +{ + typedef typename SIMDNativeOps::vSIMDType vSIMDType; + + static inline vSIMDType JUCE_VECTOR_CALLTYPE expand (std::complex s) noexcept + { + const int n = sizeof (vSIMDType) / sizeof (Scalar); + + union + { + vSIMDType v; + Scalar floats[n]; + } u; + + for (int i = 0; i < n; ++i) + u.floats[i] = (i & 1) == 0 ? s.real() : s.imag(); + + return u.v; + } + + static inline std::complex JUCE_VECTOR_CALLTYPE sum (vSIMDType a) noexcept + { + vSIMDType result = SIMDNativeOps::oddevensum (a); + const Scalar* ptr = reinterpret_cast (&result); + return std::complex (ptr[0], ptr[1]); + } + + static inline vSIMDType JUCE_VECTOR_CALLTYPE mul (vSIMDType a, vSIMDType b) noexcept + { + return SIMDNativeOps::cmplxmul (a, b); + } + + static inline vSIMDType JUCE_VECTOR_CALLTYPE muladd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept + { + return SIMDNativeOps::add (a, SIMDNativeOps::cmplxmul (b, c)); + } +}; + + +//============================================================================== +// Extend some common used global functions to SIMDRegister types +} // close namespace dsp + +template +inline dsp::SIMDRegister JUCE_VECTOR_CALLTYPE jmin (dsp::SIMDRegister a, dsp::SIMDRegister b) { return dsp::SIMDRegister::min (a, b); } +template +inline dsp::SIMDRegister JUCE_VECTOR_CALLTYPE jmax (dsp::SIMDRegister a, dsp::SIMDRegister b) { return dsp::SIMDRegister::max (a, b); } + +namespace dsp { diff --git a/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp b/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp new file mode 100644 index 0000000000..38e0df9724 --- /dev/null +++ b/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp @@ -0,0 +1,669 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +namespace SIMDRegister_test_internal +{ + template + static void fillRandom (type* dst, const int size, Random& random) + { + bool is_signed = std::is_signed::value; + + for (int i = 0; i < size; ++i) + { + if (is_signed) + { + *dst++ = static_cast ((random.nextFloat() * 16.0) - 8.0); + } + else + { + *dst++ = static_cast (random.nextFloat() * 8.0); + } + } + } + + template + static void fillRandom (std::complex* dst, const int size, Random& random) + { + for (int i = 0; i < size; ++i) + { + type real, imag; + + real = static_cast ((random.nextFloat() * 16.0) - 8.0); + imag = static_cast ((random.nextFloat() * 16.0) - 8.0); + + *dst++ = std::complex (real, imag); + } + } + + // Avoid visual studio warning + template + static type safeAbs (type a) + { + return static_cast (fabs ((double) a)); + } + + template + static type safeAbs (std::complex a) + { + return abs (a); + } + + template + static double difference (type a) + { + return static_cast (safeAbs (a)); + } + + template + static double difference (type a, type b) + { + return difference (a - b); + } +} + +// These tests need to be strictly run on all platforms supported by JUCE as the +// SIMD code is highly platform dependant. + +class SIMDRegisterUnitTests : public UnitTest +{ +public: + SIMDRegisterUnitTests() : UnitTest ("SIMDRegister UnitTests") {} + + //============================================================================== + // Some helper classes + template + static bool allValuesEqualTo (const SIMDRegister& vec, const type scalar) + { + // as we do not want to rely on the access operator we cast this to a primitive pointer + const type* ptr = reinterpret_cast (&vec); + for (size_t i = 0; i < SIMDRegister::SIMDNumElements; ++i) + if (ptr[i] != scalar) return false; + + return true; + } + + template + static bool vecEqualToArray (const SIMDRegister& vec, const type* array) + { + const type* ptr = reinterpret_cast (&vec); + for (size_t i = 0; i < SIMDRegister::SIMDNumElements; ++i) + { + double delta = SIMDRegister_test_internal::difference (ptr[i], array[i]); + if (delta > 1e-4) + { + DBG ("a: " << SIMDRegister_test_internal::difference (ptr[i]) << " b: " << SIMDRegister_test_internal::difference (array[i]) << " difference: " << delta); + return false; + } + } + + return true; + } + + template + static void copy (SIMDRegister& vec, const type* ptr) + { + for (size_t i = 0; i < SIMDRegister::SIMDNumElements; ++i) + vec[i] = ptr[i]; + } + + //============================================================================== + // Someuseful operations to test + struct Addition + { + template + static void inplace (typeOne& a, const typeTwo& b) + { + a += b; + } + + template + static typeOne outofplace (const typeOne& a, const typeTwo& b) + { + return a + b; + } + }; + + struct Subtraction + { + template + static void inplace (typeOne& a, const typeTwo& b) + { + a -= b; + } + + template + static typeOne outofplace (const typeOne& a, const typeTwo& b) + { + return a - b; + } + }; + + struct Multiplication + { + template + static void inplace (typeOne& a, const typeTwo& b) + { + a *= b; + } + + template + static typeOne outofplace (const typeOne& a, const typeTwo& b) + { + return a * b; + } + }; + + struct BitAND + { + template + static void inplace (typeOne& a, const typeTwo& b) + { + a &= b; + } + + template + static typeOne outofplace (const typeOne& a, const typeTwo& b) + { + return a & b; + } + }; + + struct BitOR + { + template + static void inplace (typeOne& a, const typeTwo& b) + { + a |= b; + } + + template + static typeOne outofplace (const typeOne& a, const typeTwo& b) + { + return a | b; + } + }; + + struct BitXOR + { + template + static void inplace (typeOne& a, const typeTwo& b) + { + a ^= b; + } + + template + static typeOne outofplace (const typeOne& a, const typeTwo& b) + { + return a ^ b; + } + }; + + //============================================================================== + // the individual tests + struct InitializationTest + { + template + static void run (UnitTest& u, Random& random) + { + u.expect (allValuesEqualTo (SIMDRegister::expand (static_cast (23)), 23)); + + { + SIMDRegister a; + + type* ptr = reinterpret_cast(&a); + SIMDRegister_test_internal::fillRandom (ptr, SIMDRegister::SIMDNumElements, random); + + u.expect (vecEqualToArray (SIMDRegister (a), ptr)); + } + } + }; + + struct AccessTest + { + template + static void run (UnitTest& u, Random& random) + { + // set-up + SIMDRegister a; + type array [SIMDRegister::SIMDNumElements]; + + SIMDRegister_test_internal::fillRandom (array, SIMDRegister::SIMDNumElements, random); + + // Test non-const access operator + for (size_t i = 0; i < SIMDRegister::SIMDNumElements; ++i) + a[i] = array[i]; + + u.expect (vecEqualToArray (a, array)); + + // Test const access operator + const SIMDRegister& b = a; + + for (size_t i = 0; i < SIMDRegister::SIMDNumElements; ++i) + u.expect (b[i] == array[i]); + } + }; + + template + struct OperatorTests + { + template + static void run (UnitTest& u, Random& random) + { + for (int n = 0; n < 100; ++n) + { + // set-up + SIMDRegister a, b, c; + type array_a [SIMDRegister::SIMDNumElements]; + type array_b [SIMDRegister::SIMDNumElements]; + type array_c [SIMDRegister::SIMDNumElements]; + + SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (array_c, SIMDRegister::SIMDNumElements, random); + + copy (a, array_a); copy (b, array_b); copy (c, array_c); + + // test in-place with both params being vectors + for (size_t i = 0; i < SIMDRegister::SIMDNumElements; ++i) + Operation::template inplace (array_a[i], array_b[i]); + + Operation::template inplace, SIMDRegister > (a, b); + + u.expect (vecEqualToArray (a, array_a)); + u.expect (vecEqualToArray (b, array_b)); + + SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (array_c, SIMDRegister::SIMDNumElements, random); + + copy (a, array_a); copy (b, array_b); copy (c, array_c); + + // test in-place with one param being scalar + for (size_t i = 0; i < SIMDRegister::SIMDNumElements; ++i) + Operation::template inplace (array_b[i], static_cast (2)); + + Operation::template inplace, type> (b, 2); + + u.expect (vecEqualToArray (a, array_a)); + u.expect (vecEqualToArray (b, array_b)); + + // set-up again + SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (array_c, SIMDRegister::SIMDNumElements, random); + copy (a, array_a); copy (b, array_b); copy (c, array_c); + + // test out-of-place with both params being vectors + for (size_t i = 0; i < SIMDRegister::SIMDNumElements; ++i) + array_c[i] = Operation::template outofplace (array_a[i], array_b[i]); + + c = Operation::template outofplace, SIMDRegister > (a, b); + + u.expect (vecEqualToArray (a, array_a)); + u.expect (vecEqualToArray (b, array_b)); + u.expect (vecEqualToArray (c, array_c)); + + // test out-of-place with one param being scalar + for (size_t i = 0; i < SIMDRegister::SIMDNumElements; ++i) + array_c[i] = Operation::template outofplace (array_b[i], static_cast (2)); + + c = Operation::template outofplace, type> (b, 2); + + u.expect (vecEqualToArray (a, array_a)); + u.expect (vecEqualToArray (b, array_b)); + u.expect (vecEqualToArray (c, array_c)); + } + } + }; + + template + struct BitOperatorTests + { + template + static void run (UnitTest& u, Random& random) + { + typedef typename SIMDRegister::vMaskType vMaskType; + typedef typename SIMDRegister::MaskType MaskType; + + + for (int n = 0; n < 100; ++n) + { + // Check flip sign bit and using as a union + { + type array_a [SIMDRegister::SIMDNumElements]; + + union + { + SIMDRegister floatVersion; + vMaskType intVersion; + } a, b; + + vMaskType bitmask = vMaskType::expand (static_cast (1) << (sizeof (MaskType) - 1)); + SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister::SIMDNumElements, random); + copy (a.floatVersion, array_a); + copy (b.floatVersion, array_a); + + Operation::template inplace, vMaskType> (a.floatVersion, bitmask); + Operation::template inplace (b.intVersion, bitmask); + + u.expect (vecEqualToArray (a.floatVersion, reinterpret_cast (&b.floatVersion))); + } + + // set-up + SIMDRegister a, c; + vMaskType b; + + MaskType array_a [SIMDRegister::SIMDNumElements]; + MaskType array_b [SIMDRegister::SIMDNumElements]; + MaskType array_c [SIMDRegister::SIMDNumElements]; + + type* conv_a = reinterpret_cast (array_a); + type* conv_c = reinterpret_cast (array_c); + + SIMDRegister_test_internal::fillRandom (conv_a, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (conv_c, SIMDRegister::SIMDNumElements, random); + copy (a, conv_a); copy (b, array_b); copy (c, conv_c); + + // test in-place with both params being vectors + for (size_t i = 0; i < SIMDRegister::SIMDNumElements; ++i) + Operation::template inplace (array_a[i], array_b[i]); + + Operation::template inplace, vMaskType> (a, b); + + u.expect (vecEqualToArray (a, conv_a)); + u.expect (vecEqualToArray (b, array_b)); + + SIMDRegister_test_internal::fillRandom (conv_a, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (conv_c, SIMDRegister::SIMDNumElements, random); + copy (a, conv_a); copy (b, array_b); copy (c, conv_c); + + // test in-place with one param being scalar + for (size_t i = 0; i < SIMDRegister::SIMDNumElements; ++i) + Operation::template inplace (array_a[i], static_cast (9)); + + Operation::template inplace, MaskType> (a, static_cast (9)); + + u.expect (vecEqualToArray (a, conv_a)); + u.expect (vecEqualToArray (b, array_b)); + + // set-up again + SIMDRegister_test_internal::fillRandom (conv_a, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (conv_c, SIMDRegister::SIMDNumElements, random); + copy (a, conv_a); copy (b, array_b); copy (c, conv_c); + + // test out-of-place with both params being vectors + for (size_t i = 0; i < SIMDRegister::SIMDNumElements; ++i) + { + array_c[i] = + Operation::template outofplace (array_a[i], array_b[i]); + } + + c = Operation::template outofplace, vMaskType> (a, b); + + u.expect (vecEqualToArray (a, conv_a)); + u.expect (vecEqualToArray (b, array_b)); + u.expect (vecEqualToArray (c, conv_c)); + + // test out-of-place with one param being scalar + for (size_t i = 0; i < SIMDRegister::SIMDNumElements; ++i) + array_c[i] = Operation::template outofplace (array_a[i], static_cast (9)); + + c = Operation::template outofplace, MaskType> (a, static_cast (9)); + + u.expect (vecEqualToArray (a, conv_a)); + u.expect (vecEqualToArray (b, array_b)); + u.expect (vecEqualToArray (c, conv_c)); + } + } + }; + + struct CheckComparisonOps + { + template + static void run (UnitTest& u, Random& random) + { + typedef typename SIMDRegister::vMaskType vMaskType; + typedef typename SIMDRegister::MaskType MaskType; + + for (int i = 0; i < 100; ++i) + { + // set-up + type array_a [SIMDRegister::SIMDNumElements]; + type array_b [SIMDRegister::SIMDNumElements]; + MaskType array_eq [SIMDRegister::SIMDNumElements]; + MaskType array_neq [SIMDRegister::SIMDNumElements]; + MaskType array_lt [SIMDRegister::SIMDNumElements]; + MaskType array_le [SIMDRegister::SIMDNumElements]; + MaskType array_gt [SIMDRegister::SIMDNumElements]; + MaskType array_ge [SIMDRegister::SIMDNumElements]; + + + SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister::SIMDNumElements, random); + + // do check + for (size_t j = 0; j < SIMDRegister::SIMDNumElements; ++j) + { + array_eq [j] = (array_a[j] == array_b[j]) ? static_cast (-1) : 0; + array_neq [j] = (array_a[j] != array_b[j]) ? static_cast (-1) : 0; + array_lt [j] = (array_a[j] < array_b[j]) ? static_cast (-1) : 0; + array_le [j] = (array_a[j] <= array_b[j]) ? static_cast (-1) : 0; + array_gt [j] = (array_a[j] > array_b[j]) ? static_cast (-1) : 0; + array_ge [j] = (array_a[j] >= array_b[j]) ? static_cast (-1) : 0; + } + + SIMDRegister a, b; + vMaskType eq, neq, lt, le, gt, ge; + + copy (a, array_a); + copy (b, array_b); + + eq = SIMDRegister::equal (a, b); + neq = SIMDRegister::notEqual (a, b); + lt = SIMDRegister::lessThan (a, b); + le = SIMDRegister::lessThanOrEqual (a, b); + gt = SIMDRegister::greaterThan (a, b); + ge = SIMDRegister::greaterThanOrEqual (a, b); + + u.expect (vecEqualToArray (eq, array_eq )); + u.expect (vecEqualToArray (neq, array_neq)); + u.expect (vecEqualToArray (lt, array_lt )); + u.expect (vecEqualToArray (le, array_le )); + u.expect (vecEqualToArray (gt, array_gt )); + u.expect (vecEqualToArray (ge, array_ge )); + } + } + }; + + struct CheckMultiplyAdd + { + template + static void run (UnitTest& u, Random& random) + { + // set-up + type array_a [SIMDRegister::SIMDNumElements]; + type array_b [SIMDRegister::SIMDNumElements]; + type array_c [SIMDRegister::SIMDNumElements]; + type array_d [SIMDRegister::SIMDNumElements]; + + SIMDRegister_test_internal::fillRandom (array_a, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (array_b, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (array_c, SIMDRegister::SIMDNumElements, random); + SIMDRegister_test_internal::fillRandom (array_d, SIMDRegister::SIMDNumElements, random); + + // check + for (size_t i = 0; i < SIMDRegister::SIMDNumElements; ++i) + array_d[i] = array_a[i] + (array_b[i] * array_c[i]); + + SIMDRegister a, b, c, d; + + copy (a, array_a); + copy (b, array_b); + copy (c, array_c); + + d = SIMDRegister::multiplyAdd (a, b, c); + + u.expect (vecEqualToArray (d, array_d)); + } + }; + + struct CheckMinMax + { + template + static void run (UnitTest& u, Random& random) + { + for (int i = 0; i < 100; ++i) + { + type array_a [SIMDRegister::SIMDNumElements]; + type array_b [SIMDRegister::SIMDNumElements]; + type array_min [SIMDRegister::SIMDNumElements]; + type array_max [SIMDRegister::SIMDNumElements]; + + for (size_t j = 0; j < SIMDRegister::SIMDNumElements; ++j) + { + array_a[j] = static_cast (random.nextInt (127)); + array_b[j] = static_cast (random.nextInt (127)); + } + + for (size_t j = 0; j < SIMDRegister::SIMDNumElements; ++j) + { + array_min[j] = (array_a[j] < array_b[j]) ? array_a[j] : array_b[j]; + array_max[j] = (array_a[j] > array_b[j]) ? array_a[j] : array_b[j]; + } + + SIMDRegister a, b, vMin, vMax; + + copy (a, array_a); + copy (b, array_b); + + vMin = jmin (a, b); + vMax = jmax (a, b); + + u.expect (vecEqualToArray (vMin, array_min)); + u.expect (vecEqualToArray (vMax, array_max)); + + copy (vMin, array_a); + copy (vMax, array_a); + + vMin = SIMDRegister::min (a, b); + vMax = SIMDRegister::max (a, b); + + u.expect (vecEqualToArray (vMin, array_min)); + u.expect (vecEqualToArray (vMax, array_max)); + } + } + }; + + struct CheckSum + { + template + static void run (UnitTest& u, Random& random) + { + type array [SIMDRegister::SIMDNumElements]; + type sumCheck = 0; + + SIMDRegister_test_internal::fillRandom (array, SIMDRegister::SIMDNumElements, random); + + for (size_t j = 0; j < SIMDRegister::SIMDNumElements; ++j) + { + sumCheck += array[j]; + } + + SIMDRegister a; + copy (a, array); + + u.expect (SIMDRegister_test_internal::difference (sumCheck, a.sum()) < 1e-4); + } + }; + + //============================================================================== + template + void runTestForAllTypes (const char* unitTestName) + { + beginTest (unitTestName); + + Random random = getRandom(); + + TheTest::template run (*this, random); + TheTest::template run (*this, random); + TheTest::template run (*this, random); + TheTest::template run (*this, random); + TheTest::template run (*this, random); + TheTest::template run(*this, random); + TheTest::template run (*this, random); + TheTest::template run(*this, random); + TheTest::template run (*this, random); + TheTest::template run(*this, random); + TheTest::template run > (*this, random); + TheTest::template run> (*this, random); + } + + template + void runTestNonComplex (const char* unitTestName) + { + beginTest (unitTestName); + + Random random = getRandom(); + + TheTest::template run (*this, random); + TheTest::template run (*this, random); + TheTest::template run (*this, random); + TheTest::template run (*this, random); + TheTest::template run (*this, random); + TheTest::template run(*this, random); + TheTest::template run (*this, random); + TheTest::template run(*this, random); + TheTest::template run (*this, random); + TheTest::template run(*this, random); + } + + void runTest() + { + runTestForAllTypes ("InitializationTest"); + + runTestForAllTypes ("AccessTest"); + + runTestForAllTypes > ("AdditionOperators"); + runTestForAllTypes > ("SubtractionOperators"); + runTestForAllTypes > ("MultiplicationOperators"); + + runTestForAllTypes > ("BitANDOperators"); + runTestForAllTypes > ("BitOROperators"); + runTestForAllTypes > ("BitXOROperators"); + + runTestNonComplex ("CheckComparisons"); + runTestNonComplex ("CheckMinMax"); + + runTestForAllTypes ("CheckMultiplyAdd"); + runTestForAllTypes ("CheckSum"); + } +}; + +static SIMDRegisterUnitTests SIMDRegisterUnitTests; diff --git a/modules/juce_dsp/filter_design/juce_FilterDesign.cpp b/modules/juce_dsp/filter_design/juce_FilterDesign.cpp new file mode 100644 index 0000000000..30574e578e --- /dev/null +++ b/modules/juce_dsp/filter_design/juce_FilterDesign.cpp @@ -0,0 +1,618 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +template +typename FIR::Coefficients::Ptr + FilterDesign::designFIRLowpassWindowMethod (FloatType frequency, + double sampleRate, size_t order, + WindowingMethod type, + FloatType beta) +{ + jassert (sampleRate > 0); + jassert (frequency > 0 && frequency <= sampleRate * 0.5); + + auto* result = new typename FIR::Coefficients (order + 1u); + + auto* c = result->getRawCoefficients(); + auto normalizedFrequency = frequency / sampleRate; + + for (size_t i = 0; i <= order; ++i) + { + if (i == order * 0.5) + { + c[i] = static_cast (normalizedFrequency * 2); + } + else + { + auto indice = double_Pi * (static_cast (i) - 0.5 * static_cast (order)); + c[i] = static_cast (std::sin (2.0 * indice * normalizedFrequency) / indice); + } + } + + WindowingFunction theWindow (order + 1, type, false, beta); + theWindow.multiplyWithWindowingTable (c, order + 1); + + return result; +} + +template +typename FIR::Coefficients::Ptr + FilterDesign::designFIRLowpassKaiserMethod (FloatType frequency, double sampleRate, + FloatType normalizedTransitionWidth, + FloatType attenuationdB) +{ + jassert (sampleRate > 0); + jassert (frequency > 0 && frequency <= sampleRate * 0.5); + jassert (normalizedTransitionWidth > 0 && normalizedTransitionWidth <= 0.5); + jassert (attenuationdB >= -100 && attenuationdB <= 0); + + FloatType beta = 0; + + if (attenuationdB < -50) + beta = static_cast (0.1102 * (-attenuationdB - 8.7)); + else if (attenuationdB <= 21) + beta = static_cast (0.5842 * std::pow (-attenuationdB - 21, 0.4) + 0.07886 * (-attenuationdB - 21)); + + int order = attenuationdB < -21 ? roundDoubleToInt (ceil ((-attenuationdB - 7.95) / (2.285 * normalizedTransitionWidth * 2.0 * double_Pi))) + : roundDoubleToInt (ceil (5.79 / (normalizedTransitionWidth * 2.0 * double_Pi))); + + jassert (order >= 0); + + return designFIRLowpassWindowMethod (frequency, sampleRate, static_cast (order), + WindowingFunction::kaiser, beta); +} + + +template +typename FIR::Coefficients::Ptr + FilterDesign::designFIRLowpassTransitionMethod (FloatType frequency, double sampleRate, size_t order, + FloatType normalizedTransitionWidth, FloatType spline) +{ + jassert (sampleRate > 0); + jassert (frequency > 0 && frequency <= sampleRate * 0.5); + jassert (normalizedTransitionWidth > 0 && normalizedTransitionWidth <= 0.5); + jassert (spline >= 1.0 && spline <= 4.0); + + auto normalizedFrequency = frequency / static_cast (sampleRate); + + auto* result = new typename FIR::Coefficients (order + 1u); + auto* c = result->getRawCoefficients(); + + for (size_t i = 0; i <= order; ++i) + { + if (i == order / 2) + { + c[i] = static_cast (2 * normalizedFrequency); + } + else + { + auto indice = double_Pi * (i - 0.5 * order); + auto indice2 = double_Pi * normalizedTransitionWidth * (i - 0.5 * order) / spline; + c[i] = static_cast (std::sin (2 * indice * normalizedFrequency) + / indice * std::pow (std::sin (indice2) / indice2, spline)); + } + } + + return result; +} + +template +typename FIR::Coefficients::Ptr + FilterDesign::designFIRLowpassLeastSquaresMethod (FloatType frequency, + double sampleRate, size_t order, + FloatType normalizedTransitionWidth, + FloatType stopBandWeight) +{ + jassert (sampleRate > 0); + jassert (frequency > 0 && frequency <= sampleRate * 0.5); + jassert (normalizedTransitionWidth > 0 && normalizedTransitionWidth <= 0.5); + jassert (stopBandWeight >= 1.0 && stopBandWeight <= 100.0); + + auto normalizedFrequency = static_cast (frequency) / sampleRate; + + auto wp = 2.0 * double_Pi * (static_cast (normalizedFrequency - normalizedTransitionWidth / 2.0)); + auto ws = 2.0 * double_Pi * (static_cast (normalizedFrequency + normalizedTransitionWidth / 2.0)); + + auto N = order + 1; + + auto* result = new typename FIR::Coefficients (static_cast (N)); + auto* c = result->getRawCoefficients(); + + if (N % 2 == 1) + { + // Type I + auto M = (N - 1) / 2; + + Matrix b (M + 1, 1), + q (2 * M + 1, 1); + + auto sinc = [](double x) { return x == 0 ? 1 : std::sin (x * double_Pi) / (double_Pi * x); }; + + auto factorp = wp / double_Pi; + auto factors = ws / double_Pi; + + for (size_t i = 0; i <= M; ++i) + b (i, 0) = factorp * sinc (factorp * i); + + q (0, 0) = factorp + stopBandWeight * (1.0 - factors); + + for (size_t i = 1; i <= 2 * M; ++i) + q (i, 0) = factorp * sinc (factorp * i) - stopBandWeight * factors * sinc (factors * i); + + auto Q1 = Matrix::toeplitz (q, M + 1); + auto Q2 = Matrix::hankel (q, M + 1, 0); + + Q1 += Q2; Q1 *= 0.5; + + Q1.solve (b); + + c[M] = static_cast (b (0, 0)); + + for (size_t i = 1; i <= M; ++i) + { + c[M - i] = static_cast (b (i, 0) * 0.5); + c[M + i] = static_cast (b (i, 0) * 0.5); + } + } + else + { + // Type II + auto M = N / 2; + + Matrix b (M, 1); + Matrix qp (2 * M, 1); + Matrix qs (2 * M, 1); + + auto sinc = [](double x) { return x == 0 ? 1 : std::sin (x * double_Pi) / (double_Pi * x); }; + + auto factorp = wp / double_Pi; + auto factors = ws / double_Pi; + + for (size_t i = 0; i < M; ++i) + b (i, 0) = factorp * sinc (factorp * (i + 0.5)); + + for (size_t i = 0; i < 2 * M; ++i) + { + qp (i, 0) = 0.25 * factorp * sinc (factorp * i); + qs (i, 0) = -0.25 * stopBandWeight * factors * sinc (factors * i); + } + + auto Q1p = Matrix::toeplitz (qp, M); + auto Q2p = Matrix::hankel (qp, M, 1); + auto Q1s = Matrix::toeplitz (qs, M); + auto Q2s = Matrix::hankel (qs, M, 1); + + auto Id = Matrix::identity (M); + Id *= (0.25 * stopBandWeight); + + Q1p += Q2p; + Q1s += Q2s; + Q1s += Id; + + auto& Q = Q1s; + Q += Q1p; + + Q.solve (b); + + for (size_t i = 0; i < M; ++i) + { + c[M - i - 1] = static_cast (b (i, 0) * 0.25); + c[M + i] = static_cast (b (i, 0) * 0.25); + } + } + + return result; +} + +template +typename FIR::Coefficients::Ptr + FilterDesign::designFIRLowpassHalfBandEquirippleMethod (FloatType normalizedTransitionWidth, + FloatType attenuationdB) +{ + jassert (normalizedTransitionWidth > 0 && normalizedTransitionWidth <= 0.5); + jassert (attenuationdB >= -300 && attenuationdB <= -10); + + auto wpT = (0.5 - normalizedTransitionWidth) * double_Pi; + + auto n = roundDoubleToInt (ceil ((attenuationdB - 18.18840664 * wpT + 33.64775300) / (18.54155181 * wpT - 29.13196871))); + auto kp = (n * wpT - 1.57111377 * n + 0.00665857) / (-1.01927560 * n + 0.37221484); + auto A = (0.01525753 * n + 0.03682344 + 9.24760314 / (double) n) * kp + 1.01701407 + 0.73512298 / (double) n; + auto B = (0.00233667 * n - 1.35418408 + 5.75145813 / (double) n) * kp + 1.02999650 - 0.72759508 / (double) n; + + auto hn = FilterDesign::getPartialImpulseResponseHn (n, kp); + auto hnm = FilterDesign::getPartialImpulseResponseHn (n - 1, kp); + + auto diff = (hn.size() - hnm.size()) / 2; + + for (int i = 0; i < diff; ++i) + { + hnm.add (0.0); + hnm.insert (0, 0.0); + } + + auto hh = hn; + + for (int i = 0; i < hn.size(); ++i) + hh.setUnchecked (i, A * hh[i] + B * hnm[i]); + + auto* result = new typename FIR::Coefficients (static_cast (hh.size())); + auto* c = result->getRawCoefficients(); + + for (int i = 0; i < hh.size(); ++i) + c[i] = (float) hh[i]; + + double NN; + + if (n % 2 == 0) + { + NN = 2.0 * result->getMagnitudeForFrequency (0.5, 1.0); + } + else + { + auto w01 = std::sqrt (kp * kp + (1 - kp * kp) * std::pow (std::cos (double_Pi / (2.0 * n + 1.0)), 2.0)); + auto om01 = std::acos (-w01); + + NN = -2.0 * result->getMagnitudeForFrequency (om01 / (2 * double_Pi), 1.0); + } + + for (int i = 0; i < hh.size(); ++i) + c[i] = static_cast ((A * hn[i] + B * hnm[i]) / NN); + + c[2 * n + 1] = static_cast (0.5); + + return result; +} + +template +Array FilterDesign::getPartialImpulseResponseHn (int n, double kp) +{ + Array alpha; + alpha.resize (2 * n + 1); + + alpha.setUnchecked (2 * n, 1.0 / std::pow (1.0 - kp * kp, n)); + + if (n > 0) + alpha.setUnchecked (2 * n - 2, -(2 * n * kp * kp + 1) * alpha[2 * n]); + + if (n > 1) + alpha.setUnchecked (2 * n - 4, -(4 * n + 1 + (n - 1) * (2 * n - 1) * kp * kp) / (2.0 * n) * alpha[2 * n - 2] + - (2 * n + 1) * ((n + 1) * kp * kp + 1) / (2.0 * n) * alpha[2 * n]); + + for (int k = n; k >= 3; --k) + { + auto c1 = (3 * (n*(n + 2) - k * (k - 2)) + 2 * k - 3 + 2 * (k - 2)*(2 * k - 3) * kp * kp) * alpha[2 * k - 4]; + auto c2 = (3 * (n*(n + 2) - (k - 1) * (k + 1)) + 2 * (2 * k - 1) + 2 * k*(2 * k - 1) * kp * kp) * alpha[2 * k - 2]; + auto c3 = (n * (n + 2) - (k - 1) * (k + 1)) * alpha[2 * k]; + auto c4 = (n * (n + 2) - (k - 3) * (k - 1)); + + alpha.setUnchecked (2 * k - 6, -(c1 + c2 + c3) / c4); + } + + Array ai; + ai.resize (2 * n + 1 + 1); + + for (int k = 0; k <= n; ++k) + ai.setUnchecked (2 * k + 1, alpha[2 * k] / (2.0 * k + 1.0)); + + Array hn; + hn.resize (2 * n + 1 + 2 * n + 1 + 1); + + for (int k = 0; k <= n; ++k) + { + hn.setUnchecked (2 * n + 1 + (2 * k + 1), 0.5 * ai[2 * k + 1]); + hn.setUnchecked (2 * n + 1 - (2 * k + 1), 0.5 * ai[2 * k + 1]); + } + + return hn; +} + +template +Array> + FilterDesign::designIIRLowpassHighOrderButterworthMethod (FloatType frequency, double sampleRate, + FloatType normalizedTransitionWidth, + FloatType passbandAttenuationdB, + FloatType stopbandAttenuationdB) +{ + return designIIRLowpassHighOrderGeneralMethod (0, frequency, sampleRate, normalizedTransitionWidth, + passbandAttenuationdB, stopbandAttenuationdB); +} + +template +Array> + FilterDesign::designIIRLowpassHighOrderChebyshev1Method (FloatType frequency, double sampleRate, + FloatType normalizedTransitionWidth, + FloatType passbandAttenuationdB, + FloatType stopbandAttenuationdB) +{ + return designIIRLowpassHighOrderGeneralMethod (1, frequency, sampleRate, normalizedTransitionWidth, + passbandAttenuationdB, stopbandAttenuationdB); +} + +template +Array> + FilterDesign::designIIRLowpassHighOrderChebyshev2Method (FloatType frequency, double sampleRate, + FloatType normalizedTransitionWidth, + FloatType passbandAttenuationdB, + FloatType stopbandAttenuationdB) +{ + return designIIRLowpassHighOrderGeneralMethod (2, frequency, sampleRate, normalizedTransitionWidth, + passbandAttenuationdB, stopbandAttenuationdB); +} + +template +Array> + FilterDesign::designIIRLowpassHighOrderEllipticMethod (FloatType frequency, double sampleRate, + FloatType normalizedTransitionWidth, + FloatType passbandAttenuationdB, + FloatType stopbandAttenuationdB) +{ + return designIIRLowpassHighOrderGeneralMethod (3, frequency, sampleRate, normalizedTransitionWidth, + passbandAttenuationdB, stopbandAttenuationdB); +} + +template +Array> + FilterDesign::designIIRLowpassHighOrderGeneralMethod (int type, FloatType frequency, double sampleRate, + FloatType normalizedTransitionWidth, + FloatType passbandAttenuationdB, + FloatType stopbandAttenuationdB) +{ + jassert (sampleRate > 0); + jassert (frequency > 0 && frequency <= sampleRate * 0.5); + jassert (normalizedTransitionWidth > 0 && normalizedTransitionWidth <= 0.5); + jassert (passbandAttenuationdB > -20 && passbandAttenuationdB < 0); + jassert (stopbandAttenuationdB > -300 && stopbandAttenuationdB < -20); + + auto normalizedFrequency = frequency / sampleRate; + + auto fp = normalizedFrequency - normalizedTransitionWidth / 2; + auto fs = normalizedFrequency + normalizedTransitionWidth / 2; + + double Ap = passbandAttenuationdB; + double As = stopbandAttenuationdB; + auto Gp = Decibels::decibelsToGain (Ap, -300.0); + auto Gs = Decibels::decibelsToGain (As, -300.0); + auto epsp = std::sqrt (1.0 / (Gp * Gp) - 1.0); + auto epss = std::sqrt (1.0 / (Gs * Gs) - 1.0); + + auto omegap = std::tan (double_Pi * fp); + auto omegas = std::tan (double_Pi * fs); + + auto k = omegap / omegas; + auto k1 = epsp / epss; + + int N; + + if (type == 0) + { + N = roundDoubleToInt (ceil (log (1.0 / k1) / log (1.0 / k))); + } + else if (type == 1 || type == 2) + { + N = roundDoubleToInt (ceil (std::acosh (1.0 / k1) / std::acosh (1.0 / k))); + } + else + { + double K, Kp, K1, K1p; + + SpecialFunctions::ellipicIntegralK (k, K, Kp); + SpecialFunctions::ellipicIntegralK (k1, K1, K1p); + + N = roundDoubleToInt (ceil ((K1p * K) / (K1 * Kp))); + } + + const int r = N % 2; + const int L = (N - r) / 2; + const double H0 = (type == 1 || type == 3) ? std::pow (Gp, 1.0 - r) : 1.0; + + Array> pa, za; + Complex j (0, 1); + + if (type == 0) + { + if (r == 1) + pa.add (-omegap * std::pow (epsp, -1.0 / (double) N)); + + for (int i = 1; i <= L; ++i) + { + auto ui = (2 * i - 1.0) / (double) N; + pa.add (omegap * std::pow (epsp, -1.0 / (double) N) * j * exp (ui * 0.5 * double_Pi * j)); + } + } + else if (type == 1) + { + auto v0 = std::asinh (1.0 / epsp) / (0.5 * N * double_Pi); + + if (r == 1) + pa.add (-omegap * std::sinh (v0 * 0.5 * double_Pi)); + + for (int i = 1; i <= L; ++i) + { + auto ui = (2 * i - 1.0) / (double) N; + pa.add (omegap * j * std::cos ((ui - j * v0) * 0.5 * double_Pi)); + } + } + else if (type == 2) + { + auto v0 = std::asinh (epss) / (N * 0.5 * double_Pi); + + if (r == 1) + pa.add(-1.0 / (k / omegap * std::sinh (v0 * 0.5 * double_Pi))); + + for (int i = 1; i <= L; ++i) + { + auto ui = (2 * i - 1.0) / (double) N; + + pa.add (1.0 / (k / omegap * j * std::cos ((ui - j * v0) * 0.5 * double_Pi))); + za.add (1.0 / (k / omegap * j * std::cos (ui * 0.5 * double_Pi))); + } + } + else + { + auto v0 = -j * (SpecialFunctions::asne (j / epsp, k1) / (double) N); + + if (r == 1) + pa.add (omegap * j * SpecialFunctions::sne (j * v0, k)); + + for (int i = 1; i <= L; ++i) + { + auto ui = (2 * i - 1.0) / (double) N; + auto zetai = SpecialFunctions::cde (ui, k); + + pa.add (omegap * j * SpecialFunctions::cde (ui - j * v0, k)); + za.add (omegap * j / (k * zetai)); + } + } + + Array> p, z, g; + + if (r == 1) + { + p.add ((1.0 + pa[0]) / (1.0 - pa[0])); + g.add (0.5 * (1.0 - p[0])); + } + + for (int i = 0; i < L; ++i) + { + p.add ((1.0 + pa[i + r]) / (1.0 - pa[i + r])); + z.add (za.size() == 0 ? -1.0 : (1.0 + za[i]) / (1.0 - za[i])); + g.add ((1.0 - p[i + r]) / (1.0 - z[i])); + } + + Array> theCascadedCoefficients; + + if (r == 1) + { + auto b0 = static_cast (H0 * std::real (g[0])); + auto b1 = b0; + auto a1 = static_cast (-std::real (p[0])); + + theCascadedCoefficients.add (IIR::Coefficients (b0, b1, 1.f, a1)); + } + + for (int i = 0; i < L; ++i) + { + auto gain = std::pow (std::abs (g[i + r]), 2.0); + + auto b0 = static_cast (gain); + auto b1 = static_cast (std::real (-z[i] - std::conj (z[i])) * gain); + auto b2 = static_cast (std::real ( z[i] * std::conj (z[i])) * gain); + + auto a1 = static_cast (std::real (-p[i+r] - std::conj (p[i + r]))); + auto a2 = static_cast (std::real ( p[i+r] * std::conj (p[i + r]))); + + theCascadedCoefficients.add (IIR::Coefficients (b0, b1, b2, 1, a1, a2)); + } + + return theCascadedCoefficients; +} + +template +typename FilterDesign::IIRPolyphaseAllpassStructure + FilterDesign::designIIRLowpassHalfBandPolyphaseAllpassMethod (FloatType normalizedTransitionWidth, + FloatType stopbandAttenuationdB) +{ + jassert (normalizedTransitionWidth > 0 && normalizedTransitionWidth <= 0.5); + jassert (stopbandAttenuationdB > -300 && stopbandAttenuationdB < -10); + + const double wt = 2 * double_Pi * normalizedTransitionWidth; + const double ds = Decibels::decibelsToGain (stopbandAttenuationdB, static_cast (-300.0)); + + auto k = std::pow (std::tan ((double_Pi - wt) / 4), 2.0); + auto kp = std::sqrt (1.0 - k * k); + auto e = (1 - std::sqrt (kp)) / (1 + std::sqrt (kp)) * 0.5; + auto q = e + 2 * std::pow (e, 5.0) + 15 * std::pow (e, 9.0) + 150 * std::pow (e, 13.0); + + auto k1 = ds * ds / (1 - ds * ds); + int n = roundDoubleToInt (ceil (log (k1 * k1 / 16) / log (q))); + + if (n % 2 == 0) + ++n; + + if (n == 1) + n = 3; + + auto q1 = std::pow (q, (double) n); + k1 = 4 * std::sqrt (q1); + + const int N = (n - 1) / 2; + Array ai; + + for (int i = 1; i <= N; ++i) + { + double num = 0.0; + double delta = 1.0; + int m = 0; + + while (std::abs (delta) > 1e-100) + { + delta = std::pow (-1, m) * std::pow (q, m * (m + 1)) + * std::sin ((2 * m + 1) * double_Pi * i / (double) n); + num += delta; + m++; + } + + num *= 2 * std::pow (q, 0.25); + + double den = 0.0; + delta = 1.0; + m = 1; + + while (std::abs (delta) > 1e-100) + { + delta = std::pow (-1, m) * std::pow (q, m * m) + * std::cos (2 * m * double_Pi * i / (double) n); + den += delta; + ++m; + } + + den = 1 + 2 * den; + + auto wi = num / den; + auto api = std::sqrt ((1 - wi * wi * k) * (1 - wi * wi / k)) / (1 + wi * wi); + + ai.add ((1 - api) / (1 + api)); + } + + IIRPolyphaseAllpassStructure structure; + + for (int i = 0; i < N; i += 2) + structure.directPath.add (IIR::Coefficients (static_cast (ai[i]), + 0, 1, 1, 0, static_cast (ai[i]))); + + structure.delayedPath.add (IIR::Coefficients (0, 1, 1, 0)); + + for (int i = 1; i < N; i += 2) + structure.delayedPath.add (IIR::Coefficients (static_cast (ai[i]), + 0, 1, 1, 0, static_cast (ai[i]))); + + return structure; +} + + +template struct FilterDesign; +template struct FilterDesign; diff --git a/modules/juce_dsp/filter_design/juce_FilterDesign.h b/modules/juce_dsp/filter_design/juce_FilterDesign.h new file mode 100644 index 0000000000..fbcec2dfa6 --- /dev/null +++ b/modules/juce_dsp/filter_design/juce_FilterDesign.h @@ -0,0 +1,251 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/* + This class provides a set of functions which generates FIR::Coefficients + and IIR::Coefficients, of high-order lowpass filters. They can be used + for processing directly audio as an equalizer, in resampling algorithms etc. + + see @FIRFilter::Coefficients, @FIRFilter, @WindowingFunction, @IIRFilter::Coefficients, @IIRFilter +*/ +template +struct FilterDesign +{ + using FIRCoefficientsPtr = typename FIR::Coefficients::Ptr; + using IIRCoefficients = typename IIR::Coefficients; + + using WindowingMethod = typename WindowingFunction::WindowingMethod; + + //============================================================================== + /* This method generates a FIR::Coefficients for a low-pass filter, using + the windowing design method, applied to a sinc impulse response. It is one + of the simplest method used to generate a high order low-pass filter, which + has the downside of needing more coefficients than more complex method to + perform a given attenuation in the stop band. + + It generates linear phase filters coefficients. + + Note : the flatTop WindowingMethod generates an impulse response with a + maximum amplitude higher than one, and might be normalized if necessary + depending on the applications. + + @param frequency the cutoff frequency of the low-pass filter + @param sampleRate the sample rate being used in the filter design + @param order the order of the filter + @param type the type, must be a @WindowingFunction::WindowingType + @param beta an optional additional parameter useful for the Kaiser windowing function + */ + + static FIRCoefficientsPtr designFIRLowpassWindowMethod (FloatType frequency, double sampleRate, + size_t order, WindowingMethod type, + FloatType beta = static_cast (2)); + + /* This a variant of the function @designFIRLowpassWindowMethod, which allows the + user to specify a transition width and an attenuation in dB, + to get a low-pass filter using the Kaiser windowing function, with calculated + values of the filter order and of the beta parameter, to satisfy the constraints. + + It generates linear phase filters coefficients. + + @param frequency the cutoff frequency of the low-pass filter + @param sampleRate the sample rate being used in the filter design + @param normalizedTransitionWidth the normalized size between 0 and 0.5 of the transition + between the pass band and the stop band + @param attenuationdB the attenuation in dB expected in the stop band + */ + + static FIRCoefficientsPtr designFIRLowpassKaiserMethod (FloatType frequency, double sampleRate, + FloatType normalizedTransitionWidth, + FloatType attenuationdB); + + + /* This method is also a variant of the function @designFIRLowpassWindowMethod, using + a rectangular window as a basis, and a spline transition between the pass band and + the stop band, to reduce the Gibbs phenomenon. + + It generates linear phase filters coefficients. + + @param frequency the cutoff frequency of the low-pass filter + @param sampleRate the sample rate being used in the filter design + @param order the order of the filter + @param normalizedTransitionWidth the normalized size between 0 and 0.5 of the transition + between the pass band and the stop band + @param spline between 1.0 and 4.0, indicates how much the transition + is curved, with 1.0 meaning a straight line + */ + static FIRCoefficientsPtr designFIRLowpassTransitionMethod (FloatType frequency, double sampleRate, + size_t order, + FloatType normalizedTransitionWidth, + FloatType spline); + + /* This method generates a FIR::Coefficients for a low-pass filter, by + minimizing the average error between the generated filter and an ideal one + using the least squares error criterion and matrices operations. + + It generates linear phase filters coefficients. + + @param frequency the cutoff frequency of the low-pass filter + @param sampleRate the sample rate being used in the filter design + @param order the order of the filter + @param normalizedTransitionWidth the normalized size between 0 and 0.5 of the transition + between the pass band and the stop band + @param stopbandWeight between 1.0 and 100.0, indicates how much we want + attenuation in the stop band, against some oscillation + in the pass band + */ + static FIRCoefficientsPtr designFIRLowpassLeastSquaresMethod (FloatType frequency, double sampleRate, size_t order, + FloatType normalizedTransitionWidth, + FloatType stopBandWeight); + + /* This method generates a FIR::Coefficients for a low-pass filter, with + a cutoff frequency at half band, using an algorithm described in the article + "Design of Half-Band FIR Filters for Signal Compression" from Pavel + Zahradnik, to get an equiripple like high order FIR filter, without the need + of an iterative method and convergence failure risks. + + It generates linear phase filters coefficients. + + @param normalizedTransitionWidth the normalized size between 0 and 0.5 of the transition + between the pass band and the stop band + @param attenuationdB the attenuation in dB expected in the stop band + */ + static FIRCoefficientsPtr designFIRLowpassHalfBandEquirippleMethod (FloatType normalizedTransitionWidth, + FloatType attenuationdB); + + //============================================================================== + /* This method returns an array of IIR::Coefficients, made to be used in + cascaded IIRFilters, providing a minimum phase lowpass filter without any + ripple in the pass band and in the stop band. + + The algorithms are based on "Lecture Notes on Elliptic Filter Design" by + Sophocles J. Orfanidis. + + @param frequency the cutoff frequency of the low-pass filter + @param sampleRate the sample rate being used in the filter design + @param passbandAttenuationdB the lowest attenuation in dB expected in the pass band + @param stopbandAttenuationdB the attenuation in dB expected in the stop band + */ + + static Array designIIRLowpassHighOrderButterworthMethod (FloatType frequency, double sampleRate, + FloatType normalizedTransitionWidth, + FloatType passbandAttenuationdB, + FloatType stopbandAttenuationdB); + + /* This method returns an array of IIR::Coefficients, made to be used in + cascaded IIRFilters, providing a minimum phase lowpass filter without any + ripple in the stop band only. + + The algorithms are based on "Lecture Notes on Elliptic Filter Design" by + Sophocles J. Orfanidis. + + @param frequency the cutoff frequency of the low-pass filter + @param sampleRate the sample rate being used in the filter design + @param passbandAttenuationdB the lowest attenuation in dB expected in the pass band + @param stopbandAttenuationdB the attenuation in dB expected in the stop band + */ + static Array designIIRLowpassHighOrderChebyshev1Method (FloatType frequency, double sampleRate, + FloatType normalizedTransitionWidth, + FloatType passbandAttenuationdB, + FloatType stopbandAttenuationdB); + + /* This method returns an array of IIR::Coefficients, made to be used in + cascaded IIRFilters, providing a minimum phase lowpass filter without any + ripple in the pass band only. + + The algorithms are based on "Lecture Notes on Elliptic Filter Design" by + Sophocles J. Orfanidis. + + @param frequency the cutoff frequency of the low-pass filter + @param sampleRate the sample rate being used in the filter design + @param passbandAttenuationdB the lowest attenuation in dB expected in the pass band + @param stopbandAttenuationdB the attenuation in dB expected in the stop band + */ + static Array designIIRLowpassHighOrderChebyshev2Method (FloatType frequency, double sampleRate, + FloatType normalizedTransitionWidth, + FloatType passbandAttenuationdB, + FloatType stopbandAttenuationdB); + + /* This method returns an array of IIR::Coefficients, made to be used in + cascaded IIR::Filters, providing a minimum phase lowpass filter with ripples + in both the pass band and in the stop band. + + The algorithms are based on "Lecture Notes on Elliptic Filter Design" by + Sophocles J. Orfanidis. + + @param frequency the cutoff frequency of the low-pass filter + @param sampleRate the sample rate being used in the filter design + @param passbandAttenuationdB the lowest attenuation in dB expected in the pass band + @param stopbandAttenuationdB the attenuation in dB expected in the stop band + */ + static Array designIIRLowpassHighOrderEllipticMethod (FloatType frequency, double sampleRate, + FloatType normalizedTransitionWidth, + FloatType passbandAttenuationdB, + FloatType stopbandAttenuationdB); + + /** The structure returned by the function designIIRLowpassHalfBandPolyphaseAllpassMethod. + + The two members of this structure directPath and delayedPath are arrays of + IIR::Coefficients, made of polyphase second order allpass filters and an additional + delay in the second array, that can be used in cascaded filters processed in two + parallel paths, which must be summed at the end to get the high order efficient + low-pass filtering. + */ + struct IIRPolyphaseAllpassStructure { Array directPath, delayedPath; }; + + /* This method generates arrays of IIR::Coefficients for a low-pass filter, with + a cutoff frequency at half band, using an algorithm described in the article + "Digital Signal Processing Schemes for efficient interpolation and decimation" from + Pavel Valenzuela and Constantinides. + + The result is a IIRPolyphaseAllpassStructure object. + + The two members of this structure directPath and delayedPath are arrays of + IIR::Coefficients, made of polyphase second order allpass filters and an additional + delay in the second array, that can be used in cascaded filters processed in two + parallel paths, which must be summed at the end to get the high order efficient + low-pass filtering. + + The gain of the resulting pass-band is 6 dB, so don't forget to compensate it if you + want to use that method for something else than two times oversampling. + + @param normalizedTransitionWidth the normalized size between 0 and 0.5 of the transition + between the pass band and the stop band + @param attenuationdB the attenuation in dB expected in the stop band + */ + static IIRPolyphaseAllpassStructure designIIRLowpassHalfBandPolyphaseAllpassMethod (FloatType normalizedTransitionWidth, + FloatType stopbandAttenuationdB); + +private: + //============================================================================== + static Array getPartialImpulseResponseHn (int n, double kp); + + static Array designIIRLowpassHighOrderGeneralMethod (int type, FloatType frequency, double sampleRate, + FloatType normalizedTransitionWidth, + FloatType passbandAttenuationdB, + FloatType stopbandAttenuationdB); + FilterDesign() = delete; +}; diff --git a/modules/juce_dsp/frequency/juce_Convolution.cpp b/modules/juce_dsp/frequency/juce_Convolution.cpp new file mode 100644 index 0000000000..29389d7ec1 --- /dev/null +++ b/modules/juce_dsp/frequency/juce_Convolution.cpp @@ -0,0 +1,1110 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** This class is the convolution engine itself, processing only one channel at + a time of input signal. +*/ +struct ConvolutionEngine +{ + ConvolutionEngine() = default; + + //============================================================================== + struct ProcessingInformation + { + enum class SourceType + { + sourceBinaryData, + sourceAudioFile, + sourceAudioBuffer, + sourceNone + }; + + SourceType sourceType = SourceType::sourceNone; + + const void* sourceData; + size_t sourceDataSize; + File fileImpulseResponse; + double bufferSampleRate; + + AudioBuffer* buffer; + + double sampleRate = 0; + bool wantsStereo; + size_t impulseResponseSize; + size_t maximumBufferSize = 0; + }; + + //============================================================================== + void reset() + { + bufferInput.clear(); + bufferOverlap.clear(); + bufferTempOutput.clear(); + + for (auto i = 0; i < buffersInputSegments.size(); ++i) + buffersInputSegments.getReference (i).clear(); + + currentSegment = 0; + inputDataPos = 0; + } + + /** Initalize all the states and objects to perform the convolution. */ + void initializeConvolutionEngine (ProcessingInformation& info, int channel) + { + blockSize = (size_t) nextPowerOfTwo ((int) info.maximumBufferSize); + + FFTSize = blockSize > 128 ? 2 * blockSize + : 4 * blockSize; + + numSegments = ((size_t) info.buffer->getNumSamples()) / (FFTSize - blockSize) + 1; + + numInputSegments = (blockSize > 128 ? numSegments : 3 * numSegments); + + FFTobject = new FFT (roundDoubleToInt (log2 (FFTSize))); + + bufferInput.setSize (1, static_cast (FFTSize)); + bufferOutput.setSize (1, static_cast (FFTSize * 2)); + bufferTempOutput.setSize (1, static_cast (FFTSize * 2)); + bufferOverlap.setSize (1, static_cast (FFTSize)); + + buffersInputSegments.clear(); + buffersImpulseSegments.clear(); + + for (size_t i = 0; i < numInputSegments; ++i) + { + AudioBuffer newInputSegment; + newInputSegment.setSize (1, static_cast (FFTSize * 2)); + buffersInputSegments.add (newInputSegment); + } + + for (auto i = 0u; i < numSegments; ++i) + { + AudioBuffer newImpulseSegment; + newImpulseSegment.setSize (1, static_cast (FFTSize * 2)); + buffersImpulseSegments.add (newImpulseSegment); + } + + ScopedPointer FFTTempObject = new FFT (roundDoubleToInt (log2 (FFTSize))); + auto numChannels = (info.wantsStereo && info.buffer->getNumChannels() >= 2 ? 2 : 1); + + if (channel < numChannels) + { + auto* channelData = info.buffer->getWritePointer (channel); + + for (size_t n = 0; n < numSegments; ++n) + { + buffersImpulseSegments.getReference (static_cast (n)).clear(); + + auto* impulseResponse = buffersImpulseSegments.getReference (static_cast (n)).getWritePointer (0); + + if (n == 0) + impulseResponse[0] = 1.0f; + + for (size_t i = 0; i < FFTSize - blockSize; ++i) + if (i + n * (FFTSize - blockSize) < (size_t) info.buffer->getNumSamples()) + impulseResponse[i] = channelData[i + n * (FFTSize - blockSize)]; + + FFTTempObject->performRealOnlyForwardTransform (impulseResponse); + prepareForConvolution (impulseResponse); + } + } + + reset(); + + isReady = true; + } + + /** Copy the states of another engine. */ + void copyStateFromOtherEngine (const ConvolutionEngine& other) + { + if (FFTSize != other.FFTSize) + { + FFTobject = new FFT (roundDoubleToInt (log2 (other.FFTSize))); + FFTSize = other.FFTSize; + } + + currentSegment = other.currentSegment; + numInputSegments = other.numInputSegments; + numSegments = other.numSegments; + blockSize = other.blockSize; + inputDataPos = other.inputDataPos; + + bufferInput = other.bufferInput; + bufferTempOutput = other.bufferTempOutput; + bufferOutput = other.bufferOutput; + + buffersInputSegments = other.buffersInputSegments; + buffersImpulseSegments = other.buffersImpulseSegments; + bufferOverlap = other.bufferOverlap; + + isReady = true; + } + + /** Performs the uniform partitioned convolution using FFT. */ + void processSamples (const float* input, float* output, size_t numSamples) + { + if (! isReady) + return; + + // Overlap-add, zero latency convolution algorithm with uniform partitioning + size_t numSamplesProcessed = 0; + + auto indexStep = numInputSegments / numSegments; + + auto* inputData = bufferInput.getWritePointer (0); + auto* outputTempData = bufferTempOutput.getWritePointer (0); + auto* outputData = bufferOutput.getWritePointer (0); + auto* overlapData = bufferOverlap.getWritePointer (0); + + while (numSamplesProcessed < numSamples) + { + const bool inputDataWasEmpty = (inputDataPos == 0); + auto numSamplesToProcess = jmin (numSamples - numSamplesProcessed, blockSize - inputDataPos); + + // copy the input samples + FloatVectorOperations::copy (inputData + inputDataPos, input + numSamplesProcessed, static_cast (numSamplesToProcess)); + + auto* inputSegmentData = buffersInputSegments.getReference (static_cast (currentSegment)).getWritePointer (0); + FloatVectorOperations::copy (inputSegmentData, inputData, static_cast (FFTSize)); + + // Forward FFT + FFTobject->performRealOnlyForwardTransform (inputSegmentData); + prepareForConvolution (inputSegmentData); + + // Complex multiplication + if (inputDataWasEmpty) + { + FloatVectorOperations::fill (outputTempData, 0, static_cast (FFTSize + 1)); + + auto index = currentSegment; + + for (size_t i = 1; i < numSegments; ++i) + { + index += indexStep; + + if (index >= numInputSegments) + index -= numInputSegments; + + convolutionProcessingAndAccumulate (buffersInputSegments.getReference (static_cast (index)).getWritePointer (0), + buffersImpulseSegments.getReference (static_cast (i)).getWritePointer (0), + outputTempData); + } + } + + FloatVectorOperations::copy (outputData, outputTempData, static_cast (FFTSize + 1)); + + convolutionProcessingAndAccumulate (buffersInputSegments.getReference (static_cast (currentSegment)).getWritePointer (0), + buffersImpulseSegments.getReference (0).getWritePointer (0), + outputData); + + // Inverse FFT + updateSymmetricFrequencyDomainData (outputData); + FFTobject->performRealOnlyInverseTransform (outputData); + + // Add overlap + for (size_t i = 0; i < numSamplesToProcess; ++i) + output[i + numSamplesProcessed] = outputData[inputDataPos + i] + overlapData[inputDataPos + i]; + + // Input buffer full => Next block + inputDataPos += numSamplesToProcess; + + if (inputDataPos == blockSize) + { + // Input buffer is empty again now + FloatVectorOperations::fill (inputData, 0.0f, static_cast (FFTSize)); + + inputDataPos = 0; + + // Extra step for segSize > blockSize + FloatVectorOperations::add (&(outputData[blockSize]), &(overlapData[blockSize]), static_cast (FFTSize - 2 * blockSize)); + + // Save the overlap + FloatVectorOperations::copy (overlapData, &(outputData[blockSize]), static_cast (FFTSize - blockSize)); + + // Update current segment + currentSegment = (currentSegment > 0) ? (currentSegment - 1) : (numInputSegments - 1); + } + + numSamplesProcessed += numSamplesToProcess; + } + } + + /** After each FFT, this function is called to allow convolution to be performed with only 4 SIMD functions calls. */ + void prepareForConvolution (float *samples) noexcept + { + auto FFTSizeDiv2 = FFTSize / 2; + + for (size_t i = 0; i < FFTSizeDiv2; i++) + samples[i] = samples[2 * i]; + + samples[FFTSizeDiv2] = 0; + + for (size_t i = 1; i < FFTSizeDiv2; i++) + samples[i + FFTSizeDiv2] = -samples[2 * (FFTSize - i) + 1]; + } + + /** Does the convolution operation itself only on half of the frequency domain samples. */ + void convolutionProcessingAndAccumulate (const float *input, const float *impulse, float *output) + { + auto FFTSizeDiv2 = FFTSize / 2; + + FloatVectorOperations::addWithMultiply (output, input, impulse, static_cast (FFTSizeDiv2)); + FloatVectorOperations::subtractWithMultiply (output, &(input[FFTSizeDiv2]), &(impulse[FFTSizeDiv2]), static_cast (FFTSizeDiv2)); + + FloatVectorOperations::addWithMultiply (&(output[FFTSizeDiv2]), input, &(impulse[FFTSizeDiv2]), static_cast (FFTSizeDiv2)); + FloatVectorOperations::addWithMultiply (&(output[FFTSizeDiv2]), &(input[FFTSizeDiv2]), impulse, static_cast (FFTSizeDiv2)); + } + + /** Undo the re-organization of samples from the function prepareForConvolution. + Then, takes the conjugate of the frequency domain first half of samples, to fill the + second half, so that the inverse transform will return real samples in the time domain. + */ + void updateSymmetricFrequencyDomainData (float* samples) noexcept + { + auto FFTSizeDiv2 = FFTSize / 2; + + for (size_t i = 1; i < FFTSizeDiv2; i++) + { + samples[2 * (FFTSize - i)] = samples[i]; + samples[2 * (FFTSize - i) + 1] = -samples[FFTSizeDiv2 + i]; + } + + samples[1] = 0.f; + + for (size_t i = 1; i < FFTSizeDiv2; i++) + { + samples[2 * i] = samples[2 * (FFTSize - i)]; + samples[2 * i + 1] = -samples[2 * (FFTSize - i) + 1]; + } + } + + //============================================================================== + ScopedPointer FFTobject; + + size_t FFTSize = 0; + size_t currentSegment = 0, numInputSegments = 0, numSegments = 0, blockSize = 0, inputDataPos = 0; + + AudioBuffer bufferInput, bufferOutput, bufferTempOutput, bufferOverlap; + Array> buffersInputSegments, buffersImpulseSegments; + + bool isReady = false; + + //============================================================================== + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ConvolutionEngine) +}; + + + +//============================================================================== +/** Manages all the changes requested by the main convolution engine, to minimize + the number of calls of the convolution engine initialization, and the potential + consequences of multiple quick calls to the function Convolution::loadImpulseResponse. +*/ +struct Convolution::Pimpl : private Thread +{ +public: + enum class ChangeRequest + { + changeEngine = 0, + changeSampleRate, + changeMaximumBufferSize, + changeSource, + changeImpulseResponseSize, + changeStereo, + numChangeRequestTypes + }; + + using SourceType = ConvolutionEngine::ProcessingInformation::SourceType; + + //============================================================================== + Pimpl() : Thread ("Convolution"), abstractFifo (fifoSize) + { + abstractFifo.reset(); + requestsType.resize (fifoSize); + requestsParameter.resize (fifoSize); + + for (auto i = 0u; i < 4; ++i) + engines.add (new ConvolutionEngine()); + + currentInfo.maximumBufferSize = 0; + currentInfo.buffer = &impulseResponse; + } + + ~Pimpl() + { + stopThread (10000); + } + + //============================================================================== + /** Adds a new change request. */ + void addToFifo (ChangeRequest type, juce::var parameter) + { + int start1, size1, start2, size2; + abstractFifo.prepareToWrite (1, start1, size1, start2, size2); + + if (size1 > 0) + { + requestsType.setUnchecked (start1, type); + requestsParameter.setUnchecked (start1, parameter); + } + + if (size2 > 0) + { + requestsType.setUnchecked (start2, type); + requestsParameter.setUnchecked (start2, parameter); + } + + abstractFifo.finishedWrite (size1 + size2); + } + + /** Adds a new array of change requests. */ + void addToFifo (ChangeRequest* types, juce::var* parameters, int numEntries) + { + int start1, size1, start2, size2; + abstractFifo.prepareToWrite (numEntries, start1, size1, start2, size2); + + if (size1 > 0) + { + for (int i = 0; i < size1; ++i) + { + requestsType.setUnchecked (start1 + i, types[i]); + requestsParameter.setUnchecked (start1 + i, parameters[i]); + } + } + + if (size2 > 0) + { + for (int i = 0; i < size2; ++i) + { + requestsType.setUnchecked (start2 + i, types[i + size1]); + requestsParameter.setUnchecked (start2 + i, parameters[i + size1]); + } + } + + abstractFifo.finishedWrite (size1 + size2); + } + + /** Reads requests from the fifo */ + void readFromFifo (ChangeRequest& type, juce::var& parameter) + { + int start1, size1, start2, size2; + abstractFifo.prepareToRead (1, start1, size1, start2, size2); + + if (size1 > 0) + { + type = requestsType[start1]; + parameter = requestsParameter[start1]; + } + + if (size2 > 0) + { + type = requestsType[start2]; + parameter = requestsParameter[start2]; + } + + abstractFifo.finishedRead (size1 + size2); + } + + /** Returns the number of requests that still need to be processed */ + int getNumRemainingEntries() const noexcept + { + return abstractFifo.getNumReady(); + } + + //============================================================================== + /** This function processes all the change requests to remove all the the + redundant ones, and to tell what kind of initialization must be done. + + Depending on the results, the convolution engines might be reset, or + simply updated, or they might not need any change at all. + */ + void processFifo() + { + if (getNumRemainingEntries() == 0 || isThreadRunning() || mustInterpolate) + return; + + // retrieve the information from the FIFO for processing + Array requests; + Array requestParameters; + + while (getNumRemainingEntries() > 0) + { + ChangeRequest type = ChangeRequest::changeEngine; + juce::var parameter; + + readFromFifo (type, parameter); + + requests.add (type); + requestParameters.add (parameter); + } + + // remove any useless messages + for (int i = 0; i < (int) ChangeRequest::numChangeRequestTypes; ++i) + { + bool exists = false; + + for (int n = requests.size(); --n >= 0;) + { + if (requests[n] == (ChangeRequest) i) + { + if (! exists) + { + exists = true; + } + else + { + requests.remove (n); + requestParameters.remove (n); + } + } + } + } + + changeLevel = 0; + + for (int n = 0; n < requests.size(); ++n) + { + switch (requests[n]) + { + case ChangeRequest::changeEngine: + changeLevel = 3; + break; + + case ChangeRequest::changeSampleRate: + { + double newSampleRate = requestParameters[n]; + + if (currentInfo.sampleRate != newSampleRate) + changeLevel = 3; + + currentInfo.sampleRate = newSampleRate; + } + break; + + case ChangeRequest::changeMaximumBufferSize: + { + int newMaximumBufferSize = requestParameters[n]; + + if (currentInfo.maximumBufferSize != (size_t) newMaximumBufferSize) + changeLevel = 3; + + currentInfo.maximumBufferSize = (size_t) newMaximumBufferSize; + } + break; + + case ChangeRequest::changeSource: + { + auto* arrayParameters = requestParameters[n].getArray(); + auto newSourceType = static_cast (static_cast (arrayParameters->getUnchecked (0))); + + if (currentInfo.sourceType != newSourceType) + changeLevel = jmax (2, changeLevel); + + if (newSourceType == SourceType::sourceBinaryData) + { + auto& prm = arrayParameters->getRawDataPointer()[1]; + auto* newMemoryBlock = prm.getBinaryData(); + + auto* newPtr = newMemoryBlock->getData(); + auto newSize = newMemoryBlock->getSize(); + + if (currentInfo.sourceData != newPtr || currentInfo.sourceDataSize != newSize) + changeLevel = jmax (2, changeLevel); + + currentInfo.sourceType = SourceType::sourceBinaryData; + currentInfo.sourceData = newPtr; + currentInfo.sourceDataSize = newSize; + currentInfo.fileImpulseResponse = File(); + } + else if (newSourceType == SourceType::sourceAudioFile) + { + File newFile (arrayParameters->getUnchecked (1).toString()); + + if (currentInfo.fileImpulseResponse != newFile) + changeLevel = jmax (2, changeLevel); + + currentInfo.sourceType = SourceType::sourceAudioFile; + currentInfo.fileImpulseResponse = newFile; + currentInfo.sourceData = nullptr; + currentInfo.sourceDataSize = 0; + } + else if (newSourceType == SourceType::sourceAudioBuffer) + { + double bufferSampleRate (arrayParameters->getUnchecked (1)); + changeLevel = jmax (2, changeLevel); + + currentInfo.sourceType = SourceType::sourceAudioBuffer; + currentInfo.bufferSampleRate = bufferSampleRate; + currentInfo.fileImpulseResponse = File(); + currentInfo.sourceData = nullptr; + currentInfo.sourceDataSize = 0; + } + } + break; + + case ChangeRequest::changeImpulseResponseSize: + { + int64 newSize = requestParameters[n]; + + if (currentInfo.impulseResponseSize != (size_t) newSize) + changeLevel = jmax (1, changeLevel); + + currentInfo.impulseResponseSize = (size_t) newSize; + } + break; + + case ChangeRequest::changeStereo: + { + bool newWantsStereo = requestParameters[n]; + + if (currentInfo.wantsStereo != newWantsStereo) + changeLevel = jmax (1, changeLevel); + + currentInfo.wantsStereo = newWantsStereo; + } + break; + + default: + jassertfalse; + break; + } + } + + if (currentInfo.sourceType == SourceType::sourceNone) + { + currentInfo.sourceType = SourceType::sourceAudioBuffer; + + if (currentInfo.sampleRate == 0) + currentInfo.sampleRate = 44100; + + if (currentInfo.maximumBufferSize == 0) + currentInfo.maximumBufferSize = 128; + + currentInfo.bufferSampleRate = currentInfo.sampleRate; + currentInfo.impulseResponseSize = 1; + currentInfo.fileImpulseResponse = File(); + currentInfo.sourceData = nullptr; + currentInfo.sourceDataSize = 0; + + AudioBuffer newBuffer; + newBuffer.setSize (1, 1); + newBuffer.setSample (0, 0, 1.f); + + copyBufferToTemporaryLocation (newBuffer); + } + + // action depending on the change level + if (changeLevel == 3) + { + interpolationBuffer.setSize (2, static_cast (currentInfo.maximumBufferSize)); + + processImpulseResponse(); + initializeConvolutionEngines(); + } + else if (changeLevel == 2) + { + startThread(); + } + else if (changeLevel == 1) + { + startThread(); + } + } + + //============================================================================== + void copyBufferToTemporaryLocation (const AudioBuffer& buffer) + { + const SpinLock::ScopedLockType sl (processLock); + + auto numChannels = buffer.getNumChannels() > 1 ? 2 : 1; + temporaryBuffer.setSize (numChannels, buffer.getNumSamples(), false, false, true); + + for (auto channel = 0; channel < numChannels; ++channel) + temporaryBuffer.copyFrom (channel, 0, buffer, channel, 0, buffer.getNumSamples()); + } + + /** Copies a buffer from a temporary location to the impulseResponseOriginal + buffer for the sourceAudioBuffer. */ + void copyBufferFromTemporaryLocation() + { + const SpinLock::ScopedLockType sl (processLock); + + impulseResponseOriginal.setSize (2, temporaryBuffer.getNumSamples(), false, false, true); + + for (auto channel = 0; channel < temporaryBuffer.getNumChannels(); ++channel) + impulseResponseOriginal.copyFrom (channel, 0, temporaryBuffer, channel, 0, temporaryBuffer.getNumSamples()); + } + + //============================================================================== + void reset() + { + for (auto* e : engines) + e->reset(); + } + + /** Convolution processing handling interpolation between previous and new states + of the convolution engines. + */ + void processSamples (const AudioBlock& input, AudioBlock& output) + { + processFifo(); + + size_t numChannels = input.getNumChannels(); + size_t numSamples = jmin (input.getNumSamples(), output.getNumSamples()); + + if (mustInterpolate == false) + { + for (size_t channel = 0; channel < numChannels; ++channel) + engines[(int) channel]->processSamples (input.getChannelPointer (channel), output.getChannelPointer (channel), numSamples); + } + else + { + auto interpolated = AudioBlock (interpolationBuffer).getSubBlock (0, numSamples); + + for (size_t channel = 0; channel < numChannels; ++channel) + { + auto&& buffer = output.getSingleChannelBlock (channel); + + interpolationBuffer.copyFrom ((int) channel, 0, input.getChannelPointer (channel), (int) numSamples); + + engines[(int) channel]->processSamples (input.getChannelPointer (channel), buffer.getChannelPointer (0), numSamples); + changeVolumes[channel].applyGain (buffer.getChannelPointer (0), (int) numSamples); + + auto* interPtr = interpolationBuffer.getWritePointer ((int) channel); + engines[(int) channel + 2]->processSamples (interPtr, interPtr, numSamples); + changeVolumes[channel + 2].applyGain (interPtr, (int) numSamples); + + buffer += interpolated.getSingleChannelBlock (channel); + } + + if (changeVolumes[0].isSmoothing() == false) + { + mustInterpolate = false; + + for (auto channel = 0; channel < 2; ++channel) + engines[channel]->copyStateFromOtherEngine (*engines[channel + 2]); + } + } + } + +private: + //============================================================================== + void run() override + { + if (changeLevel == 2) + { + processImpulseResponse(); + + if (isThreadRunning() && threadShouldExit()) + return; + + initializeConvolutionEngines(); + } + else if (changeLevel == 1) + { + initializeConvolutionEngines(); + } + } + + void processImpulseResponse() + { + if (currentInfo.sourceType == SourceType::sourceBinaryData) + { + copyAudioStreamInAudioBuffer (new MemoryInputStream (currentInfo.sourceData, currentInfo.sourceDataSize, false)); + } + else if (currentInfo.sourceType == SourceType::sourceAudioFile) + { + copyAudioStreamInAudioBuffer (new FileInputStream (currentInfo.fileImpulseResponse)); + } + else if (currentInfo.sourceType == SourceType::sourceAudioBuffer) + { + copyBufferFromTemporaryLocation(); + trimAndResampleImpulseResponse (temporaryBuffer.getNumChannels(), currentInfo.bufferSampleRate); + } + + if (isThreadRunning() && threadShouldExit()) + return; + + if (currentInfo.wantsStereo) + { + normalizeImpulseResponse (currentInfo.buffer->getWritePointer(0), currentInfo.buffer->getNumSamples()); + normalizeImpulseResponse (currentInfo.buffer->getWritePointer(1), currentInfo.buffer->getNumSamples()); + } + else + { + normalizeImpulseResponse (currentInfo.buffer->getWritePointer (0), currentInfo.buffer->getNumSamples()); + } + } + + /** Converts the data from an audio file into a stereo audio buffer of floats, and + performs resampling if necessary. + */ + void copyAudioStreamInAudioBuffer (InputStream* stream) + { + AudioFormatManager manager; + manager.registerBasicFormats(); + + if (ScopedPointer formatReader = manager.createReaderFor (stream)) + { + auto maximumTimeInSeconds = 10.0; + int64 maximumLength = static_cast (roundDoubleToInt (maximumTimeInSeconds * formatReader->sampleRate)); + auto numChannels = formatReader->numChannels > 1 ? 2 : 1; + + impulseResponseOriginal.setSize (2, static_cast (jmin (maximumLength, formatReader->lengthInSamples)), false, false, true); + impulseResponseOriginal.clear(); + formatReader->read (&(impulseResponseOriginal), 0, impulseResponseOriginal.getNumSamples(), 0, true, numChannels > 1); + + trimAndResampleImpulseResponse (numChannels, formatReader->sampleRate); + } + } + + void trimAndResampleImpulseResponse (int numChannels, double bufferSampleRate) + { + auto thresholdTrim = Decibels::decibelsToGain (-80.0f); + auto indexStart = impulseResponseOriginal.getNumSamples() - 1; + auto indexEnd = 0; + + for (auto channel = 0; channel < numChannels; ++channel) + { + auto localIndexStart = 0; + auto localIndexEnd = impulseResponseOriginal.getNumSamples() - 1; + + auto* channelData = impulseResponseOriginal.getReadPointer (channel); + + while (localIndexStart < impulseResponseOriginal.getNumSamples() - 1 + && channelData[localIndexStart] <= thresholdTrim + && channelData[localIndexStart] >= -thresholdTrim) + ++localIndexStart; + + while (localIndexEnd >= 0 + && channelData[localIndexEnd] <= thresholdTrim + && channelData[localIndexEnd] >= -thresholdTrim) + --localIndexEnd; + + indexStart = jmin (indexStart, localIndexStart); + indexEnd = jmax (indexEnd, localIndexEnd); + } + + if (indexStart > 0) + { + for (auto channel = 0; channel < numChannels; ++channel) + { + auto* channelData = impulseResponseOriginal.getWritePointer (channel); + + for (auto i = 0; i < indexEnd - indexStart + 1; ++i) + channelData[i] = channelData[i + indexStart]; + + for (auto i = indexEnd - indexStart + 1; i < impulseResponseOriginal.getNumSamples() - 1; ++i) + channelData[i] = 0.0f; + } + } + + if (currentInfo.sampleRate == bufferSampleRate) + { + // No resampling + auto impulseSize = jmin (static_cast (currentInfo.impulseResponseSize), indexEnd - indexStart + 1); + + impulseResponse.setSize (2, impulseSize); + impulseResponse.clear(); + + for (auto channel = 0; channel < numChannels; ++channel) + impulseResponse.copyFrom (channel, 0, impulseResponseOriginal, channel, 0, impulseSize); + } + else + { + // Resampling + auto factorReading = bufferSampleRate / currentInfo.sampleRate; + auto impulseSize = jmin (static_cast (currentInfo.impulseResponseSize), roundDoubleToInt ((indexEnd - indexStart + 1) / factorReading)); + + impulseResponse.setSize (2, impulseSize); + impulseResponse.clear(); + + MemoryAudioSource memorySource (impulseResponseOriginal, false); + ResamplingAudioSource resamplingSource (&memorySource, false, numChannels); + + resamplingSource.setResamplingRatio (factorReading); + resamplingSource.prepareToPlay (impulseSize, currentInfo.sampleRate); + + AudioSourceChannelInfo info; + info.startSample = 0; + info.numSamples = impulseSize; + info.buffer = &impulseResponse; + + resamplingSource.getNextAudioBlock (info); + } + + // Filling the second channel with the first if necessary + if (numChannels == 1) + impulseResponse.copyFrom (1, 0, impulseResponse, 0, 0, impulseResponse.getNumSamples()); + } + + void normalizeImpulseResponse (float* samples, int numSamples) const + { + auto magnitude = 0.0f; + + for (int i = 0; i < numSamples; ++i) + magnitude += samples[i] * samples[i]; + + auto magnitudeInv = 1.0f / (4.0f * std::sqrt (magnitude)); + + for (int i = 0; i < numSamples; ++i) + samples[i] *= magnitudeInv; + } + + void initializeConvolutionEngines() + { + if (currentInfo.maximumBufferSize == 0) + return; + + auto numChannels = (currentInfo.wantsStereo ? 2 : 1); + + if (changeLevel == 3) + { + for (int i = 0; i < numChannels; ++i) + engines[i]->initializeConvolutionEngine (currentInfo, i); + + if (numChannels == 1) + engines[1]->copyStateFromOtherEngine (*engines[0]); + + mustInterpolate = false; + } + else + { + for (int i = 0; i < numChannels; ++i) + { + engines[i + 2]->initializeConvolutionEngine (currentInfo, i); + engines[i + 2]->reset(); + + if (isThreadRunning() && threadShouldExit()) + return; + } + + if (numChannels == 1) + engines[3]->copyStateFromOtherEngine (*engines[2]); + + for (size_t i = 0; i < 2; ++i) + { + changeVolumes[i].setValue (1.0f); + changeVolumes[i].reset (currentInfo.sampleRate, 0.05); + changeVolumes[i].setValue (0.0f); + + changeVolumes[i + 2].setValue (0.0f); + changeVolumes[i + 2].reset (currentInfo.sampleRate, 0.05); + changeVolumes[i + 2].setValue (1.0f); + + } + + mustInterpolate = true; + } + } + + + //============================================================================== + static constexpr int fifoSize = 256; // the size of the fifo which handles all the change requests + AbstractFifo abstractFifo; // the abstract fifo + + Array requestsType; // an array of ChangeRequest + Array requestsParameter; // an array of change parameters + + int changeLevel = 0; // the current level of requested change in the convolution engine + + //============================================================================== + ConvolutionEngine::ProcessingInformation currentInfo; // the information about the impulse response to load + + AudioBuffer temporaryBuffer; // a temporary buffer that is used when the function copyAndLoadImpulseResponse is called in the main API + SpinLock processLock; // a necessary lock to use with this temporary buffer + + AudioBuffer impulseResponseOriginal; // a buffer with the original impulse response + AudioBuffer impulseResponse; // a buffer with the impulse response trimmed, resampled, resized and normalized + + //============================================================================== + OwnedArray engines; // the 4 convolution engines being used + + AudioBuffer interpolationBuffer; // a buffer to do the interpolation between the convolution engines 0-1 and 2-3 + LinearSmoothedValue changeVolumes[4]; // the volumes for each convolution engine during interpolation + + bool mustInterpolate = false; // tells if the convolution engines outputs must be currently interpolated + + //============================================================================== + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl) +}; + + +//============================================================================== +Convolution::Convolution() +{ + pimpl = new Pimpl(); + pimpl->addToFifo (Convolution::Pimpl::ChangeRequest::changeEngine, juce::var (0)); +} + +Convolution::~Convolution() +{ +} + +void Convolution::loadImpulseResponse (const void* sourceData, size_t sourceDataSize, bool wantsStereo, size_t size) +{ + if (sourceData == nullptr) + return; + + Pimpl::ChangeRequest types[] = { Pimpl::ChangeRequest::changeSource, + Pimpl::ChangeRequest::changeImpulseResponseSize, + Pimpl::ChangeRequest::changeStereo }; + + Array sourceParameter; + + sourceParameter.add (juce::var ((int) ConvolutionEngine::ProcessingInformation::SourceType::sourceBinaryData)); + sourceParameter.add (juce::var (sourceData, sourceDataSize)); + + juce::var parameters[] = { juce::var (sourceParameter), + juce::var (static_cast (size)), + juce::var (wantsStereo) }; + + pimpl->addToFifo (types, parameters, 3); +} + +void Convolution::loadImpulseResponse (const File& fileImpulseResponse, bool wantsStereo, size_t size) +{ + if (! fileImpulseResponse.existsAsFile()) + return; + + Pimpl::ChangeRequest types[] = { Pimpl::ChangeRequest::changeSource, + Pimpl::ChangeRequest::changeImpulseResponseSize, + Pimpl::ChangeRequest::changeStereo }; + + Array sourceParameter; + + sourceParameter.add (juce::var ((int) ConvolutionEngine::ProcessingInformation::SourceType::sourceAudioFile)); + sourceParameter.add (juce::var (fileImpulseResponse.getFullPathName())); + + juce::var parameters[] = { juce::var (sourceParameter), + juce::var (static_cast (size)), + juce::var (wantsStereo) }; + + pimpl->addToFifo (types, parameters, 3); +} + +void Convolution::copyAndLoadImpulseResponseFromBuffer (const AudioBuffer& buffer, + double bufferSampleRate, bool wantsStereo, size_t size) +{ + jassert (bufferSampleRate > 0); + + if (buffer.getNumSamples() == 0) + return; + + pimpl->copyBufferToTemporaryLocation (buffer); + + Pimpl::ChangeRequest types[] = { Pimpl::ChangeRequest::changeSource, + Pimpl::ChangeRequest::changeImpulseResponseSize, + Pimpl::ChangeRequest::changeStereo }; + + Array sourceParameter; + sourceParameter.add (juce::var ((int) ConvolutionEngine::ProcessingInformation::SourceType::sourceAudioBuffer)); + sourceParameter.add (juce::var (bufferSampleRate)); + + juce::var parameters[] = { juce::var (sourceParameter), + juce::var (static_cast (size)), + juce::var (wantsStereo) }; + + pimpl->addToFifo (types, parameters, 3); +} + +void Convolution::prepare (const ProcessSpec& spec) +{ + jassert (isPositiveAndBelow (spec.numChannels, static_cast (3))); // only mono and stereo is supported + + Pimpl::ChangeRequest types[] = { Pimpl::ChangeRequest::changeSampleRate, + Pimpl::ChangeRequest::changeMaximumBufferSize }; + + juce::var parameters[] = { juce::var (spec.sampleRate), + juce::var (static_cast (spec.maximumBlockSize)) }; + + pimpl->addToFifo (types, parameters, 2); + + for (size_t channel = 0; channel < spec.numChannels; ++channel) + { + volumeDry[channel].reset (spec.sampleRate, 0.05); + volumeWet[channel].reset (spec.sampleRate, 0.05); + } + + sampleRate = spec.sampleRate; + dryBuffer = AudioBlock (dryBufferStorage, + jmin (spec.numChannels, 2u), + spec.maximumBlockSize); +} + +void Convolution::reset() noexcept +{ + dryBuffer.clear(); + pimpl->reset(); +} + +void Convolution::processSamples (const AudioBlock& input, AudioBlock& output, bool isBypassed) noexcept +{ + jassert (input.getNumChannels() == output.getNumChannels()); + jassert (isPositiveAndBelow (input.getNumChannels(), static_cast (3))); // only mono and stereo is supported + + auto numChannels = input.getNumChannels(); + auto numSamples = jmin (input.getNumSamples(), output.getNumSamples()); + + auto dry = dryBuffer.getSubsetChannelBlock (0, numChannels); + + if (volumeDry[0].isSmoothing()) + { + dry.copy (input); + + for (size_t channel = 0; channel < numChannels; ++channel) + volumeDry[channel].applyGain (dry.getChannelPointer (channel), (int) numSamples); + + pimpl->processSamples (input, output); + + for (size_t channel = 0; channel < numChannels; ++channel) + volumeWet[channel].applyGain (output.getChannelPointer (channel), (int) numSamples); + + output += dry; + } + else + { + if (! isBypassed) + pimpl->processSamples (input, output); + + if (isBypassed != currentIsBypassed) + { + currentIsBypassed = isBypassed; + + for (size_t channel = 0; channel < numChannels; ++channel) + { + volumeDry[channel].setValue (isBypassed ? 0.0f : 1.0f); + volumeDry[channel].reset (sampleRate, 0.05); + volumeDry[channel].setValue (isBypassed ? 1.0f : 0.0f); + + volumeWet[channel].setValue (isBypassed ? 1.0f : 0.0f); + volumeWet[channel].reset (sampleRate, 0.05); + volumeWet[channel].setValue (isBypassed ? 0.0f : 1.0f); + } + } + } +} diff --git a/modules/juce_dsp/frequency/juce_Convolution.h b/modules/juce_dsp/frequency/juce_Convolution.h new file mode 100644 index 0000000000..3ce07dc7a3 --- /dev/null +++ b/modules/juce_dsp/frequency/juce_Convolution.h @@ -0,0 +1,135 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + Performs stereo uniform-partitioned convolution of an input signal with an + impulse response in the frequency domain, using the juce FFT class. + + It provides some thread-safe functions to load impulse responses as well, + from audio files or memory on the fly without any noticeable artefacts, + performing resampling and trimming if necessary. + + The processing is equivalent to the time domain convolution done in the + class FIRFilter, with a FIRFilter::Coefficients object having as + coefficients the samples of the impulse response. However, it is more + efficient in general to do frequency domain convolution when the size of + the impulse response is higher than 64 samples. + + see @FIRFilter, @FIRFilter::Coefficients, @FFT +*/ +class JUCE_API Convolution +{ +public: + //============================================================================== + /** Initialises an object for performing convolution in the frequency domain. */ + Convolution(); + + /** Destructor. */ + ~Convolution(); + + //============================================================================== + /** Must be called before loading any impulse response, to provide to the + convolution the maximumBufferSize to handle, and the sample rate useful for + optional resampling. + */ + void prepare (const ProcessSpec&); + + /** Resets the processing pipeline, ready to start a new stream of data. */ + void reset() noexcept; + + /** Performs the filter operation on the given set of samples, with optional + stereo processing. + */ + template + void process (const ProcessContext& context) noexcept + { + static_assert (std::is_same::value, + "Convolution engine only supports single precision floating point data"); + + processSamples (context.getInputBlock(), context.getOutputBlock(), context.isBypassed); + } + + //============================================================================== + /** This function loads an impulse response audio file from memory, added in a + JUCE project with the Projucer as binary data. It can load any of the audio + formats registered in JUCE, and performs some resampling and pre-processing + as well if needed. + + Note : obviously, don't try to use this function on float samples, since the + data is supposed to be an audio file in its binary format, and be sure that + the original data is not going to move at all its memory location during the + process !! + + @param sourceData the block of data to use as the stream's source + @param sourceDataSize the number of bytes in the source data block + @param wantsStereo requests to load both stereo channels or only one mono channel + @param size the expected size for the impulse response after loading + */ + void loadImpulseResponse (const void* sourceData, size_t sourceDataSize, + bool wantsStereo, size_t size); + + /** This function loads an impulse response from an audio file on any drive. It + can load any of the audio formats registered in JUCE, and performs some + resampling and pre-processing as well if needed. + + @param fileImpulseResponse the location of the audio file + @param wantsStereo requests to load both stereo channels or only one mono channel + @param size the expected size for the impulse response after loading + */ + void loadImpulseResponse (const File& fileImpulseResponse, + bool wantsStereo, size_t size); + + /** This function loads an impulse response from an audio buffer, which is + copied before doing anything else. Performs some resampling and + pre-processing as well if needed. + + @param buffer the AudioBuffer to use + @param bufferSampleRate the sampleRate of the data in the AudioBuffer + @param wantsStereo requests to load both stereo channels or only one mono channel + @param size the expected size for the impulse response after loading + */ + void copyAndLoadImpulseResponseFromBuffer (const AudioBuffer& buffer, double bufferSampleRate, + bool wantsStereo, size_t size); + +private: + //============================================================================== + struct Pimpl; + ScopedPointer pimpl; + + //============================================================================== + void processSamples (const AudioBlock&, AudioBlock&, bool isBypassed) noexcept; + + //============================================================================== + double sampleRate; + bool currentIsBypassed = false; + LinearSmoothedValue volumeDry[2], volumeWet[2]; + AudioBlock dryBuffer; + HeapBlock dryBufferStorage; + + //============================================================================== + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Convolution) +}; diff --git a/modules/juce_dsp/frequency/juce_FFT.cpp b/modules/juce_dsp/frequency/juce_FFT.cpp new file mode 100644 index 0000000000..7afa32a20f --- /dev/null +++ b/modules/juce_dsp/frequency/juce_FFT.cpp @@ -0,0 +1,815 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +struct FFT::Instance +{ + virtual ~Instance() {} + virtual void perform (const Complex* input, Complex* output, bool inverse) const noexcept = 0; + virtual void performRealOnlyForwardTransform (float*) const noexcept = 0; + virtual void performRealOnlyInverseTransform (float*) const noexcept = 0; +}; + +struct FFT::Engine +{ + Engine (int priorityToUse) : enginePriority (priorityToUse) + { + EnginePriorityComparator comparator; + getEngines().addSorted (comparator, this); + } + + virtual ~Engine() {} + + virtual FFT::Instance* create (int order) const = 0; + + //============================================================================== + static FFT::Instance* createBestEngineForPlatform (int order) + { + for (auto* engine : getEngines()) + if (auto* instance = engine->create (order)) + return instance; + + jassertfalse; // This should never happen as the fallback engine should always work! + return nullptr; + } + +private: + struct EnginePriorityComparator + { + static int compareElements (Engine* first, Engine* second) noexcept + { + // sort in reverse order + return DefaultElementComparator::compareElements (second->enginePriority, first->enginePriority); + } + }; + + static Array& getEngines() + { + static Array engines; + return engines; + } + + int enginePriority; // used so that faster engines have priority over slower ones +}; + +template +struct FFT::EngineImpl : public FFT::Engine +{ + EngineImpl() : FFT::Engine (InstanceToUse::priority) {} + FFT::Instance* create (int order) const override { return InstanceToUse::create (order); } +}; + +//============================================================================== +//============================================================================== +struct FFTFallback : public FFT::Instance +{ + // this should have the least priority of all engines + static constexpr int priority = -1; + + static FFTFallback* create (int order) + { + return new FFTFallback (order); + } + + FFTFallback (int order) + { + configForward = new FFTConfig (1 << order, false); + configInverse = new FFTConfig (1 << order, true); + + size = 1 << order; + } + + void perform (const Complex* input, Complex* output, bool inverse) const noexcept override + { + if (size == 1) + { + *output = *input; + return; + } + + const SpinLock::ScopedLockType sl(processLock); + + jassert (configForward != nullptr); + + if (inverse) + { + configInverse->perform (input, output); + + const float scaleFactor = 1.0f / size; + + for (int i = 0; i < size; ++i) + output[i] *= scaleFactor; + } + else + { + configForward->perform (input, output); + } + } + + const size_t maxFFTScratchSpaceToAlloca = 256 * 1024; + + void performRealOnlyForwardTransform (float* d) const noexcept override + { + if (size == 1) + return; + + const size_t scratchSize = 16 + sizeof (Complex) * (size_t) size; + + if (scratchSize < maxFFTScratchSpaceToAlloca) + { + performRealOnlyForwardTransform (static_cast*> (alloca (scratchSize)), d); + } + else + { + HeapBlock heapSpace (scratchSize); + performRealOnlyForwardTransform (reinterpret_cast*> (heapSpace.getData()), d); + } + } + + void performRealOnlyInverseTransform (float* d) const noexcept override + { + if (size == 1) + return; + + const size_t scratchSize = 16 + sizeof (Complex) * (size_t) size; + + if (scratchSize < maxFFTScratchSpaceToAlloca) + { + performRealOnlyInverseTransform (static_cast*> (alloca (scratchSize)), d); + } + else + { + HeapBlock heapSpace (scratchSize); + performRealOnlyInverseTransform (reinterpret_cast*> (heapSpace.getData()), d); + } + } + + void performRealOnlyForwardTransform (Complex* scratch, float* d) const noexcept + { + for (int i = 0; i < size; ++i) + { + scratch[i].real (d[i]); + scratch[i].imag (0); + } + + perform (scratch, reinterpret_cast*> (d), false); + } + + void performRealOnlyInverseTransform (Complex* scratch, float* d) const noexcept + { + perform (reinterpret_cast*> (d), scratch, true); + + for (int i = 0; i < size; ++i) + { + d[i] = scratch[i].real(); + d[i + size] = scratch[i].imag(); + } + } + + //============================================================================== + struct FFTConfig + { + FFTConfig (int sizeOfFFT, bool isInverse) + : fftSize (sizeOfFFT), inverse (isInverse), twiddleTable ((size_t) sizeOfFFT) + { + const double inverseFactor = (inverse ? 2.0 : -2.0) * double_Pi / (double) fftSize; + + if (fftSize <= 4) + { + for (int i = 0; i < fftSize; ++i) + { + const double phase = i * inverseFactor; + + twiddleTable[i].real ((float) std::cos (phase)); + twiddleTable[i].imag ((float) std::sin (phase)); + } + } + else + { + for (int i = 0; i < fftSize / 4; ++i) + { + const double phase = i * inverseFactor; + + twiddleTable[i].real ((float) std::cos (phase)); + twiddleTable[i].imag ((float) std::sin (phase)); + } + + for (int i = fftSize / 4; i < fftSize / 2; ++i) + { + const int index = i - fftSize / 4; + + twiddleTable[i].real (inverse ? -twiddleTable[index].imag() : twiddleTable[index].imag()); + twiddleTable[i].imag (inverse ? twiddleTable[index].real() : -twiddleTable[index].real()); + } + + twiddleTable[fftSize / 2].real (-1.0f); + twiddleTable[fftSize / 2].imag (0.0f); + + for (int i = fftSize / 2; i < fftSize; ++i) + { + const int index = fftSize / 2 - (i - fftSize / 2); + twiddleTable[i] = conj(twiddleTable[index]); + } + } + + const int root = (int) std::sqrt ((double) fftSize); + int divisor = 4, n = fftSize; + + for (int i = 0; i < numElementsInArray (factors); ++i) + { + while ((n % divisor) != 0) + { + if (divisor == 2) divisor = 3; + else if (divisor == 4) divisor = 2; + else divisor += 2; + + if (divisor > root) + divisor = n; + } + + n /= divisor; + + jassert (divisor == 1 || divisor == 2 || divisor == 4); + factors[i].radix = divisor; + factors[i].length = n; + } + } + + void perform (const Complex* input, Complex* output) const noexcept + { + perform (input, output, 1, 1, factors); + } + + const int fftSize; + const bool inverse; + + struct Factor { int radix, length; }; + Factor factors[32]; + HeapBlock> twiddleTable; + + void perform (const Complex* input, Complex* output, int stride, int strideIn, const Factor* facs) const noexcept + { + auto factor = *facs++; + auto* originalOutput = output; + auto* outputEnd = output + factor.radix * factor.length; + + if (stride == 1 && factor.radix <= 5) + { + for (int i = 0; i < factor.radix; ++i) + perform (input + stride * strideIn * i, output + i * factor.length, stride * factor.radix, strideIn, facs); + + butterfly (factor, output, stride); + return; + } + + if (factor.length == 1) + { + do + { + *output++ = *input; + input += stride * strideIn; + } + while (output < outputEnd); + } + else + { + do + { + perform (input, output, stride * factor.radix, strideIn, facs); + input += stride * strideIn; + output += factor.length; + } + while (output < outputEnd); + } + + butterfly (factor, originalOutput, stride); + } + + void butterfly (const Factor factor, Complex* data, int stride) const noexcept + { + switch (factor.radix) + { + case 1: break; + case 2: butterfly2 (data, stride, factor.length); return; + case 4: butterfly4 (data, stride, factor.length); return; + default: jassertfalse; break; + } + + auto* scratch = static_cast*> (alloca (sizeof (Complex) * (size_t) factor.radix)); + + for (int i = 0; i < factor.length; ++i) + { + for (int k = i, q1 = 0; q1 < factor.radix; ++q1) + { + scratch[q1] = data[k]; + k += factor.length; + } + + for (int k = i, q1 = 0; q1 < factor.radix; ++q1) + { + int twiddleIndex = 0; + data[k] = scratch[0]; + + for (int q = 1; q < factor.radix; ++q) + { + twiddleIndex += stride * k; + + if (twiddleIndex >= fftSize) + twiddleIndex -= fftSize; + + data[k] += scratch[q] * twiddleTable[twiddleIndex]; + } + + k += factor.length; + } + } + } + + void butterfly2 (Complex* data, const int stride, const int length) const noexcept + { + auto* dataEnd = data + length; + auto* tw = twiddleTable.getData(); + + for (int i = length; --i >= 0;) + { + auto s = *dataEnd; + s *= (*tw); + tw += stride; + *dataEnd++ = *data - s; + *data++ += s; + } + } + + void butterfly4 (Complex* data, const int stride, const int length) const noexcept + { + auto lengthX2 = length * 2; + auto lengthX3 = length * 3; + + auto strideX2 = stride * 2; + auto strideX3 = stride * 3; + + auto* twiddle1 = twiddleTable.getData(); + auto* twiddle2 = twiddle1; + auto* twiddle3 = twiddle1; + + for (int i = length; --i >= 0;) + { + auto s0 = data[length] * *twiddle1; + auto s1 = data[lengthX2] * *twiddle2; + auto s2 = data[lengthX3] * *twiddle3; + auto s3 = s0; s3 += s2; + auto s4 = s0; s4 -= s2; + auto s5 = *data; s5 -= s1; + + *data += s1; + data[lengthX2] = *data; + data[lengthX2] -= s3; + twiddle1 += stride; + twiddle2 += strideX2; + twiddle3 += strideX3; + *data += s3; + + if (inverse) + { + data[length].real (s5.real() - s4.imag()); + data[length].imag (s5.imag() + s4.real()); + data[lengthX3].real (s5.real() + s4.imag()); + data[lengthX3].imag (s5.imag() - s4.real()); + } + else + { + data[length].real (s5.real() + s4.imag()); + data[length].imag (s5.imag() - s4.real()); + data[lengthX3].real (s5.real() - s4.imag()); + data[lengthX3].imag (s5.imag() + s4.real()); + } + + ++data; + } + } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FFTConfig) + }; + + //============================================================================== + SpinLock processLock; + ScopedPointer configForward, configInverse; + int size; +}; + +FFT::EngineImpl fftFallback; + +//============================================================================== +//============================================================================== +#if (JUCE_MAC || JUCE_IOS) && JUCE_USE_VDSP_FRAMEWORK +struct AppleFFT : public FFT::Instance +{ + static constexpr int priority = 5; + + static AppleFFT* create (int order) + { + return new AppleFFT (order); + } + + AppleFFT (int orderToUse) + : order (static_cast (orderToUse)), + fftSetup (vDSP_create_fftsetup (order, 2)), + forwardNormalisation (.5f), + inverseNormalisation (1.0f / static_cast (1 << order)) + {} + + ~AppleFFT() override + { + if (fftSetup != nullptr) + { + vDSP_destroy_fftsetup (fftSetup); + fftSetup = nullptr; + } + } + + void perform (const Complex* input, Complex* output, bool inverse) const noexcept override + { + auto size = (1 << order); + + DSPSplitComplex splitInput (toSplitComplex (const_cast*> (input))); + DSPSplitComplex splitOutput (toSplitComplex (output)); + + vDSP_fft_zop (fftSetup, &splitInput, 2, &splitOutput, 2, + order, inverse ? kFFTDirection_Inverse : kFFTDirection_Forward); + + float factor = (inverse ? inverseNormalisation : forwardNormalisation * 2.0f); + vDSP_vsmul ((float*) output, 1, &factor, (float*) output, 1, static_cast (size << 1)); + } + + void performRealOnlyForwardTransform (float* inoutData) const noexcept override + { + auto size = (1 << order); + auto* inout = reinterpret_cast*> (inoutData); + auto splitInOut (toSplitComplex (inout)); + + inoutData[size] = 0.0f; + vDSP_fft_zrip (fftSetup, &splitInOut, 2, order, kFFTDirection_Forward); + vDSP_vsmul (inoutData, 1, &forwardNormalisation, inoutData, 1, static_cast (size << 1)); + mirrorResult (inout); + } + + void performRealOnlyInverseTransform (float* inoutData) const noexcept override + { + auto* inout = reinterpret_cast*> (inoutData); + auto size = (1 << order); + auto splitInOut (toSplitComplex (inout)); + + // Imaginary part of nyquist and DC frequencies are always zero + // so Apple uses the imaginary part of the DC frequency to store + // the real part of the nyquist frequency + if (size != 1) + inout[0] = Complex (inout[0].real(), inout[size >> 1].real()); + + vDSP_fft_zrip (fftSetup, &splitInOut, 2, order, kFFTDirection_Inverse); + vDSP_vsmul (inoutData, 1, &inverseNormalisation, inoutData, 1, static_cast (size << 1)); + vDSP_vclr (inoutData + size, 1, static_cast (size)); + } + +private: + //============================================================================== + void mirrorResult (Complex* out) const noexcept + { + auto size = (1 << order); + auto i = size >> 1; + + // Imaginary part of nyquist and DC frequencies are always zero + // so Apple uses the imaginary part of the DC frequency to store + // the real part of the nyquist frequency + out[i++] = { out[0].imag(), 0.0 }; + out[0] = { out[0].real(), 0.0 }; + + for (; i < size; ++i) + out[i] = std::conj (out[size - i]); + } + + static DSPSplitComplex toSplitComplex (Complex* data) noexcept + { + // this assumes that Complex interleaves real and imaginary parts + // and is tightly packed. + return { reinterpret_cast (data), + reinterpret_cast (data) + 1}; + } + + //============================================================================== + vDSP_Length order; + FFTSetup fftSetup; + float forwardNormalisation, inverseNormalisation; +}; + +FFT::EngineImpl appleFFT; +#endif + +//============================================================================== +//============================================================================== +#if JUCE_DSP_USE_SHARED_FFTW || JUCE_DSP_USE_STATIC_FFTW +struct FFTWImpl : public FFT::Instance +{ + #if JUCE_DSP_USE_STATIC_FFTW + // if the JUCE developer has gone through the hassle of statically + // linking in fftw, they probably want to use it + static constexpr int priority = 10; + #else + static constexpr int priority = 3; + #endif + + struct FFTWPlan; + using FFTWPlanRef = FFTWPlan*; + + enum + { + measure = 0, + unaligned = (1 << 1), + estimate = (1 << 6) + }; + + struct Symbols + { + FFTWPlanRef (*plan_dft_fftw) (unsigned, Complex*, Complex*, int, unsigned); + FFTWPlanRef (*plan_r2c_fftw) (unsigned, float*, Complex*, unsigned); + FFTWPlanRef (*plan_c2r_fftw) (unsigned, Complex*, float*, unsigned); + void (*destroy_fftw) (FFTWPlanRef); + + void (*execute_dft_fftw) (FFTWPlanRef, const Complex*, Complex*); + void (*execute_r2c_fftw) (FFTWPlanRef, float*, Complex*); + void (*execute_c2r_fftw) (FFTWPlanRef, Complex*, float*); + + #if JUCE_DSP_USE_STATIC_FFTW + template + static bool symbol (FuncPtr& dst, ActualSymbolType sym) + { + dst = reinterpret_cast (sym); + return true; + } + #else + template + static bool symbol (DynamicLibrary& lib, FuncPtr& dst, const char* name) + { + dst = reinterpret_cast (lib.getFunction (name)); + return (dst != nullptr); + } + #endif + }; + + static FFTWImpl* create (int order) + { + DynamicLibrary lib; + + #if ! JUCE_DSP_USE_STATIC_FFTW + #if JUCE_MAC + const char* libsuffix = "dylib"; + #elif JUCE_WINDOWS + const char* libsuffix = "dll"; + #else + const char* libsuffix = "so"; + #endif + + if (lib.open (String ("libfftw3f.") + libsuffix)) + #endif + { + Symbols symbols; + + #if JUCE_DSP_USE_STATIC_FFTW + if (! Symbols::symbol (symbols.plan_dft_fftw, fftwf_plan_dft_1d)) return nullptr; + if (! Symbols::symbol (symbols.plan_r2c_fftw, fftwf_plan_dft_r2c_1d)) return nullptr; + if (! Symbols::symbol (symbols.plan_c2r_fftw, fftwf_plan_dft_c2r_1d)) return nullptr; + if (! Symbols::symbol (symbols.destroy_fftw, fftwf_destroy_plan)) return nullptr; + + if (! Symbols::symbol (symbols.execute_dft_fftw, fftwf_execute_dft)) return nullptr; + if (! Symbols::symbol (symbols.execute_r2c_fftw, fftwf_execute_dft_r2c)) return nullptr; + if (! Symbols::symbol (symbols.execute_c2r_fftw, fftwf_execute_dft_c2r)) return nullptr; + #else + if (! Symbols::symbol (lib, symbols.plan_dft_fftw, "fftwf_plan_dft_1d")) return nullptr; + if (! Symbols::symbol (lib, symbols.plan_r2c_fftw, "fftwf_plan_dft_r2c_1d")) return nullptr; + if (! Symbols::symbol (lib, symbols.plan_c2r_fftw, "fftwf_plan_dft_c2r_1d")) return nullptr; + if (! Symbols::symbol (lib, symbols.destroy_fftw, "fftwf_destroy_plan")) return nullptr; + + if (! Symbols::symbol (lib, symbols.execute_dft_fftw, "fftwf_execute_dft")) return nullptr; + if (! Symbols::symbol (lib, symbols.execute_r2c_fftw, "fftwf_execute_dft_r2c")) return nullptr; + if (! Symbols::symbol (lib, symbols.execute_c2r_fftw, "fftwf_execute_dft_c2r")) return nullptr; + #endif + + return new FFTWImpl (static_cast (order), static_cast (lib), symbols); + } + + return nullptr; + } + + FFTWImpl (size_t orderToUse, DynamicLibrary&& libraryToUse, const Symbols& symbols) + : fftwLibrary (std::move (libraryToUse)), fftw (symbols), order (static_cast (orderToUse)) + { + auto n = (1u << order); + HeapBlock> in (n), out (n); + + c2cForward = fftw.plan_dft_fftw (n, in.getData(), out.getData(), -1, unaligned | estimate); + c2cInverse = fftw.plan_dft_fftw (n, in.getData(), out.getData(), +1, unaligned | estimate); + + r2c = fftw.plan_r2c_fftw (n, (float*) in.getData(), in.getData(), unaligned | estimate); + c2r = fftw.plan_c2r_fftw (n, in.getData(), (float*) in.getData(), unaligned | estimate); + } + + ~FFTWImpl() override + { + fftw.destroy_fftw (c2cForward); + fftw.destroy_fftw (c2cInverse); + fftw.destroy_fftw (r2c); + fftw.destroy_fftw (c2r); + } + + void perform (const Complex* input, Complex* output, bool inverse) const noexcept override + { + if (inverse) + { + auto n = (1u << order); + fftw.execute_dft_fftw (c2cInverse, input, output); + FloatVectorOperations::multiply ((float*) output, 1.0f / static_cast (n), (int) n << 1); + } + else + { + fftw.execute_dft_fftw (c2cForward, input, output); + } + } + + void performRealOnlyForwardTransform (float* inputOutputData) const noexcept override + { + if (order == 0) + return; + + auto* out = reinterpret_cast*> (inputOutputData); + + fftw.execute_r2c_fftw (r2c, inputOutputData, out); + + auto size = (1 << order); + + for (auto i = size >> 1; i < size; ++i) + out[i] = std::conj (out[size - i]); + } + + void performRealOnlyInverseTransform (float* inputOutputData) const noexcept override + { + auto n = (1u << order); + + fftw.execute_c2r_fftw (c2r, (Complex*) inputOutputData, inputOutputData); + FloatVectorOperations::multiply ((float*) inputOutputData, 1.0f / static_cast (n), (int) n); + } + + //============================================================================== + DynamicLibrary fftwLibrary; + Symbols fftw; + size_t order; + + FFTWPlanRef c2cForward, c2cInverse, r2c, c2r; +}; + +FFT::EngineImpl fftwEngine; +#endif + +//============================================================================== +//============================================================================== +#if JUCE_DSP_USE_INTEL_MKL +struct IntelFFT : public FFT::Instance +{ + static constexpr int priority = 8; + + static bool succeeded (MKL_LONG status) noexcept { return status == 0; } + + static IntelFFT* create (int orderToUse) + { + DFTI_DESCRIPTOR_HANDLE mklc2c, mklc2r; + + if (DftiCreateDescriptor (&mklc2c, DFTI_SINGLE, DFTI_COMPLEX, 1, 1 << orderToUse) == 0) + { + if (succeeded (DftiSetValue (mklc2c, DFTI_PLACEMENT, DFTI_NOT_INPLACE)) + && succeeded (DftiSetValue (mklc2c, DFTI_BACKWARD_SCALE, 1.0f / static_cast (1 << orderToUse))) + && succeeded (DftiCommitDescriptor (mklc2c))) + { + if (succeeded (DftiCreateDescriptor (&mklc2r, DFTI_SINGLE, DFTI_REAL, 1, 1 << orderToUse))) + { + if (succeeded (DftiSetValue (mklc2r, DFTI_PLACEMENT, DFTI_INPLACE)) + && succeeded (DftiSetValue (mklc2r, DFTI_BACKWARD_SCALE, 1.0f / static_cast (1 << orderToUse))) + && succeeded (DftiCommitDescriptor (mklc2r))) + { + return new IntelFFT (static_cast (orderToUse), mklc2c, mklc2r); + } + + DftiFreeDescriptor (&mklc2r); + } + } + + DftiFreeDescriptor (&mklc2c); + } + + return {}; + } + + IntelFFT (size_t orderToUse, DFTI_DESCRIPTOR_HANDLE c2cToUse, DFTI_DESCRIPTOR_HANDLE cr2ToUse) + : order (orderToUse), c2c (c2cToUse), c2r (cr2ToUse) + {} + + ~IntelFFT() + { + DftiFreeDescriptor (&c2c); + DftiFreeDescriptor (&c2r); + } + + void perform (const Complex* input, Complex* output, bool inverse) const noexcept override + { + if (inverse) + DftiComputeBackward (c2c, (void*) input, output); + else + DftiComputeForward (c2c, (void*) input, output); + } + + void performRealOnlyForwardTransform (float* inputOutputData) const noexcept override + { + if (order == 0) + return; + + DftiComputeForward (c2r, inputOutputData); + + auto* out = reinterpret_cast*> (inputOutputData); + auto size = (1 << order); + + for (auto i = size >> 1; i < size; ++i) + out[i] = std::conj (out[size - i]); + } + + void performRealOnlyInverseTransform (float* inputOutputData) const noexcept override + { + DftiComputeBackward (c2r, inputOutputData); + } + + size_t order; + DFTI_DESCRIPTOR_HANDLE c2c, c2r; +}; + +FFT::EngineImpl fftwEngine; +#endif + +//============================================================================== +//============================================================================== +FFT::FFT (int order) + : engine (FFT::Engine::createBestEngineForPlatform (order)), + size (1 << order) +{} + +FFT::~FFT() {} + +void FFT::perform (const Complex* input, Complex* output, bool inverse) const noexcept +{ + if (engine != nullptr) + engine->perform (input, output, inverse); +} + +void FFT::performRealOnlyForwardTransform (float* inputOutputData) const noexcept +{ + if (engine != nullptr) + engine->performRealOnlyForwardTransform (inputOutputData); +} + +void FFT::performRealOnlyInverseTransform (float* inputOutputData) const noexcept +{ + if (engine != nullptr) + engine->performRealOnlyInverseTransform (inputOutputData); +} + +void FFT::performFrequencyOnlyForwardTransform (float* inputOutputData) const noexcept +{ + if (size == 1) + return; + + performRealOnlyForwardTransform (inputOutputData); + auto* out = reinterpret_cast*> (inputOutputData); + + for (auto i = 0; i < size; ++i) + inputOutputData[i] = std::abs (out[i]); + + zeromem (&inputOutputData[size], sizeof (float) * static_cast (size)); +} diff --git a/modules/juce_audio_basics/effects/juce_FFT.h b/modules/juce_dsp/frequency/juce_FFT.h similarity index 50% rename from modules/juce_audio_basics/effects/juce_FFT.h rename to modules/juce_dsp/frequency/juce_FFT.h index 430278e9b6..a93a57fde8 100644 --- a/modules/juce_audio_basics/effects/juce_FFT.h +++ b/modules/juce_dsp/frequency/juce_FFT.h @@ -7,11 +7,15 @@ JUCE is an open source library subject to commercial or open-source licensing. - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE @@ -20,8 +24,9 @@ ============================================================================== */ + /** - A very minimal FFT class. + Performs a fast fourier transform. This is only a simple low-footprint implementation and isn't tuned for speed - it may be useful for simple applications where one of the more complex FFT libraries would be @@ -34,60 +39,61 @@ class JUCE_API FFT { public: - /** Initialises an object for performing either a forward or inverse FFT with the given size. - The the number of points the FFT will operate on will be 2 ^ order. + //============================================================================== + /** Initialises an object for performing forward and inverse FFT with the given size. + The number of points the FFT will operate on will be 2 ^ order. */ - FFT (int order, bool isInverse); + FFT (int order); /** Destructor. */ ~FFT(); - /** A complex number, for the purposes of the FFT class. */ - struct Complex - { - float r; /**< Real part. */ - float i; /**< Imaginary part. */ - }; - - /** Performs an out-of-place FFT, either forward or inverse depending on the mode - that was passed to this object's constructor. - + //============================================================================== + /** Performs an out-of-place FFT, either forward or inverse. The arrays must contain at least getSize() elements. */ - void perform (const Complex* input, Complex* output) const noexcept; + void perform (const Complex *input, Complex * output, bool inverse) const noexcept; /** Performs an in-place forward transform on a block of real data. The size of the array passed in must be 2 * getSize(), and the first half should contain your raw input sample data. On return, the array will contain - complex frequency + phase data, and can be passed to performRealOnlyInverseTransform() - in order to convert it back to reals. + size complex real + imaginary parts data interleaved, and can be passed to + performRealOnlyInverseTransform() in order to convert it back to reals. */ void performRealOnlyForwardTransform (float* inputOutputData) const noexcept; /** Performs a reverse operation to data created in performRealOnlyForwardTransform(). - The size of the array passed in must be 2 * getSize(), containing complex - frequency and phase data. On return, the first half of the array will contain - the reconstituted samples. + The size of the array passed in must be 2 * getSize(), containing size complex + real and imaginary parts interleaved numbers. On return, the first half of the + array will contain the reconstituted samples. */ void performRealOnlyInverseTransform (float* inputOutputData) const noexcept; - /** Takes an array and simply transforms it to the frequency spectrum. - This may be handy for things like frequency displays or analysis. + /** Takes an array and simply transforms it to the magnitude frequency response + spectrum. This may be handy for things like frequency displays or analysis. + The size of the array passed in must be 2 * getSize(). */ void performFrequencyOnlyForwardTransform (float* inputOutputData) const noexcept; /** Returns the number of data points that this FFT was created to work with. */ int getSize() const noexcept { return size; } + //============================================================================== + #ifndef DOXYGEN + /* internal */ + struct Instance; + template struct EngineImpl; + #endif + private: - JUCE_PUBLIC_IN_DLL_BUILD (struct FFTConfig) - ScopedPointer config; - const int size; + //============================================================================== + struct Engine; - void performRealOnlyForwardTransform (Complex*, float*) const noexcept; - void performRealOnlyInverseTransform (Complex*, float*) const noexcept; + ScopedPointer engine; + int size; + //============================================================================== JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FFT) }; diff --git a/modules/juce_dsp/frequency/juce_FFT_test.cpp b/modules/juce_dsp/frequency/juce_FFT_test.cpp new file mode 100644 index 0000000000..1377754efb --- /dev/null +++ b/modules/juce_dsp/frequency/juce_FFT_test.cpp @@ -0,0 +1,198 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +struct FFTUnitTest : public UnitTest +{ + FFTUnitTest() : UnitTest("FFT") {} + + static void fillRandom (Random& random, Complex* buffer, size_t n) + { + for (size_t i = 0; i < n; ++i) + buffer[i] = Complex ((2.0f * random.nextFloat()) - 1.0f, + (2.0f * random.nextFloat()) - 1.0f); + } + + static void fillRandom (Random& random, float* buffer, size_t n) + { + for (size_t i = 0; i < n; ++i) + buffer[i] = (2.0f * random.nextFloat()) - 1.0f; + } + + static Complex freqConvolution (const Complex* in, float freq, size_t n) + { + Complex sum (0.0, 0.0); + for (size_t i = 0; i < n; ++i) + sum += in[i] * exp (Complex (0, static_cast (i) * freq)); + + return sum; + } + + static void performReferenceFourier (const Complex* in, Complex* out, + size_t n, bool reverve) + { + float base_freq = static_cast(((reverve ? 1.0 : -1.0) * 2.0 * double_Pi) + / static_cast (n)); + + for (size_t i = 0; i < n; ++i) + out[i] = freqConvolution (in, static_cast(i) * base_freq, n); + } + + static void performReferenceFourier (const float* in, Complex* out, + size_t n, bool reverve) + { + HeapBlock> buffer (n); + + for (size_t i = 0; i < n; ++i) + buffer.getData()[i] = Complex (in[i], 0.0f); + + float base_freq = static_cast(((reverve ? 1.0 : -1.0) * 2.0 * double_Pi) + / static_cast (n)); + + for (size_t i = 0; i < n; ++i) + out[i] = freqConvolution (buffer.getData(), static_cast(i) * base_freq, n); + } + + + //============================================================================== + template + static bool checkArrayIsSimilar (Type* a, Type* b, size_t n) noexcept + { + for (size_t i = 0; i < n; ++i) + if (std::abs (a[i] - b[i]) > 1e-3f) + return false; + + return true; + } + + struct RealTest + { + static void run (FFTUnitTest& u) + { + Random random (378272); + + for (size_t order = 0; order <= 8; ++order) + { + auto n = (1u << order); + + FFT fft ((int) order); + + HeapBlock input (n); + HeapBlock> reference (n), output (n); + + fillRandom (random, input.getData(), n); + performReferenceFourier (input.getData(), reference.getData(), n, false); + + // fill only first half with real numbers + zeromem (output.getData(), n * sizeof (Complex)); + memcpy (reinterpret_cast (output.getData()), input.getData(), n * sizeof (float)); + + fft.performRealOnlyForwardTransform ((float*) output.getData()); + u.expect (checkArrayIsSimilar (reference.getData(), output.getData(), n)); + + memcpy (output.getData(), reference.getData(), n * sizeof (Complex)); + fft.performRealOnlyInverseTransform ((float*) output.getData()); + u.expect (checkArrayIsSimilar ((float*) output.getData(), input.getData(), n)); + } + } + }; + + struct FrequencyOnlyTest + { + static void run(FFTUnitTest& u) + { + Random random (378272); + for (size_t order = 0; order <= 8; ++order) + { + auto n = (1u << order); + + FFT fft ((int) order); + + HeapBlock inout (n << 1), reference (n << 1); + HeapBlock > frequency (n); + + fillRandom (random, inout.getData(), n); + zeromem (reference.getData(), sizeof (float) * (n << 1)); + performReferenceFourier (inout.getData(), frequency.getData(), n, false); + + for (size_t i = 0; i < n; ++i) + reference.getData()[i] = std::abs (frequency.getData()[i]); + + fft.performFrequencyOnlyForwardTransform (inout.getData()); + + u.expect (checkArrayIsSimilar (inout.getData(), reference.getData(), n)); + } + } + }; + + struct ComplexTest + { + static void run(FFTUnitTest& u) + { + Random random (378272); + + for (size_t order = 0; order <= 7; ++order) + { + auto n = (1u << order); + + FFT fft ((int) order); + + HeapBlock > input (n), buffer (n), output (n), reference (n); + + fillRandom (random, input.getData(), n); + performReferenceFourier (input.getData(), reference.getData(), n, false); + + memcpy (buffer.getData(), input.getData(), sizeof (Complex) * n); + fft.perform (buffer.getData(), output.getData(), false); + + u.expect (checkArrayIsSimilar (output.getData(), reference.getData(), n)); + + memcpy (buffer.getData(), reference.getData(), sizeof (Complex) * n); + fft.perform (buffer.getData(), output.getData(), true); + + + u.expect (checkArrayIsSimilar (output.getData(), input.getData(), n)); + } + } + }; + + template + void runTestForAllTypes (const char* unitTestName) + { + beginTest (unitTestName); + + TheTest::run (*this); + } + + void runTest() override + { + runTestForAllTypes ("Real input numbers Test"); + runTestForAllTypes ("Frequency only Test"); + runTestForAllTypes ("Complex input numbers Test"); + } +}; + +static FFTUnitTest fftUnitTest; diff --git a/modules/juce_dsp/frequency/juce_Windowing.cpp b/modules/juce_dsp/frequency/juce_Windowing.cpp new file mode 100644 index 0000000000..332a30b746 --- /dev/null +++ b/modules/juce_dsp/frequency/juce_Windowing.cpp @@ -0,0 +1,186 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +template +static inline FloatType ncos (size_t order, size_t i, size_t size) noexcept +{ + return std::cos (static_cast (order * i) + * MathConstants::pi / static_cast (size - 1)); +} + +template +WindowingFunction::WindowingFunction (size_t size, WindowingMethod type, bool normalize, FloatType beta) +{ + fillWindowingTables (size, type, normalize, beta); +} + +template +void WindowingFunction::fillWindowingTables (size_t size, WindowingMethod type, + bool normalize, FloatType beta) noexcept +{ + windowTable.resize (static_cast (size)); + fillWindowingTables (windowTable.getRawDataPointer(), size, type, normalize, beta); +} + +template +void WindowingFunction::fillWindowingTables (FloatType* samples, size_t size, + WindowingMethod type, bool normalize, + FloatType beta) noexcept +{ + switch (type) + { + case rectangular: + { + for (size_t i = 0; i < size; ++i) + samples[i] = static_cast (1); + } + break; + + case triangular: + { + auto halfSlots = static_cast (0.5) * static_cast (size - 1); + + for (size_t i = 0; i < size; ++i) + samples[i] = static_cast (1.0) - std::fabs ((static_cast (i) - halfSlots) / halfSlots); + } + break; + + case hann: + { + for (size_t i = 0; i < size; ++i) + { + auto cos2 = ncos (2, i, size); + samples[i] = static_cast (0.5 - 0.5 * cos2); + } + } + break; + + case hamming: + { + for (size_t i = 0; i < size; ++i) + { + auto cos2 = ncos (2, i, size); + samples[i] = static_cast (0.54 - 0.46 * cos2); + } + } + break; + + case blackmann: + { + constexpr FloatType alpha = 0.16f; + + for (size_t i = 0; i < size; ++i) + { + auto cos2 = ncos (2, i, size); + auto cos4 = ncos (4, i, size); + + samples[i] = static_cast (0.5 * (1 - alpha) - 0.5 * cos2 + 0.5 * alpha * cos4); + } + } + break; + + case blackmannHarris: + { + for (size_t i = 0; i < size; ++i) + { + auto cos2 = ncos (2, i, size); + auto cos4 = ncos (4, i, size); + auto cos6 = ncos (6, i, size); + + samples[i] = static_cast (0.35875 - 0.48829 * cos2 + 0.14128 * cos4 - 0.01168 * cos6); + } + } + break; + + case flatTop: + { + for (size_t i = 0; i < size; ++i) + { + auto cos2 = ncos (2, i, size); + auto cos4 = ncos (4, i, size); + auto cos6 = ncos (6, i, size); + auto cos8 = ncos (8, i, size); + + samples[i] = static_cast (1.0 - 1.93 * cos2 + 1.29 * cos4 - 0.388 * cos6 + 0.028 * cos8); + } + } + break; + + case kaiser: + { + const double factor = 1.0 / SpecialFunctions::besselI0 (beta); + + for (size_t i = 0; i < size; ++i) + samples[i] = static_cast (SpecialFunctions::besselI0 (beta * std::sqrt (1.0 - std::pow ((i - 0.5 * (size - 1.0)) + / ( 0.5 * (size - 1.0)), 2.0))) + * factor); + } + break; + + default: + jassertfalse; + break; + } + + // DC frequency amplitude must be one + if (normalize) + { + FloatType sum = {}; + + for (size_t i = 0; i < size; ++i) + sum += samples[i]; + + auto factor = static_cast (size) / sum; + + FloatVectorOperations::multiply (samples, factor, static_cast (size)); + } +} + +template +void WindowingFunction::multiplyWithWindowingTable (FloatType* samples, size_t size) noexcept +{ + FloatVectorOperations::multiply (samples, windowTable.getRawDataPointer(), jmin (static_cast (size), windowTable.size())); +} + +template +const char* WindowingFunction::getWindowingMethodName (WindowingMethod type) noexcept +{ + switch (type) + { + case rectangular: return "Rectangular"; + case triangular: return "Triangular"; + case hann: return "Hann"; + case hamming: return "Hamming"; + case blackmann: return "Blackmann"; + case blackmannHarris: return "Blackmann-Harris"; + case flatTop: return "FlatTop"; + case kaiser: return "Kaiser"; + default: jassertfalse; return ""; + } +} + +template struct WindowingFunction; +template struct WindowingFunction; diff --git a/modules/juce_dsp/frequency/juce_Windowing.h b/modules/juce_dsp/frequency/juce_Windowing.h new file mode 100644 index 0000000000..fa06a9b561 --- /dev/null +++ b/modules/juce_dsp/frequency/juce_Windowing.h @@ -0,0 +1,73 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + A class which provides multiple windowing functions useful for filter design + and spectrum analyzers +*/ +template +struct WindowingFunction +{ + enum WindowingMethod + { + rectangular = 0, + triangular, + hann, + hamming, + blackmann, + blackmannHarris, + flatTop, + kaiser, + numWindowingMethods + }; + + //============================================================================== + WindowingFunction (size_t size, WindowingMethod, + bool normalize = true, FloatType beta = 0); + + //============================================================================== + /** Fills the content of an array with a given windowing method table */ + void fillWindowingTables (size_t size, WindowingMethod type, + bool normalize = true, FloatType beta = 0) noexcept; + + /** Fills the content of an array with a given windowing method table */ + static void fillWindowingTables (FloatType* samples, size_t size, WindowingMethod, + bool normalize = true, FloatType beta = 0) noexcept; + + /** Multiply the content of a buffer with the given window */ + void multiplyWithWindowingTable (FloatType* samples, size_t size) noexcept; + + /** Returns the name of a given windowing method */ + static const char* getWindowingMethodName (WindowingMethod) noexcept; + + +private: + //============================================================================== + Array windowTable; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowingFunction) +}; diff --git a/modules/juce_dsp/juce_dsp.cpp b/modules/juce_dsp/juce_dsp.cpp new file mode 100644 index 0000000000..e8667ebd2a --- /dev/null +++ b/modules/juce_dsp/juce_dsp.cpp @@ -0,0 +1,89 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#ifdef JUCE_DSP_H_INCLUDED + /* When you add this cpp file to your project, you mustn't include it in a file where you've + already included any other headers - just put it inside a file on its own, possibly with your config + flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix + header files that the compiler may be using. + */ + #error "Incorrect use of JUCE cpp file" +#endif + +#include "juce_dsp.h" + +#ifndef JUCE_USE_VDSP_FRAMEWORK + #define JUCE_USE_VDSP_FRAMEWORK 1 +#endif + +#if (JUCE_MAC || JUCE_IOS) && JUCE_USE_VDSP_FRAMEWORK + #include +#else + #undef JUCE_USE_VDSP_FRAMEWORK +#endif + +#if JUCE_DSP_USE_INTEL_MKL + #include +#endif + +namespace juce +{ + namespace dsp + { + #include "processors/juce_FIRFilter.cpp" + #include "processors/juce_IIRFilter.cpp" + #include "maths/juce_SpecialFunctions.cpp" + #include "maths/juce_Matrix.cpp" + #include "maths/juce_LookupTable.cpp" + #include "frequency/juce_FFT.cpp" + #include "frequency/juce_Convolution.cpp" + #include "frequency/juce_Windowing.cpp" + #include "filter_design/juce_FilterDesign.cpp" + + #if JUCE_USE_SIMD + #if defined(__i386__) || defined(__amd64__) || defined(_M_X64) || defined(_X86_) || defined(_M_IX86) + #ifdef __AVX2__ + #include "native/juce_avx_SIMDNativeOps.cpp" + #else + #include "native/juce_sse_SIMDNativeOps.cpp" + #endif + #elif defined(__arm__) || defined(_M_ARM) || defined (__arm64__) || defined (__aarch64__) + #include "native/juce_neon_SIMDNativeOps.cpp" + #else + #error "SIMD register support not implemented for this platform" + #endif + #endif + + #if JUCE_UNIT_TESTS + #include "maths/juce_Matrix_test.cpp" + #if JUCE_USE_SIMD + #include "containers/juce_SIMDRegister_test.cpp" + #endif + #include "frequency/juce_FFT_test.cpp" + #include "processors/juce_FIRFilter_test.cpp" + #endif + } +} diff --git a/modules/juce_dsp/juce_dsp.h b/modules/juce_dsp/juce_dsp.h new file mode 100644 index 0000000000..b1a0e3df79 --- /dev/null +++ b/modules/juce_dsp/juce_dsp.h @@ -0,0 +1,221 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/******************************************************************************* + The block below describes the properties of this module, and is read by + the Projucer to automatically generate project code that uses it. + For details about the syntax and how to create or use a module, see the + JUCE Module Format.txt file. + + + BEGIN_JUCE_MODULE_DECLARATION + + ID: juce_dsp + vendor: juce + version: 5.1.0 + name: JUCE DSP classes + description: Classes for audio buffer manipulation, digital audio processing, filtering, oversampling, fast math functions etc. + website: http://www.juce.com/juce + license: GPL/Commercial + minimumCppStandard: 14 + + dependencies: juce_core, juce_audio_basics, juce_audio_formats + OSXFrameworks: Accelerate + iOSFrameworks: Accelerate + + END_JUCE_MODULE_DECLARATION + +*******************************************************************************/ + + +#pragma once +#define JUCE_DSP_H_INCLUDED + +#include +#include + +#if defined(_M_X64) || defined(__amd64__) || defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP == 2) + + #if defined(_M_X64) || defined(__amd64__) + #ifndef __SSE2__ + #define __SSE2__ + #endif + #endif + + #ifndef JUCE_USE_SIMD + #define JUCE_USE_SIMD 1 + #endif + + #if JUCE_USE_SIMD + #include + #endif + +#elif defined (__ARM_NEON__) || defined (__ARM_NEON) || defined (__arm64__) || defined (__aarch64__) + + #ifndef JUCE_USE_SIMD + #define JUCE_USE_SIMD 1 + #endif + + #include + +#else + + // No SIMD Support + #ifndef JUCE_USE_SIMD + #define JUCE_USE_SIMD 0 + #endif + +#endif + +#ifndef JUCE_VECTOR_CALLTYPE + // __vectorcall does not work on 64-bit due to internal compiler error in + // release mode in both VS2015 and VS2017. Re-enable when Microsoft fixes this + #if _MSC_VER && JUCE_USE_SIMD && ! (defined(_M_X64) || defined(__amd64__)) + #define JUCE_VECTOR_CALLTYPE __vectorcall + #else + #define JUCE_VECTOR_CALLTYPE + #endif +#endif + +#include +#include +#include +#include + + +//============================================================================== +/** Config: JUCE_ASSERTION_FIRFILTER + + When this flag is enabled, an assertion will be generated during the + execution of DEBUG configurations if you use a FIRFilter class to process + FIRCoefficients with a size higher than 128, to tell you that's it would be + more efficient to use the Convolution class instead. It is enabled by + default, but you may want to disable it if you really want to process such + a filter in the time domain. +*/ +#ifndef JUCE_ASSERTION_FIRFILTER + #define JUCE_ASSERTION_FIRFILTER 1 +#endif + +/** Config: JUCE_DSP_USE_INTEL_MKL + + If this flag is set, then JUCE will use Intel's MKL for JUCE's FFT and + convolution classes. + + The folder containing the mkl_dfti.h header must be in your header + search paths when using this flag. You also need to add all the necessary + intel mkl libraries to the "External Libraries to Link" field in the + Projucer. +*/ +#ifndef JUCE_DSP_USE_INTEL_MKL + #define JUCE_DSP_USE_INTEL_MKL 0 +#endif + +/** Config: JUCE_DSP_USE_SHARED_FFTW + + If this flag is set, then JUCE will search for the fftw shared libraries + at runtime and use the library for JUCE's FFT and convolution classes. + + If the library is not found, then JUCE's fallback FFT routines will be used. + + This is especially useful on linux as fftw often comes pre-installed on + popular linux distros. + + You must respect the FFTW license when enabling this option. +*/ + #ifndef JUCE_DSP_USE_SHARED_FFTW + #define JUCE_DSP_USE_SHARED_FFTW 0 +#endif + +/** Config: JUCE_DSP_USE_STATIC_FFTW + + If this flag is set, then JUCE will use the statically linked fftw libraries + for JUCE's FFT and convolution classes. + + You must add the fftw header/library folder to the extra header/library search + paths of your JUCE project. You also need to add the fftw library itself + to the extra libraries supplied to your JUCE project during linking. + + You must respect the FFTW license when enabling this option. +*/ +#ifndef JUCE_DSP_USE_STATIC_FFTW + #define JUCE_DSP_USE_STATIC_FFTW 0 +#endif + +//============================================================================== +namespace juce +{ + namespace dsp + { + #undef Complex // apparently some C libraries actually define these symbols (!) + #undef Factor + + template + using Complex = ::std::complex; + + #if JUCE_USE_SIMD + #include "native/juce_fallback_SIMDNativeOps.h" + + // include the correct native file for this build target CPU + #if defined(__i386__) || defined(__amd64__) || defined(_M_X64) || defined(_X86_) || defined(_M_IX86) + #ifdef __AVX2__ + #include "native/juce_avx_SIMDNativeOps.h" + #else + #include "native/juce_sse_SIMDNativeOps.h" + #endif + #elif defined(__arm__) || defined(_M_ARM) || defined (__arm64__) || defined (__aarch64__) + #include "native/juce_neon_SIMDNativeOps.h" + #else + #error "SIMD register support not implemented for this platform" + #endif + + #include "containers/juce_SIMDRegister.h" + #endif + + #include "maths/juce_SpecialFunctions.h" + #include "maths/juce_Matrix.h" + #include "maths/juce_Polynomial.h" + #include "maths/juce_FastMathApproximations.h" + #include "maths/juce_LookupTable.h" + #include "containers/juce_AudioBlock.h" + #include "processors/juce_ProcessContext.h" + #include "processors/juce_ProcessorWrapper.h" + #include "processors/juce_ProcessorChain.h" + #include "processors/juce_ProcessorDuplicator.h" + #include "processors/juce_Bias.h" + #include "processors/juce_Gain.h" + #include "processors/juce_WaveShaper.h" + #include "processors/juce_IIRFilter.h" + #include "processors/juce_FIRFilter.h" + #include "processors/juce_Oscillator.h" + #include "processors/juce_StateVariableFilter.h" + #include "frequency/juce_FFT.h" + #include "frequency/juce_Convolution.h" + #include "frequency/juce_Windowing.h" + #include "filter_design/juce_FilterDesign.h" + } +} diff --git a/modules/juce_dsp/juce_dsp.mm b/modules/juce_dsp/juce_dsp.mm new file mode 100644 index 0000000000..7fe73444c9 --- /dev/null +++ b/modules/juce_dsp/juce_dsp.mm @@ -0,0 +1,27 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#include "juce_dsp.cpp" diff --git a/modules/juce_dsp/maths/juce_FastMathApproximations.h b/modules/juce_dsp/maths/juce_FastMathApproximations.h new file mode 100644 index 0000000000..0b59afea8c --- /dev/null +++ b/modules/juce_dsp/maths/juce_FastMathApproximations.h @@ -0,0 +1,256 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + This class contains various fast mathematical function approximations. +*/ +struct FastMathApproximations +{ + /** Provides a fast approximation of the function cosh(x) using a Pade approximant + continued fraction, calculated sample by sample. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -5 and +5 for limiting the error. + */ + template + static FloatType cosh (FloatType x) noexcept + { + auto x2 = x * x; + auto numerator = -(39251520 + x2 * (18471600 + x2 * (1075032 + 14615 * x2))); + auto denominator = -39251520 + x2 * (1154160 + x2 * (-16632 + 127 * x2)); + return numerator / denominator; + } + + /** Provides a fast approximation of the function cosh(x) using a Pade approximant + continued fraction, calculated on a whole buffer. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -5 and +5 for limiting the error. + */ + template + static void cosh (FloatType* values, size_t numValues) noexcept + { + for (size_t i = 0; i < numValues; ++i) + values[i] = FastMathApproximations::cosh (values[i]); + } + + /** Provides a fast approximation of the function sinh(x) using a Pade approximant + continued fraction, calculated sample by sample. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -5 and +5 for limiting the error. + */ + template + static FloatType sinh (FloatType x) noexcept + { + auto x2 = x * x; + auto numerator = -x * (11511339840 + x2 * (1640635920 + x2 * (52785432 + x2 * 479249))); + auto denominator = -11511339840 + x2 * (277920720 + x2 * (-3177720 + x2 * 18361)); + return numerator / denominator; + } + + /** Provides a fast approximation of the function sinh(x) using a Pade approximant + continued fraction, calculated on a whole buffer. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -5 and +5 for limiting the error. + */ + template + static void sinh (FloatType* values, size_t numValues) noexcept + { + for (size_t i = 0; i < numValues; ++i) + values[i] = FastMathApproximations::sinh (values[i]); + } + + /** Provides a fast approximation of the function tanh(x) using a Pade approximant + continued fraction, calculated sample by sample. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -5 and +5 for limiting the error. + */ + template + static FloatType tanh (FloatType x) noexcept + { + auto x2 = x * x; + auto numerator = x * (135135 + x2 * (17325 + x2 * (378 + x2))); + auto denominator = 135135 + x2 * (62370 + x2 * (3150 + 28 * x2)); + return numerator / denominator; + } + + /** Provides a fast approximation of the function tanh(x) using a Pade approximant + continued fraction, calculated on a whole buffer. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -5 and +5 for limiting the error. + */ + template + static void tanh (FloatType* values, size_t numValues) noexcept + { + for (size_t i = 0; i < numValues; ++i) + values[i] = FastMathApproximations::tanh (values[i]); + } + + //============================================================================== + /** Provides a fast approximation of the function cos(x) using a Pade approximant + continued fraction, calculated sample by sample. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -pi and +pi for limiting the error. + */ + template + static FloatType cos (FloatType x) noexcept + { + auto x2 = x * x; + auto numerator = -(-39251520 + x2 * (18471600 + x2 * (-1075032 + 14615 * x2))); + auto denominator = 39251520 + x2 * (1154160 + x2 * (16632 + x2 * 127)); + return numerator / denominator; + } + + /** Provides a fast approximation of the function cos(x) using a Pade approximant + continued fraction, calculated on a whole buffer. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -pi and +pi for limiting the error. + */ + template + static void cos (FloatType* values, size_t numValues) noexcept + { + for (size_t i = 0; i < numValues; ++i) + values[i] = FastMathApproximations::cos (values[i]); + } + + /** Provides a fast approximation of the function sin(x) using a Pade approximant + continued fraction, calculated sample by sample. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -pi and +pi for limiting the error. + */ + template + static FloatType sin (FloatType x) noexcept + { + auto x2 = x * x; + auto numerator = -x * (-11511339840 + x2 * (1640635920 + x2 * (-52785432 + x2 * 479249))); + auto denominator = 11511339840 + x2 * (277920720 + x2 * (3177720 + x2 * 18361)); + return numerator / denominator; + } + + /** Provides a fast approximation of the function sin(x) using a Pade approximant + continued fraction, calculated on a whole buffer. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -pi and +pi for limiting the error. + */ + template + static void sin (FloatType* values, size_t numValues) noexcept + { + for (size_t i = 0; i < numValues; ++i) + values[i] = FastMathApproximations::sin (values[i]); + } + + /** Provides a fast approximation of the function tan(x) using a Pade approximant + continued fraction, calculated sample by sample. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -pi/2 and +pi/2 for limiting the error. + */ + template + static FloatType tan (FloatType x) noexcept + { + auto x2 = x * x; + auto numerator = x * (-135135 + x2 * (17325 + x2 * (-378 + x2))); + auto denominator = -135135 + x2 * (62370 + x2 * (-3150 + 28 * x2)); + return numerator / denominator; + } + + /** Provides a fast approximation of the function tan(x) using a Pade approximant + continued fraction, calculated on a whole buffer. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -pi/2 and +pi/2 for limiting the error. + */ + template + static void tan (FloatType* values, size_t numValues) noexcept + { + for (size_t i = 0; i < numValues; ++i) + values[i] = FastMathApproximations::tan (values[i]); + } + + //============================================================================== + /** Provides a fast approximation of the function exp(x) using a Pade approximant + continued fraction, calculated sample by sample. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -6 and +4 for limiting the error. + */ + template + static FloatType exp (FloatType x) noexcept + { + auto numerator = 1680 + x * (840 + x * (180 + x * (20 + x))); + auto denominator = 1680 + x *(-840 + x * (180 + x * (-20 + x))); + return numerator / denominator; + } + + /** Provides a fast approximation of the function exp(x) using a Pade approximant + continued fraction, calculated on a whole buffer. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -6 and +4 for limiting the error. + */ + template + static void exp (FloatType* values, size_t numValues) noexcept + { + for (size_t i = 0; i < numValues; ++i) + values[i] = FastMathApproximations::exp (values[i]); + } + + /** Provides a fast approximation of the function log(x+1) using a Pade approximant + continued fraction, calculated sample by sample. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -0.8 and +5 for limiting the error. + */ + template + static FloatType logNPlusOne (FloatType x) noexcept + { + auto numerator = x * (7560 + x * (15120 + x * (9870 + x * (2310 + x * 137)))); + auto denominator = 7560 + x * (18900 + x * (16800 + x * (6300 + x * (900 + 30 * x)))); + return numerator / denominator; + } + + /** Provides a fast approximation of the function log(x+1) using a Pade approximant + continued fraction, calculated on a whole buffer. + + Note : this is an approximation which works on a limited range. You are + advised to use input values only between -0.8 and +5 for limiting the error. + */ + template + static void logNPlusOne (FloatType* values, size_t numValues) noexcept + { + for (size_t i = 0; i < numValues; ++i) + values[i] = FastMathApproximations::logNPlusOne (values[i]); + } +}; diff --git a/modules/juce_dsp/maths/juce_LookupTable.cpp b/modules/juce_dsp/maths/juce_LookupTable.cpp new file mode 100644 index 0000000000..8d0a6e0bf7 --- /dev/null +++ b/modules/juce_dsp/maths/juce_LookupTable.cpp @@ -0,0 +1,149 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +template +LookupTable::LookupTable() +{ + data.resize (1); +} + +template +LookupTable::LookupTable (const std::function& functionToApproximate, + size_t numPointsToUse) +{ + initialise (functionToApproximate, numPointsToUse); +} + +//============================================================================== +template +void LookupTable::initialise (const std::function& functionToApproximate, + size_t numPointsToUse) +{ + data.resize (static_cast (getRequiredBufferSize (numPointsToUse))); + + for (size_t i = 0; i < numPointsToUse; ++i) + { + auto value = functionToApproximate (i); + + jassert (! std::isnan (value)); + jassert (! std::isinf (value)); + // Make sure functionToApproximate returns a sensible value for the entire specified range. + // E.g., this won't work for zero: [] (size_t i) { return 1.0f / i; } + + data.getReference (static_cast (i)) = value; + } + + prepare(); +} + +template +void LookupTable::prepare() noexcept +{ + auto guardIndex = static_cast (getGuardIndex()); + data.getReference (guardIndex) = data.getUnchecked (guardIndex - 1); +} + +template +void LookupTableTransform::initialise (const std::function& functionToApproximate, + FloatType minInputValueToUse, + FloatType maxInputValueToUse, + size_t numPoints) +{ + jassert (maxInputValueToUse > minInputValueToUse); + + minInputValue = minInputValueToUse; + maxInputValue = maxInputValueToUse; + scaler = FloatType (numPoints - 1) / (maxInputValueToUse - minInputValueToUse); + offset = -minInputValueToUse * scaler; + + const auto initFn = [functionToApproximate, minInputValueToUse, maxInputValueToUse, numPoints] (size_t i) + { + return functionToApproximate ( + jlimit ( + minInputValueToUse, maxInputValueToUse, + jmap (FloatType (i), FloatType (0), FloatType (numPoints - 1), minInputValueToUse, maxInputValueToUse)) + ); + }; + + lookupTable.initialise (initFn, numPoints); +} + +//============================================================================== +template +double LookupTableTransform::calculateMaxRelativeError (const std::function& functionToApproximate, + FloatType minInputValue, + FloatType maxInputValue, + size_t numPoints, + size_t numTestPoints) +{ + jassert (maxInputValue > minInputValue); + + if (numTestPoints == 0) + numTestPoints = 100 * numPoints; // use default + + LookupTableTransform transform (functionToApproximate, minInputValue, maxInputValue, numPoints); + + double maxError = 0; + + for (size_t i = 0; i < numTestPoints; ++i) + { + auto inputValue = jmap (FloatType (i), FloatType (0), FloatType (numTestPoints - 1), minInputValue, maxInputValue); + auto approximatedOutputValue = transform.processSample (inputValue); + auto referenceOutputValue = functionToApproximate (inputValue); + + maxError = jmax (maxError, calculateRelativeDifference ((double) referenceOutputValue, (double) approximatedOutputValue)); + } + + return maxError; +} + +//============================================================================== +template +double LookupTableTransform::calculateRelativeDifference (double x, double y) noexcept +{ + static const auto eps = std::numeric_limits::min(); + + auto absX = std::abs (x); + auto absY = std::abs (y); + auto absDiff = std::abs (x - y); + + if (absX < eps) + { + if (absY >= eps) + return absDiff / absY; + + return absDiff; // return the absolute error if both numbers are too close to zero + } + + return absDiff / std::min (absX, absY); +} + +//============================================================================== +template class LookupTable; +template class LookupTable; + +template class LookupTableTransform; +template class LookupTableTransform; diff --git a/modules/juce_dsp/maths/juce_LookupTable.h b/modules/juce_dsp/maths/juce_LookupTable.h new file mode 100644 index 0000000000..0b0b8a728d --- /dev/null +++ b/modules/juce_dsp/maths/juce_LookupTable.h @@ -0,0 +1,313 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + Class for efficiently approximating expensive arithmetic operations. + + The approximation is based on linear interpolation between pre-calculated values. + The approximated function should be passed as a callable object to the constructor + along with the number of data points to be pre-calculated. The accuracy of the + approximation can be increased by using more points at the cost of a larger memory + footprint. + + Consider using LookupTableTransform as an easy-to-use alternative. + + Example: + + LookupTable lut ([] (size_t i) { return std::sqrt ((float) i); }, 64); + auto outValue = lut[17]; + + @see LookupTableTransform +*/ +template +class LookupTable +{ +public: + /** Creates an uninitialised LookupTable object. + + You need to call initialise() before using the object. Prefer using the + non-default constructor instead. + + @see initialise + */ + LookupTable(); + + /** Creates and initialises a LookupTable object. + + @param functionToApproximate The function to be approximated. This should be a + mapping from the integer range [0, numPointsToUse - 1]. + @param numPointsToUse The number of pre-calculated values stored. + */ + LookupTable (const std::function& functionToApproximate, size_t numPointsToUse); + + /** Initialises or changes the parameters of a LookupTable object. + + This function can be used to change what function is approximated by an already + constructed LookupTable along with the number of data points used. If the function + to be approximated won't ever change, prefer using the non-default constructor. + + @param functionToApproximate The function to be approximated. This should be a + mapping from the integer range [0, numPointsToUse - 1]. + @param numPointsToUse The number of pre-calculated values stored. + */ + void initialise (const std::function& functionToApproximate, size_t numPointsToUse); + + //============================================================================== + /** Calculates the approximated value for the given index without range checking. + + Use this if you can guarantee that the index is non-negative and less than numPoints. + Otherwise use get(). + + @param index The approximation is calculated for this non-integer index. + @return The approximated value at the given index. + + @see get, operator[] + */ + FloatType getUnchecked (FloatType index) const noexcept + { + jassert (isInitialised()); // Use the non-default constructor or call initialise() before first use + jassert (isPositiveAndBelow (index, FloatType (getNumPoints()))); + + auto i = truncatePositiveToUnsignedInt (index); + auto f = index - FloatType (i); + jassert (isPositiveAndBelow (f, FloatType (1))); + + auto x0 = data.getUnchecked (static_cast (i)); + auto x1 = data.getUnchecked (static_cast (i + 1)); + + return jmap (f, x0, x1); + } + + //============================================================================== + /** Calculates the approximated value for the given index with range checking. + + This can be called with any input indices. If the provided index is out-of-range + either the bottom or the top element of the LookupTable is returned. + + If the index is guaranteed to be in range use the faster getUnchecked() instead. + + @param index The approximation is calculated for this non-integer index. + @return The approximated value at the given index. + + @see getUnchecked, operator[] + */ + FloatType get (FloatType index) const noexcept + { + if (index >= getNumPoints()) + index = static_cast (getGuardIndex()); + else if (index < 0) + index = {}; + + return getUnchecked (index); + } + + //============================================================================== + /** @see getUnchecked */ + FloatType operator[] (FloatType index) const noexcept { return getUnchecked (index); } + + /** Returns the size of the LookupTable, i.e., the number of pre-calculated data points. */ + size_t getNumPoints() const noexcept { return static_cast (data.size()) - 1; } + + /** Returns true if the LookupTable is initialised and ready to be used. */ + bool isInitialised() const noexcept { return data.size() > 1; } + +private: + //============================================================================== + Array data; + + void prepare() noexcept; + static size_t getRequiredBufferSize (size_t numPointsToUse) noexcept { return numPointsToUse + 1; } + size_t getGuardIndex() const noexcept { return getRequiredBufferSize (getNumPoints()) - 1; } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookupTable) +}; + + +//============================================================================== +/** Class for approximating expensive arithmetic operations. + + Once initialised, this class can be used just like the function it approximates + via operator(). + + Example: + + LookupTableTransform tanhApprox ([] (float x) { return std::tanh (x); }, -5.0f, 5.0f, 64); + auto outValue = tanhApprox (4.2f); + + Note : if you try to call the function with an input outside the provided + range, it will return either the first or the last recorded LookupTable value. + + @see LookupTable +*/ +template +class LookupTableTransform +{ +public: + //============================================================================== + /** Creates an uninitialised LookupTableTransform object. + + You need to call initialise() before using the object. Prefer using the + non-default constructor instead. + + @see initialise + */ + LookupTableTransform() + {} + + //============================================================================== + /** Creates and initialises a LookupTableTransform object. + + @param functionToApproximate The function to be approximated. This should be a + mapping from a FloatType to FloatType. + @param minInputValueToUse The lowest input value used. The approximation will + fail for values lower than this. + @param maxInputValueToUse The highest input value used. The approximation will + fail for values higher than this. + @param numPointsToUse The number of pre-calculated values stored. + */ + LookupTableTransform (const std::function& functionToApproximate, + FloatType minInputValueToUse, + FloatType maxInputValueToUse, + size_t numPoints) + { + initialise (functionToApproximate, minInputValueToUse, maxInputValueToUse, numPoints); + } + + //============================================================================== + /** Initialises or changes the parameters of a LookupTableTransform object. + + @param functionToApproximate The function to be approximated. This should be a + mapping from a FloatType to FloatType. + @param minInputValueToUse The lowest input value used. The approximation will + fail for values lower than this. + @param maxInputValueToUse The highest input value used. The approximation will + fail for values higher than this. + @param numPointsToUse The number of pre-calculated values stored. + */ + void initialise (const std::function& functionToApproximate, + FloatType minInputValueToUse, + FloatType maxInputValueToUse, + size_t numPoints); + + //============================================================================== + /** Calculates the approximated value for the given input value without range checking. + + Use this if you can guarantee that the input value is within the range specified + in the constructor or initialise(), otherwise use processSample(). + + @param value The approximation is calculated for this input value. + @return The approximated value for the provided input value. + + @see processSample, operator(), operator[] + */ + FloatType processSampleUnchecked (FloatType value) const noexcept + { + jassert (value >= minInputValue && value <= maxInputValue); + return lookupTable[scaler * value + offset]; + } + + //============================================================================== + /** Calculates the approximated value for the given input value with range checking. + + This can be called with any input values. Out-of-range input values will be + clipped to the specified input range. + + If the index is guaranteed to be in range use the faster processSampleUnchecked() + instead. + + @param value The approximation is calculated for this input value. + @return The approximated value for the provided input value. + + @see processSampleUnchecked, operator(), operator[] + */ + FloatType processSample (FloatType value) const noexcept + { + auto index = scaler * jlimit (minInputValue, maxInputValue, value) + offset; + jassert (isPositiveAndBelow (index, FloatType (lookupTable.getNumPoints()))); + + return lookupTable[index]; + } + + //============================================================================== + /** @see processSampleUnchecked */ + FloatType operator[] (FloatType index) const noexcept { return processSampleUnchecked (index); } + + /** @see processSample */ + FloatType operator() (FloatType index) const noexcept { return processSample (index); } + + //============================================================================== + /** Processes an array of input values without range checking + @see process + */ + void processUnchecked (const FloatType* input, FloatType* output, size_t numSamples) const noexcept + { + for (size_t i = 0; i < numSamples; ++i) + output[i] = processSampleUnchecked (input[i]); + } + + //============================================================================== + /** Processes an array of input values with range checking + @see processUnchecked + */ + void process (const FloatType* input, FloatType* output, size_t numSamples) const noexcept + { + for (size_t i = 0; i < numSamples; ++i) + output[i] = processSample (input[i]); + } + + //============================================================================== + /** Calculates the maximum relative error of the approximation for the specified parameter set. + + The closer the returned value is to zero the more accurate the approximation is. + + This function compares the approximated output of this class to the function + it approximates at a range of points and returns the maximum relative error. + This can be used to determine if the approximatiokn is suitable for the given + problem. The accuracy of the approximation can generally be improved by increasing + numPoints. + + @param numTestPoints The number of input values used for error calculation. + Higher numbers can increase the accuracy of the error + calculation. If it's zero 100 * numPoints will be used. + */ + static double calculateMaxRelativeError (const std::function& functionToApproximate, + FloatType minInputValue, + FloatType maxInputValue, + size_t numPoints, + size_t numTestPoints = 0); +private: + //============================================================================== + static double calculateRelativeDifference (double, double) noexcept; + + //============================================================================== + LookupTable lookupTable; + + FloatType minInputValue, maxInputValue; + FloatType scaler, offset; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookupTableTransform) +}; diff --git a/modules/juce_dsp/maths/juce_Matrix.cpp b/modules/juce_dsp/maths/juce_Matrix.cpp new file mode 100644 index 0000000000..27d2d1436e --- /dev/null +++ b/modules/juce_dsp/maths/juce_Matrix.cpp @@ -0,0 +1,308 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +template +Matrix Matrix::identity (size_t size) +{ + Matrix result (size, size); + + for (size_t i = 0; i < size; ++i) + result(i, i) = 1; + + return result; +} + +template +Matrix Matrix::toeplitz (const Matrix& vector, size_t size) +{ + jassert (vector.isOneColumnVector()); + jassert (size <= vector.rows); + + Matrix result (size, size); + + for (size_t i = 0; i < size; ++i) + result (i, i) = vector (0, 0); + + for (size_t i = 1; i < size; ++i) + for (size_t j = i; j < size; ++j) + result (j, j - i) = result (j - i, j) = vector (i, 0); + + return result; +} + +template +Matrix Matrix::hankel (const Matrix& vector, size_t size, size_t offset) +{ + jassert(vector.isOneColumnVector()); + jassert(vector.rows >= (2 * (size - 1) + 1)); + + Matrix result (size, size); + + for (size_t i = 0; i < size; ++i) + result (i, i) = vector ((2 * i) + offset, 0); + + for (size_t i = 1; i < size; ++i) + for (size_t j = i; j < size; ++j) + result (j, j - i) = result (j - i, j) = vector (i + 2 * (j - i) + offset, 0); + + return result; +} + +//============================================================================== +template +Matrix& Matrix::swapColumns (size_t columnOne, size_t columnTwo) noexcept +{ + jassert (columnOne < columns && columnTwo < columns); + + auto* p = data.getRawDataPointer(); + + for (size_t i = 0; i < rows; ++i) + { + auto offset = dataAcceleration.getUnchecked (static_cast (i)); + std::swap (p[offset + columnOne], p[offset + columnTwo]); + } + + return *this; +} + +template +Matrix& Matrix::swapRows (size_t rowOne, size_t rowTwo) noexcept +{ + jassert (rowOne < rows && rowTwo < rows); + + auto offset1 = rowOne * columns; + auto offset2 = rowTwo * columns; + + auto* p = data.getRawDataPointer(); + + for (size_t i = 0; i < columns; ++i) + std::swap (p[offset1 + i], p[offset2 + i]); + + return *this; +} + +//============================================================================== +template +Matrix Matrix::operator* (const Matrix& other) const +{ + auto n = getNumRows(), m = other.getNumColumns(), p = getNumColumns(); + Matrix result (n, m); + + jassert (other.getNumRows() == p && n == m); + + size_t offsetMat = 0, offsetlhs = 0; + + auto *dst = result.getRawDataPointer(); + auto *a = getRawDataPointer(); + auto *b = other.getRawDataPointer(); + + for (size_t i = 0; i < n; ++i) + { + size_t offsetrhs = 0; + + for (size_t k = 0; k < p; ++k) + { + auto ak = a[offsetlhs++]; + + for (size_t j = 0; j < m; ++j) + dst[offsetMat + j] += ak * b[offsetrhs + j]; + + offsetrhs += m; + } + + offsetMat += m; + } + + return result; +} + +//============================================================================== +template +bool Matrix::compare (const Matrix& a, const Matrix& b, ElementType tolerance) noexcept +{ + if (a.rows != b.rows || a.columns != b.columns) + return false; + + tolerance = std::abs (tolerance); + + auto* bPtr = b.begin(); + for (auto aValue : a) + if (std::abs (aValue - *bPtr++) > tolerance) + return false; + + return true; +} + +//============================================================================== +template +bool Matrix::solve (Matrix& b) const noexcept +{ + auto n = columns; + jassert (n == n && n == b.rows && b.isOneColumnVector()); + + auto* x = b.getRawDataPointer(); + const auto& A = *this; + + switch (n) + { + case 1: + { + auto denominator = A (0,0); + + if (denominator == 0) + return false; + + b (0, 0) /= denominator; + } + break; + + case 2: + { + auto denominator = A (0, 0) * A (1, 1) - A (0, 1) * A (1, 0); + + if (denominator == 0) + return false; + + auto factor = (1 / denominator); + auto b0 = x[0], b1 = x[1]; + + x[0] = factor * (A (1, 1) * b0 - A (0, 1) * b1); + x[1] = factor * (A (0, 0) * b1 - A (1, 0) * b0); + } + break; + + case 3: + { + auto denominator = A (0, 0) * (A (1, 1) * A (2, 2) - A (1, 2) * A (2, 1)) + + A (0, 1) * (A (1, 2) * A (2, 0) - A (1, 0) * A (2, 2)) + + A (0, 2) * (A (1, 0) * A (2, 1) - A (1, 1) * A (2, 0)); + + if (denominator == 0) + return false; + + auto factor = 1 / denominator; + auto b0 = x[0], b1 = x[1], b2 = x[2]; + + x[0] = ( ( A (0, 1) * A (1, 2) - A (0, 2) * A (1, 1)) * b2 + + (-A (0, 1) * A (2, 2) + A (0, 2) * A (2, 1)) * b1 + + ( A (1, 1) * A (2, 2) - A (1, 2) * A (2, 1)) * b0) * factor; + + x[1] = -( ( A (0, 0) * A (1, 2) - A (0, 2) * A (1, 0)) * b2 + + (-A (0, 0) * A (2, 2) + A (0, 2) * A (2, 0)) * b1 + + ( A (1, 0) * A (2, 2) - A (1, 2) * A (2, 0)) * b0) * factor; + + x[2] = ( ( A (0, 0) * A (1, 1) - A (0, 1) * A (1, 0)) * b2 + + (-A (0, 0) * A (2, 1) + A (0, 1) * A (2, 0)) * b1 + + ( A (1, 0) * A (2, 1) - A (1, 1) * A (2, 0)) * b0) * factor; + } + break; + + + default: + { + Matrix M (A); + + for (size_t j = 0; j < n; ++j) + { + if (M (j, j) == 0) + { + auto i = j; + while (i < n && M (i, j) == 0) + ++i; + + if (i == n) + return false; + + for (size_t k = 0; k < n; ++k) + M (j, k) += M (i, k); + + x[j] += x[i]; + } + + auto t = 1 / M (j, j); + + for (size_t k = 0; k < n; ++k) + M (j, k) *= t; + + x[j] *= t; + + for (size_t k = j + 1; k < n; ++k) + { + auto u = -M (k, j); + + for (size_t l = 0; l < n; ++l) + M (k, l) += u * M (j, l); + + x[k] += u * x[j]; + } + } + + for (int k = static_cast (n) - 2; k >= 0; --k) + for (size_t i = static_cast (k) + 1; i < n; ++i) + x[k] -= M (static_cast (k), i) * x[i]; + } + } + + return true; +} + +//============================================================================== +template +String Matrix::toString() const +{ + StringArray entries; + int sizeMax = 0; + + auto* p = data.getRawDataPointer(); + + for (size_t i = 0; i < rows; ++i) + { + for (size_t j = 0; j < columns; ++j) + { + String entry (*p++, 4); + sizeMax = jmax (sizeMax, entry.length()); + + entries.add (entry); + } + } + + sizeMax = ((sizeMax + 1) / 4 + 1) * 4; + + MemoryOutputStream result; + + auto n = static_cast (entries.size()); + + for (size_t i = 0; i < n; ++i) + { + result << entries[(int) i].paddedRight (' ', sizeMax); + + if (i % columns == (columns - 1)) + result << newLine; + } + + return result.toString(); +} diff --git a/modules/juce_dsp/maths/juce_Matrix.h b/modules/juce_dsp/maths/juce_Matrix.h new file mode 100644 index 0000000000..7c8d252221 --- /dev/null +++ b/modules/juce_dsp/maths/juce_Matrix.h @@ -0,0 +1,245 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +/** + General matrix and vectors class, meant for classic math manipulation such as + additions, multiplications, and linear systems of equations solving. + + @see LinearAlgebra +*/ +template +class Matrix +{ +public: + //============================================================================== + /** Creates a new matrix with a given number of rows and columns. */ + Matrix (size_t numRows, size_t numColumns) + : rows (numRows), columns (numColumns) + { + resize(); + clear(); + } + + /** Creates a new matrix with a given number of rows and columns, with initial + data coming from an array, stored in row-major order. + */ + Matrix (size_t numRows, size_t numColumns, const ElementType* dataPointer) + : rows (numRows), columns (numColumns) + { + resize(); + memcpy (data.getRawDataPointer(), dataPointer, rows * columns * sizeof (ElementType)); + } + + /** Creates a copy of another matrix. */ + Matrix (const Matrix&) = default; + + /** Moves a copy of another matrix. */ + Matrix (Matrix&&) noexcept = default; + + /** Creates a copy of another matrix. */ + Matrix& operator= (const Matrix&) = default; + + /** Moves another matrix into this one */ + Matrix& operator= (Matrix&&) noexcept = default; + + //============================================================================== + /** Creates the identity matrix */ + static Matrix identity (size_t size); + + /** Creates a Toeplitz Matrix from a vector with a given squared size */ + static Matrix toeplitz (const Matrix& vector, size_t size); + + /** Creates a squared size x size Hankel Matrix from a vector with an optional offset. + + @param vector The vector from which the Hankel matrix should be generated. + Its number of rows should be at least 2 * (size - 1) + 1 + @param size The size of resulting square matrix. + @param offset An optional offset into the given vector. + */ + static Matrix hankel (const Matrix& vector, size_t size, size_t offset = 0); + + //============================================================================== + /** Returns the number of rows in the matrix. */ + size_t getNumRows() const noexcept { return rows; } + + /** Returns the number of columns in the matrix. */ + size_t getNumColumns() const noexcept { return columns; } + + /** Returns an Array of 2 integers with the number of rows and columns in the + matrix. + */ + Array getSize() const noexcept { return {{ rows, columns }}; } + + /** Fills the contents of the matrix with zeroes. */ + void clear() noexcept { zeromem (data.begin(), sizeof (ElementType) * (size_t) data.size()); } + + //============================================================================== + /** Swaps the contents of two rows in the matrix and returns a reference to itself. */ + Matrix& swapRows (size_t rowOne, size_t rowTwo) noexcept; + + /** Swaps the contents of two columns in the matrix and returns a reference to itself. */ + Matrix& swapColumns (size_t columnOne, size_t columnTwo) noexcept; + + //============================================================================== + /** Returns the value of the matrix at a given row and column (for reading). */ + inline ElementType operator() (size_t row, size_t column) const noexcept + { + jassert (row < rows && column < columns); + return data.getReference (static_cast (dataAcceleration.getReference (static_cast (row))) + static_cast (column)); + } + + /** Returns the value of the matrix at a given row and column (for modifying). */ + inline ElementType& operator() (size_t row, size_t column) noexcept + { + jassert (row < rows && column < columns); + return data.getReference (static_cast (dataAcceleration.getReference (static_cast (row))) + static_cast (column)); + } + + /** Returns a pointer to the raw data of the matrix object, ordered in row-major + order (for modifying). + */ + inline ElementType* getRawDataPointer() noexcept { return data.getRawDataPointer(); } + + /** Returns a pointer to the raw data of the matrix object, ordered in row-major + order (for reading). + */ + inline const ElementType* getRawDataPointer() const noexcept { return data.begin(); } + + //============================================================================== + /** Addition of two matrices */ + inline Matrix& operator+= (const Matrix& other) noexcept { return apply (other, std::plus()); } + + /** Subtraction of two matrices */ + inline Matrix& operator-= (const Matrix& other) noexcept { return apply (other, std::minus()); } + + /** Scalar multiplication */ + inline Matrix& operator*= (ElementType scalar) noexcept + { + std::for_each (begin(), end(), [scalar] (ElementType& x) { x*= scalar; }); + return *this; + } + + /** Addition of two matrices */ + inline Matrix operator+ (const Matrix& other) const { Matrix result (*this); result += other; return result; } + + /** Addition of two matrices */ + inline Matrix operator- (const Matrix& other) const { Matrix result (*this); result -= other; return result; } + + /** Scalar multiplication */ + inline Matrix operator* (ElementType scalar) const { Matrix result (*this); result *= scalar; return result; } + + /** Matrix multiplication */ + Matrix operator* (const Matrix& other) const; + + /** Does a hadarmard product with the receiver and other and stores the result in the receiver */ + inline Matrix& hadarmard (const Matrix& other) noexcept { return apply (other, std::multiplies()); } + + /** Does a hadarmard product with a and b returns the result. */ + static inline Matrix hadarmard (const Matrix& a, const Matrix& b) { Matrix result (a); result.hadarmard (b); return result; } + + //============================================================================== + /** Compare to matrices with a given tolerance */ + static bool compare (const Matrix& a, const Matrix& b, ElementType tolerance = 0) noexcept; + + /* Comparison operator */ + inline bool operator== (const Matrix& other) const noexcept { return compare (*this, other); } + + //============================================================================== + /** Tells if the matrix is a square matrix */ + bool isSquare() const noexcept { return rows == columns; } + + /** Tells if the matrix is a vector */ + bool isVector() const noexcept { return isOneColumnVector() || isOneRowVector(); } + + /** Tells if the matrix is a one column vector */ + bool isOneColumnVector() const noexcept { return columns == 1; } + + /** Tells if the matrix is a one row vector */ + bool isOneRowVector() const noexcept { return rows == 1; } + + /** Tells if the matrix is a null matrix */ + bool isNullMatrix() const noexcept { return rows == 0 || columns == 0; } + + //============================================================================== + /** Solves a linear system of equations represented by this object and the argument b, + using various algorithms depending on the size of the arguments. + + The matrix must be a square matrix N times N, and b must be a vector N times 1, + with the coefficients of b. After the execution of the algorithm, + the vector b will contain the solution. + + Returns true if the linear system of euqations was successfully solved. + */ + bool solve (Matrix& b) const noexcept; + + //============================================================================== + /** Returns a String displaying in a convenient way the matrix contents. */ + String toString() const; + + //============================================================================== + ElementType* begin() noexcept { return data.begin(); } + ElementType* end() noexcept { return data.end(); } + + const ElementType* begin() const noexcept { return &data.getReference (0); } + const ElementType* end() const noexcept { return begin() + data.size(); } + +private: + //============================================================================== + /** Resizes the matrix. */ + void resize() + { + data.resize (static_cast (columns * rows)); + dataAcceleration.resize (static_cast (rows)); + + for (size_t i = 0; i < rows; ++i) + dataAcceleration.setUnchecked (static_cast (i), i * columns); + } + + template + Matrix& apply (const Matrix& other, BinaryOperation binaryOp) + { + jassert (rows == other.rows && columns == other.columns); + + auto* dst = getRawDataPointer(); + + for (auto src : other) + { + *dst = binaryOp (*dst, src); + ++dst; + } + + return *this; + } + + //============================================================================== + Array data; + Array dataAcceleration; + + size_t rows, columns; + + //============================================================================== + JUCE_LEAK_DETECTOR (Matrix) +}; diff --git a/modules/juce_dsp/maths/juce_Matrix_test.cpp b/modules/juce_dsp/maths/juce_Matrix_test.cpp new file mode 100644 index 0000000000..e81bfa4d7f --- /dev/null +++ b/modules/juce_dsp/maths/juce_Matrix_test.cpp @@ -0,0 +1,165 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +struct LinearAlgebraUnitTest : public UnitTest +{ + LinearAlgebraUnitTest() : UnitTest("Linear Algebra UnitTests") {} + + struct AdditionTest + { + template + static void run (LinearAlgebraUnitTest& u) + { + const ElementType data1[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; + const ElementType data2[] = { 1, -1, 3, -1, 5, -1, 7, -1 }; + const ElementType data3[] = { 2, 1, 6, 3, 10, 5, 14, 7 }; + + Matrix mat1 (2, 4, data1); + Matrix mat2 (2, 4, data2); + Matrix mat3 (2, 4, data3); + + u.expect((mat1 + mat2) == mat3); + } + }; + + struct DifferenceTest + { + template + static void run (LinearAlgebraUnitTest& u) + { + const ElementType data1[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; + const ElementType data2[] = { 1, -1, 3, -1, 5, -1, 7, -1 }; + const ElementType data3[] = { 0, 3, 0, 5, 0, 7, 0, 9 }; + + Matrix mat1 (2, 4, data1); + Matrix mat2 (2, 4, data2); + Matrix mat3 (2, 4, data3); + + u.expect((mat1 - mat2) == mat3); + } + }; + + struct ScalarMultiplicationTest + { + template + static void run (LinearAlgebraUnitTest& u) + { + const ElementType data1[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; + const ElementType scalar = 2.0; + const ElementType data2[] = { 2, 4, 6, 8, 10, 12, 14, 16 }; + + Matrix x (2, 4, data1); + Matrix expected (2, 4, data2); + + u.expect ((x * scalar) == expected); + } + }; + + struct HadamardProductTest + { + template + static void run (LinearAlgebraUnitTest& u) + { + const ElementType data1[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; + const ElementType data2[] = { 1, -1, 3, -1, 5, -1, 7, -1 }; + const ElementType data3[] = { 1, -2, 9, -4, 25, -6, 49, -8 }; + + Matrix mat1 (2, 4, data1); + Matrix mat2 (2, 4, data2); + Matrix mat3 (2, 4, data3); + + u.expect (Matrix::hadarmard (mat1, mat2) == mat3); + } + }; + + struct MultiplicationTest + { + template + static void run (LinearAlgebraUnitTest& u) + { + const ElementType data1[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; + const ElementType data2[] = { 1, -1, 3, -1, 5, -1, 7, -1 }; + const ElementType data3[] = { 50, -10, 114, -26 }; + + Matrix mat1 (2, 4, data1); + Matrix mat2 (4, 2, data2); + Matrix mat3 (2, 2, data3); + + u.expect((mat1 * mat2) == mat3); + } + }; + + struct IdentityMatrixTest + { + template + static void run (LinearAlgebraUnitTest& u) + { + const ElementType data1[] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}; + u.expect (Matrix::identity (4) == Matrix (4, 4, data1)); + } + }; + + struct SolvingTest + { + template + static void run (LinearAlgebraUnitTest& u) + { + const ElementType data1[] = { 1, -1, 2, -2 }; + const ElementType data2[] = { -1, 0, -1, -7 }; + const ElementType data3[] = { 1, 4, 2, 1, -1, 1, 4, 3, -2, -1, 1, 1, -1, 0, 1, 4 }; + + Matrix X (4, 1, data1); + Matrix B (4, 1, data2); + Matrix A (4, 4, data3); + + u.expect (A.solve (B)); + u.expect (Matrix::compare (X, B, (ElementType) 1e-4)); + } + }; + + template + void runTestForAllTypes (const char* unitTestName) + { + beginTest (unitTestName); + + TheTest::template run (*this); + TheTest::template run (*this); + } + + void runTest() override + { + runTestForAllTypes ("AdditionTest"); + runTestForAllTypes ("DifferenceTest"); + runTestForAllTypes ("ScalarMultiplication"); + runTestForAllTypes ("HadamardProductTest"); + runTestForAllTypes ("MultiplicationTest"); + runTestForAllTypes ("IdentityMatrixTest"); + runTestForAllTypes ("SolvingTest"); + } +}; + +static LinearAlgebraUnitTest linearAlgebraUnitTest; diff --git a/modules/juce_dsp/maths/juce_Polynomial.h b/modules/juce_dsp/maths/juce_Polynomial.h new file mode 100644 index 0000000000..6a4d0e2c2a --- /dev/null +++ b/modules/juce_dsp/maths/juce_Polynomial.h @@ -0,0 +1,162 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + A class representing a polynomial +*/ +template +class Polynomial +{ +public: + //============================================================================== + /** Creates a new polynomial which will always evaluate to zero. */ + Polynomial() + { + coeffs.add (0); + } + + /** Creates a new polynomial with given coefficients. + + @param numCoefficients The number of coefficients stored in coefficients. + This is also the order of the returned polynomial. + @param coefficients The coefficients which will be used by the newly + created polynomial. The Polynomial class will keep + a private copy of the coefficients. + */ + Polynomial (const FloatingType* coefficients, int numCoefficients) + : coeffs (coefficients, numCoefficients) + { + jassert (! coeffs.isEmpty()); + } + + /** Creates a copy of another polynomial. */ + Polynomial (const Polynomial&) = default; + + /** Creates a copy of another polynomial. */ + Polynomial (Polynomial&&) = default; + + /** Creates a copy of another polynomial. */ + Polynomial& operator= (const Polynomial&) = default; + + /** Creates a copy of another polynomial. */ + Polynomial& operator= (Polynomial&&) = default; + + #if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS || defined(DOXYGEN) + /** Creates a new polynomial with coefficients by a C++11 initializer list. + This function can be used in the following way: + Polynomial p ({0.5f, -0.3f, 0.2f}); + */ + template + Polynomial (const std::initializer_list& items) : coeffs (items) + { + jassert (! coeffs.isEmpty()); + } + #endif + + //============================================================================== + /** Returns a single coefficient of the receiver for reading */ + FloatingType operator[] (int index) const noexcept { return coeffs.getUnchecked (index); } + + /** Returns a single coefficient of the receiver for modifying. */ + FloatingType& operator[] (int index) noexcept { return coeffs.getReference (index); } + + /** Evaluates the value of the polynomial at a single point x. */ + FloatingType operator() (FloatingType x) const noexcept + { + // Horner's method + FloatingType y = 0; + + for (int i = coeffs.size(); --i >= 0;) + y = (x * y) + coeffs.getUnchecked(i); + + return y; + } + + /** Returns the order of the polynomial. */ + int getOrder() noexcept + { + return coeffs.size() - 1; + } + + //============================================================================== + /** Returns the polynomial with all its coefficients multiplied with a gain factor */ + Polynomial withGain (double gain) const + { + auto result = *this; + + for (auto& c : result.coeffs) + c *= gain; + + return result; + } + + /** Returns the sum of this polynomial with another */ + Polynomial getSumWith (const Polynomial& other) const + { + if (coeffs.size() < other.coeffs.size()) + return other.getSumWith (*this); + + auto result = *this; + + for (int i = 0; i < other.coeffs.size(); ++i) + result[i] += other[i]; + + return result; + } + + /** computes the product of two polynomials and return the result */ + Polynomial getProductWith (const Polynomial& other) const + { + Polynomial result; + result.coeffs.clearQuick(); + + auto N1 = coeffs.size(); + auto N2 = other.coeffs.size(); + auto Nmax = jmax (N1, N2); + + auto N = N1 + N2 - 1; + + for (int i = 0; i < N; ++i) + { + FloatingType value = {}; + + for (int j = 0; j < Nmax; ++j) + if (j >= 0 && j < N1 && i - j >= 0 && i - j < N2) + value = value + (*this)[j] * other[i - j]; + + result.coeffs.add (value); + } + + return result; + } + +private: + //============================================================================== + Array coeffs; + + JUCE_LEAK_DETECTOR (Polynomial) +}; diff --git a/modules/juce_dsp/maths/juce_SpecialFunctions.cpp b/modules/juce_dsp/maths/juce_SpecialFunctions.cpp new file mode 100644 index 0000000000..0ae4939e3d --- /dev/null +++ b/modules/juce_dsp/maths/juce_SpecialFunctions.cpp @@ -0,0 +1,135 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +double SpecialFunctions::besselI0 (double x) noexcept +{ + auto ax = std::abs (x); + + if (ax < 3.75) + { + auto y = x / 3.75; + y *= y; + + return 1.0 + y * (3.5156229 + y * (3.0899424 + y * (1.2067492 + + y * (0.2659732 + y * (0.360768e-1 + y * 0.45813e-2))))); + } + + auto y = 3.75 / ax; + + return (std::exp (ax) / std::sqrt (ax)) + * (0.39894228 + y * (0.1328592e-1 + y * (0.225319e-2 + y * (-0.157565e-2 + y * (0.916281e-2 + + y * (-0.2057706e-1 + y * (0.2635537e-1 + y * (-0.1647633e-1 + y * 0.392377e-2)))))))); +} + +void SpecialFunctions::ellipicIntegralK (double k, double& K, double& Kp) noexcept +{ + constexpr int M = 4; + + K = double_Pi * 0.5; + auto lastK = k; + + for (int i = 0; i < M; ++i) + { + lastK = std::pow (lastK / (1 + std::sqrt (1 - std::pow (lastK, 2.0))), 2.0); + K *= 1 + lastK; + } + + Kp = double_Pi * 0.5; + auto last = std::sqrt (1 - k * k); + + for (int i = 0; i < M; ++i) + { + last = std::pow (last / (1.0 + std::sqrt (1.0 - std::pow (last, 2.0))), 2.0); + Kp *= 1 + last; + } +} + +Complex SpecialFunctions::cde (Complex u, double k) noexcept +{ + constexpr int M = 4; + + double ke[M + 1]; + double* kei = ke; + *kei = k; + + for (int i = 0; i < M; ++i) + { + auto next = std::pow (*kei / (1.0 + std::sqrt (1.0 - std::pow (*kei, 2.0))), 2.0); + *++kei = next; + } + + std::complex last = std::cos (0.5 * u * double_Pi); + + for (int i = M - 1; i >= 0; --i) + last = (1.0 + ke[i + 1]) / (1.0 / last + ke[i + 1] * last); + + return last; +} + +Complex SpecialFunctions::sne (Complex u, double k) noexcept +{ + constexpr int M = 4; + + double ke[M + 1]; + double* kei = ke; + *kei = k; + + for (int i = 0; i < M; ++i) + { + auto next = std::pow (*kei / (1 + std::sqrt (1 - std::pow (*kei, 2.0))), 2.0); + *++kei = next; + } + + std::complex last = std::sin (0.5 * u * double_Pi); + + for (int i = M - 1; i >= 0; --i) + last = (1.0 + ke[i + 1]) / (1.0 / last + ke[i + 1] * last); + + return last; +} + +Complex SpecialFunctions::asne (Complex w, double k) noexcept +{ + constexpr int M = 4; + + double ke[M + 1]; + double* kei = ke; + *kei = k; + + for (int i = 0; i < M; ++i) + { + auto next = std::pow (*kei / (1.0 + std::sqrt (1.0 - std::pow (*kei, 2.0))), 2.0); + *++kei = next; + } + + std::complex last = w; + + for (int i = 1; i <= M; ++i) + last = 2.0 * last / ((1.0 + ke[i]) * (1.0 + std::sqrt (1.0 - std::pow (ke[i - 1] * last, 2.0)))); + + return 2.0 / double_Pi * std::asin (last); +} diff --git a/modules/juce_dsp/maths/juce_SpecialFunctions.h b/modules/juce_dsp/maths/juce_SpecialFunctions.h new file mode 100644 index 0000000000..42a82824c9 --- /dev/null +++ b/modules/juce_dsp/maths/juce_SpecialFunctions.h @@ -0,0 +1,59 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + Contains miscellaneous filter design and windowing functions. +*/ +struct SpecialFunctions +{ + /** Computes the modified Bessel function of the first kind I0 for a + given double value x. Modified Bessel functions are useful to solve + various mathematical problems involving differential equations. + */ + static double besselI0 (double x) noexcept; + + /** Computes the complete elliptic integral of the first kind K for a + given double value k, and the associated complete elliptic integral + of the first kind Kp for the complementary modulus of k. + */ + static void ellipicIntegralK (double k, double& K, double& Kp) noexcept; + + /** Computes the Jacobian elliptic function cd for the elliptic + modulus k and the quarter-period units u. + */ + static Complex cde (Complex u, double k) noexcept; + + /** Computes the Jacobian elliptic function sn for the elliptic + modulus k and the quarter-period units u. + */ + static Complex sne (Complex u, double k) noexcept; + + /** Computes the inverse of the Jacobian elliptic function sn + for the elliptic modulus k and the quarter-period units u. + */ + static Complex asne (Complex w, double k) noexcept; +}; diff --git a/modules/juce_dsp/native/juce_avx_SIMDNativeOps.cpp b/modules/juce_dsp/native/juce_avx_SIMDNativeOps.cpp new file mode 100644 index 0000000000..3780fd5375 --- /dev/null +++ b/modules/juce_dsp/native/juce_avx_SIMDNativeOps.cpp @@ -0,0 +1,54 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +DEFINE_AVX_SIMD_CONST (int32_t, float, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1 }; +DEFINE_AVX_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast(0x80000000), 0, static_cast(0x80000000), 0, static_cast(0x80000000), 0, static_cast(0x80000000), 0 }; +DEFINE_AVX_SIMD_CONST (float, float, kOne) = { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f }; + +DEFINE_AVX_SIMD_CONST (int64_t, double, kAllBitsSet) = { -1, -1, -1, -1 }; +DEFINE_AVX_SIMD_CONST (int64_t, double, kEvenHighBit) = { static_cast (0x8000000000000000), 0, static_cast (0x8000000000000000), 0 }; +DEFINE_AVX_SIMD_CONST (double, double, kOne) = { 1.0, 1.0, 1.0, 1.0 }; + +DEFINE_AVX_SIMD_CONST (int8_t, int8_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; + +DEFINE_AVX_SIMD_CONST (uint8_t, uint8_t, kAllBitsSet) = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +DEFINE_AVX_SIMD_CONST (uint8_t, uint8_t, kHighBit) = { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }; + +DEFINE_AVX_SIMD_CONST (int16_t, int16_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; + +DEFINE_AVX_SIMD_CONST (uint16_t, uint16_t, kAllBitsSet) = { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }; +DEFINE_AVX_SIMD_CONST (uint16_t, uint16_t, kHighBit) = { 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000 }; + +DEFINE_AVX_SIMD_CONST (int32_t, int32_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1 }; + +DEFINE_AVX_SIMD_CONST (uint32_t, uint32_t, kAllBitsSet) = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }; +DEFINE_AVX_SIMD_CONST (uint32_t, uint32_t, kHighBit) = { 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000 }; + +DEFINE_AVX_SIMD_CONST (int64_t, int64_t, kAllBitsSet) = { -1LL, -1LL, -1LL, -1LL }; + +DEFINE_AVX_SIMD_CONST (uint64_t, uint64_t, kAllBitsSet) = { 0xffffffffffffffffULL, 0xffffffffffffffffULL, 0xffffffffffffffffULL, 0xffffffffffffffffULL }; +DEFINE_AVX_SIMD_CONST (uint64_t, uint64_t, kHighBit) = { 0x8000000000000000ULL, 0x8000000000000000ULL, 0x8000000000000000ULL, 0x8000000000000000ULL }; diff --git a/modules/juce_dsp/native/juce_avx_SIMDNativeOps.h b/modules/juce_dsp/native/juce_avx_SIMDNativeOps.h new file mode 100644 index 0000000000..cdeda72596 --- /dev/null +++ b/modules/juce_dsp/native/juce_avx_SIMDNativeOps.h @@ -0,0 +1,560 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +#ifndef DOXYGEN + +#ifdef _MSC_VER + #define DECLARE_AVX_SIMD_CONST(type, name) \ + static __declspec(align(32)) const type name[32 / sizeof (type)] + + #define DEFINE_AVX_SIMD_CONST(type, class_type, name) \ + __declspec(align(32)) const type SIMDNativeOps:: name[32 / sizeof (type)] + +#else + #define DECLARE_AVX_SIMD_CONST(type, name) \ + static const type name[32 / sizeof (type)] __attribute__((aligned(32))) + + #define DEFINE_AVX_SIMD_CONST(type, class_type, name) \ + const type SIMDNativeOps:: name[32 / sizeof (type)] __attribute__((aligned(32))) + +#endif + +template +struct SIMDNativeOps; + +//============================================================================== +/** Single-precision floating point AVX intrinsics. */ +template <> +struct SIMDNativeOps +{ + typedef __m256 vSIMDType; + + //============================================================================== + DECLARE_AVX_SIMD_CONST (int32_t, kAllBitsSet); + DECLARE_AVX_SIMD_CONST (int32_t, kEvenHighBit); + DECLARE_AVX_SIMD_CONST (float, kOne); + + //============================================================================== + static forcedinline __m256 JUCE_VECTOR_CALLTYPE vconst (const float* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE expand (float s) noexcept { return _mm256_broadcast_ss (&s); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE add (__m256 a, __m256 b) noexcept { return _mm256_add_ps (a, b); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE sub (__m256 a, __m256 b) noexcept { return _mm256_sub_ps (a, b); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE mul (__m256 a, __m256 b) noexcept { return _mm256_mul_ps (a, b); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE bit_and (__m256 a, __m256 b) noexcept { return _mm256_and_ps (a, b); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE bit_or (__m256 a, __m256 b) noexcept { return _mm256_or_ps (a, b); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE bit_xor (__m256 a, __m256 b) noexcept { return _mm256_xor_ps (a, b); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE bit_notand (__m256 a, __m256 b) noexcept { return _mm256_andnot_ps (a, b); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE bit_not (__m256 a) noexcept { return bit_notand (a, vconst (kAllBitsSet)); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE min (__m256 a, __m256 b) noexcept { return _mm256_min_ps (a, b); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE max (__m256 a, __m256 b) noexcept { return _mm256_max_ps (a, b); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE equal (__m256 a, __m256 b) noexcept { return _mm256_cmp_ps (a, b, _CMP_EQ_OQ); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE notEqual (__m256 a, __m256 b) noexcept { return _mm256_cmp_ps (a, b, _CMP_NEQ_OQ); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE greaterThan (__m256 a, __m256 b) noexcept { return _mm256_cmp_ps (a, b, _CMP_GT_OQ); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256 a, __m256 b) noexcept { return _mm256_cmp_ps (a, b, _CMP_GE_OQ); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE multiplyAdd (__m256 a, __m256 b, __m256 c) noexcept { return _mm256_fmadd_ps (b, c, a); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE dupeven (__m256 a) noexcept { return _mm256_shuffle_ps (a, a, _MM_SHUFFLE (2, 2, 0, 0)); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE dupodd (__m256 a) noexcept { return _mm256_shuffle_ps (a, a, _MM_SHUFFLE (3, 3, 1, 1)); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE swapevenodd (__m256 a) noexcept { return _mm256_shuffle_ps (a, a, _MM_SHUFFLE (2, 3, 0, 1)); } + static forcedinline __m256 JUCE_VECTOR_CALLTYPE oddevensum (__m256 a) noexcept + { + a = _mm256_add_ps (_mm256_shuffle_ps (a, a, _MM_SHUFFLE (1, 0, 3, 2)), a); + return add (_mm256_permute2f128_ps (a, a, 1), a); + } + + //============================================================================== + static forcedinline __m256 JUCE_VECTOR_CALLTYPE cmplxmul (__m256 a, __m256 b) noexcept + { + __m256 rr_ir = mul (a, dupeven (b)); + __m256 ii_ri = mul (swapevenodd (a), dupodd (b)); + return add (rr_ir, bit_xor (ii_ri, vconst (kEvenHighBit))); + } + + static forcedinline float JUCE_VECTOR_CALLTYPE sum (__m256 a) noexcept + { + __m256 retval = _mm256_dp_ps (a, vconst (kOne), 0xff); + __m256 tmp = _mm256_permute2f128_ps (retval, retval, 1); + retval = _mm256_add_ps (retval, tmp); + return ((float*) &retval)[0]; + } +}; + +//============================================================================== +/** Double-precision floating point AVX intrinsics. */ +template <> +struct SIMDNativeOps +{ + typedef __m256d vSIMDType; + + //============================================================================== + DECLARE_AVX_SIMD_CONST (int64_t, kAllBitsSet); + DECLARE_AVX_SIMD_CONST (int64_t, kEvenHighBit); + DECLARE_AVX_SIMD_CONST (double, kOne); + + //============================================================================== + static forcedinline __m256d JUCE_VECTOR_CALLTYPE vconst (const double* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m256d expand (double s) noexcept { return _mm256_broadcast_sd (&s); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE add (__m256d a, __m256d b) noexcept { return _mm256_add_pd (a, b); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE sub (__m256d a, __m256d b) noexcept { return _mm256_sub_pd (a, b); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE mul (__m256d a, __m256d b) noexcept { return _mm256_mul_pd (a, b); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE bit_and (__m256d a, __m256d b) noexcept { return _mm256_and_pd (a, b); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE bit_or (__m256d a, __m256d b) noexcept { return _mm256_or_pd (a, b); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE bit_xor (__m256d a, __m256d b) noexcept { return _mm256_xor_pd (a, b); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE bit_notand (__m256d a, __m256d b) noexcept { return _mm256_andnot_pd (a, b); } + static forcedinline __m256d bit_not (__m256d a) noexcept { return bit_notand (a, vconst (kAllBitsSet)); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE min (__m256d a, __m256d b) noexcept { return _mm256_min_pd (a, b); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE max (__m256d a, __m256d b) noexcept { return _mm256_max_pd (a, b); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE equal (__m256d a, __m256d b) noexcept { return _mm256_cmp_pd (a, b, _CMP_EQ_OQ); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE notEqual (__m256d a, __m256d b) noexcept { return _mm256_cmp_pd (a, b, _CMP_NEQ_OQ); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE greaterThan (__m256d a, __m256d b) noexcept { return _mm256_cmp_pd (a, b, _CMP_GT_OQ); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256d a, __m256d b) noexcept { return _mm256_cmp_pd (a, b, _CMP_GE_OQ); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE multiplyAdd (__m256d a, __m256d b, __m256d c) noexcept { return _mm256_add_pd (a, _mm256_mul_pd (b, c)); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE dupeven (__m256d a) noexcept { return _mm256_shuffle_pd (a, a, 0); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE dupodd (__m256d a) noexcept { return _mm256_shuffle_pd (a, a, (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3)); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE swapevenodd (__m256d a) noexcept { return _mm256_shuffle_pd (a, a, (1 << 0) | (0 << 1) | (1 << 2) | (0 << 3)); } + static forcedinline __m256d JUCE_VECTOR_CALLTYPE oddevensum (__m256d a) noexcept { return _mm256_add_pd (_mm256_permute2f128_pd (a, a, 1), a); } + + //============================================================================== + static forcedinline __m256d JUCE_VECTOR_CALLTYPE cmplxmul (__m256d a, __m256d b) noexcept + { + __m256d rr_ir = mul (a, dupeven (b)); + __m256d ii_ri = mul (swapevenodd (a), dupodd (b)); + return add (rr_ir, bit_xor (ii_ri, vconst (kEvenHighBit))); + } + + static forcedinline double JUCE_VECTOR_CALLTYPE sum (__m256d a) noexcept + { + __m256d retval = _mm256_hadd_pd (a, a); + __m256d tmp = _mm256_permute2f128_pd (retval, retval, 1); + retval = _mm256_add_pd (retval, tmp); + return ((double*) &retval)[0]; + } +}; + +//============================================================================== +/** Signed 8-bit integer AVX intrinsics */ +template <> +struct SIMDNativeOps +{ + typedef __m256i vSIMDType; + + //============================================================================== + DECLARE_AVX_SIMD_CONST (int8_t, kAllBitsSet); + + static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const int8_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int8_t s) noexcept { return _mm256_set1_epi8 (s); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi8 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi8 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { return _mm256_min_epi8 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { return _mm256_max_epi8 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi8 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept { return _mm256_cmpgt_epi8 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline int8_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept + { + __m256i lo = _mm256_unpacklo_epi8 (a, _mm256_setzero_si256()); + __m256i hi = _mm256_unpackhi_epi8 (a, _mm256_setzero_si256()); + + for (int i = 0; i < 3; ++i) + { + lo = _mm256_hadd_epi16 (lo, lo); + hi = _mm256_hadd_epi16 (hi, hi); + } + + const int8_t* lo_ptr = reinterpret_cast (&lo); + const int8_t* hi_ptr = reinterpret_cast (&hi); + + return lo_ptr[0] + hi_ptr[0] + lo_ptr[16] + hi_ptr[16]; + } + + static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) + { + // unpack and multiply + __m256i even = _mm256_mullo_epi16 (a, b); + __m256i odd = _mm256_mullo_epi16 (_mm256_srli_epi16 (a, 8), _mm256_srli_epi16 (b, 8)); + + return _mm256_or_si256 (_mm256_slli_epi16 (odd, 8), + _mm256_srli_epi16 (_mm256_slli_epi16 (even, 8), 8)); + } +}; + +//============================================================================== +/** Unsigned 8-bit integer AVX intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m256i vSIMDType; + + //============================================================================== + DECLARE_AVX_SIMD_CONST (uint8_t, kHighBit); + DECLARE_AVX_SIMD_CONST (uint8_t, kAllBitsSet); + + static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const uint8_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, vconst (kHighBit)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint8_t s) noexcept { return _mm256_set1_epi8 ((int8_t) s); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi8 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi8 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { return _mm256_min_epu8 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { return _mm256_max_epu8 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi8 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept { return _mm256_cmpgt_epi8 (ssign (a), ssign (b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline uint8_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept + { + __m256i lo = _mm256_unpacklo_epi8 (a, _mm256_setzero_si256()); + __m256i hi = _mm256_unpackhi_epi8 (a, _mm256_setzero_si256()); + + for (int i = 0; i < 3; ++i) + { + lo = _mm256_hadd_epi16 (lo, lo); + hi = _mm256_hadd_epi16 (hi, hi); + } + + const uint8_t* lo_ptr = reinterpret_cast (&lo); + const uint8_t* hi_ptr = reinterpret_cast (&hi); + + return lo_ptr[0] + hi_ptr[0] + lo_ptr[16] + hi_ptr[16]; + } + + static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) + { + // unpack and multiply + __m256i even = _mm256_mullo_epi16 (a, b); + __m256i odd = _mm256_mullo_epi16 (_mm256_srli_epi16 (a, 8), _mm256_srli_epi16 (b, 8)); + + return _mm256_or_si256 (_mm256_slli_epi16 (odd, 8), + _mm256_srli_epi16 (_mm256_slli_epi16 (even, 8), 8)); + } +}; + +//============================================================================== +/** Signed 16-bit integer AVX intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m256i vSIMDType; + + //============================================================================== + DECLARE_AVX_SIMD_CONST (int16_t, kAllBitsSet); + + //============================================================================== + static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const int16_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int16_t s) noexcept { return _mm256_set1_epi16 (s); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi16 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi16 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return _mm256_mullo_epi16 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { return _mm256_min_epi16 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { return _mm256_max_epi16 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi16 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept { return _mm256_cmpgt_epi16 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline int16_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept + { + __m256i tmp = _mm256_hadd_epi16 (a, a); + tmp = _mm256_hadd_epi16 (tmp, tmp); + tmp = _mm256_hadd_epi16 (tmp, tmp); + int16_t* ptr = reinterpret_cast (&tmp); + return ptr[0] + ptr[8]; + } +}; + +//============================================================================== +/** Unsigned 16-bit integer AVX intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m256i vSIMDType; + + //============================================================================== + DECLARE_AVX_SIMD_CONST (uint16_t, kHighBit); + DECLARE_AVX_SIMD_CONST (uint16_t, kAllBitsSet); + + //============================================================================== + static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const uint16_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, vconst (kHighBit)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint16_t s) noexcept { return _mm256_set1_epi16 ((int16_t) s); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi16 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi16 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return _mm256_mullo_epi16 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { return _mm256_min_epu16 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { return _mm256_max_epu16 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi16 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept { return _mm256_cmpgt_epi16 (ssign (a), ssign (b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline uint16_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept + { + __m256i tmp = _mm256_hadd_epi16 (a, a); + tmp = _mm256_hadd_epi16 (tmp, tmp); + tmp = _mm256_hadd_epi16 (tmp, tmp); + uint16_t* ptr = reinterpret_cast (&tmp); + return ptr[0] + ptr[8]; + } +}; + +//============================================================================== +/** Signed 32-bit integer AVX intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m256i vSIMDType; + + //============================================================================== + DECLARE_AVX_SIMD_CONST (int32_t, kAllBitsSet); + + //============================================================================== + static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int32_t s) noexcept { return _mm256_set1_epi32 (s); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi32 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi32 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return _mm256_mullo_epi32 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { return _mm256_min_epi32 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { return _mm256_max_epi32 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi32 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept { return _mm256_cmpgt_epi32 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline int32_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept + { + __m256i tmp = _mm256_hadd_epi32 (a, a); + tmp = _mm256_hadd_epi32 (tmp, tmp); + int32_t* ptr = reinterpret_cast (&tmp); + return ptr[0] + ptr[4]; + } +}; + +//============================================================================== +/** Unsigned 32-bit integer AVX intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m256i vSIMDType; + + //============================================================================== + DECLARE_AVX_SIMD_CONST (uint32_t, kAllBitsSet); + DECLARE_AVX_SIMD_CONST (uint32_t, kHighBit); + + //============================================================================== + static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const uint32_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, vconst (kHighBit)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint32_t s) noexcept { return _mm256_set1_epi32 ((int32_t) s); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi32 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi32 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return _mm256_mullo_epi32 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { return _mm256_min_epu32 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { return _mm256_max_epu32 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi32 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept { return _mm256_cmpgt_epi32 (ssign (a), ssign (b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline uint32_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept + { + __m256i tmp = _mm256_hadd_epi32 (a, a); + tmp = _mm256_hadd_epi32 (tmp, tmp); + uint32_t* ptr = reinterpret_cast (&tmp); + return ptr[0] + ptr[4]; + } +}; + +//============================================================================== +/** Signed 64-bit integer AVX intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m256i vSIMDType; + + //============================================================================== + DECLARE_AVX_SIMD_CONST (int64_t, kAllBitsSet); + + static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi64 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi64 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { __m256i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { __m256i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi64 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept { return _mm256_cmpgt_epi64 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int64_t s) noexcept + { + #ifdef _MSC_VER + __m256d tmp = _mm256_broadcast_sd (reinterpret_cast (&s)); + return *reinterpret_cast (&tmp); + #else + return _mm256_set1_epi64x ((int64_t) s); + #endif + } + + static forcedinline int64_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept + { + const int64_t* ptr = reinterpret_cast (&a); + return ptr[0] + ptr[1] + ptr[2] + ptr[3]; + } + + static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept + { + __m256i retval; + + const int64_t* aptr = reinterpret_cast (&a); + const int64_t* bptr = reinterpret_cast (&b); + int64_t* dst = reinterpret_cast (&retval); + + for (int i = 0; i < 4; ++i) + dst[i] = aptr[i] * bptr[i]; + + return retval; + } +}; + +//============================================================================== +/** Unsigned 64-bit integer AVX intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m256i vSIMDType; + + //============================================================================== + DECLARE_AVX_SIMD_CONST (uint64_t, kAllBitsSet); + DECLARE_AVX_SIMD_CONST (uint64_t, kHighBit); + + static forcedinline __m256i JUCE_VECTOR_CALLTYPE vconst (const uint64_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, vconst (kHighBit)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi64 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi64 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_or (__m256i a, __m256i b) noexcept { return _mm256_or_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_xor (__m256i a, __m256i b) noexcept { return _mm256_xor_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_andnot (__m256i a, __m256i b) noexcept { return _mm256_andnot_si256 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_not (__m256i a) noexcept { return _mm256_andnot_si256 (a, vconst (kAllBitsSet)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE min (__m256i a, __m256i b) noexcept { __m256i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE max (__m256i a, __m256i b) noexcept { __m256i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE equal (__m256i a, __m256i b) noexcept { return _mm256_cmpeq_epi64 (a, b); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThan (__m256i a, __m256i b) noexcept { return _mm256_cmpgt_epi64 (ssign (a), ssign (b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m256i a, __m256i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE multiplyAdd (__m256i a, __m256i b, __m256i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m256i JUCE_VECTOR_CALLTYPE notEqual (__m256i a, __m256i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint64_t s) noexcept + { + #ifdef _MSC_VER + __m256d tmp = _mm256_broadcast_sd (reinterpret_cast (&s)); + return *reinterpret_cast (&tmp); + #else + return _mm256_set1_epi64x ((int64_t) s); + #endif + } + + static forcedinline uint64_t JUCE_VECTOR_CALLTYPE sum (__m256i a) noexcept + { + const uint64_t* ptr = reinterpret_cast (&a); + return ptr[0] + ptr[1] + ptr[2] + ptr[3]; + } + + static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept + { + __m256i retval; + + const uint64_t* aptr = reinterpret_cast (&a); + const uint64_t* bptr = reinterpret_cast (&b); + uint64_t* dst = reinterpret_cast (&retval); + + for (int i = 0; i < 4; ++i) + dst[i] = aptr[i] * bptr[i]; + + return retval; + } +}; + +#endif diff --git a/modules/juce_dsp/native/juce_fallback_SIMDNativeOps.h b/modules/juce_dsp/native/juce_fallback_SIMDNativeOps.h new file mode 100644 index 0000000000..bf371b6db4 --- /dev/null +++ b/modules/juce_dsp/native/juce_fallback_SIMDNativeOps.h @@ -0,0 +1,213 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** A template specialisation to find corresponding mask type for primitives. */ +namespace SIMDInternal +{ + template struct MaskTypeFor { typedef Primitive type; }; + template <> struct MaskTypeFor { typedef uint32_t type; }; + template <> struct MaskTypeFor { typedef uint64_t type; }; + template <> struct MaskTypeFor { typedef uint8_t type; }; + template <> struct MaskTypeFor { typedef uint8_t type; }; + template <> struct MaskTypeFor { typedef uint16_t type; }; + template <> struct MaskTypeFor { typedef uint32_t type; }; + template <> struct MaskTypeFor { typedef uint64_t type; }; + template <> struct MaskTypeFor > { typedef uint32_t type; }; + template <> struct MaskTypeFor > { typedef uint64_t type; }; + + template struct PrimitiveType { typedef Primitive type; }; + template struct PrimitiveType > { typedef Primitive type; }; + + template struct Log2Helper { enum { value = Log2Helper::value + 1 }; }; + template <> struct Log2Helper<1> { enum { value = 0 }; }; +} + +/** + Useful fallback routines to use if the native SIMD op is not supported. You + should never need to use this directly. Use juce_SIMDRegister instead. +*/ +template +struct SIMDFallbackOps +{ + static constexpr size_t n = sizeof (vSIMDType) / sizeof (ScalarType); + static constexpr size_t mask = (sizeof (vSIMDType) / sizeof (ScalarType)) - 1; + static constexpr size_t bits = SIMDInternal::Log2Helper::value; + + // corresponding mask type + typedef typename SIMDInternal::MaskTypeFor::type MaskType; + + // fallback methods + static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return apply (a, b); } + static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return apply (a, b); } + static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return apply (a, b); } + static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return bitapply (a, b); } + static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return bitapply (a, b); } + static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return bitapply (a, b); } + static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return bitapply (a, b); } + + static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return apply (a, b); } + static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return apply (a, b); } + static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return cmp (a, b); } + static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return cmp (a, b); } + static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return cmp (a, b); } + static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return cmp (a, b); } + + static forcedinline vSIMDType bit_not (vSIMDType a) noexcept + { + vSIMDType retval; + auto* dst = reinterpret_cast (&retval); + auto* aSrc = reinterpret_cast (&a); + + for (int i = 0; i < n; ++i) + dst [i] = ~aSrc [i]; + + return retval; + } + + static forcedinline ScalarType sum (vSIMDType a) noexcept + { + auto retval = static_cast (0); + auto* aSrc = reinterpret_cast (&a); + + for (int i = 0; i < n; ++i) + retval += aSrc [i]; + + return retval; + } + + static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept + { + vSIMDType retval; + auto* dst = reinterpret_cast (&retval); + auto* aSrc = reinterpret_cast (&a); + auto* bSrc = reinterpret_cast (&b); + auto* cSrc = reinterpret_cast (&c); + + for (int i = 0; i < n; ++i) + dst [i] = aSrc [i] + (bSrc [i] * cSrc [i]); + + return retval; + } + + //============================================================================== + static forcedinline vSIMDType cmplxmul (vSIMDType a, vSIMDType b) noexcept + { + vSIMDType retval; + auto* dst = reinterpret_cast*> (&retval); + auto* aSrc = reinterpret_cast*> (&a); + auto* bSrc = reinterpret_cast*> (&b); + + const int m = n >> 1; + for (int i = 0; i < m; ++i) + dst [i] = aSrc [i] * bSrc [i]; + + return retval; + } + + struct ScalarAdd { static forcedinline ScalarType op (ScalarType a, ScalarType b) noexcept { return a + b; } }; + struct ScalarSub { static forcedinline ScalarType op (ScalarType a, ScalarType b) noexcept { return a - b; } }; + struct ScalarMul { static forcedinline ScalarType op (ScalarType a, ScalarType b) noexcept { return a * b; } }; + struct ScalarMin { static forcedinline ScalarType op (ScalarType a, ScalarType b) noexcept { return jmin (a, b); } }; + struct ScalarMax { static forcedinline ScalarType op (ScalarType a, ScalarType b) noexcept { return jmax (a, b); } }; + struct ScalarAnd { static forcedinline MaskType op (MaskType a, MaskType b) noexcept { return a & b; } }; + struct ScalarOr { static forcedinline MaskType op (MaskType a, MaskType b) noexcept { return a | b; } }; + struct ScalarXor { static forcedinline MaskType op (MaskType a, MaskType b) noexcept { return a ^ b; } }; + struct ScalarNot { static forcedinline MaskType op (MaskType a, MaskType b) noexcept { return (~a) & b; } }; + struct ScalarEq { static forcedinline bool op (ScalarType a, ScalarType b) noexcept { return (a == b); } }; + struct ScalarNeq { static forcedinline bool op (ScalarType a, ScalarType b) noexcept { return (a != b); } }; + struct ScalarGt { static forcedinline bool op (ScalarType a, ScalarType b) noexcept { return (a > b); } }; + struct ScalarGeq { static forcedinline bool op (ScalarType a, ScalarType b) noexcept { return (a >= b); } }; + + // generic apply routines for operations above + template + static forcedinline vSIMDType apply (vSIMDType a, vSIMDType b) noexcept + { + vSIMDType retval; + auto* dst = reinterpret_cast (&retval); + auto* aSrc = reinterpret_cast (&a); + auto* bSrc = reinterpret_cast (&b); + + for (int i = 0; i < n; ++i) + dst [i] = Op::op (aSrc [i], bSrc [i]); + + return retval; + } + + template + static forcedinline vSIMDType cmp (vSIMDType a, vSIMDType b) noexcept + { + vSIMDType retval; + auto* dst = reinterpret_cast (&retval); + auto* aSrc = reinterpret_cast (&a); + auto* bSrc = reinterpret_cast (&b); + + for (int i = 0; i < n; ++i) + dst [i] = Op::op (aSrc [i], bSrc [i]) ? static_cast (-1) : static_cast (0); + + return retval; + } + + template + static forcedinline vSIMDType bitapply (vSIMDType a, vSIMDType b) noexcept + { + vSIMDType retval; + auto* dst = reinterpret_cast (&retval); + auto* aSrc = reinterpret_cast (&a); + auto* bSrc = reinterpret_cast (&b); + + for (int i = 0; i < n; ++i) + dst [i] = Op::op (aSrc [i], bSrc [i]); + + return retval; + } + + static forcedinline vSIMDType expand (ScalarType s) noexcept + { + vSIMDType retval; + auto* dst = reinterpret_cast (&retval); + + for (int i = 0; i < n; ++i) + dst [i] = s; + + return retval; + } + + template + static forcedinline vSIMDType shuffle (vSIMDType a) noexcept + { + vSIMDType retval; + auto* dst = reinterpret_cast (&retval); + auto* aSrc = reinterpret_cast (&a); + + // the compiler will unroll this loop and the index can + // be computed at compile-time, so this will be super fast + for (int i = 0; i < n; ++i) + dst [i] = aSrc [(shuffle_idx >> (bits * i)) & mask]; + + return retval; + } +}; diff --git a/modules/juce_dsp/native/juce_neon_SIMDNativeOps.cpp b/modules/juce_dsp/native/juce_neon_SIMDNativeOps.cpp new file mode 100644 index 0000000000..d52f7505bd --- /dev/null +++ b/modules/juce_dsp/native/juce_neon_SIMDNativeOps.cpp @@ -0,0 +1,39 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +DEFINE_NEON_SIMD_CONST (int32_t, float, kAllBitsSet) = { -1, -1, -1, -1 }; +DEFINE_NEON_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast(0x80000000), 0, static_cast(0x80000000), 0 }; +DEFINE_NEON_SIMD_CONST (float, float, kOne) = { 1.0f, 1.0f, 1.0f, 1.0f }; + +DEFINE_NEON_SIMD_CONST (int8_t, int8_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; +DEFINE_NEON_SIMD_CONST (uint8_t, uint8_t, kAllBitsSet) = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +DEFINE_NEON_SIMD_CONST (int16_t, int16_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1 }; +DEFINE_NEON_SIMD_CONST (uint16_t, uint16_t, kAllBitsSet) = { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }; +DEFINE_NEON_SIMD_CONST (int32_t, int32_t, kAllBitsSet) = { -1, -1, -1, -1 }; +DEFINE_NEON_SIMD_CONST (uint32_t, uint32_t, kAllBitsSet) = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }; +DEFINE_NEON_SIMD_CONST (int64_t, int64_t, kAllBitsSet) = { -1, -1 }; +DEFINE_NEON_SIMD_CONST (uint64_t, uint64_t, kAllBitsSet) = { 0xffffffffffffffff, 0xffffffffffffffff }; diff --git a/modules/juce_dsp/native/juce_neon_SIMDNativeOps.h b/modules/juce_dsp/native/juce_neon_SIMDNativeOps.h new file mode 100644 index 0000000000..de8bc9d602 --- /dev/null +++ b/modules/juce_dsp/native/juce_neon_SIMDNativeOps.h @@ -0,0 +1,386 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#ifndef DOXYGEN + +#ifdef _MSC_VER + #define DECLARE_NEON_SIMD_CONST(type, name) \ + static __declspec(align(16)) const type name [16 / sizeof (type)] + + #define DEFINE_NEON_SIMD_CONST(type, class_type, name) \ + __declspec(align(16)) const type SIMDNativeOps:: name [16 / sizeof (type)] + +#else + #define DECLARE_NEON_SIMD_CONST(type, name) \ + static const type name [16 / sizeof (type)] __attribute__((aligned(16))) + + #define DEFINE_NEON_SIMD_CONST(type, class_type, name) \ + const type SIMDNativeOps:: name [16 / sizeof (type)] __attribute__((aligned(16))) + +#endif + +template +struct SIMDNativeOps; + +//============================================================================== +/** Single-precision floating point NEON intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef float32x4_t vSIMDType; + typedef uint32x4_t vMaskType; + typedef SIMDFallbackOps fb; + + //============================================================================== + DECLARE_NEON_SIMD_CONST (int32_t, kAllBitsSet); + DECLARE_NEON_SIMD_CONST (int32_t, kEvenHighBit); + DECLARE_NEON_SIMD_CONST (float, kOne); + + //============================================================================== + static forcedinline vSIMDType expand (float s) noexcept { return vdupq_n_f32 (s); } + static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_f32 (a, b); } + static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_f32 (a, b); } + static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_f32 (a, b); } + static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vandq_u32 ((vMaskType) a, (vMaskType) b); } + static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vorrq_u32 ((vMaskType) a, (vMaskType) b); } + static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) veorq_u32 ((vMaskType) a, (vMaskType) b); } + static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vbicq_u32 ((vMaskType) b, (vMaskType) a); } + static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_f32 ((float*) kAllBitsSet)); } + static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_f32 (a, b); } + static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_f32 (a, b); } + static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_f32 (a, b); } + static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); } + static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_f32 (a, b); } + static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_f32 (a, b); } + static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_f32 (a, b, c); } + static forcedinline vSIMDType dupeven (vSIMDType a) noexcept { return fb::shuffle<(0 << 0) | (0 << 2) | (2 << 4) | (2 << 6)> (a); } + static forcedinline vSIMDType dupodd (vSIMDType a) noexcept { return fb::shuffle<(1 << 0) | (1 << 2) | (3 << 4) | (3 << 6)> (a); } + static forcedinline vSIMDType swapevenodd (vSIMDType a) noexcept { return fb::shuffle<(1 << 0) | (0 << 2) | (3 << 4) | (2 << 6)> (a); } + static forcedinline float sum (vSIMDType a) noexcept { return fb::sum (a); } + static forcedinline vSIMDType oddevensum (vSIMDType a) noexcept { return add (fb::shuffle<(2 << 0) | (3 << 2) | (0 << 4) | (1 << 6)> (a), a); } + + //============================================================================== + static forcedinline vSIMDType cmplxmul (vSIMDType a, vSIMDType b) noexcept + { + vSIMDType rr_ir = mul (a, dupeven (b)); + vSIMDType ii_ri = mul (swapevenodd (a), dupodd (b)); + return add (rr_ir, bit_xor (ii_ri, vld1q_f32 ((float*) kEvenHighBit))); + } +}; + +//============================================================================== +/** Double-precision floating point NEON intrinsics does not exist in NEON + so we need to emulate this. +*/ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef struct { double values [2]; } vSIMDType; + typedef SIMDFallbackOps fb; + + static forcedinline vSIMDType expand (double s) noexcept { return fb::expand (s); } + static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return fb::add (a, b); } + static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return fb::sub (a, b); } + static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return fb::mul (a, b); } + static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return fb::bit_and (a, b); } + static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return fb::bit_or (a, b); } + static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return fb::bit_xor (a, b); } + static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return fb::bit_notand (a, b); } + static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return fb::bit_not (a); } + static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return fb::min (a, b); } + static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return fb::max (a, b); } + static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return fb::equal (a, b); } + static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return fb::notEqual (a, b); } + static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThan (a, b); } + static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThanOrEqual (a, b); } + static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return fb::multiplyAdd (a, b, c); } + static forcedinline vSIMDType cmplxmul (vSIMDType a, vSIMDType b) noexcept { return fb::cmplxmul (a, b); } + static forcedinline double sum (vSIMDType a) noexcept { return fb::sum (a); } + static forcedinline vSIMDType oddevensum (vSIMDType a) noexcept { return a; } +}; + +//============================================================================== +/** Signed 8-bit integer NEON intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef int8x16_t vSIMDType; + typedef SIMDFallbackOps fb; + + //============================================================================== + DECLARE_NEON_SIMD_CONST (int8_t, kAllBitsSet); + + //============================================================================== + static forcedinline vSIMDType expand (int8_t s) noexcept { return vdupq_n_s8 (s); } + static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_s8 (a, b); } + static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_s8 (a, b); } + static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_s8 (a, b); } + static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_s8 (a, b); } + static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_s8 (a, b); } + static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_s8 (a, b); } + static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s8 (b, a); } + static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_s8 ((int8_t*) kAllBitsSet)); } + static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_s8 (a, b); } + static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_s8 (a, b); } + static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_s8 (a, b); } + static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); } + static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_s8 (a, b); } + static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_s8 (a, b); } + static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_s8 (a, b, c); } + static forcedinline int8_t sum (vSIMDType a) noexcept { return fb::sum (a); } +}; + +//============================================================================== +/** Unsigned 8-bit integer NEON intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef uint8x16_t vSIMDType; + typedef SIMDFallbackOps fb; + + //============================================================================== + DECLARE_NEON_SIMD_CONST (uint8_t, kAllBitsSet); + + //============================================================================== + static forcedinline vSIMDType expand (uint8_t s) noexcept { return vdupq_n_u8 (s); } + static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_u8 (a, b); } + static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_u8 (a, b); } + static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_u8 (a, b); } + static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_u8 (a, b); } + static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_u8 (a, b); } + static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_u8 (a, b); } + static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u8 (b, a); } + static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_u8 ((uint8_t*) kAllBitsSet)); } + static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_u8 (a, b); } + static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_u8 (a, b); } + static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_u8 (a, b); } + static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); } + static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_u8 (a, b); } + static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_u8 (a, b); } + static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_u8 (a, b, c); } + static forcedinline uint8_t sum (vSIMDType a) noexcept { return fb::sum (a); } +}; + +//============================================================================== +/** Signed 16-bit integer NEON intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef int16x8_t vSIMDType; + typedef SIMDFallbackOps fb; + + //============================================================================== + DECLARE_NEON_SIMD_CONST (int16_t, kAllBitsSet); + + //============================================================================== + static forcedinline vSIMDType expand (int16_t s) noexcept { return vdupq_n_s16 (s); } + static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_s16 (a, b); } + static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_s16 (a, b); } + static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_s16 (a, b); } + static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_s16 (a, b); } + static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_s16 (a, b); } + static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_s16 (a, b); } + static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s16 (b, a); } + static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_s16 ((int16_t*) kAllBitsSet)); } + static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_s16 (a, b); } + static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_s16 (a, b); } + static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_s16 (a, b); } + static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); } + static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_s16 (a, b); } + static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_s16 (a, b); } + static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_s16 (a, b, c); } + static forcedinline int16_t sum (vSIMDType a) noexcept { return fb::sum (a); } +}; + + +//============================================================================== +/** Unsigned 16-bit integer NEON intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef uint16x8_t vSIMDType; + typedef SIMDFallbackOps fb; + + //============================================================================== + DECLARE_NEON_SIMD_CONST (uint16_t, kAllBitsSet); + + //============================================================================== + static forcedinline vSIMDType expand (uint16_t s) noexcept { return vdupq_n_u16 (s); } + static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_u16 (a, b); } + static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_u16 (a, b); } + static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_u16 (a, b); } + static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_u16 (a, b); } + static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_u16 (a, b); } + static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_u16 (a, b); } + static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u16 (b, a); } + static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_u16 ((uint16_t*) kAllBitsSet)); } + static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_u16 (a, b); } + static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_u16 (a, b); } + static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_u16 (a, b); } + static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); } + static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_u16 (a, b); } + static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_u16 (a, b); } + static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_u16 (a, b, c); } + static forcedinline uint16_t sum (vSIMDType a) noexcept { return fb::sum (a); } +}; + +//============================================================================== +/** Signed 32-bit integer NEON intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef int32x4_t vSIMDType; + typedef SIMDFallbackOps fb; + + //============================================================================== + DECLARE_NEON_SIMD_CONST (int32_t, kAllBitsSet); + + //============================================================================== + static forcedinline vSIMDType expand (int32_t s) noexcept { return vdupq_n_s32 (s); } + static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_s32 (a, b); } + static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_s32 (a, b); } + static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_s32 (a, b); } + static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_s32 (a, b); } + static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_s32 (a, b); } + static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_s32 (a, b); } + static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s32 (b, a); } + static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_s32 ((int32_t*) kAllBitsSet)); } + static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_s32 (a, b); } + static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_s32 (a, b); } + static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_s32 (a, b); } + static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); } + static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_s32 (a, b); } + static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_s32 (a, b); } + static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_s32 (a, b, c); } + static forcedinline int32_t sum (vSIMDType a) noexcept { return fb::sum (a); } +}; + + +//============================================================================== +/** Unsigned 32-bit integer NEON intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef uint32x4_t vSIMDType; + typedef SIMDFallbackOps fb; + + //============================================================================== + DECLARE_NEON_SIMD_CONST (uint32_t, kAllBitsSet); + + //============================================================================== + static forcedinline vSIMDType expand (uint32_t s) noexcept { return vdupq_n_u32 (s); } + static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_u32 (a, b); } + static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_u32 (a, b); } + static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return vmulq_u32 (a, b); } + static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_u32 (a, b); } + static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_u32 (a, b); } + static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_u32 (a, b); } + static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u32 (b, a); } + static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_u32 ((uint32_t*) kAllBitsSet)); } + static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return vminq_u32 (a, b); } + static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return vmaxq_u32 (a, b); } + static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vceqq_u32 (a, b); } + static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return bit_not (equal (a, b)); } + static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgtq_u32 (a, b); } + static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return (vSIMDType) vcgeq_u32 (a, b); } + static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return vmlaq_u32 (a, b, c); } + static forcedinline uint32_t sum (vSIMDType a) noexcept { return fb::sum (a); } +}; + +//============================================================================== +/** Signed 64-bit integer NEON intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef int64x2_t vSIMDType; + typedef SIMDFallbackOps fb; + + //============================================================================== + DECLARE_NEON_SIMD_CONST (int64_t, kAllBitsSet); + + //============================================================================== + static forcedinline vSIMDType expand (int64_t s) noexcept { return vdupq_n_s64 (s); } + static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_s64 (a, b); } + static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_s64 (a, b); } + static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return fb::mul (a, b); } + static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_s64 (a, b); } + static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_s64 (a, b); } + static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_s64 (a, b); } + static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_s64 (b, a); } + static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_s64 ((int64_t*) kAllBitsSet)); } + static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return fb::min (a, b); } + static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return fb::max (a, b); } + static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return fb::equal (a, b); } + static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return fb::notEqual (a, b); } + static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThan (a, b); } + static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThanOrEqual (a, b); } + static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return fb::multiplyAdd (a, b, c); } + static forcedinline int64_t sum (vSIMDType a) noexcept { return fb::sum (a); } +}; + + +//============================================================================== +/** Unsigned 64-bit integer NEON intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef uint64x2_t vSIMDType; + typedef SIMDFallbackOps fb; + + //============================================================================== + DECLARE_NEON_SIMD_CONST (uint64_t, kAllBitsSet); + + //============================================================================== + static forcedinline vSIMDType expand (uint64_t s) noexcept { return vdupq_n_u64 (s); } + static forcedinline vSIMDType add (vSIMDType a, vSIMDType b) noexcept { return vaddq_u64 (a, b); } + static forcedinline vSIMDType sub (vSIMDType a, vSIMDType b) noexcept { return vsubq_u64 (a, b); } + static forcedinline vSIMDType mul (vSIMDType a, vSIMDType b) noexcept { return fb::mul (a, b); } + static forcedinline vSIMDType bit_and (vSIMDType a, vSIMDType b) noexcept { return vandq_u64 (a, b); } + static forcedinline vSIMDType bit_or (vSIMDType a, vSIMDType b) noexcept { return vorrq_u64 (a, b); } + static forcedinline vSIMDType bit_xor (vSIMDType a, vSIMDType b) noexcept { return veorq_u64 (a, b); } + static forcedinline vSIMDType bit_notand (vSIMDType a, vSIMDType b) noexcept { return vbicq_u64 (b, a); } + static forcedinline vSIMDType bit_not (vSIMDType a) noexcept { return bit_notand (a, vld1q_u64 ((uint64_t*) kAllBitsSet)); } + static forcedinline vSIMDType min (vSIMDType a, vSIMDType b) noexcept { return fb::min (a, b); } + static forcedinline vSIMDType max (vSIMDType a, vSIMDType b) noexcept { return fb::max (a, b); } + static forcedinline vSIMDType equal (vSIMDType a, vSIMDType b) noexcept { return fb::equal (a, b); } + static forcedinline vSIMDType notEqual (vSIMDType a, vSIMDType b) noexcept { return fb::notEqual (a, b); } + static forcedinline vSIMDType greaterThan (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThan (a, b); } + static forcedinline vSIMDType greaterThanOrEqual (vSIMDType a, vSIMDType b) noexcept { return fb::greaterThanOrEqual (a, b); } + static forcedinline vSIMDType multiplyAdd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return fb::multiplyAdd (a, b, c); } + static forcedinline uint64_t sum (vSIMDType a) noexcept { return fb::sum (a); } +}; + +#endif diff --git a/modules/juce_dsp/native/juce_sse_SIMDNativeOps.cpp b/modules/juce_dsp/native/juce_sse_SIMDNativeOps.cpp new file mode 100644 index 0000000000..c3af98e6e0 --- /dev/null +++ b/modules/juce_dsp/native/juce_sse_SIMDNativeOps.cpp @@ -0,0 +1,54 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +DEFINE_SSE_SIMD_CONST (int32_t, float, kAllBitsSet) = { -1, -1, -1, -1 }; +DEFINE_SSE_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast(0x80000000), 0, static_cast(0x80000000), 0 }; +DEFINE_SSE_SIMD_CONST (float, float, kOne) = { 1.0f, 1.0f, 1.0f, 1.0f }; + +DEFINE_SSE_SIMD_CONST (int64_t, double, kAllBitsSet) = { -1LL, -1LL }; +DEFINE_SSE_SIMD_CONST (int64_t, double, kEvenHighBit) = { static_cast(0x8000000000000000), 0 }; +DEFINE_SSE_SIMD_CONST (double, double, kOne) = { 1.0, 1.0 }; + +DEFINE_SSE_SIMD_CONST (int8_t, int8_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; + +DEFINE_SSE_SIMD_CONST (uint8_t, uint8_t, kAllBitsSet) = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +DEFINE_SSE_SIMD_CONST (uint8_t, uint8_t, kHighBit) = { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }; + +DEFINE_SSE_SIMD_CONST (int16_t, int16_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1 }; + +DEFINE_SSE_SIMD_CONST (uint16_t, uint16_t, kAllBitsSet) = { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }; +DEFINE_SSE_SIMD_CONST (uint16_t, uint16_t, kHighBit) = { 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000 }; + +DEFINE_SSE_SIMD_CONST (int32_t, int32_t, kAllBitsSet) = { -1, -1, -1, -1 }; + +DEFINE_SSE_SIMD_CONST (uint32_t, uint32_t, kAllBitsSet) = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }; +DEFINE_SSE_SIMD_CONST (uint32_t, uint32_t, kHighBit) = { 0x80000000, 0x80000000, 0x80000000, 0x80000000 }; + +DEFINE_SSE_SIMD_CONST (int64_t, int64_t, kAllBitsSet) = { -1, -1 }; + +DEFINE_SSE_SIMD_CONST (uint64_t, uint64_t, kAllBitsSet) = { 0xffffffffffffffff, 0xffffffffffffffff }; +DEFINE_SSE_SIMD_CONST (uint64_t, uint64_t, kHighBit) = { 0x8000000000000000, 0x8000000000000000 }; diff --git a/modules/juce_dsp/native/juce_sse_SIMDNativeOps.h b/modules/juce_dsp/native/juce_sse_SIMDNativeOps.h new file mode 100644 index 0000000000..847403334e --- /dev/null +++ b/modules/juce_dsp/native/juce_sse_SIMDNativeOps.h @@ -0,0 +1,740 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#ifndef DOXYGEN + +#ifdef _MSC_VER + #define DECLARE_SSE_SIMD_CONST(type, name) \ + static __declspec(align(16)) const type name [16 / sizeof (type)] + + #define DEFINE_SSE_SIMD_CONST(type, class_type, name) \ + __declspec(align(16)) const type SIMDNativeOps:: name [16 / sizeof (type)] + +#else + #define DECLARE_SSE_SIMD_CONST(type, name) \ + static const type name [16 / sizeof (type)] __attribute__((aligned(16))) + + #define DEFINE_SSE_SIMD_CONST(type, class_type, name) \ + const type SIMDNativeOps:: name [16 / sizeof (type)] __attribute__((aligned(16))) + +#endif + +template +struct SIMDNativeOps; + +//============================================================================== +/** Single-precision floating point SSE intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m128 vSIMDType; + + //============================================================================== + DECLARE_SSE_SIMD_CONST (int32_t, kAllBitsSet); + DECLARE_SSE_SIMD_CONST (int32_t, kEvenHighBit); + DECLARE_SSE_SIMD_CONST (float, kOne); + + //============================================================================== + static forcedinline __m128 JUCE_VECTOR_CALLTYPE expand (float s) noexcept { return _mm_load1_ps (&s); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE add (__m128 a, __m128 b) noexcept { return _mm_add_ps (a, b); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE sub (__m128 a, __m128 b) noexcept { return _mm_sub_ps (a, b); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE mul (__m128 a, __m128 b) noexcept { return _mm_mul_ps (a, b); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE bit_and (__m128 a, __m128 b) noexcept { return _mm_and_ps (a, b); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE bit_or (__m128 a, __m128 b) noexcept { return _mm_or_ps (a, b); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE bit_xor (__m128 a, __m128 b) noexcept { return _mm_xor_ps (a, b); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE bit_notand (__m128 a, __m128 b) noexcept { return _mm_andnot_ps (a, b); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE bit_not (__m128 a) noexcept { return bit_notand (a, _mm_loadu_ps ((float*) kAllBitsSet)); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE min (__m128 a, __m128 b) noexcept { return _mm_min_ps (a, b); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE max (__m128 a, __m128 b) noexcept { return _mm_max_ps (a, b); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE equal (__m128 a, __m128 b) noexcept { return _mm_cmpeq_ps (a, b); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE notEqual (__m128 a, __m128 b) noexcept { return _mm_cmpneq_ps (a, b); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE greaterThan (__m128 a, __m128 b) noexcept { return _mm_cmpgt_ps (a, b); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128 a, __m128 b) noexcept { return _mm_cmpge_ps (a, b); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE multiplyAdd (__m128 a, __m128 b, __m128 c) noexcept { return _mm_add_ps (a, _mm_mul_ps (b, c)); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE dupeven (__m128 a) noexcept { return _mm_shuffle_ps (a, a, _MM_SHUFFLE (2, 2, 0, 0)); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE dupodd (__m128 a) noexcept { return _mm_shuffle_ps (a, a, _MM_SHUFFLE (3, 3, 1, 1)); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE swapevenodd (__m128 a) noexcept { return _mm_shuffle_ps (a, a, _MM_SHUFFLE (2, 3, 0, 1)); } + static forcedinline __m128 JUCE_VECTOR_CALLTYPE oddevensum (__m128 a) noexcept { return _mm_add_ps (_mm_shuffle_ps (a, a, _MM_SHUFFLE (1, 0, 3, 2)), a); } + + //============================================================================== + static forcedinline __m128 JUCE_VECTOR_CALLTYPE cmplxmul (__m128 a, __m128 b) noexcept + { + __m128 rr_ir = mul (a, dupeven (b)); + __m128 ii_ri = mul (swapevenodd (a), dupodd (b)); + return add (rr_ir, bit_xor (ii_ri, _mm_loadu_ps ((float*) kEvenHighBit))); + } + + static forcedinline float JUCE_VECTOR_CALLTYPE sum (__m128 a) noexcept + { + #if defined(__SSE4__) + __m128 retval = _mm_dp_ps (a, _mm_loadu_ps (kOne), 0xff); + #elif defined(__SSE3__) + __m128 retval = _mm_hadd_ps (_mm_hadd_ps (a, a), a); + #else + __m128 retval = _mm_add_ps (_mm_shuffle_ps (a, a, 0x4e), a); + retval = _mm_add_ps (retval, _mm_shuffle_ps (retval, retval, 0xb1)); + #endif + return ((float*) &retval) [0]; + } +}; + +//============================================================================== +/** Double-precision floating point SSE intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m128d vSIMDType; + + //============================================================================== + DECLARE_SSE_SIMD_CONST (int64_t, kAllBitsSet); + DECLARE_SSE_SIMD_CONST (int64_t, kEvenHighBit); + DECLARE_SSE_SIMD_CONST (double, kOne); + + //============================================================================== + static forcedinline __m128d JUCE_VECTOR_CALLTYPE vconst (const double* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE expand (double s) noexcept { return _mm_load1_pd (&s); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE add (__m128d a, __m128d b) noexcept { return _mm_add_pd (a, b); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE sub (__m128d a, __m128d b) noexcept { return _mm_sub_pd (a, b); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE mul (__m128d a, __m128d b) noexcept { return _mm_mul_pd (a, b); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE bit_and (__m128d a, __m128d b) noexcept { return _mm_and_pd (a, b); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE bit_or (__m128d a, __m128d b) noexcept { return _mm_or_pd (a, b); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE bit_xor (__m128d a, __m128d b) noexcept { return _mm_xor_pd (a, b); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE bit_notand (__m128d a, __m128d b) noexcept { return _mm_andnot_pd (a, b); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE bit_not (__m128d a) noexcept { return bit_notand (a, vconst (kAllBitsSet)); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE min (__m128d a, __m128d b) noexcept { return _mm_min_pd (a, b); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE max (__m128d a, __m128d b) noexcept { return _mm_max_pd (a, b); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE equal (__m128d a, __m128d b) noexcept { return _mm_cmpeq_pd (a, b); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE notEqual (__m128d a, __m128d b) noexcept { return _mm_cmpneq_pd (a, b); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE greaterThan (__m128d a, __m128d b) noexcept { return _mm_cmpgt_pd (a, b); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128d a, __m128d b) noexcept { return _mm_cmpge_pd (a, b); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE multiplyAdd (__m128d a, __m128d b, __m128d c) noexcept { return _mm_add_pd (a, _mm_mul_pd (b, c)); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE dupeven (__m128d a) noexcept { return _mm_shuffle_pd (a, a, _MM_SHUFFLE2 (0, 0)); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE dupodd (__m128d a) noexcept { return _mm_shuffle_pd (a, a, _MM_SHUFFLE2 (1, 1)); } + static forcedinline __m128d JUCE_VECTOR_CALLTYPE swapevenodd (__m128d a) noexcept { return _mm_shuffle_pd (a, a, _MM_SHUFFLE2 (0, 1)); } + static forcedinline __m128d oddevensum (__m128d a) noexcept { return a; } + + //============================================================================== + static forcedinline __m128d JUCE_VECTOR_CALLTYPE cmplxmul (__m128d a, __m128d b) noexcept + { + __m128d rr_ir = mul (a, dupeven (b)); + __m128d ii_ri = mul (swapevenodd (a), dupodd (b)); + return add (rr_ir, bit_xor (ii_ri, vconst (kEvenHighBit))); + } + + static forcedinline double JUCE_VECTOR_CALLTYPE sum (__m128d a) noexcept + { + #if defined(__SSE4__) + __m128d retval = _mm_dp_pd (a, vconst (kOne), 0xff); + #elif defined(__SSE3__) + __m128d retval = _mm_hadd_pd (a, a); + #else + __m128d retval = _mm_add_pd (_mm_shuffle_pd (a, a, 0x01), a); + #endif + return ((double*) &retval) [0]; + } +}; + +//============================================================================== +/** Signed 8-bit integer SSE intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m128i vSIMDType; + + //============================================================================== + DECLARE_SSE_SIMD_CONST (int8_t, kAllBitsSet); + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int8_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int8_t s) noexcept { return _mm_set1_epi8 (s); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi8 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi8 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or (__m128i a, __m128i b) noexcept { return _mm_or_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); } + #if defined(__SSE4__) + static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { return _mm_min_epi8 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { return _mm_max_epi8 (a, b); } + #else + static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { __m128i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { __m128i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); } + #endif + static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept { return _mm_cmpeq_epi8 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept { return _mm_cmpgt_epi8 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline int8_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept + { + #ifdef __SSSE3__ + __m128i lo = _mm_unpacklo_epi8 (a, _mm_setzero_si128()); + __m128i hi = _mm_unpackhi_epi8 (a, _mm_setzero_si128()); + + for (int i = 0; i < 3; ++i) + { + lo = _mm_hadd_epi16 (lo, lo); + hi = _mm_hadd_epi16 (hi, hi); + } + + const int8_t* lo_ptr = reinterpret_cast (&lo); + const int8_t* hi_ptr = reinterpret_cast (&hi); + + return lo_ptr[0] + hi_ptr[0]; + #else + int8_t sum = 0; + const int8_t* src = reinterpret_cast (&a); + + for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(int8_t)); ++i) + sum += src [i]; + + return sum; + #endif + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) + { + // unpack and multiply + __m128i even = _mm_mullo_epi16 (a, b); + __m128i odd = _mm_mullo_epi16 (_mm_srli_epi16 (a, 8), _mm_srli_epi16 (b, 8)); + + return _mm_or_si128 (_mm_slli_epi16 (odd, 8), + _mm_srli_epi16 (_mm_slli_epi16 (even, 8), 8)); + } +}; + +//============================================================================== +/** Unsigned 8-bit integer SSE intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m128i vSIMDType; + + //============================================================================== + DECLARE_SSE_SIMD_CONST (uint8_t, kHighBit); + DECLARE_SSE_SIMD_CONST (uint8_t, kAllBitsSet); + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint8_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint8_t s) noexcept { return _mm_set1_epi8 ((int8_t) s); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi8 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi8 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or (__m128i a, __m128i b) noexcept { return _mm_or_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { return _mm_min_epu8 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { return _mm_max_epu8 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept { return _mm_cmpeq_epi8 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept { return _mm_cmpgt_epi8 (ssign (a), ssign (b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline uint8_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept + { + #ifdef __SSSE3__ + __m128i lo = _mm_unpacklo_epi8 (a, _mm_setzero_si128()); + __m128i hi = _mm_unpackhi_epi8 (a, _mm_setzero_si128()); + + for (int i = 0; i < 3; ++i) + { + lo = _mm_hadd_epi16 (lo, lo); + hi = _mm_hadd_epi16 (hi, hi); + } + + const uint8_t* lo_ptr = reinterpret_cast (&lo); + const uint8_t* hi_ptr = reinterpret_cast (&hi); + + return lo_ptr[0] + hi_ptr[0]; + #else + uint8_t sum = 0; + const uint8_t* src = reinterpret_cast (&a); + + for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(int8_t)); ++i) + sum += src [i]; + + return sum; + #endif + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) + { + // unpack and multiply + __m128i even = _mm_mullo_epi16 (a, b); + __m128i odd = _mm_mullo_epi16 (_mm_srli_epi16 (a, 8), _mm_srli_epi16 (b, 8)); + + return _mm_or_si128 (_mm_slli_epi16 (odd, 8), + _mm_srli_epi16 (_mm_slli_epi16 (even, 8), 8)); + } +}; + +//============================================================================== +/** Signed 16-bit integer SSE intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m128i vSIMDType; + + //============================================================================== + DECLARE_SSE_SIMD_CONST (int16_t, kAllBitsSet); + + //============================================================================== + static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int16_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int16_t s) noexcept { return _mm_set1_epi16 (s); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi16 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi16 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept { return _mm_mullo_epi16 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or (__m128i a, __m128i b) noexcept { return _mm_or_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { return _mm_min_epi16 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { return _mm_max_epi16 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept { return _mm_cmpeq_epi16 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept { return _mm_cmpgt_epi16 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline int16_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept + { + #ifdef __SSSE3__ + __m128i tmp = _mm_hadd_epi16 (a, a); + tmp = _mm_hadd_epi16 (tmp, tmp); + tmp = _mm_hadd_epi16 (tmp, tmp); + return *reinterpret_cast (&tmp); + + #else + int16_t sum = 0; + const int16_t* src = reinterpret_cast (&a); + + for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(int16_t)); ++i) + sum += src [i]; + + return sum; + #endif + } +}; + +//============================================================================== +/** Unsigned 16-bit integer SSE intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m128i vSIMDType; + + //============================================================================== + DECLARE_SSE_SIMD_CONST (uint16_t, kHighBit); + DECLARE_SSE_SIMD_CONST (uint16_t, kAllBitsSet); + + //============================================================================== + static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint16_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint16_t s) noexcept { return _mm_set1_epi16 ((int16_t) s); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi16 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi16 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept { return _mm_mullo_epi16 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or (__m128i a, __m128i b) noexcept { return _mm_or_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); } + #if defined(__SSE4__) + static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { return _mm_min_epu16 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { return _mm_max_epu16 (a, b); } + #else + static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { __m128i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { __m128i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); } + #endif + static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept { return _mm_cmpeq_epi16 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept { return _mm_cmpgt_epi16 (ssign (a), ssign (b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline uint16_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept + { + #ifdef __SSSE3__ + __m128i tmp = _mm_hadd_epi16 (a, a); + tmp = _mm_hadd_epi16 (tmp, tmp); + tmp = _mm_hadd_epi16 (tmp, tmp); + return *reinterpret_cast (&tmp); + #else + uint16_t sum = 0; + const uint16_t* src = reinterpret_cast (&a); + + for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(uint16_t)); ++i) + sum += src [i]; + + return sum; + #endif + } +}; + +//============================================================================== +/** Signed 32-bit integer SSE intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m128i vSIMDType; + + //============================================================================== + DECLARE_SSE_SIMD_CONST (int32_t, kAllBitsSet); + + //============================================================================== + static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int32_t s) noexcept { return _mm_set1_epi32 (s); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi32 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi32 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or (__m128i a, __m128i b) noexcept { return _mm_or_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept { return _mm_cmpeq_epi32 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept { return _mm_cmpgt_epi32 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline int32_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept + { + #ifdef __SSSE3__ + __m128i tmp = _mm_hadd_epi32 (a, a); + tmp = _mm_hadd_epi32 (tmp, tmp); + return *reinterpret_cast (&tmp); + #else + int32_t sum = 0; + const int32_t* src = reinterpret_cast (&a); + + for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(int32_t)); ++i) + sum += src [i]; + + return sum; + #endif + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept + { + #if defined(__SSE4_1__) + return _mm_mullo_epi32 (a, b); + #else + __m128i even = _mm_mul_epu32 (a,b); + __m128i odd = _mm_mul_epu32 (_mm_srli_si128 (a,4), _mm_srli_si128 (b,4)); + return _mm_unpacklo_epi32 (_mm_shuffle_epi32(even, _MM_SHUFFLE (0,0,2,0)), + _mm_shuffle_epi32(odd, _MM_SHUFFLE (0,0,2,0))); + #endif + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept + { + #if defined(__SSE4_1__) + return _mm_min_epi32 (a, b); + #else + __m128i lt = greaterThan (b, a); + return bit_or (bit_and (lt, a), bit_andnot (lt, b)); + #endif + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept + { + #if defined(__SSE4_1__) + return _mm_max_epi32 (a, b); + #else + __m128i gt = greaterThan (a, b); + return bit_or (bit_and (gt, a), bit_andnot (gt, b)); + #endif + } +}; + +//============================================================================== +/** Unsigned 32-bit integer SSE intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m128i vSIMDType; + + //============================================================================== + DECLARE_SSE_SIMD_CONST (uint32_t, kAllBitsSet); + DECLARE_SSE_SIMD_CONST (uint32_t, kHighBit); + + //============================================================================== + static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint32_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint32_t s) noexcept { return _mm_set1_epi32 ((int32_t) s); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi32 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi32 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or (__m128i a, __m128i b) noexcept { return _mm_or_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept { return _mm_cmpeq_epi32 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept { return _mm_cmpgt_epi32 (ssign (a), ssign (b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline uint32_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept + { + #ifdef __SSSE3__ + __m128i tmp = _mm_hadd_epi32 (a, a); + tmp = _mm_hadd_epi32 (tmp, tmp); + return *reinterpret_cast (&tmp); + #else + uint32_t sum = 0; + const uint32_t* src = reinterpret_cast (&a); + + for (std::size_t i = 0; i < (sizeof (vSIMDType) / sizeof(uint32_t)); ++i) + sum += src [i]; + + return sum; + #endif + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept + { + #if defined(__SSE4_1__) + return _mm_mullo_epi32 (a, b); + #else + __m128i even = _mm_mul_epu32 (a,b); + __m128i odd = _mm_mul_epu32 (_mm_srli_si128 (a,4), _mm_srli_si128 (b,4)); + return _mm_unpacklo_epi32 (_mm_shuffle_epi32(even, _MM_SHUFFLE (0,0,2,0)), + _mm_shuffle_epi32(odd, _MM_SHUFFLE (0,0,2,0))); + #endif + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept + { + #if defined(__SSE4_1__) + return _mm_min_epi32 (a, b); + #else + __m128i lt = greaterThan (b, a); + return bit_or (bit_and (lt, a), bit_andnot (lt, b)); + #endif + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept + { + #if defined(__SSE4_1__) + return _mm_max_epi32 (a, b); + #else + __m128i gt = greaterThan (a, b); + return bit_or (bit_and (gt, a), bit_andnot (gt, b)); + #endif + } +}; + +//============================================================================== +/** Signed 64-bit integer SSE intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m128i vSIMDType; + + //============================================================================== + DECLARE_SSE_SIMD_CONST (int64_t, kAllBitsSet); + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int64_t s) noexcept + { + __m128i retval; + int64_t* ptr = reinterpret_cast (&retval); + ptr[0] = ptr[1] = s; + return retval; + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi64 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi64 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or (__m128i a, __m128i b) noexcept { return _mm_or_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { __m128i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { __m128i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); } + static forcedinline __m128i greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline int64_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept + { + const int64_t* ptr = reinterpret_cast (&a); + return ptr[0] + ptr[1]; + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept + { + __m128i retval; + + const int64_t* aptr = reinterpret_cast (&a); + const int64_t* bptr = reinterpret_cast (&b); + int64_t* dst = reinterpret_cast (&retval); + + dst[0] = aptr[0] * bptr[0]; + dst[1] = aptr[1] * bptr[1]; + + return retval; + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept + { + #if defined(__SSE4_1__) + return _mm_cmpeq_epi64 (a, b); + #else + __m128i bitmask = _mm_cmpeq_epi32 (a, b); + bitmask = _mm_and_si128 (bitmask, _mm_shuffle_epi32 (bitmask, _MM_SHUFFLE (2, 3, 0, 1))); + return _mm_shuffle_epi32 (bitmask, _MM_SHUFFLE (2, 2, 0, 0)); + #endif + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept + { + #if defined(__SSE4_1__) && !defined(__clang__) + return _mm_cmpgt_epi64 (a, b); + #else + __m128i retval; + + const int64_t* aptr = reinterpret_cast (&a); + const int64_t* bptr = reinterpret_cast (&b); + int64_t* dst = reinterpret_cast (&retval); + + dst[0] = aptr[0] > bptr[0] ? -1LL : 0; + dst[1] = aptr[1] > bptr[1] ? -1LL : 0; + + return retval; + #endif + } +}; + +//============================================================================== +/** Unsigned 64-bit integer SSE intrinsics. */ +template <> +struct SIMDNativeOps +{ + //============================================================================== + typedef __m128i vSIMDType; + + //============================================================================== + DECLARE_SSE_SIMD_CONST (uint64_t, kAllBitsSet); + DECLARE_SSE_SIMD_CONST (uint64_t, kHighBit); + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint64_t s) noexcept + { + __m128i retval; + uint64_t* ptr = reinterpret_cast (&retval); + ptr[0] = ptr[1] = s; + return retval; + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint64_t* a) noexcept { return *reinterpret_cast (a); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi64 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi64 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_or (__m128i a, __m128i b) noexcept { return _mm_or_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { __m128i lt = greaterThan (b, a); return bit_or (bit_and (lt, a), bit_andnot (lt, b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { __m128i gt = greaterThan (a, b); return bit_or (bit_and (gt, a), bit_andnot (gt, b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThanOrEqual (__m128i a, __m128i b) noexcept { return bit_or (greaterThan (a, b), equal (a,b)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE multiplyAdd (__m128i a, __m128i b, __m128i c) noexcept { return add (a, mul (b, c)); } + static forcedinline __m128i JUCE_VECTOR_CALLTYPE notEqual (__m128i a, __m128i b) noexcept { return bit_not (equal (a, b)); } + + //============================================================================== + static forcedinline uint64_t JUCE_VECTOR_CALLTYPE sum (__m128i a) noexcept + { + const uint64_t* ptr = reinterpret_cast (&a); + return ptr[0] + ptr[1]; + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept + { + __m128i retval; + + const uint64_t* aptr = reinterpret_cast (&a); + const uint64_t* bptr = reinterpret_cast (&b); + uint64_t* dst = reinterpret_cast (&retval); + + dst[0] = aptr[0] * bptr[0]; + dst[1] = aptr[1] * bptr[1]; + + return retval; + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept + { + #if defined(__SSE4_1__) + return _mm_cmpeq_epi64 (a, b); + #else + __m128i bitmask = _mm_cmpeq_epi32 (a, b); + bitmask = _mm_and_si128 (bitmask, _mm_shuffle_epi32 (bitmask, _MM_SHUFFLE (2, 3, 0, 1))); + return _mm_shuffle_epi32 (bitmask, _MM_SHUFFLE (2, 2, 0, 0)); + #endif + } + + static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept + { + #if defined(__SSE4_1__) && !defined(__clang__) + return _mm_cmpgt_epi64 (a, b); + #else + __m128i retval; + + const uint64_t* aptr = reinterpret_cast (&a); + const uint64_t* bptr = reinterpret_cast (&b); + uint64_t* dst = reinterpret_cast (&retval); + + dst[0] = aptr[0] > bptr[0] ? (uint64_t) -1LL : 0; + dst[1] = aptr[1] > bptr[1] ? (uint64_t) -1LL : 0; + + return retval; + #endif + } +}; + +#endif diff --git a/modules/juce_dsp/processors/juce_Bias.h b/modules/juce_dsp/processors/juce_Bias.h new file mode 100644 index 0000000000..8dfb773790 --- /dev/null +++ b/modules/juce_dsp/processors/juce_Bias.h @@ -0,0 +1,138 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + Adds a DC offset (voltage bias) to the audio samples. + + This is a useful preprocessor for asymmetric waveshaping when a waveshaper is + bookended by a bias on input and a DC-offset removing high pass filter on output. + + This is an extremely simple bias implementation that simply adds a value to a signal. + More complicated bias behaviours exist in real circuits - for your homework ;). +*/ +template +class Bias +{ +public: + Bias() noexcept {} + + //============================================================================== + /** Sets the DC bias + @param newBias DC offset in range [-1, 1] + */ + void setBias (FloatType newBias) noexcept + { + jassert (newBias >= static_cast (-1) && newBias <= static_cast (1)); + bias.setValue(newBias); + } + + //============================================================================== + /** Returns the DC bias + @return DC bias, which should be in the range [-1, 1] + */ + FloatType getBias() const noexcept { return bias.getTargetValue(); } + + /** Sets the length of the ramp used for smoothing gain changes. */ + void setRampDurationSeconds (double newDurationSeconds) noexcept + { + if (rampDurationSeconds != newDurationSeconds) + { + rampDurationSeconds = newDurationSeconds; + updateRamp(); + } + } + + double getRampDurationSeconds() const noexcept { return rampDurationSeconds; } + + //============================================================================== + /** Called before processing starts */ + void prepare (const ProcessSpec& spec) noexcept + { + sampleRate = spec.sampleRate; + updateRamp(); + } + + void reset() noexcept + { + } + + //============================================================================== + /** Returns the result of processing a single sample. */ + template + SampleType processSample (SampleType inputSample) const noexcept + { + return inputSample + bias.getNextValue(); + } + + //============================================================================== + /** Processes the input and output buffers supplied in the processing context. */ + template + void process (const ProcessContext& context) noexcept + { + auto&& inBlock = context.getInputBlock(); + auto&& outBlock = context.getOutputBlock(); + + jassert (inBlock.getNumChannels() == outBlock.getNumChannels()); + jassert (inBlock.getNumSamples() == outBlock.getNumSamples()); + + auto len = inBlock.getNumSamples(); + auto numChannels = inBlock.getNumChannels(); + + if (numChannels == 1) + { + auto* src = inBlock.getChannelPointer (0); + auto* dst = outBlock.getChannelPointer (0); + + for (size_t i = 0; i < len; ++i) + dst[i] = src[i] + bias.getNextValue(); + } + else + { + auto* biases = static_cast (alloca (sizeof (FloatType) * len)); + + for (size_t i = 0; i < len; ++i) + biases[i] = bias.getNextValue(); + + for (size_t chan = 0; chan < numChannels; ++chan) + FloatVectorOperations::add (outBlock.getChannelPointer (chan), + inBlock.getChannelPointer (chan), + biases, static_cast (len)); + } + } + + +private: + //============================================================================== + LinearSmoothedValue bias; + double sampleRate = 0, rampDurationSeconds = 0; + + void updateRamp() noexcept + { + if (sampleRate > 0) + bias.reset (sampleRate, rampDurationSeconds); + } +}; diff --git a/modules/juce_dsp/processors/juce_FIRFilter.cpp b/modules/juce_dsp/processors/juce_FIRFilter.cpp new file mode 100644 index 0000000000..c0008b2bbe --- /dev/null +++ b/modules/juce_dsp/processors/juce_FIRFilter.cpp @@ -0,0 +1,155 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +template +double FIR::Coefficients::Coefficients::getMagnitudeForFrequency (double frequency, double theSampleRate) const noexcept +{ + jassert (theSampleRate > 0.0); + jassert (frequency >= 0.0 && frequency <= theSampleRate * 0.5); + + constexpr Complex j (0, 1); + auto order = getFilterOrder(); + + Complex numerator = 0.0, factor = 1.0; + Complex jw = std::exp (-2.0 * double_Pi * frequency * j / theSampleRate); + + const auto* coefs = coefficients.begin(); + + for (size_t n = 0; n <= order; ++n) + { + numerator += static_cast (coefs[n]) * factor; + factor *= jw; + } + + return std::abs (numerator); +} + +//============================================================================== +template +void FIR::Coefficients::Coefficients::getMagnitudeForFrequencyArray (double* frequencies, double* magnitudes, + size_t numSamples, double theSampleRate) const noexcept +{ + jassert (theSampleRate > 0.0); + + constexpr Complex j (0, 1); + const auto* coefs = coefficients.begin(); + auto order = getFilterOrder(); + + for (size_t i = 0; i < numSamples; ++i) + { + jassert (frequencies[i] >= 0.0 && frequencies[i] <= theSampleRate * 0.5); + + Complex numerator = 0.0; + Complex factor = 1.0; + Complex jw = std::exp (-2.0 * double_Pi * frequencies[i] * j / theSampleRate); + + for (size_t n = 0; n <= order; ++n) + { + numerator += static_cast (coefs[n]) * factor; + factor *= jw; + } + + magnitudes[i] = std::abs (numerator); + } +} + +//============================================================================== +template +double FIR::Coefficients::Coefficients::getPhaseForFrequency (double frequency, double theSampleRate) const noexcept +{ + jassert (theSampleRate > 0.0); + jassert (frequency >= 0.0 && frequency <= theSampleRate * 0.5); + + constexpr Complex j (0, 1); + + Complex numerator = 0.0; + Complex factor = 1.0; + Complex jw = std::exp (-2.0 * double_Pi * frequency * j / theSampleRate); + + const auto* coefs = coefficients.begin(); + auto order = getFilterOrder(); + + for (size_t n = 0; n <= order; ++n) + { + numerator += static_cast (coefs[n]) * factor; + factor *= jw; + } + + return std::arg (numerator); +} + +//============================================================================== +template +void FIR::Coefficients::Coefficients::getPhaseForFrequencyArray (double* frequencies, double* phases, + size_t numSamples, double theSampleRate) const noexcept +{ + jassert (theSampleRate > 0.0); + + constexpr Complex j (0, 1); + const auto* coefs = coefficients.begin(); + auto order = getFilterOrder(); + + for (size_t i = 0; i < numSamples; ++i) + { + jassert (frequencies[i] >= 0.0 && frequencies[i] <= theSampleRate * 0.5); + + Complex numerator = 0.0, factor = 1.0; + Complex jw = std::exp (-2.0 * double_Pi * frequencies[i] * j / theSampleRate); + + for (size_t n = 0; n <= order; ++n) + { + numerator += static_cast (coefs[n]) * factor; + factor *= jw; + } + + phases[i] = std::arg (numerator); + } +} + +//============================================================================== +template +void FIR::Coefficients::Coefficients::normalise() noexcept +{ + auto magnitude = static_cast (0); + + auto* coefs = coefficients.getRawDataPointer(); + auto n = static_cast (coefficients.size()); + + for (size_t i = 0; i < n; ++i) + { + auto c = coefs[i]; + magnitude += c * c; + } + + auto magnitudeInv = 1 / (4 * std::sqrt (magnitude)); + + FloatVectorOperations::multiply (coefs, magnitudeInv, static_cast (n)); +} + +//============================================================================== +template struct FIR::Coefficients; +template struct FIR::Coefficients; diff --git a/modules/juce_dsp/processors/juce_FIRFilter.h b/modules/juce_dsp/processors/juce_FIRFilter.h new file mode 100644 index 0000000000..902ff437df --- /dev/null +++ b/modules/juce_dsp/processors/juce_FIRFilter.h @@ -0,0 +1,276 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + Classes for FIR filter processing. +*/ +namespace FIR +{ + template + struct Coefficients; + + //============================================================================== + /** + A processing class that can perform FIR filtering on an audio signal, in the + time domain. + + Using FIRFilter is fast enough for FIRCoefficients with a size lower than 128 + samples. For longer filters, it might be more efficient to use the class + Convolution instead, which does the same processing in the frequency domain + thanks to FFT. + + @see FIRFilter::Coefficients, Convolution, FFT + */ + template + class Filter + { + public: + /** The NumericType is the underlying primitive type used by the SampleType (which + could be either a primitive or vector) + */ + using NumericType = typename SampleTypeHelpers::ElementType::Type; + + //============================================================================== + /** This will create a filter which will produce silence. */ + Filter() : coefficients (new Coefficients) { reset(); } + + /** Creates a filter with a given set of coefficients. */ + Filter (Coefficients* coefficientsToUse) : coefficients (coefficientsToUse) { reset(); } + + /** Creates a copy of another filter. */ + Filter (const Filter&) = default; + + /** Creates a copy of another filter. */ + Filter (Filter&&) = default; + + /** Assignment operator */ + Filter& operator= (const Filter&) = default; + + /** Assignment operator */ + Filter& operator= (Filter&&) = default; + + //============================================================================== + /** Prepare this filter for processing. */ + inline void prepare (const ProcessSpec& spec) noexcept + { + // This class can only process mono signals. Use the ProcessorDuplicator class + // to apply this filter on a multi-channel audio stream. + jassert (spec.numChannels == 1); + ignoreUnused (spec); + reset(); + } + + /** Resets the filter's processing pipeline, ready to start a new stream of data. + + Note that this clears the processing state, but the type of filter and + its coefficients aren't changed. To disable the filter, call setEnabled (false). + */ + void reset() + { + if (coefficients != nullptr) + { + auto newSize = coefficients->getFilterOrder() + 1; + + if (newSize != size) + { + memory.malloc (1 + jmax (newSize, size, static_cast (128))); + + fifo = snapPointerToAlignment (memory.getData(), sizeof (SampleType)); + size = newSize; + } + + for (size_t i = 0; i < size; ++i) + fifo[i] = SampleType {0}; + } + } + + //============================================================================== + /** The coefficients of the FIR filter. It's up to the called to ensure that + these coefficients are modified in a thread-safe way. + + If you change the order of the coefficients then you must call reset after + modifying them. + */ + typename Coefficients::Ptr coefficients; + + //============================================================================== + /** Processes as a block of samples */ + template + void process (const ProcessContext& context) noexcept + { + static_assert (std::is_same::value, + "The sample-type of the FIR filter must match the sample-type supplied to this process callback"); + check(); + + auto&& inputBlock = context.getInputBlock(); + auto&& outputBlock = context.getOutputBlock(); + + // This class can only process mono signals. Use the ProcessorDuplicator class + // to apply this filter on a multi-channel audio stream. + jassert (inputBlock.getNumChannels() == 1); + jassert (outputBlock.getNumChannels() == 1); + + auto numSamples = inputBlock.getNumSamples(); + auto* src = inputBlock .getChannelPointer (0); + auto* dst = outputBlock.getChannelPointer (0); + + auto* fir = coefficients->getRawCoefficients(); + size_t p = pos; + + for (size_t i = 0; i < numSamples; ++i) + dst[i] = processSingleSample (src[i], fifo, fir, size, p); + + pos = p; + } + + + /** Processes a single sample, without any locking. + Use this if you need processing of a single value. + */ + SampleType JUCE_VECTOR_CALLTYPE processSample (SampleType sample) noexcept + { + check(); + return processSingleSample (sample, fifo, coefficients->getRawCoefficients(), size, pos); + } + + private: + //============================================================================== + HeapBlock memory; + SampleType* fifo = nullptr; + size_t pos = 0, size = 0; + + //============================================================================== + void check() + { + jassert (coefficients != nullptr); + + if (size != (coefficients->getFilterOrder() + 1)) + reset(); + } + + static SampleType JUCE_VECTOR_CALLTYPE processSingleSample (SampleType sample, SampleType* buf, + const NumericType* fir, size_t m, size_t& p) noexcept + { + SampleType out = {}; + + buf[p] = sample; + + size_t k; + for (k = 0; k < m - p; ++k) + out += buf[(p + k)] * fir[k]; + + for (size_t j = 0; j < p; ++j) + out += buf[j] * fir[j + k]; + + p = (p == 0 ? m - 1 : p - 1); + + return out; + } + + + JUCE_LEAK_DETECTOR (Filter) + }; + + //============================================================================== + /** + A set of coefficients for use in an FIRFilter object. + + @see FIRFilter + */ + template + struct Coefficients : public ProcessorState + { + //============================================================================== + /** Creates a null set of coefficients (which will produce silence). */ + Coefficients() : coefficients ({ NumericType() }) {} + + /** Creates a null set of coefficients of a given size. */ + Coefficients (size_t size) { coefficients.resize ((int) size); } + + /** Creates a copy of another filter. */ + Coefficients (const Coefficients&) = default; + + /** Move constructor. */ + Coefficients (Coefficients&&) = default; + + /** Creates a set of coefficients from an array of samples. */ + Coefficients (const NumericType* samples, size_t numSamples) : coefficients (samples, (int) numSamples) {} + + /** Creates a copy of another filter. */ + Coefficients& operator= (const Coefficients& other) { coefficients = other.coefficients; return *this; } + + /** Creates a copy of another filter. */ + Coefficients& operator= (Coefficients&&) = default; + + /** The Coefficients structure is ref-counted, so this is a handy type that can be used + as a pointer to one. + */ + using Ptr = ReferenceCountedObjectPtr; + + //============================================================================== + /** Returns the filter order associated with the coefficients. */ + size_t getFilterOrder() const noexcept { return static_cast (coefficients.size()) - 1; } + + /** Returns the magnitude frequency response of the filter for a given frequency + and sample rate. + */ + double getMagnitudeForFrequency (double frequency, double sampleRate) const noexcept; + + /** Returns the magnitude frequency response of the filter for a given frequency array + and sample rate. + */ + void getMagnitudeForFrequencyArray (double* frequencies, double* magnitudes, + size_t numSamples, double sampleRate) const noexcept; + + /** Returns the phase frequency response of the filter for a given frequency and + sample rate. + */ + double getPhaseForFrequency (double frequency, double sampleRate) const noexcept; + + /** Returns the phase frequency response of the filter for a given frequency array + and sample rate. + */ + void getPhaseForFrequencyArray (double* frequencies, double* phases, + size_t numSamples, double sampleRate) const noexcept; + + /** Returns a raw data pointer to the coefficients. */ + NumericType* getRawCoefficients() noexcept { return coefficients.getRawDataPointer(); } + + /** Returns a raw data pointer to the coefficients. */ + const NumericType* getRawCoefficients() const noexcept { return coefficients.begin(); } + + //============================================================================== + /** Scales the values of the FIR filter with the sum of the squared coefficients. */ + void normalise() noexcept; + + //============================================================================== + /** The raw coefficients. + You should leave these numbers alone unless you really know what you're doing. + */ + Array coefficients; + }; +} diff --git a/modules/juce_dsp/processors/juce_FIRFilter_test.cpp b/modules/juce_dsp/processors/juce_FIRFilter_test.cpp new file mode 100644 index 0000000000..b1fc1ddfc9 --- /dev/null +++ b/modules/juce_dsp/processors/juce_FIRFilter_test.cpp @@ -0,0 +1,203 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +class FIRFilterTest : public UnitTest +{ + template + struct Helpers + { + static void fillRandom (Random& random, Type* buffer, size_t n) + { + for (size_t i = 0; i < n; ++i) + buffer[i] = (2.0f * random.nextFloat()) - 1.0f; + } + + static bool checkArrayIsSimilar (Type* a, Type* b, size_t n) noexcept + { + for (size_t i = 0; i < n; ++i) + if (std::abs (a[i] - b[i]) > 1e-6f) + return false; + + return true; + } + }; + + template + struct Helpers> + { + static void fillRandom (Random& random, SIMDRegister* buffer, size_t n) + { + Helpers::fillRandom (random, reinterpret_cast (buffer), n * SIMDRegister::size()); + } + + static bool checkArrayIsSimilar (SIMDRegister* a, SIMDRegister* b, size_t n) noexcept + { + return Helpers::checkArrayIsSimilar (reinterpret_cast (a), + reinterpret_cast (b), + n * SIMDRegister::size()); + } + }; + + template + static void fillRandom (Random& random, Type* buffer, size_t n) { Helpers::fillRandom (random, buffer, n); } + + template + static bool checkArrayIsSimilar (Type* a, Type* b, size_t n) noexcept { return Helpers::checkArrayIsSimilar (a, b, n); } + + //============================================================================== + // reference implementation of an FIR + template + static void reference (const NumericType* firCoefficients, size_t numCoefficients, + const SampleType* input, SampleType* output, size_t n) noexcept + { + if (numCoefficients == 0) + { + zeromem (output, sizeof (SampleType) * n); + return; + } + + HeapBlock scratchBuffer (numCoefficients + + (SIMDRegister::SIMDRegisterSize / sizeof (SampleType))); + SampleType* buffer = reinterpret_cast (SIMDRegister::getNextSIMDAlignedPtr (reinterpret_cast (scratchBuffer.getData()))); + + zeromem (buffer, sizeof (SampleType) * numCoefficients); + + for (size_t i = 0; i < n; ++i) + { + for (size_t j = (numCoefficients - 1); j >= 1; --j) + buffer[j] = buffer[j-1]; + + buffer[0] = input[i]; + + SampleType sum{}; + + for (size_t j = 0; j < numCoefficients; ++j) + sum += buffer[j] * firCoefficients[j]; + + output[i] = sum; + } + } + + //============================================================================== + struct LargeBlockTest + { + template + static void run (FIR::Filter& filter, FloatType* src, FloatType* dst, size_t n) + { + AudioBlock input (&src, 1, n); + AudioBlock output (&dst, 1, n); + ProcessContextNonReplacing context (input, output); + + filter.process (context); + } + }; + + struct SampleBySampleTest + { + template + static void run (FIR::Filter& filter, FloatType* src, FloatType* dst, size_t n) + { + for (size_t i = 0; i < n; ++i) + dst[i] = filter.processSample (src[i]); + } + }; + + struct SplitBlockTest + { + template + static void run (FIR::Filter& filter, FloatType* input, FloatType* output, size_t n) + { + size_t len = 0; + for (size_t i = 0; i < n; i += len) + { + len = jmin (n - i, n / 3); + auto* src = input + i; + auto* dst = output + i; + + AudioBlock inBlock (&src, 1, len); + AudioBlock outBlock (&dst, 1, len); + ProcessContextNonReplacing context (inBlock, outBlock); + + filter.process (context); + } + } + }; + + //============================================================================== + template + void runTestForType () + { + Random random (8392829); + + for (auto size : {1, 2, 4, 8, 12, 13, 25}) + { + constexpr size_t n = 813; + + HeapBlock inputBuffer, outputBuffer, refBuffer; + AudioBlock input (inputBuffer, 1, n), output (outputBuffer, 1, n), ref (refBuffer, 1, n); + fillRandom (random, input.getChannelPointer (0), n); + + HeapBlock firBlock; + AudioBlock fir (firBlock, 1, static_cast (size)); + fillRandom (random, fir.getChannelPointer (0), static_cast (size)); + + FIR::Filter filter (new FIR::Coefficients (fir.getChannelPointer (0), static_cast (size))); + ProcessSpec spec {0.0, n, 1}; + filter.prepare (spec); + + reference (fir.getChannelPointer (0), static_cast (size), + input.getChannelPointer (0), ref.getChannelPointer (0), n); + + TheTest::template run (filter, input.getChannelPointer (0), output.getChannelPointer (0), n); + expect (checkArrayIsSimilar (output.getChannelPointer (0), ref.getChannelPointer (0), n)); + } + } + + template + void runTestForAllTypes (const char* unitTestName) + { + beginTest (unitTestName); + + runTestForType (); + runTestForType(); + runTestForType, float> (); + runTestForType, double>(); + } + + +public: + FIRFilterTest() : UnitTest ("FIR Filter") {} + + void runTest() override + { + runTestForAllTypes ("Large Blocks"); + runTestForAllTypes ("Sample by Sample"); + runTestForAllTypes ("Split Block"); + } +}; + +static FIRFilterTest firFilterUnitTest; diff --git a/modules/juce_dsp/processors/juce_Gain.h b/modules/juce_dsp/processors/juce_Gain.h new file mode 100644 index 0000000000..408043af6d --- /dev/null +++ b/modules/juce_dsp/processors/juce_Gain.h @@ -0,0 +1,127 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + Applies a gain to audio samples as single samples or AudioBlocks. +*/ +template +class Gain +{ +public: + Gain() noexcept {} + + //============================================================================== + /** Applies a new gain as a linear value. */ + void setGainLinear (FloatType newGain) noexcept { gain.setValue (newGain); } + + /** Applies a new gain as a decibel value. */ + void setGainDecibels (FloatType newGainDecibels) noexcept { setGainLinear (Decibels::decibelsToGain (newGainDecibels)); } + + /** Returns the current gain as a linear value. */ + FloatType getGainLinear() const noexcept { return gain.getTargetValue(); } + + /** Returns the current gain in decibels. */ + FloatType getGainDecibels() const noexcept { return Decibels::gainToDecibels (getGainLinear()); } + + /** Sets the length of the ramp used for smoothing gain changes. */ + void setRampDurationSeconds (double newDurationSeconds) noexcept + { + if (rampDurationSeconds != newDurationSeconds) + { + rampDurationSeconds = newDurationSeconds; + reset(); + } + } + + double getRampDurationSeconds() const noexcept { return rampDurationSeconds; } + + /** Returns true if the current value is currently being interpolated. */ + bool isSmoothing() const noexcept { return gain.isSmoothing(); } + + //============================================================================== + /** Called before processing starts. */ + void prepare (const ProcessSpec& spec) noexcept + { + sampleRate = spec.sampleRate; + reset(); + } + + /** Resets the internal state of the gain */ + void reset() noexcept + { + if (sampleRate > 0) + gain.reset (sampleRate, rampDurationSeconds); + } + + //============================================================================== + /** Returns the result of processing a single sample. */ + template + SampleType JUCE_VECTOR_CALLTYPE processSample (SampleType s) noexcept + { + return s * gain.getNextValue(); + } + + /** Processes the input and output buffers supplied in the processing context. */ + template + void process (const ProcessContext& context) noexcept + { + auto&& inBlock = context.getInputBlock(); + auto&& outBlock = context.getOutputBlock(); + + jassert (inBlock.getNumChannels() == outBlock.getNumChannels()); + jassert (inBlock.getNumSamples() == outBlock.getNumSamples()); + + auto len = inBlock.getNumSamples(); + auto numChannels = inBlock.getNumChannels(); + + if (numChannels == 1) + { + auto* src = inBlock.getChannelPointer (0); + auto* dst = outBlock.getChannelPointer (0); + + for (size_t i = 0; i < len; ++i) + dst[i] = src[i] * gain.getNextValue(); + } + else + { + auto* gains = static_cast (alloca (sizeof (FloatType) * len)); + + for (size_t i = 0; i < len; ++i) + gains[i] = gain.getNextValue(); + + for (size_t chan = 0; chan < numChannels; ++chan) + FloatVectorOperations::multiply (outBlock.getChannelPointer (chan), + inBlock.getChannelPointer (chan), + gains, static_cast (len)); + } + } + +private: + //============================================================================== + LinearSmoothedValue gain; + double sampleRate = 0, rampDurationSeconds = 0; +}; diff --git a/modules/juce_dsp/processors/juce_IIRFilter.cpp b/modules/juce_dsp/processors/juce_IIRFilter.cpp new file mode 100644 index 0000000000..beb7664e68 --- /dev/null +++ b/modules/juce_dsp/processors/juce_IIRFilter.cpp @@ -0,0 +1,484 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +template +IIR::Coefficients::Coefficients() + : coefficients ({ NumericType(), + NumericType(), + NumericType(), + NumericType(), + NumericType() }) +{ +} + +template +IIR::Coefficients::Coefficients (const Coefficients& other) + : coefficients (other.coefficients) +{ +} + +template +IIR::Coefficients& IIR::Coefficients::operator= (const Coefficients& other) +{ + coefficients = other.coefficients; + return *this; +} + +template +IIR::Coefficients::Coefficients (NumericType b0, NumericType b1, + NumericType a0, NumericType a1) +{ + jassert (a0 != 0); + + coefficients.clear(); + + auto a0inv = static_cast (1) / a0; + + coefficients.add (b0 * a0inv, + b1 * a0inv, + a1 * a0inv); +} + +template +IIR::Coefficients::Coefficients (NumericType b0, NumericType b1, NumericType b2, + NumericType a0, NumericType a1, NumericType a2) +{ + jassert (a0 != 0); + + coefficients.clear(); + + auto a0inv = static_cast (1) / a0; + + coefficients.add (b0 * a0inv, + b1 * a0inv, + b2 * a0inv, + a1 * a0inv, + a2 * a0inv); +} + +template +IIR::Coefficients::Coefficients (NumericType b0, NumericType b1, NumericType b2, NumericType b3, + NumericType a0, NumericType a1, NumericType a2, NumericType a3) +{ + jassert (a0 != 0); + + coefficients.clear(); + + auto a0inv = static_cast (1) / a0; + + coefficients.add (b0 * a0inv, + b1 * a0inv, + b2 * a0inv, + b3 * a0inv, + a1 * a0inv, + a2 * a0inv, + a3 * a0inv); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeFirstOrderLowPass (double sampleRate, + NumericType frequency) +{ + jassert (sampleRate > 0.0); + jassert (frequency > 0 && frequency <= static_cast (sampleRate * 0.5)); + + auto n = std::tan (MathConstants::pi * frequency / static_cast (sampleRate)); + + return new Coefficients (n, n, n + 1, n - 1); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeFirstOrderHighPass (double sampleRate, + NumericType frequency) +{ + jassert (sampleRate > 0.0); + jassert (frequency > 0 && frequency <= static_cast (sampleRate * 0.5)); + + auto n = std::tan (MathConstants::pi * frequency / static_cast (sampleRate)); + + return new Coefficients (1, -1, n + 1, n - 1); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeFirstOrderAllPass (double sampleRate, + NumericType frequency) +{ + jassert (sampleRate > 0.0); + jassert (frequency > 0 && frequency <= static_cast (sampleRate * 0.5)); + + auto n = std::tan (MathConstants::pi * frequency / static_cast (sampleRate)); + + return new Coefficients (n - 1, n + 1, n + 1, n - 1); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeLowPass (double sampleRate, + NumericType frequency) +{ + return makeLowPass (sampleRate, frequency, inverseRootTwo); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeLowPass (double sampleRate, + NumericType frequency, + NumericType Q) +{ + jassert (sampleRate > 0.0); + jassert (frequency > 0 && frequency <= static_cast (sampleRate * 0.5)); + jassert (Q > 0.0); + + auto n = 1 / std::tan (MathConstants::pi * frequency / static_cast (sampleRate)); + auto nSquared = n * n; + auto invQ = 1 / Q; + auto c1 = 1 / (1 + invQ * n + nSquared); + + return new Coefficients (c1, c1 * 2, c1, + 1, c1 * 2 * (1 - nSquared), + c1 * (1 - invQ * n + nSquared)); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeHighPass (double sampleRate, + NumericType frequency) +{ + return makeHighPass (sampleRate, frequency, inverseRootTwo); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeHighPass (double sampleRate, + NumericType frequency, + NumericType Q) +{ + jassert (sampleRate > 0.0); + jassert (frequency > 0 && frequency <= static_cast (sampleRate * 0.5)); + jassert (Q > 0.0); + + auto n = std::tan (MathConstants::pi * frequency / static_cast (sampleRate)); + auto nSquared = n * n; + auto invQ = 1 / Q; + auto c1 = 1 / (1 + invQ * n + nSquared); + + return new Coefficients (c1, c1 * -2, c1, + 1, c1 * 2 * (nSquared - 1), + c1 * (1 - invQ * n + nSquared)); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeBandPass (double sampleRate, + NumericType frequency) +{ + return makeBandPass (sampleRate, frequency, inverseRootTwo); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeBandPass (double sampleRate, + NumericType frequency, + NumericType Q) +{ + jassert (sampleRate > 0.0); + jassert (frequency > 0 && frequency <= static_cast (sampleRate * 0.5)); + jassert (Q > 0.0); + + auto n = 1 / std::tan (MathConstants::pi * frequency / static_cast (sampleRate)); + auto nSquared = n * n; + auto invQ = 1 / Q; + auto c1 = 1 / (1 + invQ * n + nSquared); + + return new Coefficients (c1 * n * invQ, 0, + -c1 * n * invQ, 1, + c1 * 2 * (1 - nSquared), + c1 * (1 - invQ * n + nSquared)); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeNotch (double sampleRate, + NumericType frequency) +{ + return makeNotch (sampleRate, frequency, inverseRootTwo); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeNotch (double sampleRate, + NumericType frequency, + NumericType Q) +{ + jassert (sampleRate > 0.0); + jassert (frequency > 0 && frequency <= static_cast (sampleRate * 0.5)); + jassert (Q > 0.0); + + auto n = 1 / std::tan (MathConstants::pi * frequency / static_cast (sampleRate)); + auto nSquared = n * n; + auto invQ = 1 / Q; + auto c1 = 1 / (1 + n * invQ + nSquared); + auto b0 = c1 * (1 + nSquared); + auto b1 = 2 * c1 * (1 - nSquared); + + return new Coefficients (b0, b1, b0, 1, b1, c1 * (1 - n * invQ + nSquared)); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeAllPass (double sampleRate, + NumericType frequency) +{ + return makeAllPass (sampleRate, frequency, inverseRootTwo); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeAllPass (double sampleRate, + NumericType frequency, + NumericType Q) +{ + jassert (sampleRate > 0); + jassert (frequency > 0 && frequency <= sampleRate * 0.5); + jassert (Q > 0); + + auto n = 1 / std::tan (MathConstants::pi * frequency / static_cast (sampleRate)); + auto nSquared = n * n; + auto invQ = 1 / Q; + auto c1 = 1 / (1 + invQ * n + nSquared); + auto b0 = c1 * (1 - n * invQ + nSquared); + auto b1 = c1 * 2 * (1 - nSquared); + + return new Coefficients (b0, b1, 1, 1, b1, b0); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeLowShelf (double sampleRate, + NumericType cutOffFrequency, + NumericType Q, + NumericType gainFactor) +{ + jassert (sampleRate > 0.0); + jassert (cutOffFrequency > 0.0 && cutOffFrequency <= sampleRate * 0.5); + jassert (Q > 0.0); + + auto A = jmax (static_cast (0.0), std::sqrt (gainFactor)); + auto aminus1 = A - 1; + auto aplus1 = A + 1; + auto omega = (2 * MathConstants::pi * jmax (cutOffFrequency, static_cast (2.0))) / static_cast (sampleRate); + auto coso = std::cos (omega); + auto beta = std::sin (omega) * std::sqrt (A) / Q; + auto aminus1TimesCoso = aminus1 * coso; + + return new Coefficients (A * (aplus1 - aminus1TimesCoso + beta), + A * 2 * (aminus1 - aplus1 * coso), + A * (aplus1 - aminus1TimesCoso - beta), + aplus1 + aminus1TimesCoso + beta, + -2 * (aminus1 + aplus1 * coso), + aplus1 + aminus1TimesCoso - beta); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makeHighShelf (double sampleRate, + NumericType cutOffFrequency, + NumericType Q, + NumericType gainFactor) +{ + jassert (sampleRate > 0); + jassert (cutOffFrequency > 0 && cutOffFrequency <= static_cast (sampleRate * 0.5)); + jassert (Q > 0); + + auto A = jmax (static_cast (0.0), std::sqrt (gainFactor)); + auto aminus1 = A - 1; + auto aplus1 = A + 1; + auto omega = (2 * MathConstants::pi * jmax (cutOffFrequency, static_cast (2.0))) / static_cast (sampleRate); + auto coso = std::cos (omega); + auto beta = std::sin (omega) * std::sqrt (A) / Q; + auto aminus1TimesCoso = aminus1 * coso; + + return new Coefficients (A * (aplus1 + aminus1TimesCoso + beta), + A * -2 * (aminus1 + aplus1 * coso), + A * (aplus1 + aminus1TimesCoso - beta), + aplus1 - aminus1TimesCoso + beta, + 2 * (aminus1 - aplus1 * coso), + aplus1 - aminus1TimesCoso - beta); +} + +template +typename IIR::Coefficients::Ptr IIR::Coefficients::makePeakFilter (double sampleRate, + NumericType frequency, + NumericType Q, + NumericType gainFactor) +{ + jassert (sampleRate > 0); + jassert (frequency > 0 && frequency <= static_cast (sampleRate * 0.5)); + jassert (Q > 0); + + auto A = jmax (static_cast (0.0), std::sqrt (gainFactor)); + auto omega = (2 * MathConstants::pi * jmax (frequency, static_cast (2.0))) / static_cast (sampleRate); + auto alpha = std::sin (omega) / (Q * 2); + auto c2 = -2 * std::cos (omega); + auto alphaTimesA = alpha * A; + auto alphaOverA = alpha / A; + + return new Coefficients (1 + alphaTimesA, c2, + 1 - alphaTimesA, + 1 + alphaOverA, c2, + 1 - alphaOverA); +} + +template +size_t IIR::Coefficients::getFilterOrder() const noexcept +{ + return (static_cast (coefficients.size()) - 1) / 2; +} + +template +double IIR::Coefficients::getMagnitudeForFrequency (double frequency, double sampleRate) const noexcept +{ + constexpr Complex j (0, 1); + const auto order = getFilterOrder(); + const auto* coefs = coefficients.begin(); + + jassert (frequency >= 0 && frequency <= sampleRate * 0.5); + + Complex numerator = 0.0, denominator = 0.0, factor = 1.0; + Complex jw = std::exp (-2.0 * double_Pi * frequency * j / sampleRate); + + for (size_t n = 0; n <= order; ++n) + { + numerator += static_cast (coefs[n]) * factor; + factor *= jw; + } + + denominator = 1.0; + factor = jw; + + for (size_t n = order + 1; n <= 2 * order; ++n) + { + denominator += static_cast (coefs[n]) * factor; + factor *= jw; + } + + return std::abs (numerator / denominator); +} + +template +void IIR::Coefficients::getMagnitudeForFrequencyArray (const double* frequencies, double* magnitudes, + size_t numSamples, double sampleRate) const noexcept +{ + constexpr Complex j (0, 1); + const auto order = getFilterOrder(); + const auto* coefs = coefficients.begin(); + + jassert (order >= 0); + + for (size_t i = 0; i < numSamples; ++i) + { + jassert (frequencies[i] >= 0 && frequencies[i] <= sampleRate * 0.5); + + Complex numerator = 0.0, denominator = 0.0, factor = 1.0; + Complex jw = std::exp (-2.0 * double_Pi * frequencies[i] * j / sampleRate); + + for (size_t n = 0; n <= order; ++n) + { + numerator += static_cast (coefs[n]) * factor; + factor *= jw; + } + + denominator = 1.0; + factor = jw; + + for (size_t n = order + 1; n <= 2 * order; ++n) + { + denominator += static_cast (coefs[n]) * factor; + factor *= jw; + } + + magnitudes[i] = std::abs(numerator / denominator); + } +} + +template +double IIR::Coefficients::getPhaseForFrequency (double frequency, double sampleRate) const noexcept +{ + constexpr Complex j (0, 1); + const auto order = getFilterOrder(); + const auto* coefs = coefficients.begin(); + + jassert (frequency >= 0 && frequency <= sampleRate * 0.5); + + Complex numerator = 0.0, denominator = 0.0, factor = 1.0; + Complex jw = std::exp (-2.0 * double_Pi * frequency * j / sampleRate); + + for (size_t n = 0; n <= order; ++n) + { + numerator += static_cast (coefs[n]) * factor; + factor *= jw; + } + + denominator = 1.0; + factor = jw; + + for (size_t n = order + 1; n <= 2 * order; ++n) + { + denominator += static_cast (coefs[n]) * factor; + factor *= jw; + } + + return std::arg (numerator / denominator); +} + +template +void IIR::Coefficients::getPhaseForFrequencyArray (double* frequencies, double* phases, + size_t numSamples, double sampleRate) const noexcept +{ + constexpr Complex j (0, 1); + const auto order = getFilterOrder(); + const auto* coefs = coefficients.begin(); + auto invSampleRate = 1 / sampleRate; + + jassert (order >= 0); + + for (size_t i = 0; i < numSamples; ++i) + { + jassert (frequencies[i] >= 0 && frequencies[i] <= sampleRate * 0.5); + + Complex numerator = 0.0, denominator = 0.0, factor = 1.0; + Complex jw = std::exp (-2.0 * double_Pi * frequencies[i] * j * invSampleRate); + + for (size_t n = 0; n <= order; ++n) + { + numerator += static_cast (coefs[n]) * factor; + factor *= jw; + } + + denominator = 1.0; + factor = jw; + + for (size_t n = order + 1; n <= 2 * order; ++n) + { + denominator += static_cast (coefs[n]) * factor; + factor *= jw; + } + + phases[i] = std::arg (numerator / denominator); + } +} + +template struct IIR::Coefficients; +template struct IIR::Coefficients; diff --git a/modules/juce_dsp/processors/juce_IIRFilter.h b/modules/juce_dsp/processors/juce_IIRFilter.h new file mode 100644 index 0000000000..1c2ca8b7ff --- /dev/null +++ b/modules/juce_dsp/processors/juce_IIRFilter.h @@ -0,0 +1,274 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + Classes for IIR filter processing. +*/ +namespace IIR +{ + template + struct Coefficients; + + /** + A processing class that can perform IIR filtering on an audio signal, using + the Transposed Direct Form II digital structure. + + If you need a lowpass, bandpass or highpass filter with fast modulation of + its cutoff frequency, you might use the class StateVariableFilter instead, + which is designed to prevent artefacts at parameter changes, instead of the + class Filter. + + @see Filter::Coefficients, FilterAudioSource, @StateVariableFilter + */ + template + class Filter + { + public: + /** The NumericType is the underlying primitive type used by the SampleType (which + could be either a primitive or vector) + */ + using NumericType = typename SampleTypeHelpers::ElementType::Type; + + //============================================================================== + /** Creates a filter. + + Initially the filter is inactive, so will have no effect on samples that + you process with it. Use the setCoefficients() method to turn it into the + type of filter needed. + */ + Filter(); + + /** Creates a filter with a given set of coefficients. */ + Filter (Coefficients* coefficientsToUse); + + /** Creates a copy of another filter. */ + Filter (const Filter&) = default; + + /** Move constructor. */ + Filter (Filter&&) = default; + + //============================================================================== + /** The coefficients of the IIR filter. It's up to the called to ensure that + these coefficients are modified in a thread-safe way. + + If you change the order of the coefficients then you must call reset after + modifying them. + */ + typename Coefficients::Ptr coefficients; + + //============================================================================== + /** Resets the filter's processing pipeline, ready to start a new stream of data. + + Note that this clears the processing state, but the type of filter and + its coefficients aren't changed. + */ + void reset(); + + //============================================================================== + /** Called before processing starts. */ + void prepare (const ProcessSpec&) noexcept; + + /** Processes as a block of samples */ + template + void process (const ProcessContext& context) noexcept; + + /** Processes a single sample, without any locking. + + Use this if you need processing of a single value. + + Moreover, you might need the function snapToZero after a few calls to avoid + potential denormalisation issues. + */ + SampleType JUCE_VECTOR_CALLTYPE processSample (SampleType sample) noexcept; + + private: + //============================================================================== + void snapToZero() noexcept; + void check(); + + //============================================================================== + HeapBlock memory; + SampleType* state = nullptr; + size_t order = 0; + + JUCE_LEAK_DETECTOR (Filter) + }; + + + //============================================================================== + /** A set of coefficients for use in an Filter object. + @see IIR::Filter + */ + template + struct Coefficients : public ProcessorState + { + /** Creates a null set of coefficients (which will produce silence). */ + Coefficients(); + + /** Directly constructs an object from the raw coefficients. + Most people will want to use the static methods instead of this, but the + constructor is public to allow tinkerers to create their own custom filters! + */ + Coefficients (NumericType b0, NumericType b1, + NumericType a0, NumericType a1); + + Coefficients (NumericType b0, NumericType b1, NumericType b2, + NumericType a0, NumericType a1, NumericType a2); + + Coefficients (NumericType b0, NumericType, NumericType b2, NumericType b3, + NumericType a0, NumericType a1, NumericType a2, NumericType a3); + + /** Creates a copy of another filter. */ + Coefficients (const Coefficients&); + + /** Creates a copy of another filter. */ + Coefficients& operator= (const Coefficients&); + + /** The Coefficients structure is ref-counted, so this is a handy type that can be used + as a pointer to one. + */ + using Ptr = ReferenceCountedObjectPtr; + + //============================================================================== + /** Returns the coefficients for a first order low-pass filter. */ + static Ptr makeFirstOrderLowPass (double sampleRate, NumericType frequency); + + /** Returns the coefficients for a first order high-pass filter. */ + static Ptr makeFirstOrderHighPass (double sampleRate, NumericType frequency); + + /** Returns the coefficients for a first order all-pass filter. */ + static Ptr makeFirstOrderAllPass (double sampleRate, NumericType frequency); + + //============================================================================== + /** Returns the coefficients for a low-pass filter. */ + static Ptr makeLowPass (double sampleRate, NumericType frequency); + + /** Returns the coefficients for a low-pass filter with variable Q. */ + static Ptr makeLowPass (double sampleRate, NumericType frequency, NumericType Q); + + //============================================================================== + /** Returns the coefficients for a high-pass filter. */ + static Ptr makeHighPass (double sampleRate, NumericType frequency); + + /** Returns the coefficients for a high-pass filter with variable Q. */ + static Ptr makeHighPass (double sampleRate, NumericType frequency, NumericType Q); + + //============================================================================== + /** Returns the coefficients for a band-pass filter. */ + static Ptr makeBandPass (double sampleRate, NumericType frequency); + + /** Returns the coefficients for a band-pass filter with variable Q. */ + static Ptr makeBandPass (double sampleRate, NumericType frequency, NumericType Q); + + //============================================================================== + /** Returns the coefficients for a notch filter. */ + static Ptr makeNotch (double sampleRate, NumericType frequency); + + /** Returns the coefficients for a notch filter with variable Q. */ + static Ptr makeNotch (double sampleRate, NumericType frequency, NumericType Q); + + //============================================================================== + /** Returns the coefficients for an all-pass filter. */ + static Ptr makeAllPass (double sampleRate, NumericType frequency); + + /** Returns the coefficients for an all-pass filter with variable Q. */ + static Ptr makeAllPass (double sampleRate, NumericType frequency, NumericType Q); + + //============================================================================== + /** Returns the coefficients for a low-pass shelf filter with variable Q and gain. + + The gain is a scale factor that the low frequencies are multiplied by, so values + greater than 1.0 will boost the low frequencies, values less than 1.0 will + attenuate them. + */ + static Ptr makeLowShelf (double sampleRate, NumericType cutOffFrequency, + NumericType Q, NumericType gainFactor); + + /** Returns the coefficients for a high-pass shelf filter with variable Q and gain. + + The gain is a scale factor that the high frequencies are multiplied by, so values + greater than 1.0 will boost the high frequencies, values less than 1.0 will + attenuate them. + */ + static Ptr makeHighShelf (double sampleRate, NumericType cutOffFrequency, + NumericType Q, NumericType gainFactor); + + /** Returns the coefficients for a peak filter centred around a + given frequency, with a variable Q and gain. + + The gain is a scale factor that the centre frequencies are multiplied by, so + values greater than 1.0 will boost the centre frequencies, values less than + 1.0 will attenuate them. + */ + static Ptr makePeakFilter (double sampleRate, NumericType centreFrequency, + NumericType Q, NumericType gainFactor); + + //============================================================================== + /** Returns the filter order associated with the coefficients */ + size_t getFilterOrder() const noexcept; + + /** Returns the magnitude frequency response of the filter for a given frequency + and sample rate + */ + double getMagnitudeForFrequency (double frequency, double sampleRate) const noexcept; + + /** Returns the magnitude frequency response of the filter for a given frequency array + and sample rate. + */ + void getMagnitudeForFrequencyArray (const double* frequencies, double* magnitudes, + size_t numSamples, double sampleRate) const noexcept; + + /** Returns the phase frequency response of the filter for a given frequency and + sample rate + */ + double getPhaseForFrequency (double frequency, double sampleRate) const noexcept; + + /** Returns the phase frequency response of the filter for a given frequency array + and sample rate. + */ + void getPhaseForFrequencyArray (double* frequencies, double* phases, + size_t numSamples, double sampleRate) const noexcept; + + /** Returns a raw data pointer to the coefficients. */ + NumericType* getRawCoefficients() noexcept { return coefficients.getRawDataPointer(); } + + /** Returns a raw data pointer to the coefficients. */ + const NumericType* getRawCoefficients() const noexcept { return coefficients.begin(); } + + //============================================================================== + /** The raw coefficients. + You should leave these numbers alone unless you really know what you're doing. + */ + Array coefficients; + + private: + // Unfortunately, std::sqrt is not marked as constexpr just yet in all compilers + static constexpr NumericType inverseRootTwo = static_cast (0.70710678118654752440L); + }; + + #include "juce_IIRFilter_Impl.h" +} diff --git a/modules/juce_dsp/processors/juce_IIRFilter_Impl.h b/modules/juce_dsp/processors/juce_IIRFilter_Impl.h new file mode 100644 index 0000000000..daadd09c79 --- /dev/null +++ b/modules/juce_dsp/processors/juce_IIRFilter_Impl.h @@ -0,0 +1,232 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +template +struct SnapToZeroHelper +{ + static void snap (Type& x) noexcept + { + for (size_t i = 0; i < Type::size(); ++i) + JUCE_SNAP_TO_ZERO (x[i]); + } +}; + +template <> struct SnapToZeroHelper { static void snap (float& x) noexcept { JUCE_SNAP_TO_ZERO (x); } }; +template <> struct SnapToZeroHelper { static void snap (double& x) noexcept { JUCE_SNAP_TO_ZERO (x); } }; +template <> struct SnapToZeroHelper { static void snap (long double& x) noexcept { JUCE_SNAP_TO_ZERO (x); } }; + +#if JUCE_USE_SIMD +template +struct SnapToZeroHelper> { static void snap (SIMDRegister&) noexcept {} }; +#endif + +//============================================================================== +template +Filter::Filter() + : coefficients (new Coefficients::NumericType> (Coefficients::NumericType>::passThrough)) +{ + reset(); +} + +template +Filter::Filter (Coefficients::NumericType>* c) + : coefficients (c) +{ + reset(); +} + +template +void Filter::reset() +{ + auto newOrder = coefficients->getFilterOrder(); + + if (newOrder != order) + { + memory.malloc (jmax (order, newOrder, static_cast (3)) + 1); + state = snapPointerToAlignment (memory.getData(), sizeof (SampleType)); + order = newOrder; + } + + for (size_t i = 0; i < order; ++i) + state[i] = SampleType {0}; +} + +template +void Filter::prepare (const ProcessSpec&) noexcept { reset(); } + + +template +template +void Filter::process (const ProcessContext& context) noexcept +{ + static_assert (std::is_same::value, + "The sample-type of the IIR filter must match the sample-type supplied to this process callback"); + check(); + + auto&& inputBlock = context.getInputBlock(); + auto&& outputBlock = context.getOutputBlock(); + + // This class can only process mono signals. Use the ProcessorDuplicator class + // to apply this filter on a multi-channel audio stream. + jassert (inputBlock.getNumChannels() == 1); + jassert (outputBlock.getNumChannels() == 1); + + auto numSamples = inputBlock.getNumSamples(); + auto* src = inputBlock .getChannelPointer (0); + auto* dst = outputBlock.getChannelPointer (0); + auto* coeffs = coefficients->getRawCoefficients(); + + switch (order) + { + case 1: + { + auto b0 = coeffs[0]; + auto b1 = coeffs[1]; + auto a1 = coeffs[2]; + + auto lv1 = state[0]; + + for (size_t i = 0; i < numSamples; ++i) + { + auto in = src[i]; + auto out = in * b0 + lv1; + dst[i] = out; + + lv1 = (in * b1) - (out * a1); + } + + SnapToZeroHelper::snap (lv1); state[0] = lv1; + } + break; + + case 2: + { + auto b0 = coeffs[0]; + auto b1 = coeffs[1]; + auto b2 = coeffs[2]; + auto a1 = coeffs[3]; + auto a2 = coeffs[4]; + + auto lv1 = state[0]; + auto lv2 = state[1]; + + for (size_t i = 0; i < numSamples; ++i) + { + auto in = src[i]; + auto out = (in * b0) + lv1; + dst[i] = out; + + lv1 = (in * b1) - (out * a1) + lv2; + lv2 = (in * b2) - (out * a2); + } + + SnapToZeroHelper::snap (lv1); state[0] = lv1; + SnapToZeroHelper::snap (lv2); state[1] = lv2; + } + break; + + case 3: + { + auto b0 = coeffs[0]; + auto b1 = coeffs[1]; + auto b2 = coeffs[2]; + auto b3 = coeffs[3]; + auto a1 = coeffs[4]; + auto a2 = coeffs[5]; + auto a3 = coeffs[6]; + + auto lv1 = state[0]; + auto lv2 = state[1]; + auto lv3 = state[2]; + + for (size_t i = 0; i < numSamples; ++i) + { + auto in = src[i]; + auto out = (in * b0) + lv1; + dst[i] = out; + + lv1 = (in * b1) - (out * a1) + lv2; + lv2 = (in * b2) - (out * a2) + lv3; + lv3 = (in * b3) - (out * a3); + } + + SnapToZeroHelper::snap (lv1); state[0] = lv1; + SnapToZeroHelper::snap (lv2); state[1] = lv2; + SnapToZeroHelper::snap (lv3); state[2] = lv3; + } + break; + + default: + { + for (size_t i = 0; i < numSamples; ++i) + { + auto in = src[i]; + auto out = (in * coeffs[0]) + state[0]; + dst[i] = out; + + for (size_t j = 0; j < order - 1; ++j) + state[j] = (in * coeffs[j + 1]) - (out * coeffs[order + j + 1]) + state[j + 1]; + + state[order - 1] = (in * coeffs[order]) - (out * coeffs[order * 2]); + } + + snapToZero(); + } + } +} + +template +SampleType JUCE_VECTOR_CALLTYPE Filter::processSample (SampleType sample) noexcept +{ + check(); + auto* c = coefficients->getRawCoefficients(); + + auto out = (c[0] * sample) + state[0]; + + for (size_t j = 0; j < order - 1; ++j) + state[j] = (c[j + 1] * sample) - (c[order + j + 1] * out) + state[j + 1]; + + state[order - 1] = (c[order] * sample) - (c[order * 2] * out); + + return out; +} + +template +void Filter::snapToZero() noexcept +{ + for (size_t i = 0; i < order; ++i) + SnapToZeroHelper::snap (state[i]); +} + +template +void Filter::check() +{ + jassert (coefficients != nullptr); + + if (order != coefficients->getFilterOrder()) + reset(); +} diff --git a/modules/juce_dsp/processors/juce_Oscillator.h b/modules/juce_dsp/processors/juce_Oscillator.h new file mode 100644 index 0000000000..7a3fc1a21c --- /dev/null +++ b/modules/juce_dsp/processors/juce_Oscillator.h @@ -0,0 +1,153 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ +/** + Applies a gain to audio samples as single samples or AudioBlocks. + */ +template +class Oscillator +{ +public: + /** The NumericType is the underlying primitive type used by the SampleType (which + could be either a primitive or vector) + */ + using NumericType = typename SampleTypeHelpers::ElementType::Type; + + /* Create an oscillator with a periodic input function (-pi..pi). + + If lookup table is not zero, then the function will be approximated + with a lookup table. + */ + Oscillator (const std::function& function, size_t lookupTableNumPoints = 0) + : generator (function), frequency (440.0f) + { + if (lookupTableNumPoints != 0) + { + auto table = new LookupTableTransform (generator, static_cast (-1.0 * double_Pi), + static_cast (double_Pi), lookupTableNumPoints); + + lookupTable = table; + generator = [table] (NumericType x) { return (*table) (x); }; + } + } + + //============================================================================== + /** Applies a new gain as a linear value. */ + void setFrequency (NumericType newGain) noexcept { frequency.setValue (newGain); } + + /** Returns the current gain as a linear value. */ + NumericType getFrequency() const noexcept { return frequency.getTargetValue(); } + + //============================================================================== + /** Called before processing starts. */ + void prepare (const ProcessSpec& spec) noexcept + { + sampleRate = static_cast (spec.sampleRate); + rampBuffer.resize ((int) spec.maximumBlockSize); + + reset(); + } + + /** Resets the internal state of the gain */ + void reset() noexcept + { + pos = 0.0; + + if (sampleRate > 0) + frequency.reset (sampleRate, 0.05); + } + + //============================================================================== + /** Returns the result of processing a single sample. */ + SampleType JUCE_VECTOR_CALLTYPE processSample (SampleType) noexcept + { + auto increment = static_cast (2.0 * double_Pi) * frequency.getNextValue() / sampleRate; + auto value = generator (pos - static_cast (double_Pi)); + pos = std::fmod (pos + increment, static_cast (2.0 * double_Pi)); + + return value; + } + + /** Processes the input and output buffers supplied in the processing context. */ + template + void process (const ProcessContext& context) noexcept + { + auto&& outBlock = context.getOutputBlock(); + + // this is an output-only processory + jassert (context.getInputBlock().getNumChannels() == 0 || (! context.usesSeparateInputAndOutputBlocks())); + jassert (outBlock.getNumSamples() <= static_cast (rampBuffer.size())); + + auto len = outBlock.getNumSamples(); + auto numChannels = outBlock.getNumChannels(); + auto baseIncrement = static_cast (2.0 * double_Pi) / sampleRate; + + if (frequency.isSmoothing()) + { + auto* buffer = rampBuffer.getRawDataPointer(); + + for (size_t i = 0; i < len; ++i) + { + buffer[i] = pos - static_cast (double_Pi); + + pos = std::fmod (pos + (baseIncrement * frequency.getNextValue()), static_cast (2.0 * double_Pi)); + } + + for (size_t ch = 0; ch < numChannels; ++ch) + { + auto* dst = outBlock.getChannelPointer (ch); + + for (size_t i = 0; i < len; ++i) + dst[i] = generator (buffer[i]); + } + } + else + { + auto freq = baseIncrement * frequency.getNextValue(); + + for (size_t ch = 0; ch < numChannels; ++ch) + { + auto p = pos; + auto* dst = outBlock.getChannelPointer (ch); + + for (size_t i = 0; i < len; ++i) + { + dst[i] = generator (p - static_cast (double_Pi)); + p = std::fmod (p + freq, static_cast (2.0 * double_Pi)); + } + } + + pos = std::fmod (pos + freq * static_cast (len), static_cast (2.0 * double_Pi)); + } + } + +private: + //============================================================================== + std::function generator; + ScopedPointer> lookupTable; + Array rampBuffer; + LinearSmoothedValue frequency {static_cast (440.0)}; + NumericType sampleRate = 48000.0, pos = 0.0; +}; diff --git a/modules/juce_dsp/processors/juce_ProcessContext.h b/modules/juce_dsp/processors/juce_ProcessContext.h new file mode 100644 index 0000000000..8c41f7c686 --- /dev/null +++ b/modules/juce_dsp/processors/juce_ProcessContext.h @@ -0,0 +1,155 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + This structure is passed into a DSP algorithm's prepare() method, and contains + information about various aspects of the context in which it can expect to be called. +*/ +struct ProcessSpec +{ + /** The sample rate that will be used for the data that is sent to the processor. */ + double sampleRate; + + /** The maximum number of samples that will be in the blocks sent to process() method. */ + uint32 maximumBlockSize; + + /** The number of channels that the process() method will be expected to handle. */ + uint32 numChannels; +}; + +//============================================================================== +/** + This is a handy base class for the state of a processor (such as parameter values) + which is typically shared among several procoessors. This is useful to for + multi-mono filters which share the same state among several mono processors. +*/ +struct ProcessorState : ReferenceCountedObject +{ + /** The ProcessorState structure is ref-counted, so this is a handy type that can be used + as a pointer to one. + */ + using Ptr = ReferenceCountedObjectPtr; +}; + +//============================================================================== +/** + Contains context information that is passed into an algorithm's process method. + + This context is intended for use in situations where a single block is being used + for both the input and output, so it will return the same object for both its + getInputBlock() and getOutputBlock() methods. + + @see ProcessContextNonReplacing +*/ +template +struct ProcessContextReplacing +{ +public: + /** The type of a single sample (which may be a vector if multichannel). */ + using SampleType = ContextSampleType; + /** The type of audio block that this context handles. */ + using AudioBlockType = AudioBlock; + + /** Creates a ProcessContextReplacing that uses the given audio block. + Note that the caller must not delete the block while it is still in use by this object! + */ + ProcessContextReplacing (AudioBlockType& block) noexcept : ioBlock (block) {} + + ProcessContextReplacing (const ProcessContextReplacing&) = default; + ProcessContextReplacing (ProcessContextReplacing&&) = default; + + /** Returns the audio block to use as the input to a process function. */ + const AudioBlockType& getInputBlock() const noexcept { return ioBlock; } + + /** Returns the audio block to use as the output to a process function. */ + AudioBlockType& getOutputBlock() const noexcept { return const_cast (ioBlock); } + + /** All process context classes will define this constant method so that templated + code can determine whether the input and output blocks refer to the same buffer, + or to two different ones. + */ + static constexpr bool usesSeparateInputAndOutputBlocks() { return false; } + + /** If set to true, then a processor's process() method is expected to do whatever + is appropriate for it to be in a bypassed state. + */ + bool isBypassed = false; + +private: + AudioBlockType& ioBlock; +}; + +//============================================================================== +/** + Contains context information that is passed into an algorithm's process method. + + This context is intended for use in situations where two different blocks are being + used the input and output to the process algorithm, so the processor must read from + the block returned by getInputBlock() and write its results to the block returned by + getOutputBlock(). + + @see ProcessContextReplacing +*/ +template +struct ProcessContextNonReplacing +{ +public: + /** The type of a single sample (which may be a vector if multichannel). */ + using SampleType = ContextSampleType; + /** The type of audio block that this context handles. */ + using AudioBlockType = AudioBlock; + + /** Creates a ProcessContextReplacing that uses the given input and output blocks. + Note that the caller must not delete these blocks while they are still in use by this object! + */ + ProcessContextNonReplacing (const AudioBlockType& input, AudioBlockType& output) noexcept + : inputBlock (input), outputBlock (output) {} + + ProcessContextNonReplacing (const ProcessContextNonReplacing&) = default; + ProcessContextNonReplacing (ProcessContextNonReplacing&&) = default; + + /** Returns the audio block to use as the input to a process function. */ + const AudioBlockType& getInputBlock() const noexcept { return inputBlock; } + + /** Returns the audio block to use as the output to a process function. */ + AudioBlockType& getOutputBlock() const noexcept { return const_cast (outputBlock); } + + /** All process context classes will define this constant method so that templated + code can determine whether the input and output blocks refer to the same buffer, + or to two different ones. + */ + static constexpr bool usesSeparateInputAndOutputBlocks() { return true; } + + /** If set to true, then a processor's process() method is expected to do whatever + is appropriate for it to be in a bypassed state. + */ + bool isBypassed = false; + +private: + const AudioBlockType& inputBlock; + AudioBlockType& outputBlock; +}; diff --git a/modules/juce_dsp/processors/juce_ProcessorChain.h b/modules/juce_dsp/processors/juce_ProcessorChain.h new file mode 100644 index 0000000000..fa16f60d35 --- /dev/null +++ b/modules/juce_dsp/processors/juce_ProcessorChain.h @@ -0,0 +1,114 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +#ifndef DOXYGEN +namespace ProcessorHelpers // Internal helper classes used in building the ProcessorChain +{ + template + struct GetterHelper + { + template + static auto& get (ProcessorType& a) noexcept { return GetterHelper::get (a.processors); } + }; + + template <> + struct GetterHelper<0> + { + template + static auto& get (ProcessorType& a) noexcept { return a.getProcessor(); } + }; + + template + struct ChainBase + { + Processor processor; + + Processor& getProcessor() noexcept { return processor; } + Subclass& getThis() noexcept { return *static_cast (this); } + + template auto& get() noexcept { return GetterHelper::get (getThis()); } + }; + + template + struct Chain : public ChainBase> + { + using Base = ChainBase>; + + void prepare (const ProcessSpec& spec) + { + Base::processor.prepare (spec); + processors.prepare (spec); + } + + template + void process (ProcessContext& context) noexcept + { + Base::processor.process (context); + processors.process (context); + } + + void reset() + { + Base::processor.reset(); + processors.reset(); + } + + Chain processors; + }; + + template + struct Chain : public ChainBase> + { + using Base = ChainBase>; + + template + void process (ProcessContext& context) noexcept + { + Base::processor.process (context); + } + + void prepare (const ProcessSpec& spec) + { + Base::processor.prepare (spec); + } + + void reset() + { + Base::processor.reset(); + } + }; +} +#endif + + +//============================================================================== +/** + This variadically-templated class lets you join together any number of processor + classes into a single processor which will call process() on them all in sequence. +*/ +template +using ProcessorChain = ProcessorHelpers::Chain; diff --git a/modules/juce_dsp/processors/juce_ProcessorDuplicator.h b/modules/juce_dsp/processors/juce_ProcessorDuplicator.h new file mode 100644 index 0000000000..dcd8e180b7 --- /dev/null +++ b/modules/juce_dsp/processors/juce_ProcessorDuplicator.h @@ -0,0 +1,90 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + Converts a mono processor class into a multi-channel version by duplicating it + and applying multichannel buffers across an array of instances. + + When the prepare method is called, it uses the specified number of channels to + instantiate the appropriate number of instances, which it then uses in its + process() method. +*/ +template +struct ProcessorDuplicator +{ + ProcessorDuplicator() {} + ProcessorDuplicator (StateType* stateToUse) : state (stateToUse) {} + ProcessorDuplicator (const ProcessorDuplicator&) = default; + ProcessorDuplicator (ProcessorDuplicator&&) = default; + + void prepare (const ProcessSpec& spec) + { + processors.removeRange ((int) spec.numChannels, processors.size()); + + while (static_cast (processors.size()) < spec.numChannels) + processors.add (new MonoProcessorType (state)); + + auto monoSpec = spec; + monoSpec.numChannels = 1; + + for (auto* p : processors) + p->prepare (monoSpec); + } + + void reset() noexcept { for (auto* p : processors) p->reset(); } + + template + void process (const ProcessContext& context) noexcept + { + jassert ((int) context.getInputBlock().getNumChannels() <= processors.size()); + jassert ((int) context.getOutputBlock().getNumChannels() <= processors.size()); + + auto numChannels = static_cast (jmin (context.getInputBlock().getNumChannels(), + context.getOutputBlock().getNumChannels())); + + for (size_t chan = 0; chan < numChannels; ++chan) + processors[(int) chan]->process (MonoProcessContext (context, chan)); + } + + typename StateType::Ptr state; + +private: + template + struct MonoProcessContext : public ProcessContext + { + MonoProcessContext (const ProcessContext& multiChannelContext, size_t channelToUse) + : ProcessContext (multiChannelContext), channel (channelToUse) + {} + + size_t channel; + + typename ProcessContext::AudioBlockType getInputBlock() const noexcept { return ProcessContext::getInputBlock().getSingleChannelBlock (channel); } + typename ProcessContext::AudioBlockType getOutputBlock() const noexcept { return ProcessContext::getOutputBlock().getSingleChannelBlock (channel); } + }; + + juce::OwnedArray processors; +}; diff --git a/modules/juce_dsp/processors/juce_ProcessorWrapper.h b/modules/juce_dsp/processors/juce_ProcessorWrapper.h new file mode 100644 index 0000000000..2e9fe98dd5 --- /dev/null +++ b/modules/juce_dsp/processors/juce_ProcessorWrapper.h @@ -0,0 +1,71 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + Acts as a polymorphic base class for processors. + This exposes the same set of methods that a processor must implement as virtual + methods, so that you can use the ProcessorWrapper class to wrap an instance of + a subclass, and then pass that around using ProcessorBase as a base class. + @see ProcessorWrapper +*/ +struct ProcessorBase +{ + ProcessorBase() = default; + virtual ~ProcessorBase() = default; + + virtual void prepare (const ProcessSpec&) = 0; + virtual void process (const ProcessContextReplacing&) = 0; + virtual void reset() = 0; +}; + + +//============================================================================== +/** + Wraps an instance of a given processor class, and exposes it through the + ProcessorBase interface. + @see ProcessorBase +*/ +template +struct ProcessorWrapper : public ProcessorBase +{ + void prepare (const ProcessSpec& spec) override + { + processor.prepare (spec); + } + + void process (const ProcessContextReplacing& context) override + { + processor.process (context); + } + + void reset() override + { + processor.reset(); + } + + ProcessorType processor; +}; diff --git a/modules/juce_dsp/processors/juce_StateVariableFilter.h b/modules/juce_dsp/processors/juce_StateVariableFilter.h new file mode 100644 index 0000000000..88a75bb972 --- /dev/null +++ b/modules/juce_dsp/processors/juce_StateVariableFilter.h @@ -0,0 +1,200 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + An IIR filter that can perform low, band and high-pass filtering on an audio + signal, with 12 dB of attenuation / octave, using a TPT structure, designed + for fast modulation (see Vadim Zavalishin's documentation about TPT + structures for more information). Its behaviour is based on the analog + state variable filter circuit. + + Note : the bandpass here is not the one in the RBJ CookBook, its gain can be + higher than 0 dB. For the classic 0 dB bandpass, we need to multiply the + result with R2 +*/ +namespace StateVariableFilter +{ + template + struct Parameters; + + template + class Filter + { + public: + //============================================================================== + /** The NumericType is the underlying primitive type used by the SampleType (which + could be either a primitive or vector) + */ + using NumericType = typename SampleTypeHelpers::ElementType::Type; + + //============================================================================== + /** Creates a filter with default parameters. */ + Filter() : parameters (new Parameters) { reset(); } + + Filter (Parameters* paramtersToUse) : parameters (paramtersToUse) { reset(); } + + /** Creates a copy of another filter. */ + Filter (const Filter&) = default; + + /** Move constructor */ + Filter (Filter&&) = default; + + //============================================================================== + /** Initialization of the filter */ + void prepare (const ProcessSpec&) noexcept { reset(); } + + /** Resets the filter's processing pipeline. */ + void reset() noexcept { s1 = s2 = SampleType {0}; } + + //============================================================================== + /** The parameters of the state variable filter. It's up to the called to ensure + that these parameters are modified in a thread-safe way. */ + typename Parameters::Ptr parameters; + + //============================================================================== + template + void process (const ProcessContext& context) noexcept + { + static_assert (std::is_same::value, + "The sample-type of the filter must match the sample-type supplied to this process callback"); + + auto&& inputBlock = context.getInputBlock(); + auto&& outputBlock = context.getOutputBlock(); + + // This class can only process mono signals. Use the ProcessorDuplicator class + // to apply this filter on a multi-channel audio stream. + jassert (inputBlock.getNumChannels() == 1); + jassert (outputBlock.getNumChannels() == 1); + + auto n = inputBlock.getNumSamples(); + auto* src = inputBlock .getChannelPointer (0); + auto* dst = outputBlock.getChannelPointer (0); + + switch (parameters->type) + { + case Parameters::Type::lowPass: processBlock::Type::lowPass> (src, dst, n); break; + case Parameters::Type::bandPass: processBlock::Type::bandPass> (src, dst, n); break; + case Parameters::Type::highPass: processBlock::Type::highPass> (src, dst, n); break; + default: jassertfalse; + } + } + + /** Processes a single sample, without any locking or checking. + Use this if you need processing of a single value. */ + SampleType JUCE_VECTOR_CALLTYPE processSample (SampleType sample) noexcept + { + switch (parameters->type) + { + case Parameters::Type::lowPass: return processLoop::Type::lowPass> (sample, *parameters); break; + case Parameters::Type::bandPass: return processLoop::Type::bandPass> (sample, *parameters); break; + case Parameters::Type::highPass: return processLoop::Type::highPass> (sample, *parameters); break; + default: jassertfalse; + } + + return SampleType{0}; + } + + private: + //============================================================================== + template ::Type type> + SampleType JUCE_VECTOR_CALLTYPE processLoop (SampleType sample, Parameters& state) noexcept + { + y[2] = (sample - s1 * state.R2 - s1 * state.g - s2) * state.h; + + y[1] = y[2] * state.g + s1; + s1 = y[2] * state.g + y[1]; + + y[0] = y[1] * state.g + s2; + s2 = y[1] * state.g + y[0]; + + return y[static_cast (type)]; + } + + template ::Type type> + void processBlock (const SampleType* input, SampleType* output, size_t n) noexcept + { + auto state = *parameters; + for (size_t i = 0 ; i < n; ++i) + output[i] = processLoop (input[i], state); + + *parameters = state; + } + + //============================================================================== + std::array y; + SampleType s1, s2; + + //============================================================================== + JUCE_LEAK_DETECTOR (Filter) + }; + + //============================================================================== + template + struct Parameters : public ProcessorState + { + //============================================================================== + enum class Type + { + lowPass, + bandPass, + highPass + }; + + //============================================================================== + /** The type of the IIR filter */ + Type type = Type::lowPass; + + /** Set the cutoff frequency and resonance of the IIR filter. + Note : the bandwidth of the resonance increases with the value of the + parameter. To have a standard 12 dB/octave filter, the value must be set + at 1 / sqrt(2). + */ + void setCutOffFrequency (double sampleRate, NumericType frequency, + NumericType resonance = static_cast (1.0 / std::sqrt (2.0))) noexcept + { + g = static_cast (std::tan (double_Pi * frequency / sampleRate)); + R2 = static_cast (1.0 / resonance); + h = static_cast (1.0 / (1.0 + R2 * g + g * g)); + } + + //============================================================================== + /** The Coefficients structure is ref-counted, so this is a handy type that can be used + as a pointer to one. + */ + using Ptr = ReferenceCountedObjectPtr; + + //============================================================================== + Parameters() = default; + Parameters (const Parameters& o) : g (o.g), R2 (o.R2), h (o.h) {} + Parameters& operator= (const Parameters& o) noexcept { g = o.g; R2 = o.R2; h = o.h; return *this; } + + //============================================================================== + NumericType g = static_cast (std::tan (double_Pi * 200.0 / 44100.0)); + NumericType R2 = static_cast (std::sqrt (2.0)); + NumericType h = static_cast (1.0 / (1.0 + R2 * g + g * g)); + }; +} diff --git a/modules/juce_dsp/processors/juce_WaveShaper.h b/modules/juce_dsp/processors/juce_WaveShaper.h new file mode 100644 index 0000000000..7dd5aeb387 --- /dev/null +++ b/modules/juce_dsp/processors/juce_WaveShaper.h @@ -0,0 +1,65 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + + +/** + Applies waveshaping to audio samples as single samples or AudioBlocks. +*/ +template +struct WaveShaper +{ + Function functionToUse; + + //============================================================================== + /** Called before processing starts. */ + void prepare (const ProcessSpec&) noexcept {} + + //============================================================================== + /** Returns the result of processing a single sample. */ + template + SampleType JUCE_VECTOR_CALLTYPE processSample (SampleType inputSample) const noexcept + { + return functionToUse (inputSample); + } + + /** Processes the input and output buffers supplied in the processing context. */ + template + void process (const ProcessContext& context) const noexcept + { + jassert (context.getInputBlock().getNumChannels() == context.getOutputBlock().getNumChannels()); + jassert (context.getInputBlock().getNumSamples() == context.getOutputBlock().getNumSamples()); + + AudioBlock::process (context.getInputBlock(), + context.getOutputBlock(), + functionToUse); + } + + void reset() noexcept {} +}; + +//============================================================================== +template +static WaveShaper, Functor> CreateWaveShaper (Functor functionToUse) { return {functionToUse}; } diff --git a/modules/juce_events/juce_events.h b/modules/juce_events/juce_events.h index cc8b719771..06a77fca4b 100644 --- a/modules/juce_events/juce_events.h +++ b/modules/juce_events/juce_events.h @@ -31,7 +31,7 @@ ID: juce_events vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE message and event handling classes description: Classes for running an application's main event loop and sending/receiving messages, timers, etc. website: http://www.juce.com/juce diff --git a/modules/juce_events/messages/juce_ApplicationBase.h b/modules/juce_events/messages/juce_ApplicationBase.h index 75ee107ede..c9ffc5f0b9 100644 --- a/modules/juce_events/messages/juce_ApplicationBase.h +++ b/modules/juce_events/messages/juce_ApplicationBase.h @@ -188,6 +188,13 @@ public: const String& sourceFilename, int lineNumber) = 0; + //============================================================================== + /** Override this method to be informed when the back button is pressed on a device. + + This is currently only implemented on Android devices. + */ + virtual void backButtonPressed() { } + //============================================================================== /** Signals that the main message loop should stop and the application should terminate. diff --git a/modules/juce_events/messages/juce_Initialisation.h b/modules/juce_events/messages/juce_Initialisation.h index 2a218f8cc8..e911807bd1 100644 --- a/modules/juce_events/messages/juce_Initialisation.h +++ b/modules/juce_events/messages/juce_Initialisation.h @@ -84,10 +84,6 @@ public: */ #ifdef DOXYGEN #define START_JUCE_APPLICATION(AppClass) -#elif JUCE_ANDROID - #define START_JUCE_APPLICATION(AppClass) \ - juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } - #else #if JUCE_WINDOWS && ! defined (_CONSOLE) #define JUCE_MAIN_FUNCTION int __stdcall WinMain (struct HINSTANCE__*, struct HINSTANCE__*, char*, int) @@ -115,6 +111,13 @@ public: return juce::JUCEApplicationBase::main (JUCE_MAIN_FUNCTION_ARGS); \ } + #elif JUCE_ANDROID + + #define JUCE_CREATE_APPLICATION_DEFINE(AppClass) \ + juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } + + #define JUCE_MAIN_FUNCTION_DEFINITION + #else #define JUCE_CREATE_APPLICATION_DEFINE(AppClass) \ diff --git a/modules/juce_graphics/colour/juce_Colour.cpp b/modules/juce_graphics/colour/juce_Colour.cpp index 14c99e8ce4..ae73b07614 100644 --- a/modules/juce_graphics/colour/juce_Colour.cpp +++ b/modules/juce_graphics/colour/juce_Colour.cpp @@ -103,7 +103,7 @@ namespace ColourHelpers if (h < 3.0f) return PixelARGB (alpha, x, intV, (uint8) roundToInt (v * (1.0f - (s * (1.0f - f))))); if (h < 4.0f) return PixelARGB (alpha, x, (uint8) roundToInt (v * (1.0f - s * f)), intV); if (h < 5.0f) return PixelARGB (alpha, (uint8) roundToInt (v * (1.0f - (s * (1.0f - f)))), x, intV); - return PixelARGB (alpha, intV, x, (uint8) roundToInt (v * (1.0f - s * f))); + return PixelARGB (alpha, intV, x, (uint8) roundToInt (v * (1.0f - s * f))); } float hue, saturation, brightness; diff --git a/modules/juce_graphics/effects/juce_DropShadowEffect.h b/modules/juce_graphics/effects/juce_DropShadowEffect.h index 7bdb591688..9fefe9a365 100644 --- a/modules/juce_graphics/effects/juce_DropShadowEffect.h +++ b/modules/juce_graphics/effects/juce_DropShadowEffect.h @@ -97,7 +97,7 @@ public: //============================================================================== /** @internal */ - void applyEffect (Image& sourceImage, Graphics& destContext, float scaleFactor, float alpha); + void applyEffect (Image& sourceImage, Graphics& destContext, float scaleFactor, float alpha) override; private: diff --git a/modules/juce_graphics/effects/juce_GlowEffect.cpp b/modules/juce_graphics/effects/juce_GlowEffect.cpp index 9586a4598c..e3af9ed032 100644 --- a/modules/juce_graphics/effects/juce_GlowEffect.cpp +++ b/modules/juce_graphics/effects/juce_GlowEffect.cpp @@ -24,21 +24,14 @@ ============================================================================== */ -GlowEffect::GlowEffect() - : radius (2.0f), - colour (Colours::white) -{ -} +GlowEffect::GlowEffect() {} +GlowEffect::~GlowEffect() {} -GlowEffect::~GlowEffect() -{ -} - -void GlowEffect::setGlowProperties (const float newRadius, - Colour newColour) +void GlowEffect::setGlowProperties (float newRadius, Colour newColour, Point pos) { radius = newRadius; colour = newColour; + offset = pos; } void GlowEffect::applyEffect (Image& image, Graphics& g, float scaleFactor, float alpha) @@ -53,8 +46,8 @@ void GlowEffect::applyEffect (Image& image, Graphics& g, float scaleFactor, floa blurKernel.applyToImage (temp, image, image.getBounds()); g.setColour (colour.withMultipliedAlpha (alpha)); - g.drawImageAt (temp, 0, 0, true); + g.drawImageAt (temp, offset.x, offset.y, true); g.setOpacity (alpha); - g.drawImageAt (image, 0, 0, false); + g.drawImageAt (image, offset.x, offset.y, false); } diff --git a/modules/juce_graphics/effects/juce_GlowEffect.h b/modules/juce_graphics/effects/juce_GlowEffect.h index 46e47b419c..2489516825 100644 --- a/modules/juce_graphics/effects/juce_GlowEffect.h +++ b/modules/juce_graphics/effects/juce_GlowEffect.h @@ -40,7 +40,6 @@ class JUCE_API GlowEffect : public ImageEffectFilter public: //============================================================================== /** Creates a default 'glow' effect. - To customise its appearance, use the setGlowProperties() method. */ GlowEffect(); @@ -56,17 +55,19 @@ public: opacity). */ void setGlowProperties (float newRadius, - Colour newColour); + Colour newColour, + Point offset = {}); //============================================================================== /** @internal */ - void applyEffect (Image& sourceImage, Graphics& destContext, float scaleFactor, float alpha); + void applyEffect (Image&, Graphics&, float scaleFactor, float alpha) override; private: //============================================================================== - float radius; - Colour colour; + float radius = 2.0f; + Colour colour { Colours::white }; + Point offset; JUCE_LEAK_DETECTOR (GlowEffect) }; diff --git a/modules/juce_graphics/fonts/juce_Font.cpp b/modules/juce_graphics/fonts/juce_Font.cpp index b80a306a07..8d43600250 100644 --- a/modules/juce_graphics/fonts/juce_Font.cpp +++ b/modules/juce_graphics/fonts/juce_Font.cpp @@ -625,6 +625,10 @@ int Font::getStringWidth (const String& text) const float Font::getStringWidthFloat (const String& text) const { + // This call isn't thread-safe when there's a message thread running + jassert (MessageManager::getInstanceWithoutCreating() == nullptr + || MessageManager::getInstanceWithoutCreating()->currentThreadHasLockedMessageManager()); + auto w = getTypeface()->getStringWidth (text); if (font->kerning != 0.0f) @@ -635,6 +639,10 @@ float Font::getStringWidthFloat (const String& text) const void Font::getGlyphPositions (const String& text, Array& glyphs, Array& xOffsets) const { + // This call isn't thread-safe when there's a message thread running + jassert (MessageManager::getInstanceWithoutCreating() == nullptr + || MessageManager::getInstanceWithoutCreating()->currentThreadHasLockedMessageManager()); + getTypeface()->getGlyphPositions (text, glyphs, xOffsets); if (auto num = xOffsets.size()) diff --git a/modules/juce_graphics/geometry/juce_Line.h b/modules/juce_graphics/geometry/juce_Line.h index 12d0b7a2bc..7143fe3082 100644 --- a/modules/juce_graphics/geometry/juce_Line.h +++ b/modules/juce_graphics/geometry/juce_Line.h @@ -251,7 +251,7 @@ public: */ Point getPointAlongLineProportionally (typename Point::FloatType proportionOfLength) const noexcept { - return start + Point ((end - start) * proportionOfLength); + return start + (end - start) * proportionOfLength; } /** Returns the smallest distance between this line segment and a given point. @@ -274,11 +274,11 @@ public: if (length > 0) { auto prop = ((targetPoint.x - start.x) * delta.x - + (targetPoint.y - start.y) * delta.y) / length; + + (targetPoint.y - start.y) * delta.y) / (double) length; if (prop >= 0 && prop <= 1.0) { - pointOnLine = start + delta * static_cast (prop); + pointOnLine = start + delta * prop; return targetPoint.getDistanceFrom (pointOnLine); } } diff --git a/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp b/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp index 4455e21745..ff5c1629d6 100644 --- a/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp +++ b/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp @@ -40,6 +40,9 @@ namespace jpeglibNamespace #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wdeprecated-register" + #if __has_warning("-Wcomma") + #pragma clang diagnostic ignored "-Wcomma" + #endif #endif #define JPEG_INTERNALS diff --git a/modules/juce_graphics/image_formats/juce_PNGLoader.cpp b/modules/juce_graphics/image_formats/juce_PNGLoader.cpp index 023b43d412..dbf35059eb 100644 --- a/modules/juce_graphics/image_formats/juce_PNGLoader.cpp +++ b/modules/juce_graphics/image_formats/juce_PNGLoader.cpp @@ -63,6 +63,9 @@ namespace pnglibNamespace #if JUCE_CLANG #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wsign-conversion" + #if __has_warning("-Wcomma") + #pragma clang diagnostic ignored "-Wcomma" + #endif #endif #undef check diff --git a/modules/juce_graphics/juce_graphics.cpp b/modules/juce_graphics/juce_graphics.cpp index c7f02b145a..6884981880 100644 --- a/modules/juce_graphics/juce_graphics.cpp +++ b/modules/juce_graphics/juce_graphics.cpp @@ -57,7 +57,7 @@ #undef JUCE_USE_DIRECTWRITE #endif - #if JUCE_USE_DIRECTWRITE + #if JUCE_USE_DIRECTWRITE || JUCE_DIRECT2D /* If you hit a compile error trying to include these files, you may need to update your version of the Windows SDK to the latest one. The DirectWrite and Direct2D headers are in the version 7 SDKs. diff --git a/modules/juce_graphics/juce_graphics.h b/modules/juce_graphics/juce_graphics.h index b16cfd5cca..80878627a1 100644 --- a/modules/juce_graphics/juce_graphics.h +++ b/modules/juce_graphics/juce_graphics.h @@ -35,7 +35,7 @@ ID: juce_graphics vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE graphics classes description: Classes for 2D vector graphics, image loading/saving, font handling, etc. website: http://www.juce.com/juce @@ -142,4 +142,8 @@ class LowLevelGraphicsContext; #include "native/juce_mac_CoreGraphicsContext.h" #endif +#if JUCE_DIRECT2D && JUCE_WINDOWS +#include "native/juce_win32_Direct2DGraphicsContext.h" +#endif + } diff --git a/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp b/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp index 550aa5f47b..40f848e58d 100644 --- a/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp +++ b/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp @@ -24,714 +24,110 @@ ============================================================================== */ -class Direct2DLowLevelGraphicsContext : public LowLevelGraphicsContext +template +D2D1_RECT_F rectangleToRectF (const Rectangle& r) { -public: - Direct2DLowLevelGraphicsContext (HWND hwnd_) - : hwnd (hwnd_), - currentState (nullptr) + return D2D1::RectF ((float) r.getX(), (float) r.getY(), (float) r.getRight(), (float) r.getBottom()); +} + +static D2D1_COLOR_F colourToD2D (Colour c) +{ + return D2D1::ColorF::ColorF (c.getFloatRed(), c.getFloatGreen(), c.getFloatBlue(), c.getFloatAlpha()); +} + +static void pathToGeometrySink (const Path& path, ID2D1GeometrySink* sink, const AffineTransform& transform) +{ + Path::Iterator it (path); + + while (it.next()) { - RECT windowRect; - GetClientRect (hwnd, &windowRect); - D2D1_SIZE_U size = { windowRect.right - windowRect.left, windowRect.bottom - windowRect.top }; - bounds.setSize (size.width, size.height); - - D2D1_RENDER_TARGET_PROPERTIES props = D2D1::RenderTargetProperties(); - D2D1_HWND_RENDER_TARGET_PROPERTIES propsHwnd = D2D1::HwndRenderTargetProperties (hwnd, size); - - if (factories->d2dFactory != nullptr) + switch (it.elementType) { - HRESULT hr = factories->d2dFactory->CreateHwndRenderTarget (props, propsHwnd, renderingTarget.resetAndGetPointerAddress()); - jassert (SUCCEEDED (hr)); ignoreUnused (hr); - hr = renderingTarget->CreateSolidColorBrush (D2D1::ColorF::ColorF (0.0f, 0.0f, 0.0f, 1.0f), colourBrush.resetAndGetPointerAddress()); - } - } - - ~Direct2DLowLevelGraphicsContext() - { - states.clear(); - } - - void resized() - { - RECT windowRect; - GetClientRect (hwnd, &windowRect); - D2D1_SIZE_U size = { windowRect.right - windowRect.left, windowRect.bottom - windowRect.top }; - - renderingTarget->Resize (size); - bounds.setSize (size.width, size.height); - } - - void clear() - { - renderingTarget->Clear (D2D1::ColorF (D2D1::ColorF::White, 0.0f)); // xxx why white and not black? - } - - void start() - { - renderingTarget->BeginDraw(); - saveState(); - } - - void end() - { - states.clear(); - currentState = 0; - renderingTarget->EndDraw(); - renderingTarget->CheckWindowState(); - } - - bool isVectorDevice() const { return false; } - - void setOrigin (Point o) - { - addTransform (AffineTransform::translation ((float) o.x, (float) o.y)); - } - - void addTransform (const AffineTransform& transform) - { - currentState->transform = transform.followedBy (currentState->transform); - } - - float getPhysicalPixelScaleFactor() - { - return currentState->transform.getScaleFactor(); - } - - bool clipToRectangle (const Rectangle& r) - { - currentState->clipToRectangle (r); - return ! isClipEmpty(); - } - - bool clipToRectangleList (const RectangleList& clipRegion) - { - currentState->clipToRectList (rectListToPathGeometry (clipRegion)); - return ! isClipEmpty(); - } - - void excludeClipRectangle (const Rectangle&) - { - //xxx - } - - void clipToPath (const Path& path, const AffineTransform& transform) - { - currentState->clipToPath (pathToPathGeometry (path, transform)); - } - - void clipToImageAlpha (const Image& sourceImage, const AffineTransform& transform) - { - currentState->clipToImage (sourceImage, transform); - } - - bool clipRegionIntersects (const Rectangle& r) - { - return currentState->clipRect.intersects (r.toFloat().transformed (currentState->transform).getSmallestIntegerContainer()); - } - - Rectangle getClipBounds() const - { - // xxx could this take into account complex clip regions? - return currentState->clipRect.toFloat().transformed (currentState->transform.inverted()).getSmallestIntegerContainer(); - } - - bool isClipEmpty() const - { - return currentState->clipRect.isEmpty(); - } - - void saveState() - { - states.add (new SavedState (*this)); - currentState = states.getLast(); - } - - void restoreState() - { - jassert (states.size() > 1) //you should never pop the last state! - states.removeLast (1); - currentState = states.getLast(); - } - - void beginTransparencyLayer (float /*opacity*/) - { - jassertfalse; //xxx todo - } - - void endTransparencyLayer() - { - jassertfalse; //xxx todo - } - - void setFill (const FillType& fillType) - { - currentState->setFill (fillType); - } - - void setOpacity (float newOpacity) - { - currentState->setOpacity (newOpacity); - } - - void setInterpolationQuality (Graphics::ResamplingQuality /*quality*/) - { - } - - void fillRect (const Rectangle& r, bool /*replaceExistingContents*/) - { - fillRect (r.toFloat()); - } - - void fillRect (const Rectangle& r) - { - renderingTarget->SetTransform (transformToMatrix (currentState->transform)); - currentState->createBrush(); - renderingTarget->FillRectangle (rectangleToRectF (r), currentState->currentBrush); - renderingTarget->SetTransform (D2D1::IdentityMatrix()); - } - - void fillRectList (const RectangleList& list) - { - for (auto& r : list) - fillRect (r); - } - - void fillPath (const Path& p, const AffineTransform& transform) - { - currentState->createBrush(); - ComSmartPtr geometry (pathToPathGeometry (p, transform.followedBy (currentState->transform))); - - if (renderingTarget != nullptr) - renderingTarget->FillGeometry (geometry, currentState->currentBrush); - } - - void drawImage (const Image& image, const AffineTransform& transform) - { - renderingTarget->SetTransform (transformToMatrix (transform.followedBy (currentState->transform))); - - D2D1_SIZE_U size; - size.width = image.getWidth(); - size.height = image.getHeight(); - - D2D1_BITMAP_PROPERTIES bp = D2D1::BitmapProperties(); - - Image img (image.convertedToFormat (Image::ARGB)); - Image::BitmapData bd (img, Image::BitmapData::readOnly); - bp.pixelFormat = renderingTarget->GetPixelFormat(); - bp.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED; - + case Path::Iterator::cubicTo: { - ComSmartPtr tempBitmap; - renderingTarget->CreateBitmap (size, bd.data, bd.lineStride, bp, tempBitmap.resetAndGetPointerAddress()); - if (tempBitmap != nullptr) - renderingTarget->DrawBitmap (tempBitmap); + D2D1_BEZIER_SEGMENT seg; + + transform.transformPoint (it.x1, it.y1); + seg.point1 = D2D1::Point2F (it.x1, it.y1); + + transform.transformPoint (it.x2, it.y2); + seg.point2 = D2D1::Point2F (it.x2, it.y2); + + transform.transformPoint (it.x3, it.y3); + seg.point3 = D2D1::Point2F (it.x3, it.y3); + + sink->AddBezier (seg); + break; } - renderingTarget->SetTransform (D2D1::IdentityMatrix()); + case Path::Iterator::lineTo: + { + transform.transformPoint (it.x1, it.y1); + sink->AddLine (D2D1::Point2F (it.x1, it.y1)); + break; + } + + case Path::Iterator::quadraticTo: + { + D2D1_QUADRATIC_BEZIER_SEGMENT seg; + + transform.transformPoint (it.x1, it.y1); + seg.point1 = D2D1::Point2F (it.x1, it.y1); + + transform.transformPoint (it.x2, it.y2); + seg.point2 = D2D1::Point2F (it.x2, it.y2); + + sink->AddQuadraticBezier (seg); + break; + } + + case Path::Iterator::closePath: + { + sink->EndFigure (D2D1_FIGURE_END_CLOSED); + break; + } + + case Path::Iterator::startNewSubPath: + { + transform.transformPoint (it.x1, it.y1); + sink->BeginFigure (D2D1::Point2F (it.x1, it.y1), D2D1_FIGURE_BEGIN_FILLED); + break; + } + } } - - void drawLine (const Line & line) - { - // xxx doesn't seem to be correctly aligned, may need nudging by 0.5 to match the software renderer's behaviour - renderingTarget->SetTransform (transformToMatrix (currentState->transform)); - currentState->createBrush(); - - renderingTarget->DrawLine (D2D1::Point2F (line.getStartX(), line.getStartY()), - D2D1::Point2F (line.getEndX(), line.getEndY()), - currentState->currentBrush); - renderingTarget->SetTransform (D2D1::IdentityMatrix()); - } - - void setFont (const Font& newFont) - { - currentState->setFont (newFont); - } - - const Font& getFont() - { - return currentState->font; - } - - void drawGlyph (int glyphNumber, const AffineTransform& transform) - { - currentState->createBrush(); - currentState->createFont(); - - float hScale = currentState->font.getHorizontalScale(); - - renderingTarget->SetTransform (transformToMatrix (AffineTransform::scale (hScale, 1.0f) - .followedBy (transform) - .followedBy (currentState->transform))); - - const UINT16 glyphIndices = (UINT16) glyphNumber; - const FLOAT glyphAdvances = 0; - DWRITE_GLYPH_OFFSET offset; - offset.advanceOffset = 0; - offset.ascenderOffset = 0; - - DWRITE_GLYPH_RUN glyphRun; - glyphRun.fontFace = currentState->currentFontFace; - glyphRun.fontEmSize = (FLOAT) (currentState->font.getHeight() * currentState->fontHeightToEmSizeFactor); - glyphRun.glyphCount = 1; - glyphRun.glyphIndices = &glyphIndices; - glyphRun.glyphAdvances = &glyphAdvances; - glyphRun.glyphOffsets = &offset; - glyphRun.isSideways = FALSE; - glyphRun.bidiLevel = 0; - - renderingTarget->DrawGlyphRun (D2D1::Point2F (0, 0), &glyphRun, currentState->currentBrush); - renderingTarget->SetTransform (D2D1::IdentityMatrix()); - } - - bool drawTextLayout (const AttributedString& text, const Rectangle& area) - { - renderingTarget->SetTransform (transformToMatrix (currentState->transform)); - - DirectWriteTypeLayout::drawToD2DContext (text, area, *renderingTarget, factories->directWriteFactory, - factories->d2dFactory, factories->systemFonts); - - renderingTarget->SetTransform (D2D1::IdentityMatrix()); - return true; - } - - //============================================================================== - class SavedState - { - public: - SavedState (Direct2DLowLevelGraphicsContext& owner_) - : owner (owner_), currentBrush (0), - fontHeightToEmSizeFactor (1.0f), currentFontFace (0), - clipsRect (false), shouldClipRect (false), - clipsRectList (false), shouldClipRectList (false), - clipsComplex (false), shouldClipComplex (false), - clipsBitmap (false), shouldClipBitmap (false) - { - if (owner.currentState != nullptr) - { - // xxx seems like a very slow way to create one of these, and this is a performance - // bottleneck.. Can the same internal objects be shared by multiple state objects, maybe using copy-on-write? - setFill (owner.currentState->fillType); - currentBrush = owner.currentState->currentBrush; - clipRect = owner.currentState->clipRect; - transform = owner.currentState->transform; - - font = owner.currentState->font; - currentFontFace = owner.currentState->currentFontFace; - } - else - { - const D2D1_SIZE_U size (owner.renderingTarget->GetPixelSize()); - clipRect.setSize (size.width, size.height); - setFill (FillType (Colours::black)); - } - } - - ~SavedState() - { - clearClip(); - clearFont(); - clearFill(); - clearPathClip(); - clearImageClip(); - complexClipLayer = 0; - bitmapMaskLayer = 0; - } - - void clearClip() - { - popClips(); - shouldClipRect = false; - } - - void clipToRectangle (const Rectangle& r) - { - clearClip(); - clipRect = r.toFloat().transformed (transform).getSmallestIntegerContainer(); - shouldClipRect = true; - pushClips(); - } - - void clearPathClip() - { - popClips(); - - if (shouldClipComplex) - { - complexClipGeometry = 0; - shouldClipComplex = false; - } - } - - void clipToPath (ID2D1Geometry* geometry) - { - clearPathClip(); - - if (complexClipLayer == 0) - owner.renderingTarget->CreateLayer (complexClipLayer.resetAndGetPointerAddress()); - - complexClipGeometry = geometry; - shouldClipComplex = true; - pushClips(); - } - - void clearRectListClip() - { - popClips(); - - if (shouldClipRectList) - { - rectListGeometry = 0; - shouldClipRectList = false; - } - } - - void clipToRectList (ID2D1Geometry* geometry) - { - clearRectListClip(); - - if (rectListLayer == 0) - owner.renderingTarget->CreateLayer (rectListLayer.resetAndGetPointerAddress()); - - rectListGeometry = geometry; - shouldClipRectList = true; - pushClips(); - } - - void clearImageClip() - { - popClips(); - - if (shouldClipBitmap) - { - maskBitmap = 0; - bitmapMaskBrush = 0; - shouldClipBitmap = false; - } - } - - void clipToImage (const Image& image, const AffineTransform& transform) - { - clearImageClip(); - - if (bitmapMaskLayer == 0) - owner.renderingTarget->CreateLayer (bitmapMaskLayer.resetAndGetPointerAddress()); - - D2D1_BRUSH_PROPERTIES brushProps; - brushProps.opacity = 1; - brushProps.transform = transformToMatrix (transform); - - D2D1_BITMAP_BRUSH_PROPERTIES bmProps = D2D1::BitmapBrushProperties (D2D1_EXTEND_MODE_WRAP, D2D1_EXTEND_MODE_WRAP); - - D2D1_SIZE_U size; - size.width = image.getWidth(); - size.height = image.getHeight(); - - D2D1_BITMAP_PROPERTIES bp = D2D1::BitmapProperties(); - - maskImage = image.convertedToFormat (Image::ARGB); - Image::BitmapData bd (this->image, Image::BitmapData::readOnly); // xxx should be maskImage? - bp.pixelFormat = owner.renderingTarget->GetPixelFormat(); - bp.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED; - - HRESULT hr = owner.renderingTarget->CreateBitmap (size, bd.data, bd.lineStride, bp, maskBitmap.resetAndGetPointerAddress()); - hr = owner.renderingTarget->CreateBitmapBrush (maskBitmap, bmProps, brushProps, bitmapMaskBrush.resetAndGetPointerAddress()); - - imageMaskLayerParams = D2D1::LayerParameters(); - imageMaskLayerParams.opacityBrush = bitmapMaskBrush; - - shouldClipBitmap = true; - pushClips(); - } - - void popClips() - { - if (clipsBitmap) - { - owner.renderingTarget->PopLayer(); - clipsBitmap = false; - } - - if (clipsComplex) - { - owner.renderingTarget->PopLayer(); - clipsComplex = false; - } - - if (clipsRectList) - { - owner.renderingTarget->PopLayer(); - clipsRectList = false; - } - - if (clipsRect) - { - owner.renderingTarget->PopAxisAlignedClip(); - clipsRect = false; - } - } - - void pushClips() - { - if (shouldClipRect && ! clipsRect) - { - owner.renderingTarget->PushAxisAlignedClip (rectangleToRectF (clipRect), D2D1_ANTIALIAS_MODE_PER_PRIMITIVE); - clipsRect = true; - } - - if (shouldClipRectList && ! clipsRectList) - { - D2D1_LAYER_PARAMETERS layerParams = D2D1::LayerParameters(); - rectListGeometry->GetBounds (D2D1::IdentityMatrix(), &layerParams.contentBounds); - layerParams.geometricMask = rectListGeometry; - owner.renderingTarget->PushLayer (layerParams, rectListLayer); - clipsRectList = true; - } - - if (shouldClipComplex && ! clipsComplex) - { - D2D1_LAYER_PARAMETERS layerParams = D2D1::LayerParameters(); - complexClipGeometry->GetBounds (D2D1::IdentityMatrix(), &layerParams.contentBounds); - layerParams.geometricMask = complexClipGeometry; - owner.renderingTarget->PushLayer (layerParams, complexClipLayer); - clipsComplex = true; - } - - if (shouldClipBitmap && ! clipsBitmap) - { - owner.renderingTarget->PushLayer (imageMaskLayerParams, bitmapMaskLayer); - clipsBitmap = true; - } - } - - void setFill (const FillType& newFillType) - { - if (fillType != newFillType) - { - fillType = newFillType; - clearFill(); - } - } - - void clearFont() - { - currentFontFace = localFontFace = 0; - } - - void setFont (const Font& newFont) - { - if (font != newFont) - { - font = newFont; - clearFont(); - } - } - - void createFont() - { - if (currentFontFace == nullptr) - { - WindowsDirectWriteTypeface* typeface = dynamic_cast (font.getTypeface()); - currentFontFace = typeface->getIDWriteFontFace(); - fontHeightToEmSizeFactor = typeface->unitsToHeightScaleFactor(); - } - } - - void setOpacity (float newOpacity) - { - fillType.setOpacity (newOpacity); - - if (currentBrush != nullptr) - currentBrush->SetOpacity (newOpacity); - } - - void clearFill() - { - gradientStops = 0; - linearGradient = 0; - radialGradient = 0; - bitmap = 0; - bitmapBrush = 0; - currentBrush = 0; - } - - void createBrush() - { - if (currentBrush == 0) - { - if (fillType.isColour()) - { - D2D1_COLOR_F colour = colourToD2D (fillType.colour); - owner.colourBrush->SetColor (colour); - currentBrush = owner.colourBrush; - } - else if (fillType.isTiledImage()) - { - D2D1_BRUSH_PROPERTIES brushProps; - brushProps.opacity = fillType.getOpacity(); - brushProps.transform = transformToMatrix (fillType.transform); - - D2D1_BITMAP_BRUSH_PROPERTIES bmProps = D2D1::BitmapBrushProperties (D2D1_EXTEND_MODE_WRAP,D2D1_EXTEND_MODE_WRAP); - - image = fillType.image; - - D2D1_SIZE_U size; - size.width = image.getWidth(); - size.height = image.getHeight(); - - D2D1_BITMAP_PROPERTIES bp = D2D1::BitmapProperties(); - - this->image = image.convertedToFormat (Image::ARGB); - Image::BitmapData bd (this->image, Image::BitmapData::readOnly); - bp.pixelFormat = owner.renderingTarget->GetPixelFormat(); - bp.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED; - - HRESULT hr = owner.renderingTarget->CreateBitmap (size, bd.data, bd.lineStride, bp, bitmap.resetAndGetPointerAddress()); - hr = owner.renderingTarget->CreateBitmapBrush (bitmap, bmProps, brushProps, bitmapBrush.resetAndGetPointerAddress()); - - currentBrush = bitmapBrush; - } - else if (fillType.isGradient()) - { - gradientStops = 0; - - D2D1_BRUSH_PROPERTIES brushProps; - brushProps.opacity = fillType.getOpacity(); - brushProps.transform = transformToMatrix (fillType.transform.followedBy (transform)); - - const int numColors = fillType.gradient->getNumColours(); - - HeapBlock stops (numColors); - - for (int i = fillType.gradient->getNumColours(); --i >= 0;) - { - stops[i].color = colourToD2D (fillType.gradient->getColour(i)); - stops[i].position = (FLOAT) fillType.gradient->getColourPosition(i); - } - - owner.renderingTarget->CreateGradientStopCollection (stops.getData(), numColors, gradientStops.resetAndGetPointerAddress()); - - if (fillType.gradient->isRadial) - { - radialGradient = 0; - - const Point p1 = fillType.gradient->point1; - const Point p2 = fillType.gradient->point2; - float r = p1.getDistanceFrom (p2); - - D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES props = - D2D1::RadialGradientBrushProperties (D2D1::Point2F (p1.x, p1.y), - D2D1::Point2F (0, 0), - r, r); - - owner.renderingTarget->CreateRadialGradientBrush (props, brushProps, gradientStops, radialGradient.resetAndGetPointerAddress()); - currentBrush = radialGradient; - } - else - { - linearGradient = 0; - - const Point p1 = fillType.gradient->point1; - const Point p2 = fillType.gradient->point2; - - D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES props = - D2D1::LinearGradientBrushProperties (D2D1::Point2F (p1.x, p1.y), - D2D1::Point2F (p2.x, p2.y)); - - owner.renderingTarget->CreateLinearGradientBrush (props, brushProps, gradientStops, linearGradient.resetAndGetPointerAddress()); - - currentBrush = linearGradient; - } - } - } - } - - //============================================================================== - //xxx most of these members should probably be private... - - Direct2DLowLevelGraphicsContext& owner; - - AffineTransform transform; - - Font font; - float fontHeightToEmSizeFactor; - IDWriteFontFace* currentFontFace; - ComSmartPtr localFontFace; - - FillType fillType; - - Image image; - ComSmartPtr bitmap; // xxx needs a better name - what is this for?? - - Rectangle clipRect; - bool clipsRect, shouldClipRect; - - ComSmartPtr complexClipGeometry; - D2D1_LAYER_PARAMETERS complexClipLayerParams; - ComSmartPtr complexClipLayer; - bool clipsComplex, shouldClipComplex; - - ComSmartPtr rectListGeometry; - D2D1_LAYER_PARAMETERS rectListLayerParams; - ComSmartPtr rectListLayer; - bool clipsRectList, shouldClipRectList; - - Image maskImage; - D2D1_LAYER_PARAMETERS imageMaskLayerParams; - ComSmartPtr bitmapMaskLayer; - ComSmartPtr maskBitmap; - ComSmartPtr bitmapMaskBrush; - bool clipsBitmap, shouldClipBitmap; - - ID2D1Brush* currentBrush; - ComSmartPtr bitmapBrush; - ComSmartPtr linearGradient; - ComSmartPtr radialGradient; - ComSmartPtr gradientStops; - - private: - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SavedState) - }; - - //============================================================================== -private: - SharedResourcePointer factories; - HWND hwnd; - ComSmartPtr renderingTarget; - ComSmartPtr colourBrush; - Rectangle bounds; - - SavedState* currentState; - OwnedArray states; - - //============================================================================== - template - static D2D1_RECT_F rectangleToRectF (const Rectangle& r) - { - return D2D1::RectF ((float) r.getX(), (float) r.getY(), (float) r.getRight(), (float) r.getBottom()); - } - - static D2D1_COLOR_F colourToD2D (Colour c) - { - return D2D1::ColorF::ColorF (c.getFloatRed(), c.getFloatGreen(), c.getFloatBlue(), c.getFloatAlpha()); - } - - static D2D1_POINT_2F pointTransformed (int x, int y, const AffineTransform& transform) - { - transform.transformPoint (x, y); - return D2D1::Point2F ((FLOAT) x, (FLOAT) y); - } - - static void rectToGeometrySink (const Rectangle& rect, ID2D1GeometrySink* sink) - { - sink->BeginFigure (pointTransformed (rect.getX(), rect.getY()), D2D1_FIGURE_BEGIN_FILLED); - sink->AddLine (pointTransformed (rect.getRight(), rect.getY())); - sink->AddLine (pointTransformed (rect.getRight(), rect.getBottom())); - sink->AddLine (pointTransformed (rect.getX(), rect.getBottom())); - sink->EndFigure (D2D1_FIGURE_END_CLOSED); - } - - static ID2D1PathGeometry* rectListToPathGeometry (const RectangleList& clipRegion) +} + +static D2D1::Matrix3x2F transformToMatrix (const AffineTransform& transform) +{ + D2D1::Matrix3x2F matrix; + matrix._11 = transform.mat00; + matrix._12 = transform.mat10; + matrix._21 = transform.mat01; + matrix._22 = transform.mat11; + matrix._31 = transform.mat02; + matrix._32 = transform.mat12; + return matrix; +} + +static D2D1_POINT_2F pointTransformed (int x, int y, const AffineTransform& transform) +{ + transform.transformPoint (x, y); + return D2D1::Point2F ((FLOAT) x, (FLOAT) y); +} + +static void rectToGeometrySink (const Rectangle& rect, ID2D1GeometrySink* sink, const AffineTransform& transform) +{ + sink->BeginFigure (pointTransformed (rect.getX(), rect.getY(), transform), D2D1_FIGURE_BEGIN_FILLED); + sink->AddLine (pointTransformed (rect.getRight(), rect.getY(), transform)); + sink->AddLine (pointTransformed (rect.getRight(), rect.getBottom(), transform)); + sink->AddLine (pointTransformed (rect.getX(), rect.getBottom(), transform)); + sink->EndFigure (D2D1_FIGURE_END_CLOSED); +} + +//============================================================================== +struct Direct2DLowLevelGraphicsContext::Pimpl +{ + ID2D1PathGeometry* rectListToPathGeometry (const RectangleList& clipRegion) { ID2D1PathGeometry* p = nullptr; factories->d2dFactory->CreatePathGeometry (&p); @@ -741,75 +137,13 @@ private: sink->SetFillMode (D2D1_FILL_MODE_WINDING); for (int i = clipRegion.getNumRectangles(); --i >= 0;) - rectToGeometrySink (clipRegion.getRectangle(i), sink); + rectToGeometrySink (clipRegion.getRectangle(i), sink, AffineTransform()); hr = sink->Close(); return p; } - static void pathToGeometrySink (const Path& path, ID2D1GeometrySink* sink, const AffineTransform& transform) - { - Path::Iterator it (path); - - while (it.next()) - { - switch (it.elementType) - { - case Path::Iterator::cubicTo: - { - D2D1_BEZIER_SEGMENT seg; - - transform.transformPoint (it.x1, it.y1); - seg.point1 = D2D1::Point2F (it.x1, it.y1); - - transform.transformPoint (it.x2, it.y2); - seg.point2 = D2D1::Point2F (it.x2, it.y2); - - transform.transformPoint(it.x3, it.y3); - seg.point3 = D2D1::Point2F (it.x3, it.y3); - - sink->AddBezier (seg); - break; - } - - case Path::Iterator::lineTo: - { - transform.transformPoint (it.x1, it.y1); - sink->AddLine (D2D1::Point2F (it.x1, it.y1)); - break; - } - - case Path::Iterator::quadraticTo: - { - D2D1_QUADRATIC_BEZIER_SEGMENT seg; - - transform.transformPoint (it.x1, it.y1); - seg.point1 = D2D1::Point2F (it.x1, it.y1); - - transform.transformPoint (it.x2, it.y2); - seg.point2 = D2D1::Point2F (it.x2, it.y2); - - sink->AddQuadraticBezier (seg); - break; - } - - case Path::Iterator::closePath: - { - sink->EndFigure (D2D1_FIGURE_END_CLOSED); - break; - } - - case Path::Iterator::startNewSubPath: - { - transform.transformPoint (it.x1, it.y1); - sink->BeginFigure (D2D1::Point2F (it.x1, it.y1), D2D1_FIGURE_BEGIN_FILLED); - break; - } - } - } - } - - static ID2D1PathGeometry* pathToPathGeometry (const Path& path, const AffineTransform& transform) + ID2D1PathGeometry* pathToPathGeometry (const Path& path, const AffineTransform& transform) { ID2D1PathGeometry* p = nullptr; factories->d2dFactory->CreatePathGeometry (&p); @@ -824,17 +158,668 @@ private: return p; } - static D2D1::Matrix3x2F transformToMatrix (const AffineTransform& transform) + SharedResourcePointer factories; + + ComSmartPtr renderingTarget; + ComSmartPtr colourBrush; +}; + +//============================================================================== +struct Direct2DLowLevelGraphicsContext::SavedState +{ +public: + SavedState (Direct2DLowLevelGraphicsContext& owner_) + : owner (owner_) { - D2D1::Matrix3x2F matrix; - matrix._11 = transform.mat00; - matrix._12 = transform.mat10; - matrix._21 = transform.mat01; - matrix._22 = transform.mat11; - matrix._31 = transform.mat02; - matrix._32 = transform.mat12; - return matrix; + if (owner.currentState != nullptr) + { + // xxx seems like a very slow way to create one of these, and this is a performance + // bottleneck.. Can the same internal objects be shared by multiple state objects, maybe using copy-on-write? + setFill (owner.currentState->fillType); + currentBrush = owner.currentState->currentBrush; + clipRect = owner.currentState->clipRect; + transform = owner.currentState->transform; + + font = owner.currentState->font; + currentFontFace = owner.currentState->currentFontFace; + } + else + { + const D2D1_SIZE_U size (owner.pimpl->renderingTarget->GetPixelSize()); + clipRect.setSize (size.width, size.height); + setFill (FillType (Colours::black)); + } } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Direct2DLowLevelGraphicsContext) + ~SavedState() + { + clearClip(); + clearFont(); + clearFill(); + clearPathClip(); + clearImageClip(); + complexClipLayer = nullptr; + bitmapMaskLayer = nullptr; + } + + void clearClip() + { + popClips(); + shouldClipRect = false; + } + + void clipToRectangle (const Rectangle& r) + { + clearClip(); + clipRect = r.toFloat().transformed (transform).getSmallestIntegerContainer(); + shouldClipRect = true; + pushClips(); + } + + void clearPathClip() + { + popClips(); + + if (shouldClipComplex) + { + complexClipGeometry = nullptr; + shouldClipComplex = false; + } + } + + void Direct2DLowLevelGraphicsContext::SavedState::clipToPath (ID2D1Geometry* geometry) + { + clearPathClip(); + + if (complexClipLayer == nullptr) + owner.pimpl->renderingTarget->CreateLayer (complexClipLayer.resetAndGetPointerAddress()); + + complexClipGeometry = geometry; + shouldClipComplex = true; + pushClips(); + } + + void clearRectListClip() + { + popClips(); + + if (shouldClipRectList) + { + rectListGeometry = nullptr; + shouldClipRectList = false; + } + } + + void clipToRectList (ID2D1Geometry* geometry) + { + clearRectListClip(); + + if (rectListLayer == nullptr) + owner.pimpl->renderingTarget->CreateLayer (rectListLayer.resetAndGetPointerAddress()); + + rectListGeometry = geometry; + shouldClipRectList = true; + pushClips(); + } + + void clearImageClip() + { + popClips(); + + if (shouldClipBitmap) + { + maskBitmap = nullptr; + bitmapMaskBrush = nullptr; + shouldClipBitmap = false; + } + } + + void clipToImage (const Image& clipImage, const AffineTransform& clipTransform) + { + clearImageClip(); + + if (bitmapMaskLayer == nullptr) + owner.pimpl->renderingTarget->CreateLayer (bitmapMaskLayer.resetAndGetPointerAddress()); + + D2D1_BRUSH_PROPERTIES brushProps; + brushProps.opacity = 1; + brushProps.transform = transformToMatrix (clipTransform); + + D2D1_BITMAP_BRUSH_PROPERTIES bmProps = D2D1::BitmapBrushProperties (D2D1_EXTEND_MODE_WRAP, D2D1_EXTEND_MODE_WRAP); + + D2D1_SIZE_U size; + size.width = clipImage.getWidth(); + size.height = clipImage.getHeight(); + + D2D1_BITMAP_PROPERTIES bp = D2D1::BitmapProperties(); + + maskImage = clipImage.convertedToFormat (Image::ARGB); + Image::BitmapData bd (maskImage, Image::BitmapData::readOnly); // xxx should be maskImage? + bp.pixelFormat = owner.pimpl->renderingTarget->GetPixelFormat(); + bp.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED; + + HRESULT hr = owner.pimpl->renderingTarget->CreateBitmap (size, bd.data, bd.lineStride, bp, maskBitmap.resetAndGetPointerAddress()); + hr = owner.pimpl->renderingTarget->CreateBitmapBrush (maskBitmap, bmProps, brushProps, bitmapMaskBrush.resetAndGetPointerAddress()); + + imageMaskLayerParams = D2D1::LayerParameters(); + imageMaskLayerParams.opacityBrush = bitmapMaskBrush; + + shouldClipBitmap = true; + pushClips(); + } + + void popClips() + { + if (clipsBitmap) + { + owner.pimpl->renderingTarget->PopLayer(); + clipsBitmap = false; + } + + if (clipsComplex) + { + owner.pimpl->renderingTarget->PopLayer(); + clipsComplex = false; + } + + if (clipsRectList) + { + owner.pimpl->renderingTarget->PopLayer(); + clipsRectList = false; + } + + if (clipsRect) + { + owner.pimpl->renderingTarget->PopAxisAlignedClip(); + clipsRect = false; + } + } + + void pushClips() + { + if (shouldClipRect && !clipsRect) + { + owner.pimpl->renderingTarget->PushAxisAlignedClip (rectangleToRectF (clipRect), D2D1_ANTIALIAS_MODE_PER_PRIMITIVE); + clipsRect = true; + } + + if (shouldClipRectList && !clipsRectList) + { + D2D1_LAYER_PARAMETERS layerParams = D2D1::LayerParameters(); + rectListGeometry->GetBounds (D2D1::IdentityMatrix(), &layerParams.contentBounds); + layerParams.geometricMask = rectListGeometry; + owner.pimpl->renderingTarget->PushLayer (layerParams, rectListLayer); + clipsRectList = true; + } + + if (shouldClipComplex && !clipsComplex) + { + D2D1_LAYER_PARAMETERS layerParams = D2D1::LayerParameters(); + complexClipGeometry->GetBounds (D2D1::IdentityMatrix(), &layerParams.contentBounds); + layerParams.geometricMask = complexClipGeometry; + owner.pimpl->renderingTarget->PushLayer (layerParams, complexClipLayer); + clipsComplex = true; + } + + if (shouldClipBitmap && !clipsBitmap) + { + owner.pimpl->renderingTarget->PushLayer (imageMaskLayerParams, bitmapMaskLayer); + clipsBitmap = true; + } + } + + void setFill (const FillType& newFillType) + { + if (fillType != newFillType) + { + fillType = newFillType; + clearFill(); + } + } + + void clearFont() + { + currentFontFace = localFontFace = nullptr; + } + + void setFont (const Font& newFont) + { + if (font != newFont) + { + font = newFont; + clearFont(); + } + } + + void createFont() + { + if (currentFontFace == nullptr) + { + WindowsDirectWriteTypeface* typeface = dynamic_cast (font.getTypeface()); + currentFontFace = typeface->getIDWriteFontFace(); + fontHeightToEmSizeFactor = typeface->getUnitsToHeightScaleFactor(); + } + } + + void setOpacity (float newOpacity) + { + fillType.setOpacity (newOpacity); + + if (currentBrush != nullptr) + currentBrush->SetOpacity (newOpacity); + } + + void clearFill() + { + gradientStops = nullptr; + linearGradient = nullptr; + radialGradient = nullptr; + bitmap = nullptr; + bitmapBrush = nullptr; + currentBrush = nullptr; + } + + void createBrush() + { + if (currentBrush == nullptr) + { + if (fillType.isColour()) + { + D2D1_COLOR_F colour = colourToD2D (fillType.colour); + owner.pimpl->colourBrush->SetColor (colour); + currentBrush = owner.pimpl->colourBrush; + } + else if (fillType.isTiledImage()) + { + D2D1_BRUSH_PROPERTIES brushProps; + brushProps.opacity = fillType.getOpacity(); + brushProps.transform = transformToMatrix (fillType.transform); + + D2D1_BITMAP_BRUSH_PROPERTIES bmProps = D2D1::BitmapBrushProperties (D2D1_EXTEND_MODE_WRAP, D2D1_EXTEND_MODE_WRAP); + + image = fillType.image; + + D2D1_SIZE_U size; + size.width = image.getWidth(); + size.height = image.getHeight(); + + D2D1_BITMAP_PROPERTIES bp = D2D1::BitmapProperties(); + + this->image = image.convertedToFormat (Image::ARGB); + Image::BitmapData bd (this->image, Image::BitmapData::readOnly); + bp.pixelFormat = owner.pimpl->renderingTarget->GetPixelFormat(); + bp.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED; + + HRESULT hr = owner.pimpl->renderingTarget->CreateBitmap (size, bd.data, bd.lineStride, bp, bitmap.resetAndGetPointerAddress()); + hr = owner.pimpl->renderingTarget->CreateBitmapBrush (bitmap, bmProps, brushProps, bitmapBrush.resetAndGetPointerAddress()); + + currentBrush = bitmapBrush; + } + else if (fillType.isGradient()) + { + gradientStops = nullptr; + + D2D1_BRUSH_PROPERTIES brushProps; + brushProps.opacity = fillType.getOpacity(); + brushProps.transform = transformToMatrix (fillType.transform.followedBy (transform)); + + const int numColors = fillType.gradient->getNumColours(); + + HeapBlock stops (numColors); + + for (int i = fillType.gradient->getNumColours(); --i >= 0;) + { + stops[i].color = colourToD2D (fillType.gradient->getColour (i)); + stops[i].position = (FLOAT) fillType.gradient->getColourPosition (i); + } + + owner.pimpl->renderingTarget->CreateGradientStopCollection (stops.getData(), numColors, gradientStops.resetAndGetPointerAddress()); + + if (fillType.gradient->isRadial) + { + radialGradient = nullptr; + + const Point p1 = fillType.gradient->point1; + const Point p2 = fillType.gradient->point2; + float r = p1.getDistanceFrom(p2); + + D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES props = + D2D1::RadialGradientBrushProperties(D2D1::Point2F(p1.x, p1.y), + D2D1::Point2F(0, 0), + r, r); + + owner.pimpl->renderingTarget->CreateRadialGradientBrush(props, brushProps, gradientStops, radialGradient.resetAndGetPointerAddress()); + currentBrush = radialGradient; + } + else + { + linearGradient = 0; + + const Point p1 = fillType.gradient->point1; + const Point p2 = fillType.gradient->point2; + + D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES props = + D2D1::LinearGradientBrushProperties(D2D1::Point2F(p1.x, p1.y), + D2D1::Point2F(p2.x, p2.y)); + + owner.pimpl->renderingTarget->CreateLinearGradientBrush (props, brushProps, gradientStops, linearGradient.resetAndGetPointerAddress()); + + currentBrush = linearGradient; + } + } + } + } + + Direct2DLowLevelGraphicsContext& owner; + + AffineTransform transform; + + Font font; + float fontHeightToEmSizeFactor = 1.0; + + IDWriteFontFace* currentFontFace = nullptr; + ComSmartPtr localFontFace; + + Rectangle clipRect; + bool clipsRect = false, shouldClipRect = false; + + Image image; + ComSmartPtr bitmap; // xxx needs a better name - what is this for?? + bool clipsBitmap = false, shouldClipBitmap = false; + + ComSmartPtr complexClipGeometry; + D2D1_LAYER_PARAMETERS complexClipLayerParams; + ComSmartPtr complexClipLayer; + bool clipsComplex = false, shouldClipComplex = false; + + ComSmartPtr rectListGeometry; + D2D1_LAYER_PARAMETERS rectListLayerParams; + ComSmartPtr rectListLayer; + bool clipsRectList = false, shouldClipRectList = false; + + Image maskImage; + D2D1_LAYER_PARAMETERS imageMaskLayerParams; + ComSmartPtr bitmapMaskLayer; + ComSmartPtr maskBitmap; + ComSmartPtr bitmapMaskBrush; + + ID2D1Brush* currentBrush = nullptr; + ComSmartPtr bitmapBrush; + ComSmartPtr linearGradient; + ComSmartPtr radialGradient; + ComSmartPtr gradientStops; + + FillType fillType; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SavedState) }; + +//============================================================================== +Direct2DLowLevelGraphicsContext::Direct2DLowLevelGraphicsContext (HWND hwnd_) + : hwnd (hwnd_), + currentState (nullptr), + pimpl (new Pimpl()) +{ + RECT windowRect; + GetClientRect (hwnd, &windowRect); + D2D1_SIZE_U size = { (UINT32) (windowRect.right - windowRect.left), (UINT32) (windowRect.bottom - windowRect.top) }; + bounds.setSize (size.width, size.height); + + D2D1_RENDER_TARGET_PROPERTIES props = D2D1::RenderTargetProperties(); + D2D1_HWND_RENDER_TARGET_PROPERTIES propsHwnd = D2D1::HwndRenderTargetProperties (hwnd, size); + + if (pimpl->factories->d2dFactory != nullptr) + { + HRESULT hr = pimpl->factories->d2dFactory->CreateHwndRenderTarget (props, propsHwnd, pimpl->renderingTarget.resetAndGetPointerAddress()); + jassert (SUCCEEDED (hr)); ignoreUnused (hr); + hr = pimpl->renderingTarget->CreateSolidColorBrush (D2D1::ColorF::ColorF (0.0f, 0.0f, 0.0f, 1.0f), pimpl->colourBrush.resetAndGetPointerAddress()); + } +} + +Direct2DLowLevelGraphicsContext::~Direct2DLowLevelGraphicsContext() +{ + states.clear(); +} + +void Direct2DLowLevelGraphicsContext::resized() +{ + RECT windowRect; + GetClientRect (hwnd, &windowRect); + D2D1_SIZE_U size = { (UINT32) (windowRect.right - windowRect.left), (UINT32) (windowRect.bottom - windowRect.top) }; + + pimpl->renderingTarget->Resize (size); + bounds.setSize (size.width, size.height); +} + +void Direct2DLowLevelGraphicsContext::clear() +{ + pimpl->renderingTarget->Clear (D2D1::ColorF (D2D1::ColorF::White, 0.0f)); // xxx why white and not black? +} + +void Direct2DLowLevelGraphicsContext::start() +{ + pimpl->renderingTarget->BeginDraw(); + saveState(); +} + +void Direct2DLowLevelGraphicsContext::end() +{ + states.clear(); + currentState = 0; + pimpl->renderingTarget->EndDraw(); + pimpl->renderingTarget->CheckWindowState(); +} + +void Direct2DLowLevelGraphicsContext::setOrigin (Point o) +{ + addTransform (AffineTransform::translation ((float) o.x, (float) o.y)); +} + +void Direct2DLowLevelGraphicsContext::addTransform (const AffineTransform& transform) +{ + currentState->transform = transform.followedBy (currentState->transform); +} + +float Direct2DLowLevelGraphicsContext::getPhysicalPixelScaleFactor() +{ + return currentState->transform.getScaleFactor(); +} + +bool Direct2DLowLevelGraphicsContext::clipToRectangle (const Rectangle& r) +{ + currentState->clipToRectangle (r); + return ! isClipEmpty(); +} + +bool Direct2DLowLevelGraphicsContext::clipToRectangleList (const RectangleList& clipRegion) +{ + currentState->clipToRectList (pimpl->rectListToPathGeometry (clipRegion)); + return ! isClipEmpty(); +} + +void Direct2DLowLevelGraphicsContext::excludeClipRectangle (const Rectangle&) +{ + //xxx +} + +void Direct2DLowLevelGraphicsContext::clipToPath (const Path& path, const AffineTransform& transform) +{ + currentState->clipToPath (pimpl->pathToPathGeometry (path, transform)); +} + +void Direct2DLowLevelGraphicsContext::clipToImageAlpha (const Image& sourceImage, const AffineTransform& transform) +{ + currentState->clipToImage (sourceImage, transform); +} + +bool Direct2DLowLevelGraphicsContext::clipRegionIntersects (const Rectangle& r) +{ + return currentState->clipRect.intersects (r.toFloat().transformed (currentState->transform).getSmallestIntegerContainer()); +} + +Rectangle Direct2DLowLevelGraphicsContext::getClipBounds() const +{ + // xxx could this take into account complex clip regions? + return currentState->clipRect.toFloat().transformed (currentState->transform.inverted()).getSmallestIntegerContainer(); +} + +bool Direct2DLowLevelGraphicsContext::isClipEmpty() const +{ + return currentState->clipRect.isEmpty(); +} + +void Direct2DLowLevelGraphicsContext::saveState() +{ + states.add (new SavedState (*this)); + currentState = states.getLast(); +} + +void Direct2DLowLevelGraphicsContext::restoreState() +{ + jassert (states.size() > 1); //you should never pop the last state! + states.removeLast (1); + currentState = states.getLast(); +} + +void Direct2DLowLevelGraphicsContext::beginTransparencyLayer (float /*opacity*/) +{ + jassertfalse; //xxx todo +} + +void Direct2DLowLevelGraphicsContext::endTransparencyLayer() +{ + jassertfalse; //xxx todo +} + +void Direct2DLowLevelGraphicsContext::setFill (const FillType& fillType) +{ + currentState->setFill (fillType); +} + +void Direct2DLowLevelGraphicsContext::setOpacity (float newOpacity) +{ + currentState->setOpacity (newOpacity); +} + +void Direct2DLowLevelGraphicsContext::setInterpolationQuality (Graphics::ResamplingQuality /*quality*/) +{ +} + +void Direct2DLowLevelGraphicsContext::fillRect (const Rectangle& r, bool /*replaceExistingContents*/) +{ + fillRect (r.toFloat()); +} + +void Direct2DLowLevelGraphicsContext::fillRect (const Rectangle& r) +{ + pimpl->renderingTarget->SetTransform (transformToMatrix (currentState->transform)); + currentState->createBrush(); + pimpl->renderingTarget->FillRectangle (rectangleToRectF (r), currentState->currentBrush); + pimpl->renderingTarget->SetTransform (D2D1::IdentityMatrix()); +} + +void Direct2DLowLevelGraphicsContext::fillRectList (const RectangleList& list) +{ + for (auto& r : list) + fillRect (r); +} + +void Direct2DLowLevelGraphicsContext::fillPath (const Path& p, const AffineTransform& transform) +{ + currentState->createBrush(); + ComSmartPtr geometry (pimpl->pathToPathGeometry (p, transform.followedBy (currentState->transform))); + + if (pimpl->renderingTarget != nullptr) + pimpl->renderingTarget->FillGeometry (geometry, currentState->currentBrush); +} + +void Direct2DLowLevelGraphicsContext::drawImage (const Image& image, const AffineTransform& transform) +{ + pimpl->renderingTarget->SetTransform (transformToMatrix (transform.followedBy (currentState->transform))); + + D2D1_SIZE_U size; + size.width = image.getWidth(); + size.height = image.getHeight(); + + D2D1_BITMAP_PROPERTIES bp = D2D1::BitmapProperties(); + + Image img (image.convertedToFormat (Image::ARGB)); + Image::BitmapData bd (img, Image::BitmapData::readOnly); + bp.pixelFormat = pimpl->renderingTarget->GetPixelFormat(); + bp.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED; + + { + ComSmartPtr tempBitmap; + pimpl->renderingTarget->CreateBitmap (size, bd.data, bd.lineStride, bp, tempBitmap.resetAndGetPointerAddress()); + if (tempBitmap != nullptr) + pimpl->renderingTarget->DrawBitmap (tempBitmap); + } + + pimpl->renderingTarget->SetTransform (D2D1::IdentityMatrix()); +} + +void Direct2DLowLevelGraphicsContext::drawLine (const Line & line) +{ + // xxx doesn't seem to be correctly aligned, may need nudging by 0.5 to match the software renderer's behaviour + pimpl->renderingTarget->SetTransform (transformToMatrix (currentState->transform)); + currentState->createBrush(); + + pimpl->renderingTarget->DrawLine (D2D1::Point2F (line.getStartX(), line.getStartY()), + D2D1::Point2F (line.getEndX(), line.getEndY()), + currentState->currentBrush); + pimpl->renderingTarget->SetTransform (D2D1::IdentityMatrix()); +} + +void Direct2DLowLevelGraphicsContext::setFont (const Font& newFont) +{ + currentState->setFont (newFont); +} + +const Font& Direct2DLowLevelGraphicsContext::getFont() +{ + return currentState->font; +} + +void Direct2DLowLevelGraphicsContext::drawGlyph (int glyphNumber, const AffineTransform& transform) +{ + currentState->createBrush(); + currentState->createFont(); + + float hScale = currentState->font.getHorizontalScale(); + + pimpl->renderingTarget->SetTransform (transformToMatrix (AffineTransform::scale (hScale, 1.0f) + .followedBy (transform) + .followedBy (currentState->transform))); + + const UINT16 glyphIndices = (UINT16) glyphNumber; + const FLOAT glyphAdvances = 0; + DWRITE_GLYPH_OFFSET offset; + offset.advanceOffset = 0; + offset.ascenderOffset = 0; + + DWRITE_GLYPH_RUN glyphRun; + glyphRun.fontFace = currentState->currentFontFace; + glyphRun.fontEmSize = (FLOAT) (currentState->font.getHeight() * currentState->fontHeightToEmSizeFactor); + glyphRun.glyphCount = 1; + glyphRun.glyphIndices = &glyphIndices; + glyphRun.glyphAdvances = &glyphAdvances; + glyphRun.glyphOffsets = &offset; + glyphRun.isSideways = FALSE; + glyphRun.bidiLevel = 0; + + pimpl->renderingTarget->DrawGlyphRun (D2D1::Point2F (0, 0), &glyphRun, currentState->currentBrush); + pimpl->renderingTarget->SetTransform (D2D1::IdentityMatrix()); +} + +bool Direct2DLowLevelGraphicsContext::drawTextLayout (const AttributedString& text, const Rectangle& area) +{ + pimpl->renderingTarget->SetTransform (transformToMatrix (currentState->transform)); + + DirectWriteTypeLayout::drawToD2DContext (text, area, + *(pimpl->renderingTarget), + *(pimpl->factories->directWriteFactory), + *(pimpl->factories->systemFonts)); + + pimpl->renderingTarget->SetTransform (D2D1::IdentityMatrix()); + return true; +} diff --git a/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.h b/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.h new file mode 100644 index 0000000000..2c923a76ed --- /dev/null +++ b/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.h @@ -0,0 +1,103 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#pragma once + +#ifndef _WINDEF_ +class HWND__; // Forward or never +typedef HWND__* HWND; +#endif + +class Direct2DLowLevelGraphicsContext : public LowLevelGraphicsContext +{ +public: + Direct2DLowLevelGraphicsContext (HWND); + ~Direct2DLowLevelGraphicsContext(); + + //============================================================================== + bool isVectorDevice() const override { return false; } + + void setOrigin (Point) override; + void addTransform (const AffineTransform&) override; + float getPhysicalPixelScaleFactor() override; + bool clipToRectangle (const Rectangle&) override; + bool clipToRectangleList (const RectangleList&) override; + void excludeClipRectangle (const Rectangle&) override; + void clipToPath (const Path&, const AffineTransform&) override; + void clipToImageAlpha (const Image&, const AffineTransform&) override; + bool clipRegionIntersects (const Rectangle&) override; + Rectangle getClipBounds() const override; + bool isClipEmpty() const override; + + //============================================================================== + void saveState() override; + void restoreState() override; + void beginTransparencyLayer (float opacity) override; + void endTransparencyLayer() override; + + //============================================================================== + void setFill (const FillType&) override; + void setOpacity (float) override; + void setInterpolationQuality (Graphics::ResamplingQuality) override; + + //============================================================================== + void fillRect (const Rectangle&, bool replaceExistingContents) override; + void fillRect (const Rectangle&) override; + void fillRectList (const RectangleList&) override; + void fillPath (const Path&, const AffineTransform&) override; + void drawImage (const Image& sourceImage, const AffineTransform&) override; + + //============================================================================== + void drawLine (const Line&) override; + void setFont (const Font&) override; + const Font& getFont() override; + void drawGlyph (int glyphNumber, const AffineTransform&) override; + bool drawTextLayout (const AttributedString&, const Rectangle&) override; + + void resized(); + void clear(); + + void start(); + void end(); + + //============================================================================== +private: + struct SavedState; + + HWND hwnd; + + SavedState* currentState; + OwnedArray states; + + Rectangle bounds; + + struct Pimpl; + friend struct Pimpl; + friend struct ContainerDeletePolicy; + ScopedPointer pimpl; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Direct2DLowLevelGraphicsContext) +}; diff --git a/modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp b/modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp index 8a45d42d4c..fb30ddb42d 100644 --- a/modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp +++ b/modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp @@ -265,6 +265,8 @@ public: IDWriteFontFace* getIDWriteFontFace() const noexcept { return dwFontFace; } + float getUnitsToHeightScaleFactor() const noexcept { return unitsToHeightScaleFactor; } + private: SharedResourcePointer factories; ComSmartPtr dwFontFace; diff --git a/modules/juce_gui_basics/buttons/juce_Button.cpp b/modules/juce_gui_basics/buttons/juce_Button.cpp index f93576df33..2dc8696014 100644 --- a/modules/juce_gui_basics/buttons/juce_Button.cpp +++ b/modules/juce_gui_basics/buttons/juce_Button.cpp @@ -242,19 +242,17 @@ void Button::setRadioGroupId (const int newGroupId, NotificationType notificatio void Button::turnOffOtherButtonsInGroup (const NotificationType notification) { - if (Component* const p = getParentComponent()) + if (auto* p = getParentComponent()) { if (radioGroupId != 0) { WeakReference deletionWatcher (this); - for (int i = p->getNumChildComponents(); --i >= 0;) + for (auto* c : p->getChildren()) { - Component* const c = p->getChildComponent (i); - if (c != this) { - if (Button* const b = dynamic_cast (c)) + if (auto b = dynamic_cast (c)) { if (b->getRadioGroupId() == radioGroupId) { @@ -331,6 +329,11 @@ void Button::setTriggeredOnMouseDown (const bool isTriggeredOnMouseDown) noexcep triggerOnMouseDown = isTriggeredOnMouseDown; } +bool Button::getTriggeredOnMouseDown() const noexcept +{ + return triggerOnMouseDown; +} + //============================================================================== void Button::clicked() { diff --git a/modules/juce_gui_basics/buttons/juce_Button.h b/modules/juce_gui_basics/buttons/juce_Button.h index a410433b1e..e15ef92f03 100644 --- a/modules/juce_gui_basics/buttons/juce_Button.h +++ b/modules/juce_gui_basics/buttons/juce_Button.h @@ -267,6 +267,11 @@ public: */ void setTriggeredOnMouseDown (bool isTriggeredOnMouseDown) noexcept; + /** Returns whether the button click happens when the mouse is pressed or released. + @see setTriggeredOnMouseDown + */ + bool getTriggeredOnMouseDown() const noexcept; + /** Returns the number of milliseconds since the last time the button went into the 'down' state. */ diff --git a/modules/juce_gui_basics/buttons/juce_ShapeButton.h b/modules/juce_gui_basics/buttons/juce_ShapeButton.h index 7e934b3c70..60372a3bf0 100644 --- a/modules/juce_gui_basics/buttons/juce_ShapeButton.h +++ b/modules/juce_gui_basics/buttons/juce_ShapeButton.h @@ -79,9 +79,9 @@ public: /** Sets the colours to use for drawing the shape when the button's toggle state is 'on'. To enable this behaviour, use the shouldUseOnColours() method. - @param normalColour the colour to fill the shape with when the mouse isn't over and the button's toggle state is 'on' - @param overColour the colour to use when the mouse is over the shape and the button's toggle state is 'on' - @param downColour the colour to use when the button is in the pressed-down state and the button's toggle state is 'on' + @param normalColourOn the colour to fill the shape with when the mouse isn't over and the button's toggle state is 'on' + @param overColourOn the colour to use when the mouse is over the shape and the button's toggle state is 'on' + @param downColourOn the colour to use when the button is in the pressed-down state and the button's toggle state is 'on' */ void setOnColours (Colour normalColourOn, Colour overColourOn, diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index fc3622084e..7efb8a9190 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -176,7 +176,10 @@ struct FocusRestorer ~FocusRestorer() { if (lastFocus != nullptr && ! lastFocus->isCurrentlyBlockedByAnotherModalComponent()) - lastFocus->grabKeyboardFocus(); + { + if (lastFocus != nullptr && lastFocus->isShowing()) + lastFocus->grabKeyboardFocus(); + } } WeakReference lastFocus; @@ -406,7 +409,7 @@ struct Component::ComponentHelpers for (int i = comp.childComponentList.size(); --i >= 0;) { - const Component& child = *comp.childComponentList.getUnchecked(i); + auto& child = *comp.childComponentList.getUnchecked(i); if (child.isVisible() && ! child.isTransformed()) { @@ -421,7 +424,8 @@ struct Component::ComponentHelpers } else { - const Point childPos (child.getPosition()); + auto childPos = child.getPosition(); + if (clipObscuredRegions (child, g, newClip - childPos, childPos + delta)) wasClipped = true; } @@ -434,7 +438,7 @@ struct Component::ComponentHelpers static Rectangle getParentOrMainMonitorBounds (const Component& comp) { - if (Component* p = comp.getParentComponent()) + if (auto* p = comp.getParentComponent()) return p->getLocalBounds(); return Desktop::getInstance().getDisplays().getMainDisplay().userArea; @@ -442,31 +446,22 @@ struct Component::ComponentHelpers static void releaseAllCachedImageResources (Component& c) { - if (CachedComponentImage* cached = c.getCachedComponentImage()) + if (auto* cached = c.getCachedComponentImage()) cached->releaseResources(); - for (int i = c.getNumChildComponents(); --i >= 0;) - releaseAllCachedImageResources (*c.getChildComponent (i)); + for (auto* child : c.childComponentList) + releaseAllCachedImageResources (*child); } }; //============================================================================== Component::Component() noexcept - : parentComponent (nullptr), - lookAndFeel (nullptr), - effect (nullptr), - componentFlags (0), - componentTransparency (0) + : componentFlags (0) { } Component::Component (const String& name) noexcept - : componentName (name), - parentComponent (nullptr), - lookAndFeel (nullptr), - effect (nullptr), - componentFlags (0), - componentTransparency (0) + : componentName (name), componentFlags (0) { } @@ -895,11 +890,11 @@ void Component::toFront (const bool setAsForeground) } else if (parentComponent != nullptr) { - const Array& childList = parentComponent->childComponentList; + auto& childList = parentComponent->childComponentList; if (childList.getLast() != this) { - const int index = childList.indexOf (this); + auto index = childList.indexOf (this); if (index >= 0) { @@ -936,8 +931,8 @@ void Component::toBehind (Component* const other) if (parentComponent != nullptr) { - const Array& childList = parentComponent->childComponentList; - const int index = childList.indexOf (this); + auto& childList = parentComponent->childComponentList; + auto index = childList.indexOf (this); if (index >= 0 && childList [index + 1] != other) { @@ -977,11 +972,11 @@ void Component::toBack() } else if (parentComponent != nullptr) { - const Array& childList = parentComponent->childComponentList; + auto& childList = parentComponent->childComponentList; if (childList.getFirst() != this) { - const int index = childList.indexOf (this); + auto index = childList.indexOf (this); if (index > 0) { @@ -1380,7 +1375,7 @@ bool Component::hitTest (int x, int y) { for (int i = childComponentList.size(); --i >= 0;) { - Component& child = *childComponentList.getUnchecked (i); + auto& child = *childComponentList.getUnchecked (i); if (child.isVisible() && ComponentHelpers::hitTest (child, ComponentHelpers::convertFromParentSpace (child, Point (x, y)))) @@ -1437,7 +1432,8 @@ Component* Component::getComponentAt (Point position) { for (int i = childComponentList.size(); --i >= 0;) { - Component* child = childComponentList.getUnchecked(i); + auto* child = childComponentList.getUnchecked(i); + child = child->getComponentAt (ComponentHelpers::convertFromParentSpace (*child, position)); if (child != nullptr) @@ -1607,7 +1603,7 @@ int Component::getNumChildComponents() const noexcept Component* Component::getChildComponent (const int index) const noexcept { - return childComponentList [index]; + return childComponentList[index]; } int Component::getIndexOfChildComponent (const Component* const child) const noexcept @@ -1617,12 +1613,9 @@ int Component::getIndexOfChildComponent (const Component* const child) const noe Component* Component::findChildWithID (StringRef targetID) const noexcept { - for (int i = childComponentList.size(); --i >= 0;) - { - auto* c = childComponentList.getUnchecked(i); + for (auto* c : childComponentList) if (c->componentID == targetID) return c; - } return nullptr; } @@ -1979,7 +1972,7 @@ void Component::paintComponentAndChildren (Graphics& g) for (int i = 0; i < childComponentList.size(); ++i) { - Component& child = *childComponentList.getUnchecked (i); + auto& child = *childComponentList.getUnchecked (i); if (child.isVisible()) { @@ -2007,7 +2000,7 @@ void Component::paintComponentAndChildren (Graphics& g) for (int j = i + 1; j < childComponentList.size(); ++j) { - const Component& sibling = *childComponentList.getUnchecked (j); + auto& sibling = *childComponentList.getUnchecked (j); if (sibling.flags.opaqueFlag && sibling.isVisible() && sibling.affineTransform == nullptr) { diff --git a/modules/juce_gui_basics/components/juce_Component.h b/modules/juce_gui_basics/components/juce_Component.h index 6abe04d389..d482a0e69a 100644 --- a/modules/juce_gui_basics/components/juce_Component.h +++ b/modules/juce_gui_basics/components/juce_Component.h @@ -613,7 +613,7 @@ public: //============================================================================== /** Returns the number of child components that this component contains. - @see getChildComponent, getIndexOfChildComponent + @see getChildren, getChildComponent, getIndexOfChildComponent */ int getNumChildComponents() const noexcept; @@ -624,7 +624,7 @@ public: If the index is out-of-range, this will return a null pointer. - @see getNumChildComponents, getIndexOfChildComponent + @see getChildren, getNumChildComponents, getIndexOfChildComponent */ Component* getChildComponent (int index) const noexcept; @@ -635,10 +635,15 @@ public: Returns -1 if the component passed-in is not a child of this component. - @see getNumChildComponents, getChildComponent, addChildComponent, toFront, toBack, toBehind + @see getChildren, getNumChildComponents, getChildComponent, addChildComponent, toFront, toBack, toBehind */ int getIndexOfChildComponent (const Component* child) const noexcept; + /** Provides access to the underlying array of child components. + The most likely reason you may want to use this is for iteration in a range-based for loop. + */ + const Array& getChildren() const noexcept { return childComponentList; } + /** Looks for a child component with the specified ID. @see setComponentID, getComponentID */ @@ -2251,14 +2256,14 @@ private: //============================================================================== String componentName, componentID; - Component* parentComponent; + Component* parentComponent = nullptr; Rectangle boundsRelativeToParent; ScopedPointer positioner; ScopedPointer affineTransform; Array childComponentList; - LookAndFeel* lookAndFeel; + LookAndFeel* lookAndFeel = nullptr; MouseCursor cursor; - ImageEffectFilter* effect; + ImageEffectFilter* effect = nullptr; ScopedPointer cachedImage; class MouseListenerList; @@ -2304,7 +2309,7 @@ private: ComponentFlags flags; }; - uint8 componentTransparency; + uint8 componentTransparency = 0; //============================================================================== void internalMouseEnter (MouseInputSource, Point, Time); diff --git a/modules/juce_gui_basics/components/juce_Desktop.cpp b/modules/juce_gui_basics/components/juce_Desktop.cpp index 81224c9eef..9317213fe2 100644 --- a/modules/juce_gui_basics/components/juce_Desktop.cpp +++ b/modules/juce_gui_basics/components/juce_Desktop.cpp @@ -401,6 +401,11 @@ void Desktop::setOrientationsEnabled (const int newOrientations) } } +int Desktop::getOrientationsEnabled() const noexcept +{ + return allowedOrientations; +} + bool Desktop::isOrientationEnabled (const DisplayOrientation orientation) const noexcept { // Make sure you only pass one valid flag in here... diff --git a/modules/juce_gui_basics/components/juce_Desktop.h b/modules/juce_gui_basics/components/juce_Desktop.h index f265d1460d..3677263296 100644 --- a/modules/juce_gui_basics/components/juce_Desktop.h +++ b/modules/juce_gui_basics/components/juce_Desktop.h @@ -312,6 +312,11 @@ public: */ void setOrientationsEnabled (int allowedOrientations); + /** Returns the set of orientations the display is allowed to rotate to. + @see setOrientationsEnabled + */ + int getOrientationsEnabled() const noexcept; + /** Returns whether the display is allowed to auto-rotate to the given orientation. Each orientation can be enabled using setOrientationEnabled(). By default, all orientations are allowed. */ diff --git a/modules/juce_gui_basics/drawables/juce_Drawable.cpp b/modules/juce_gui_basics/drawables/juce_Drawable.cpp index 4075340eb3..3bd5833e44 100644 --- a/modules/juce_gui_basics/drawables/juce_Drawable.cpp +++ b/modules/juce_gui_basics/drawables/juce_Drawable.cpp @@ -44,6 +44,17 @@ Drawable::~Drawable() { } +void Drawable::applyDrawableClipPath (Graphics& g) +{ + if (drawableClipPath != nullptr) + { + auto clipPath = drawableClipPath->getOutlineAsPath(); + + if (! clipPath.isEmpty()) + g.getInternalContext().clipToPath (clipPath, {}); + } +} + //============================================================================== void Drawable::draw (Graphics& g, float opacity, const AffineTransform& transform) const { @@ -59,6 +70,8 @@ void Drawable::nonConstDraw (Graphics& g, float opacity, const AffineTransform& .followedBy (getTransform()) .followedBy (transform)); + applyDrawableClipPath (g); + if (! g.isClipEmpty()) { if (opacity < 1.0f) @@ -91,6 +104,15 @@ DrawableComposite* Drawable::getParent() const return dynamic_cast (getParentComponent()); } +void Drawable::setClipPath (Drawable* clipPath) +{ + if (drawableClipPath != clipPath) + { + drawableClipPath = clipPath; + repaint(); + } +} + void Drawable::transformContextToCorrectOrigin (Graphics& g) { g.setOrigin (originRelativeToComponent); @@ -118,8 +140,8 @@ bool Drawable::replaceColour (Colour original, Colour replacement) { bool changed = false; - for (int i = getNumChildComponents(); --i >= 0;) - if (auto* d = dynamic_cast (getChildComponent(i))) + for (auto* c : getChildren()) + if (auto* d = dynamic_cast (c)) changed = d->replaceColour (original, replacement) || changed; return changed; diff --git a/modules/juce_gui_basics/drawables/juce_Drawable.h b/modules/juce_gui_basics/drawables/juce_Drawable.h index 64921cb4ac..810970b2c3 100644 --- a/modules/juce_gui_basics/drawables/juce_Drawable.h +++ b/modules/juce_gui_basics/drawables/juce_Drawable.h @@ -54,6 +54,9 @@ public: */ virtual Drawable* createCopy() const = 0; + /** Creates a path that describes the outline of this drawable. */ + virtual Path getOutlineAsPath() const = 0; + //============================================================================== /** Renders this Drawable object. @@ -63,7 +66,8 @@ public: @see drawWithin */ - void draw (Graphics& g, float opacity, const AffineTransform& transform = {}) const; + void draw (Graphics& g, float opacity, + const AffineTransform& transform = AffineTransform()) const; /** Renders the Drawable at a given offset within the Graphics context. @@ -116,6 +120,11 @@ public: /** Returns the DrawableComposite that contains this object, if there is one. */ DrawableComposite* getParent() const; + /** Sets a the clipping region of this drawable using another drawable. + The drawbale passed in ill be deleted when no longer needed. + */ + void setClipPath (Drawable* drawableClipPath); + //============================================================================== /** Tries to turn some kind of image file into a drawable. @@ -149,6 +158,20 @@ public: */ static Drawable* createFromSVG (const XmlElement& svgDocument); + /** Attempts to parse an SVG (Scalable Vector Graphics) document from a file, + and to turn this into a Drawable tree. + + The object returned must be deleted by the caller. If something goes wrong + while parsing, it may return nullptr. + + SVG is a pretty large and complex spec, and this doesn't aim to be a full + implementation, but it can return the basic vector objects. + + Any references to references to external image files will be relative to + the parent directory of the file passed. + */ + static Drawable* createFromSVGFile (const File& svgFile); + /** Parses an SVG path string and returns it. */ static Path parseSVGPath (const String& svgPath); @@ -213,8 +236,11 @@ protected: void parentHierarchyChanged() override; /** @internal */ void setBoundsToEnclose (Rectangle); + /** @internal */ + void applyDrawableClipPath (Graphics&); Point originRelativeToComponent; + ScopedPointer drawableClipPath; #ifndef DOXYGEN /** Internal utility class used by Drawables. */ diff --git a/modules/juce_gui_basics/drawables/juce_DrawableComposite.cpp b/modules/juce_gui_basics/drawables/juce_DrawableComposite.cpp index eeabaf9db3..b406400af8 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableComposite.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableComposite.cpp @@ -25,8 +25,7 @@ */ DrawableComposite::DrawableComposite() - : bounds (Point(), Point (100.0f, 0.0f), Point (0.0f, 100.0f)), - updateBoundsReentrant (false) + : bounds (Point(), Point (100.0f, 0.0f), Point (0.0f, 100.0f)) { setContentArea (RelativeRectangle (Rectangle (0.0f, 0.0f, 100.0f, 100.0f))); } @@ -35,11 +34,10 @@ DrawableComposite::DrawableComposite (const DrawableComposite& other) : Drawable (other), bounds (other.bounds), markersX (other.markersX), - markersY (other.markersY), - updateBoundsReentrant (false) + markersY (other.markersY) { - for (int i = 0; i < other.getNumChildComponents(); ++i) - if (const Drawable* const d = dynamic_cast (other.getChildComponent(i))) + for (auto* c : other.getChildren()) + if (auto* d = dynamic_cast (c)) addAndMakeVisible (d->createCopy()); } @@ -58,8 +56,8 @@ Rectangle DrawableComposite::getDrawableBounds() const { Rectangle r; - for (int i = getNumChildComponents(); --i >= 0;) - if (const Drawable* const d = dynamic_cast (getChildComponent(i))) + for (auto* c : getChildren()) + if (auto* d = dynamic_cast (c)) r = r.getUnion (d->isTransformed() ? d->getDrawableBounds().transformedBy (d->getTransform()) : d->getDrawableBounds()); @@ -96,7 +94,7 @@ void DrawableComposite::setBoundingBox (const RelativeParallelogram& newBounds) if (bounds.isDynamic()) { - Drawable::Positioner* const p = new Drawable::Positioner (*this); + auto p = new Drawable::Positioner (*this); setPositioner (p); p->apply(); } @@ -135,11 +133,11 @@ void DrawableComposite::recalculateCoordinates (Expression::Scope* scope) Point resolved[3]; bounds.resolveThreePoints (resolved, scope); - const Rectangle content (getContentArea().resolve (scope)); + auto content = getContentArea().resolve (scope); - AffineTransform t (AffineTransform::fromTargetPoints (content.getX(), content.getY(), resolved[0].x, resolved[0].y, - content.getRight(), content.getY(), resolved[1].x, resolved[1].y, - content.getX(), content.getBottom(), resolved[2].x, resolved[2].y)); + auto t = AffineTransform::fromTargetPoints (content.getX(), content.getY(), resolved[0].x, resolved[0].y, + content.getRight(), content.getY(), resolved[1].x, resolved[1].y, + content.getX(), content.getBottom(), resolved[2].x, resolved[2].y); if (t.isSingularity()) t = AffineTransform(); @@ -149,8 +147,7 @@ void DrawableComposite::recalculateCoordinates (Expression::Scope* scope) void DrawableComposite::parentHierarchyChanged() { - DrawableComposite* parent = getParent(); - if (parent != nullptr) + if (auto* parent = getParent()) originRelativeToComponent = parent->originRelativeToComponent - getPosition(); } @@ -172,10 +169,10 @@ void DrawableComposite::updateBoundsToFitChildren() Rectangle childArea; - for (int i = getNumChildComponents(); --i >= 0;) - childArea = childArea.getUnion (getChildComponent(i)->getBoundsInParent()); + for (auto* c : getChildren()) + childArea = childArea.getUnion (c->getBoundsInParent()); - const Point delta (childArea.getPosition()); + auto delta = childArea.getPosition(); childArea += getPosition(); if (childArea != getBounds()) @@ -184,9 +181,8 @@ void DrawableComposite::updateBoundsToFitChildren() { originRelativeToComponent -= delta; - for (int i = getNumChildComponents(); --i >= 0;) - if (Component* const c = getChildComponent(i)) - c->setBounds (c->getBounds() - delta); + for (auto* c : getChildren()) + c->setBounds (c->getBounds() - delta); } setBounds (childArea); @@ -306,9 +302,9 @@ ValueTree DrawableComposite::createValueTree (ComponentBuilder::ImageProvider* i ValueTree childList (v.getChildListCreating (nullptr)); - for (int i = 0; i < getNumChildComponents(); ++i) + for (auto* c : getChildren()) { - const Drawable* const d = dynamic_cast (getChildComponent(i)); + auto* d = dynamic_cast (c); jassert (d != nullptr); // You can't save a mix of Drawables and normal components! childList.addChild (d->createValueTree (imageProvider), -1, nullptr); @@ -319,3 +315,15 @@ ValueTree DrawableComposite::createValueTree (ComponentBuilder::ImageProvider* i return tree; } + +Path DrawableComposite::getOutlineAsPath() const +{ + Path p; + + for (auto* c : getChildren()) + if (auto* d = dynamic_cast (c)) + p.addPath (d->getOutlineAsPath()); + + p.applyTransform (getTransform()); + return p; +} diff --git a/modules/juce_gui_basics/drawables/juce_DrawableComposite.h b/modules/juce_gui_basics/drawables/juce_DrawableComposite.h index deeb46dab1..00217e4f9c 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableComposite.h +++ b/modules/juce_gui_basics/drawables/juce_DrawableComposite.h @@ -115,6 +115,8 @@ public: void parentHierarchyChanged() override; /** @internal */ MarkerList* getMarkers (bool xAxis) override; + /** @internal */ + Path getOutlineAsPath() const override; //============================================================================== /** Internally-used class for wrapping a DrawableComposite's state into a ValueTree. */ @@ -146,7 +148,7 @@ private: //============================================================================== RelativeParallelogram bounds; MarkerList markersX, markersY; - bool updateBoundsReentrant; + bool updateBoundsReentrant = false; friend class Drawable::Positioner; bool registerCoordinates (RelativeCoordinatePositionerBase&); diff --git a/modules/juce_gui_basics/drawables/juce_DrawableImage.cpp b/modules/juce_gui_basics/drawables/juce_DrawableImage.cpp index 3940f2235e..c8f1770955 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableImage.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableImage.cpp @@ -290,3 +290,8 @@ ValueTree DrawableImage::createValueTree (ComponentBuilder::ImageProvider* image return tree; } + +Path DrawableImage::getOutlineAsPath() const +{ + return {}; // not applicable for images +} diff --git a/modules/juce_gui_basics/drawables/juce_DrawableImage.h b/modules/juce_gui_basics/drawables/juce_DrawableImage.h index a4ea339a6b..818012e444 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableImage.h +++ b/modules/juce_gui_basics/drawables/juce_DrawableImage.h @@ -94,6 +94,8 @@ public: ValueTree createValueTree (ComponentBuilder::ImageProvider*) const override; /** @internal */ static const Identifier valueTreeType; + /** @internal */ + Path getOutlineAsPath() const override; //============================================================================== /** Internally-used class for wrapping a DrawableImage's state into a ValueTree. */ diff --git a/modules/juce_gui_basics/drawables/juce_DrawableShape.cpp b/modules/juce_gui_basics/drawables/juce_DrawableShape.cpp index f1ed39532e..9c23c44a7c 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableShape.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableShape.cpp @@ -171,6 +171,7 @@ void DrawableShape::writeTo (FillAndStrokeState& state, ComponentBuilder::ImageP void DrawableShape::paint (Graphics& g) { transformContextToCorrectOrigin (g); + applyDrawableClipPath (g); g.setFillType (mainFill.fill); g.fillPath (path); @@ -488,3 +489,10 @@ bool DrawableShape::replaceColour (Colour original, Colour replacement) bool changed2 = replaceColourInFill (strokeFill, original, replacement); return changed1 || changed2; } + +Path DrawableShape::getOutlineAsPath() const +{ + Path outline (isStrokeVisible() ? strokePath : path); + outline.applyTransform (getTransform()); + return outline; +} diff --git a/modules/juce_gui_basics/drawables/juce_DrawableShape.h b/modules/juce_gui_basics/drawables/juce_DrawableShape.h index a9f60ae256..2cb7e3712a 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableShape.h +++ b/modules/juce_gui_basics/drawables/juce_DrawableShape.h @@ -156,6 +156,8 @@ public: bool hitTest (int x, int y) override; /** @internal */ bool replaceColour (Colour originalColour, Colour replacementColour) override; + /** @internal */ + Path getOutlineAsPath() const override; protected: //============================================================================== diff --git a/modules/juce_gui_basics/drawables/juce_DrawableText.cpp b/modules/juce_gui_basics/drawables/juce_DrawableText.cpp index af15206aae..3bfddce9d7 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableText.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableText.cpp @@ -162,6 +162,18 @@ void DrawableText::recalculateCoordinates (Expression::Scope* scope) } //============================================================================== +Rectangle DrawableText::getTextArea (float w, float h) const +{ + return Rectangle (w, h).getSmallestIntegerContainer(); +} + +AffineTransform DrawableText::getTextTransform (float w, float h) const +{ + return AffineTransform::fromTargetPoints (0, 0, resolvedPoints[0].x, resolvedPoints[0].y, + w, 0, resolvedPoints[1].x, resolvedPoints[1].y, + 0, h, resolvedPoints[2].x, resolvedPoints[2].y); +} + void DrawableText::paint (Graphics& g) { transformContextToCorrectOrigin (g); @@ -169,13 +181,11 @@ void DrawableText::paint (Graphics& g) const float w = Line (resolvedPoints[0], resolvedPoints[1]).getLength(); const float h = Line (resolvedPoints[0], resolvedPoints[2]).getLength(); - g.addTransform (AffineTransform::fromTargetPoints (0, 0, resolvedPoints[0].x, resolvedPoints[0].y, - w, 0, resolvedPoints[1].x, resolvedPoints[1].y, - 0, h, resolvedPoints[2].x, resolvedPoints[2].y)); + g.addTransform (getTextTransform (w, h)); g.setFont (scaledFont); g.setColour (colour); - g.drawFittedText (text, Rectangle (w, h).getSmallestIntegerContainer(), justification, 0x100000); + g.drawFittedText (text, getTextArea (w, h), justification, 0x100000); } Rectangle DrawableText::getDrawableBounds() const @@ -334,3 +344,31 @@ ValueTree DrawableText::createValueTree (ComponentBuilder::ImageProvider*) const return tree; } + +Path DrawableText::getOutlineAsPath() const +{ + auto w = Line (resolvedPoints[0], resolvedPoints[1]).getLength(); + auto h = Line (resolvedPoints[0], resolvedPoints[2]).getLength(); + const auto area = getTextArea (w, h).toFloat(); + + GlyphArrangement arr; + arr.addFittedText (scaledFont, text, + area.getX(), area.getY(), + area.getWidth(), area.getHeight(), + justification, + 0x100000); + + Path pathOfAllGlyphs; + + for (int i = 0; i < arr.getNumGlyphs(); ++i) + { + Path gylphPath; + arr.getGlyph (i).createPath (gylphPath); + pathOfAllGlyphs.addPath (gylphPath); + } + + pathOfAllGlyphs.applyTransform (getTextTransform (w, h) + .followedBy (getTransform())); + + return pathOfAllGlyphs; +} diff --git a/modules/juce_gui_basics/drawables/juce_DrawableText.h b/modules/juce_gui_basics/drawables/juce_DrawableText.h index d7536b3d70..1033b0b665 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableText.h +++ b/modules/juce_gui_basics/drawables/juce_DrawableText.h @@ -99,6 +99,8 @@ public: static const Identifier valueTreeType; /** @internal */ Rectangle getDrawableBounds() const override; + /** @internal */ + Path getOutlineAsPath() const override; //============================================================================== /** Internally-used class for wrapping a DrawableText's state into a ValueTree. */ @@ -147,6 +149,8 @@ private: bool registerCoordinates (RelativeCoordinatePositionerBase&); void recalculateCoordinates (Expression::Scope*); void refreshBounds(); + Rectangle getTextArea (float width, float height) const; + AffineTransform getTextTransform (float width, float height) const; DrawableText& operator= (const DrawableText&); JUCE_LEAK_DETECTOR (DrawableText) diff --git a/modules/juce_gui_basics/drawables/juce_SVGParser.cpp b/modules/juce_gui_basics/drawables/juce_SVGParser.cpp index 7270237986..60de4aa0ab 100644 --- a/modules/juce_gui_basics/drawables/juce_SVGParser.cpp +++ b/modules/juce_gui_basics/drawables/juce_SVGParser.cpp @@ -28,7 +28,8 @@ class SVGState { public: //============================================================================== - explicit SVGState (const XmlElement* topLevel) : topLevelXml (topLevel, nullptr) + explicit SVGState (const XmlElement* topLevel, const File& svgFile = {}) + : originalFile (svgFile), topLevelXml (topLevel, nullptr) { } @@ -47,11 +48,9 @@ public: { XmlPath child (e, this); - if (e->compareAttribute ("id", id)) - { - op (child); - return true; - } + if (e->compareAttribute ("id", id) + && ! child->hasTagName ("defs")) + return op (child); if (child.applyOperationToChildWithID (id, op)) return true; @@ -70,20 +69,60 @@ public: const SVGState* state; Path* targetPath; - void operator() (const XmlPath& xmlPath) const + bool operator() (const XmlPath& xmlPath) const { - state->parsePathElement (xmlPath, *targetPath); + return state->parsePathElement (xmlPath, *targetPath); + } + }; + + struct UseShapeOp + { + const SVGState* state; + Path* sourcePath; + AffineTransform* transform; + Drawable* target; + + bool operator() (const XmlPath& xmlPath) + { + target = state->parseShape (xmlPath, *sourcePath, true, transform); + return target != nullptr; + } + }; + + struct UseTextOp + { + const SVGState* state; + AffineTransform* transform; + Drawable* target; + + bool operator() (const XmlPath& xmlPath) + { + target = state->parseText (xmlPath, true, transform); + return target != nullptr; + } + }; + + struct UseImageOp + { + const SVGState* state; + AffineTransform* transform; + Drawable* target; + + bool operator() (const XmlPath& xmlPath) + { + target = state->parseImage (xmlPath, true, transform); + return target != nullptr; } }; struct GetClipPathOp { - const SVGState* state; + SVGState* state; Drawable* target; - void operator() (const XmlPath& xmlPath) const + bool operator() (const XmlPath& xmlPath) { - state->applyClipPath (*target, xmlPath); + return state->applyClipPath (*target, xmlPath); } }; @@ -92,9 +131,9 @@ public: const SVGState* state; ColourGradient* gradient; - void operator() (const XmlPath& xml) const + bool operator() (const XmlPath& xml) const { - state->addGradientStopsIn (*gradient, xml); + return state->addGradientStopsIn (*gradient, xml); } }; @@ -105,11 +144,16 @@ public: float opacity; FillType fillType; - void operator() (const XmlPath& xml) + bool operator() (const XmlPath& xml) { if (xml->hasTagNameIgnoringNamespace ("linearGradient") || xml->hasTagNameIgnoringNamespace ("radialGradient")) + { fillType = state->getGradientFillType (xml, *path, opacity); + return true; + } + + return false; } }; @@ -402,6 +446,7 @@ public: private: //============================================================================== + const File originalFile; const XmlPath topLevelXml; float width = 512, height = 512, viewBoxW = 0, viewBoxH = 0; AffineTransform transform; @@ -423,7 +468,7 @@ private: } //============================================================================== - void parseSubElements (const XmlPath& xml, DrawableComposite& parentDrawable) + void parseSubElements (const XmlPath& xml, DrawableComposite& parentDrawable, const bool shouldParseClip = true) { forEachXmlChildElement (*xml, e) { @@ -435,6 +480,9 @@ private: if (! isNone (getStyleAttribute (child, "display"))) drawable->setVisible (true); + + if (shouldParseClip) + parseClipPath (child, *drawable); } } } @@ -449,11 +497,13 @@ private: auto tag = xml->getTagNameWithoutNamespace(); - if (tag == "g") return parseGroupElement (xml); + if (tag == "g") return parseGroupElement (xml, true); if (tag == "svg") return parseSVGElement (xml); if (tag == "text") return parseText (xml, true); + if (tag == "image") return parseImage (xml, true); if (tag == "switch") return parseSwitch (xml); if (tag == "a") return parseLinkElement (xml); + if (tag == "use") return parseUseOther (xml); if (tag == "style") parseCSSStyle (xml); if (tag == "defs") parseDefs (xml); @@ -462,7 +512,7 @@ private: bool parsePathElement (const XmlPath& xml, Path& path) const { - const String tag (xml->getTagNameWithoutNamespace()); + auto tag = xml->getTagNameWithoutNamespace(); if (tag == "path") { parsePath (xml, path); return true; } if (tag == "rect") { parseRect (xml, path); return true; } @@ -471,7 +521,7 @@ private: if (tag == "line") { parseLine (xml, path); return true; } if (tag == "polyline") { parsePolygon (xml, true, path); return true; } if (tag == "polygon") { parsePolygon (xml, false, path); return true; } - if (tag == "use") { parseUse (xml, path); return true; } + if (tag == "use") { return parseUsePath (xml, path); } return false; } @@ -479,35 +529,32 @@ private: DrawableComposite* parseSwitch (const XmlPath& xml) { if (auto* group = xml->getChildByName ("g")) - return parseGroupElement (xml.getChild (group)); + return parseGroupElement (xml.getChild (group), true); return nullptr; } - DrawableComposite* parseGroupElement (const XmlPath& xml) + DrawableComposite* parseGroupElement (const XmlPath& xml, bool shouldParseTransform) { - auto drawable = new DrawableComposite(); - - setCommonAttributes (*drawable, xml); - - if (xml->hasAttribute ("transform")) + if (shouldParseTransform && xml->hasAttribute ("transform")) { SVGState newState (*this); newState.addTransform (xml); - newState.parseSubElements (xml, *drawable); - } - else - { - parseSubElements (xml, *drawable); + + return newState.parseGroupElement (xml, false); } + auto* drawable = new DrawableComposite(); + setCommonAttributes (*drawable, xml); + parseSubElements (xml, *drawable); + drawable->resetContentAreaAndBoundingBoxToFitChildren(); return drawable; } DrawableComposite* parseLinkElement (const XmlPath& xml) { - return parseGroupElement (xml); // TODO: support for making this clickable + return parseGroupElement (xml, true); // TODO: support for making this clickable } //============================================================================== @@ -602,17 +649,35 @@ private: } } - void parseUse (const XmlPath& xml, Path& path) const + static String getLinkedID (const XmlPath& xml) { auto link = xml->getStringAttribute ("xlink:href"); if (link.startsWithChar ('#')) - { - auto linkedID = link.substring (1); + return link.substring (1); + return {}; + } + + bool parseUsePath (const XmlPath& xml, Path& path) const + { + auto linkedID = getLinkedID (xml); + + if (linkedID.isNotEmpty()) + { UsePathOp op = { this, &path }; - topLevelXml.applyOperationToChildWithID (linkedID, op); + return topLevelXml.applyOperationToChildWithID (linkedID, op); } + + return false; + } + + Drawable* parseUseOther (const XmlPath& xml) const + { + if (auto* drawableText = parseText (xml, false)) return drawableText; + if (auto* drawableImage = parseImage (xml, false)) return drawableImage; + + return nullptr; } static String parseURL (const String& str) @@ -625,22 +690,46 @@ private: } //============================================================================== + + Drawable* useShape (const XmlPath& xml, Path& path) const + { + auto translation = AffineTransform::translation ((float) xml->getDoubleAttribute ("x", 0.0), + (float) xml->getDoubleAttribute ("y", 0.0)); + + UseShapeOp op = { this, &path, &translation, nullptr }; + + auto linkedID = getLinkedID (xml); + + if (linkedID.isNotEmpty()) + topLevelXml.applyOperationToChildWithID (linkedID, op); + + return op.target; + } + Drawable* parseShape (const XmlPath& xml, Path& path, - const bool shouldParseTransform = true) const + const bool shouldParseTransform = true, + AffineTransform* additonalTransform = nullptr) const { if (shouldParseTransform && xml->hasAttribute ("transform")) { SVGState newState (*this); newState.addTransform (xml); - return newState.parseShape (xml, path, false); + return newState.parseShape (xml, path, false, additonalTransform); } + if (xml->hasTagName ("use")) + return useShape (xml, path); + auto dp = new DrawablePath(); setCommonAttributes (*dp, xml); dp->setFill (Colours::transparentBlack); path.applyTransform (transform); + + if (additonalTransform != nullptr) + path.applyTransform (*additonalTransform); + dp->setPath (path); dp->setFill (getPathFillType (path, xml, "fill", @@ -666,7 +755,6 @@ private: if (strokeDashArray.isNotEmpty()) parseDashArray (strokeDashArray, *dp); - parseClipPath (xml, *dp); return dp; } @@ -726,7 +814,7 @@ private: } } - void parseClipPath (const XmlPath& xml, Drawable& d) const + bool parseClipPath (const XmlPath& xml, Drawable& d) { const String clipPath (getStyleAttribute (xml, "clip-path")); @@ -737,22 +825,36 @@ private: if (urlID.isNotEmpty()) { GetClipPathOp op = { this, &d }; - topLevelXml.applyOperationToChildWithID (urlID, op); + return topLevelXml.applyOperationToChildWithID (urlID, op); } } + + return false; } - void applyClipPath (Drawable& target, const XmlPath& xmlPath) const + bool applyClipPath (Drawable& target, const XmlPath& xmlPath) { if (xmlPath->hasTagNameIgnoringNamespace ("clipPath")) { - // TODO: implement clipping.. - ignoreUnused (target); + ScopedPointer drawableClipPath (new DrawableComposite()); + + parseSubElements (xmlPath, *drawableClipPath, false); + + if (drawableClipPath->getNumChildComponents() > 0) + { + setCommonAttributes (*drawableClipPath, xmlPath); + target.setClipPath (drawableClipPath.release()); + return true; + } } + + return false; } - void addGradientStopsIn (ColourGradient& cg, const XmlPath& fillXml) const + bool addGradientStopsIn (ColourGradient& cg, const XmlPath& fillXml) const { + bool result = false; + if (fillXml.xml != nullptr) { forEachXmlChildElementWithTagName (*fillXml, e, "stop") @@ -768,8 +870,11 @@ private: offset *= 0.01; cg.addColour (jlimit (0.0, 1.0, offset), col); + result = true; } } + + return result; } FillType getGradientFillType (const XmlPath& fillXml, @@ -779,12 +884,12 @@ private: ColourGradient gradient; { - auto link = fillXml->getStringAttribute ("xlink:href"); + auto linkedID = getLinkedID (fillXml); - if (link.startsWithChar ('#')) + if (linkedID.isNotEmpty()) { SetGradientStopsOp op = { this, &gradient, }; - topLevelXml.applyOperationToChildWithID (link.substring (1), op); + topLevelXml.applyOperationToChildWithID (linkedID, op); } } @@ -957,16 +1062,39 @@ private: } //============================================================================== - Drawable* parseText (const XmlPath& xml, bool shouldParseTransform) + + Drawable* useText (const XmlPath& xml) const + { + auto translation = AffineTransform::translation ((float) xml->getDoubleAttribute ("x", 0.0), + (float) xml->getDoubleAttribute ("y", 0.0)); + + UseTextOp op = { this, &translation, nullptr }; + + auto linkedID = getLinkedID (xml); + + if (linkedID.isNotEmpty()) + topLevelXml.applyOperationToChildWithID (linkedID, op); + + return op.target; + } + + Drawable* parseText (const XmlPath& xml, bool shouldParseTransform, + AffineTransform* additonalTransform = nullptr) const { if (shouldParseTransform && xml->hasAttribute ("transform")) { SVGState newState (*this); newState.addTransform (xml); - return newState.parseText (xml, false); + return newState.parseText (xml, false, additonalTransform); } + if (xml->hasTagName ("use")) + return useText (xml); + + if (! xml->hasTagName ("text")) + return nullptr; + Array xCoords, yCoords, dxCoords, dyCoords; getCoordList (xCoords, getInheritedAttribute (xml, "x"), true, true); @@ -975,7 +1103,7 @@ private: getCoordList (dyCoords, getInheritedAttribute (xml, "dy"), true, false); auto font = getFont (xml); - auto anchorStr = getStyleAttribute(xml, "text-anchor"); + auto anchorStr = getStyleAttribute (xml, "text-anchor"); auto dc = new DrawableComposite(); setCommonAttributes (*dc, xml); @@ -991,7 +1119,11 @@ private: dt->setText (text); dt->setFont (font, true); - dt->setTransform (transform); + + if (additonalTransform != nullptr) + dt->setTransform (transform.followedBy (*additonalTransform)); + else + dt->setTransform (transform); dt->setColour (parseColour (xml, "fill", Colours::black) .withMultipliedAlpha (getStyleAttribute (xml, "fill-opacity", "1").getFloatValue())); @@ -1015,17 +1147,108 @@ private: Font getFont (const XmlPath& xml) const { - auto fontSize = getCoordLength (getStyleAttribute (xml, "font-size"), 1.0f); - - int style = getStyleAttribute (xml, "font-style").containsIgnoreCase ("italic") ? Font::italic : Font::plain; - - if (getStyleAttribute (xml, "font-weight").containsIgnoreCase ("bold")) - style |= Font::bold; - + Font f; auto family = getStyleAttribute (xml, "font-family").unquoted(); - return family.isEmpty() ? Font (fontSize, style) - : Font (family, fontSize, style); + if (family.isNotEmpty()) + f.setTypefaceName (family); + + if (getStyleAttribute (xml, "font-style").containsIgnoreCase ("italic")) + f.setItalic (true); + + if (getStyleAttribute (xml, "font-weight").containsIgnoreCase ("bold")) + f.setBold (true); + + return f.withPointHeight (getCoordLength (getStyleAttribute (xml, "font-size"), 1.0f)); + } + + //============================================================================== + Drawable* useImage (const XmlPath& xml) const + { + auto translation = AffineTransform::translation ((float) xml->getDoubleAttribute ("x", 0.0), + (float) xml->getDoubleAttribute ("y", 0.0)); + + UseImageOp op = { this, &translation, nullptr }; + + auto linkedID = getLinkedID (xml); + + if (linkedID.isNotEmpty()) + topLevelXml.applyOperationToChildWithID (linkedID, op); + + return op.target; + } + + Drawable* parseImage (const XmlPath& xml, bool shouldParseTransform, + AffineTransform* additionalTransform = nullptr) const + { + if (shouldParseTransform && xml->hasAttribute ("transform")) + { + SVGState newState (*this); + newState.addTransform (xml); + + return newState.parseImage (xml, false, additionalTransform); + } + + if (xml->hasTagName ("use")) + return useImage (xml); + + if (! xml->hasTagName ("image")) + return nullptr; + + auto link = xml->getStringAttribute ("xlink:href"); + + ScopedPointer inputStream; + MemoryOutputStream imageStream; + + if (link.startsWith ("data:")) + { + const auto indexOfComma = link.indexOf (","); + auto format = link.substring (5, indexOfComma).trim(); + + const auto indexOfSemi = format.indexOf (";"); + + if (format.substring (indexOfSemi + 1).trim().equalsIgnoreCase ("base64")) + { + auto mime = format.substring (0, indexOfSemi).trim(); + + if (mime.equalsIgnoreCase ("image/png") || mime.equalsIgnoreCase ("image/jpeg")) + { + const String base64text = link.substring (indexOfComma + 1).removeCharacters ("\t\n\r "); + + if (Base64::convertFromBase64 (imageStream, base64text)) + inputStream = new MemoryInputStream (imageStream.getData(), imageStream.getDataSize(), false); + } + } + } + else + { + auto linkedFile = originalFile.getParentDirectory().getChildFile (link); + + if (linkedFile.existsAsFile()) + inputStream = linkedFile.createInputStream(); + } + + if (inputStream != nullptr) + { + auto image = ImageFileFormat::loadFrom (*inputStream); + + if (image.isValid()) + { + auto* di = new DrawableImage(); + + setCommonAttributes (*di, xml); + di->setImage (image); + + if (additionalTransform != nullptr) + di->setTransform (transform.followedBy (*additionalTransform)); + else + di->setTransform (transform); + + return di; + } + } + + return nullptr; } //============================================================================== @@ -1512,6 +1735,25 @@ Drawable* Drawable::createFromSVG (const XmlElement& svgDocument) return state.parseSVGElement (SVGState::XmlPath (&svgDocument, nullptr)); } +Drawable* Drawable::createFromSVGFile (const File& svgFile) +{ + XmlDocument doc (svgFile); + ScopedPointer outer (doc.getDocumentElement (true)); + + if (outer != nullptr && outer->hasTagName ("svg")) + { + ScopedPointer svgDocument (doc.getDocumentElement()); + + if (svgDocument != nullptr) + { + SVGState state (svgDocument, svgFile); + return state.parseSVGElement (SVGState::XmlPath (svgDocument, nullptr)); + } + } + + return nullptr; +} + Path Drawable::parseSVGPath (const String& svgPath) { SVGState state (nullptr); diff --git a/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.cpp index cdbd0b882d..5e9268fe94 100644 --- a/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.cpp @@ -24,8 +24,8 @@ ============================================================================== */ -DirectoryContentsDisplayComponent::DirectoryContentsDisplayComponent (DirectoryContentsList& listToShow) - : fileList (listToShow) +DirectoryContentsDisplayComponent::DirectoryContentsDisplayComponent (DirectoryContentsList& l) + : directoryContentsList (l) { } @@ -38,15 +38,8 @@ FileBrowserListener::~FileBrowserListener() { } -void DirectoryContentsDisplayComponent::addListener (FileBrowserListener* const listener) -{ - listeners.add (listener); -} - -void DirectoryContentsDisplayComponent::removeListener (FileBrowserListener* const listener) -{ - listeners.remove (listener); -} +void DirectoryContentsDisplayComponent::addListener (FileBrowserListener* l) { listeners.add (l); } +void DirectoryContentsDisplayComponent::removeListener (FileBrowserListener* l) { listeners.remove (l); } void DirectoryContentsDisplayComponent::sendSelectionChangeMessage() { @@ -56,7 +49,7 @@ void DirectoryContentsDisplayComponent::sendSelectionChangeMessage() void DirectoryContentsDisplayComponent::sendMouseClickMessage (const File& file, const MouseEvent& e) { - if (fileList.getDirectory().exists()) + if (directoryContentsList.getDirectory().exists()) { Component::BailOutChecker checker (dynamic_cast (this)); listeners.callChecked (checker, &FileBrowserListener::fileClicked, file, e); @@ -65,7 +58,7 @@ void DirectoryContentsDisplayComponent::sendMouseClickMessage (const File& file, void DirectoryContentsDisplayComponent::sendDoubleClickMessage (const File& file) { - if (fileList.getDirectory().exists()) + if (directoryContentsList.getDirectory().exists()) { Component::BailOutChecker checker (dynamic_cast (this)); listeners.callChecked (checker, &FileBrowserListener::fileDoubleClicked, file); diff --git a/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.h b/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.h index 2bc98cb42f..77279ed5a2 100644 --- a/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.h +++ b/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.h @@ -43,6 +43,10 @@ public: /** Destructor. */ virtual ~DirectoryContentsDisplayComponent(); + //============================================================================== + /** The list that this component is displaying */ + DirectoryContentsList& directoryContentsList; + //============================================================================== /** Returns the number of files the user has got selected. @see getSelectedFile @@ -95,14 +99,13 @@ public: /** @internal */ void sendSelectionChangeMessage(); /** @internal */ - void sendDoubleClickMessage (const File& file); + void sendDoubleClickMessage (const File&); /** @internal */ - void sendMouseClickMessage (const File& file, const MouseEvent& e); + void sendMouseClickMessage (const File&, const MouseEvent&); protected: //============================================================================== - DirectoryContentsList& fileList; - ListenerList listeners; + ListenerList listeners; private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DirectoryContentsDisplayComponent) diff --git a/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h b/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h index 1e9b03391f..6d1f159141 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h +++ b/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h @@ -195,6 +195,7 @@ public: const String& instructions) = 0; virtual void drawFileBrowserRow (Graphics&, int width, int height, + const File& file, const String& filename, Image* optionalIcon, const String& fileSizeDescription, diff --git a/modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp index e96ee75285..4e201007c4 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp @@ -29,16 +29,16 @@ Image juce_createIconForFile (const File& file); //============================================================================== FileListComponent::FileListComponent (DirectoryContentsList& listToShow) - : ListBox (String(), nullptr), + : ListBox ({}, nullptr), DirectoryContentsDisplayComponent (listToShow) { setModel (this); - fileList.addChangeListener (this); + directoryContentsList.addChangeListener (this); } FileListComponent::~FileListComponent() { - fileList.removeChangeListener (this); + directoryContentsList.removeChangeListener (this); } int FileListComponent::getNumSelectedFiles() const @@ -48,7 +48,7 @@ int FileListComponent::getNumSelectedFiles() const File FileListComponent::getSelectedFile (int index) const { - return fileList.getFile (getSelectedRow (index)); + return directoryContentsList.getFile (getSelectedRow (index)); } void FileListComponent::deselectAllFiles() @@ -63,9 +63,9 @@ void FileListComponent::scrollToTop() void FileListComponent::setSelectedFile (const File& f) { - for (int i = fileList.getNumFiles(); --i >= 0;) + for (int i = directoryContentsList.getNumFiles(); --i >= 0;) { - if (fileList.getFile(i) == f) + if (directoryContentsList.getFile(i) == f) { selectRow (i); return; @@ -80,9 +80,9 @@ void FileListComponent::changeListenerCallback (ChangeBroadcaster*) { updateContent(); - if (lastDirectory != fileList.getDirectory()) + if (lastDirectory != directoryContentsList.getDirectory()) { - lastDirectory = fileList.getDirectory(); + lastDirectory = directoryContentsList.getDirectory(); deselectAllRows(); } } @@ -94,7 +94,7 @@ class FileListComponent::ItemComponent : public Component, { public: ItemComponent (FileListComponent& fc, TimeSliceThread& t) - : owner (fc), thread (t), index (0), highlighted (false) + : owner (fc), thread (t) { } @@ -107,7 +107,7 @@ public: void paint (Graphics& g) override { getLookAndFeel().drawFileBrowserRow (g, getWidth(), getHeight(), - file.getFileName(), + file, file.getFileName(), &icon, fileSize, modTime, isDirectory, highlighted, index, owner); @@ -124,17 +124,15 @@ public: owner.sendDoubleClickMessage (file); } - void update (const File& root, - const DirectoryContentsList::FileInfo* const fileInfo, - const int index_, - const bool highlighted_) + void update (const File& root, const DirectoryContentsList::FileInfo* fileInfo, + int newIndex, bool nowHighlighted) { thread.removeTimeSliceClient (this); - if (highlighted_ != highlighted || index_ != index) + if (nowHighlighted != highlighted || newIndex != index) { - index = index_; - highlighted = highlighted_; + index = newIndex; + highlighted = nowHighlighted; repaint(); } @@ -188,15 +186,15 @@ private: File file; String fileSize, modTime; Image icon; - int index; - bool highlighted, isDirectory; + int index = 0; + bool highlighted = false, isDirectory = false; void updateIcon (const bool onlyUpdateIfCached) { if (icon.isNull()) { - const int hashCode = (file.getFullPathName() + "_iconCacheSalt").hashCode(); - Image im (ImageCache::getFromHashCode (hashCode)); + auto hashCode = (file.getFullPathName() + "_iconCacheSalt").hashCode(); + auto im = ImageCache::getFromHashCode (hashCode); if (im.isNull() && ! onlyUpdateIfCached) { @@ -220,7 +218,7 @@ private: //============================================================================== int FileListComponent::getNumRows() { - return fileList.getNumFiles(); + return directoryContentsList.getNumFiles(); } void FileListComponent::paintListBoxItem (int, Graphics&, int, int, bool) @@ -231,14 +229,14 @@ Component* FileListComponent::refreshComponentForRow (int row, bool isSelected, { jassert (existingComponentToUpdate == nullptr || dynamic_cast (existingComponentToUpdate) != nullptr); - ItemComponent* comp = static_cast (existingComponentToUpdate); + auto comp = static_cast (existingComponentToUpdate); if (comp == nullptr) - comp = new ItemComponent (*this, fileList.getTimeSliceThread()); + comp = new ItemComponent (*this, directoryContentsList.getTimeSliceThread()); DirectoryContentsList::FileInfo fileInfo; - comp->update (fileList.getDirectory(), - fileList.getFileInfo (row, fileInfo) ? &fileInfo : nullptr, + comp->update (directoryContentsList.getDirectory(), + directoryContentsList.getFileInfo (row, fileInfo) ? &fileInfo : nullptr, row, isSelected); return comp; @@ -255,5 +253,5 @@ void FileListComponent::deleteKeyPressed (int /*currentSelectedRow*/) void FileListComponent::returnKeyPressed (int currentSelectedRow) { - sendDoubleClickMessage (fileList.getFile (currentSelectedRow)); + sendDoubleClickMessage (directoryContentsList.getFile (currentSelectedRow)); } diff --git a/modules/juce_gui_basics/filebrowser/juce_FileListComponent.h b/modules/juce_gui_basics/filebrowser/juce_FileListComponent.h index d645e8d8dc..3dbf93efc7 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileListComponent.h +++ b/modules/juce_gui_basics/filebrowser/juce_FileListComponent.h @@ -46,8 +46,7 @@ class JUCE_API FileListComponent : public ListBox, { public: //============================================================================== - /** Creates a listbox to show the contents of a specified directory. - */ + /** Creates a listbox to show the contents of a specified directory. */ FileListComponent (DirectoryContentsList& listToShow); /** Destructor. */ @@ -78,11 +77,9 @@ public: private: //============================================================================== File lastDirectory; - class ItemComponent; void changeListenerCallback (ChangeBroadcaster*) override; - int getNumRows() override; void paintListBoxItem (int, Graphics&, int, int, bool) override; Component* refreshComponentForRow (int rowNumber, bool isRowSelected, Component*) override; diff --git a/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp index 84c2fe6285..15bc43a44a 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp @@ -34,8 +34,8 @@ class FileListTreeItem : public TreeViewItem, { public: FileListTreeItem (FileTreeComponent& treeComp, - DirectoryContentsList* const parentContents, - const int indexInContents, + DirectoryContentsList* parentContents, + int indexInContents, const File& f, TimeSliceThread& t) : file (f), @@ -135,7 +135,7 @@ public: for (int maxRetries = 500; --maxRetries > 0;) { for (int i = 0; i < getNumSubItems(); ++i) - if (FileListTreeItem* f = dynamic_cast (getSubItem (i))) + if (auto* f = dynamic_cast (getSubItem (i))) if (f->selectFile (target)) return true; @@ -183,7 +183,7 @@ public: } owner.getLookAndFeel().drawFileBrowserRow (g, width, height, - file.getFileName(), + file, file.getFileName(), &icon, fileSize, modTime, isDirectory, isSelected(), indexInContentsList, owner); @@ -233,8 +233,8 @@ private: { if (icon.isNull()) { - const int hashCode = (file.getFullPathName() + "_iconCacheSalt").hashCode(); - Image im (ImageCache::getFromHashCode (hashCode)); + auto hashCode = (file.getFullPathName() + "_iconCacheSalt").hashCode(); + auto im = ImageCache::getFromHashCode (hashCode); if (im.isNull() && ! onlyUpdateIfCached) { @@ -273,11 +273,10 @@ void FileTreeComponent::refresh() { deleteRootItem(); - FileListTreeItem* const root - = new FileListTreeItem (*this, nullptr, 0, fileList.getDirectory(), - fileList.getTimeSliceThread()); + auto root = new FileListTreeItem (*this, nullptr, 0, directoryContentsList.getDirectory(), + directoryContentsList.getTimeSliceThread()); - root->setSubContentsList (&fileList, false); + root->setSubContentsList (&directoryContentsList, false); setRootItem (root); } @@ -307,7 +306,7 @@ void FileTreeComponent::setDragAndDropDescription (const String& description) void FileTreeComponent::setSelectedFile (const File& target) { - if (FileListTreeItem* t = dynamic_cast (getRootItem())) + if (auto* t = dynamic_cast (getRootItem())) if (! t->selectFile (target)) clearSelectedItems(); } @@ -318,7 +317,7 @@ void FileTreeComponent::setItemHeight (int newHeight) { itemHeight = newHeight; - if (TreeViewItem* root = getRootItem()) + if (auto* root = getRootItem()) root->treeHasChanged(); } } diff --git a/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.cpp index e092e7471a..fee3d6c964 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.cpp @@ -126,6 +126,7 @@ void FilenameComponent::buttonClicked (Button*) setCurrentFile (fc.getResult(), true); } #else + ignoreUnused (isSaving); jassertfalse; // needs rewriting to deal with non-modal environments #endif } diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp index 3c1e54df04..b710d391a2 100644 --- a/modules/juce_gui_basics/juce_gui_basics.cpp +++ b/modules/juce_gui_basics/juce_gui_basics.cpp @@ -76,10 +76,6 @@ #endif #endif - #if JUCE_QUICKTIME && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - #pragma comment (lib, "QTMLClient.lib") - #endif - #if JUCE_DIRECT2D && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES #pragma comment (lib, "Dwrite.lib") #pragma comment (lib, "D2d1.lib") @@ -258,7 +254,7 @@ extern bool juce_areThereAnyAlwaysOnTopWindows(); #include "misc/juce_JUCESplashScreen.cpp" // these classes are C++11-only -#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS && JUCE_COMPILER_SUPPORTS_LAMBDAS +#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS #include "layout/juce_FlexBox.cpp" #endif diff --git a/modules/juce_gui_basics/juce_gui_basics.h b/modules/juce_gui_basics/juce_gui_basics.h index a874624b71..6b98ff4a37 100644 --- a/modules/juce_gui_basics/juce_gui_basics.h +++ b/modules/juce_gui_basics/juce_gui_basics.h @@ -35,7 +35,7 @@ ID: juce_gui_basics vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE GUI core classes description: Basic user-interface components and related classes. website: http://www.juce.com/juce @@ -178,7 +178,6 @@ class FlexBox; #include "mouse/juce_DragAndDropContainer.h" #include "mouse/juce_FileDragAndDropTarget.h" #include "mouse/juce_SelectedItemSet.h" -#include "mouse/juce_LassoComponent.h" #include "mouse/juce_MouseInactivityDetector.h" #include "mouse/juce_TextDragAndDropTarget.h" #include "mouse/juce_TooltipClient.h" @@ -286,13 +285,14 @@ class FlexBox; #include "lookandfeel/juce_LookAndFeel_V1.h" #include "lookandfeel/juce_LookAndFeel_V3.h" #include "lookandfeel/juce_LookAndFeel_V4.h" +#include "mouse/juce_LassoComponent.h" #if JUCE_LINUX #include "native/juce_linux_X11.h" #endif // these classes are C++11-only -#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS && JUCE_COMPILER_SUPPORTS_LAMBDAS +#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS #include "layout/juce_FlexItem.h" #include "layout/juce_FlexBox.h" #endif diff --git a/modules/juce_gui_basics/keyboard/juce_KeyboardFocusTraverser.cpp b/modules/juce_gui_basics/keyboard/juce_KeyboardFocusTraverser.cpp index 48927c83c9..13afbd4027 100644 --- a/modules/juce_gui_basics/keyboard/juce_KeyboardFocusTraverser.cpp +++ b/modules/juce_gui_basics/keyboard/juce_KeyboardFocusTraverser.cpp @@ -30,46 +30,40 @@ namespace KeyboardFocusHelpers // left-to-right and then top-to-bottom. struct ScreenPositionComparator { - static int compareElements (const Component* const first, const Component* const second) + static int compareElements (const Component* first, const Component* second) { - const int explicitOrder1 = getOrder (first); - const int explicitOrder2 = getOrder (second); + auto explicitOrder1 = getOrder (first); + auto explicitOrder2 = getOrder (second); if (explicitOrder1 != explicitOrder2) return explicitOrder1 - explicitOrder2; - const int yDiff = first->getY() - second->getY(); + auto yDiff = first->getY() - second->getY(); return yDiff == 0 ? first->getX() - second->getX() : yDiff; } - static int getOrder (const Component* const c) + static int getOrder (const Component* c) { - const int order = c->getExplicitFocusOrder(); + auto order = c->getExplicitFocusOrder(); return order > 0 ? order : (std::numeric_limits::max() / 2); } }; - static void findAllFocusableComponents (Component* const parent, Array & comps) + static void findAllFocusableComponents (Component* parent, Array& comps) { - if (parent->getNumChildComponents() > 0) + if (parent->getNumChildComponents() != 0) { - Array localComps; + Array localComps; ScreenPositionComparator comparator; - for (int i = parent->getNumChildComponents(); --i >= 0;) - { - Component* const c = parent->getChildComponent (i); - + for (auto* c : parent->getChildren()) if (c->isVisible() && c->isEnabled()) localComps.addSorted (comparator, c); - } - for (int i = 0; i < localComps.size(); ++i) + for (auto* c : localComps) { - Component* const c = localComps.getUnchecked (i); - if (c->getWantsKeyboardFocus()) comps.add (c); @@ -90,18 +84,16 @@ namespace KeyboardFocusHelpers return c; } - static Component* getIncrementedComponent (Component* const current, const int delta) + static Component* getIncrementedComponent (Component* current, int delta) { - Component* focusContainer = findFocusContainer (current); - - if (focusContainer != nullptr) + if (auto* focusContainer = findFocusContainer (current)) { - Array comps; + Array comps; KeyboardFocusHelpers::findAllFocusableComponents (focusContainer, comps); - if (comps.size() > 0) + if (! comps.isEmpty()) { - const int index = comps.indexOf (current); + auto index = comps.indexOf (current); return comps [(index + comps.size() + delta) % comps.size()]; } } @@ -128,7 +120,7 @@ Component* KeyboardFocusTraverser::getPreviousComponent (Component* current) Component* KeyboardFocusTraverser::getDefaultComponent (Component* parentComponent) { - Array comps; + Array comps; if (parentComponent != nullptr) KeyboardFocusHelpers::findAllFocusableComponents (parentComponent, comps); diff --git a/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp b/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp index 6d9d7fc5d1..b34240c575 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp +++ b/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp @@ -114,8 +114,7 @@ void ComponentBoundsConstrainer::setBoundsForComponent (Component* component, if (auto* peer = component->getPeer()) border = peer->getFrameSize(); - auto targetScreenArea = component->localAreaToGlobal (targetBounds.withZeroOrigin()); - auto screenBounds = Desktop::getInstance().getDisplays().getDisplayContaining (targetScreenArea.getCentre()).userArea; + auto screenBounds = Desktop::getInstance().getDisplays().getDisplayContaining (targetBounds.getCentre()).userArea; limits = component->getLocalArea (nullptr, screenBounds) + component->getPosition(); } diff --git a/modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp b/modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp index 99764e99f4..bd5b6c52db 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp +++ b/modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp @@ -52,9 +52,9 @@ namespace ComponentBuilderHelpers if (c.getComponentID() == compId) return &c; - for (int i = c.getNumChildComponents(); --i >= 0;) - if (Component* const child = findComponentWithID (*c.getChildComponent (i), compId)) - return child; + for (auto* child : c.getChildren()) + if (auto* found = findComponentWithID (*child, compId)) + return found; return nullptr; } @@ -238,7 +238,7 @@ void ComponentBuilder::updateChildComponents (Component& parent, const ValueTree { using namespace ComponentBuilderHelpers; - const int numExistingChildComps = parent.getNumChildComponents(); + auto numExistingChildComps = parent.getNumChildComponents(); Array componentsInOrder; componentsInOrder.ensureStorageAllocated (numExistingChildComps); @@ -250,15 +250,16 @@ void ComponentBuilder::updateChildComponents (Component& parent, const ValueTree for (int i = 0; i < numExistingChildComps; ++i) existingComponents.add (parent.getChildComponent (i)); - const int newNumChildren = children.getNumChildren(); + auto newNumChildren = children.getNumChildren(); + for (int i = 0; i < newNumChildren; ++i) { - const ValueTree childState (children.getChild (i)); - Component* c = removeComponentWithID (existingComponents, getStateId (childState)); + auto childState = children.getChild (i); + auto* c = removeComponentWithID (existingComponents, getStateId (childState)); if (c == nullptr) { - if (TypeHandler* const type = getHandlerForState (childState)) + if (auto* type = getHandlerForState (childState)) c = ComponentBuilderHelpers::createNewComponent (*type, childState, &parent); else jassertfalse; diff --git a/modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.h b/modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.h index ed97e8227b..0a1c55bd9f 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.h +++ b/modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.h @@ -38,7 +38,7 @@ It also includes a callback that lets you know when the top-level peer is changed. - This class is used by specialised components like WebBrowserComponent or QuickTimeComponent + This class is used by specialised components like WebBrowserComponent because they need to keep their custom windows in the right place and respond to changes in the peer. */ diff --git a/modules/juce_gui_basics/layout/juce_FlexBox.cpp b/modules/juce_gui_basics/layout/juce_FlexBox.cpp index 8513b9b7c6..bdaaea8060 100644 --- a/modules/juce_gui_basics/layout/juce_FlexBox.cpp +++ b/modules/juce_gui_basics/layout/juce_FlexBox.cpp @@ -787,7 +787,13 @@ void FlexBox::performLayout (Rectangle targetArea) item.currentBounds += targetArea.getPosition(); if (auto comp = item.associatedComponent) - comp->setBounds (item.currentBounds.getSmallestIntegerContainer()); + { + auto position = item.currentBounds.getPosition().roundToInt(); + comp->setBounds (position.getX(), + position.getY(), + roundToInt (item.currentBounds.getRight()) - position.getX(), + roundToInt (item.currentBounds.getBottom()) - position.getY()); + } if (auto box = item.associatedFlexBox) box->performLayout (item.currentBounds); diff --git a/modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp b/modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp index 57f607c10d..65c7454200 100644 --- a/modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp +++ b/modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp @@ -143,7 +143,7 @@ void MultiDocumentPanel::addWindow (Component* component) int x = 4; - if (Component* const topComp = getChildComponent (getNumChildComponents() - 1)) + if (auto* topComp = getChildren().getLast()) if (topComp->getX() == x && topComp->getY() == x) x += 16; @@ -200,7 +200,7 @@ bool MultiDocumentPanel::addDocument (Component* const component, { addAndMakeVisible (tabComponent = new TabbedComponentInternal()); - Array temp (components); + Array temp (components); for (int i = 0; i < temp.size(); ++i) tabComponent->addTab (temp[i]->getName(), docColour, temp[i], false); @@ -239,9 +239,9 @@ bool MultiDocumentPanel::closeDocument (Component* component, if (mode == FloatingWindows) { - for (int i = getNumChildComponents(); --i >= 0;) + for (auto* child : getChildren()) { - if (MultiDocumentPanelWindow* const dw = dynamic_cast (getChildComponent (i))) + if (auto* dw = dynamic_cast (child)) { if (dw->getContentComponent() == component) { @@ -326,8 +326,8 @@ Component* MultiDocumentPanel::getActiveDocument() const noexcept { if (mode == FloatingWindows) { - for (int i = getNumChildComponents(); --i >= 0;) - if (MultiDocumentPanelWindow* const dw = dynamic_cast (getChildComponent (i))) + for (auto* child : getChildren()) + if (auto* dw = dynamic_cast (child)) if (dw->isActiveWindow()) return dw->getContentComponent(); } @@ -411,7 +411,7 @@ void MultiDocumentPanel::setLayoutMode (const LayoutMode newLayoutMode) resized(); - const Array tempComps (components); + const Array tempComps (components); components.clear(); for (int i = 0; i < tempComps.size(); ++i) @@ -445,8 +445,8 @@ void MultiDocumentPanel::resized() { if (mode == MaximisedWindowsWithTabs || components.size() == numDocsBeforeTabsUsed) { - for (int i = getNumChildComponents(); --i >= 0;) - getChildComponent (i)->setBounds (getLocalBounds()); + for (auto* child : getChildren()) + child->setBounds (getLocalBounds()); } setWantsKeyboardFocus (components.size() == 0); @@ -456,8 +456,8 @@ Component* MultiDocumentPanel::getContainerComp (Component* c) const { if (mode == FloatingWindows) { - for (int i = 0; i < getNumChildComponents(); ++i) - if (MultiDocumentPanelWindow* const dw = dynamic_cast (getChildComponent (i))) + for (auto* child : getChildren()) + if (auto* dw = dynamic_cast (child)) if (dw->getContentComponent() == c) return dw; } @@ -469,8 +469,8 @@ void MultiDocumentPanel::componentNameChanged (Component&) { if (mode == FloatingWindows) { - for (int i = 0; i < getNumChildComponents(); ++i) - if (MultiDocumentPanelWindow* const dw = dynamic_cast (getChildComponent (i))) + for (auto* child : getChildren()) + if (auto* dw = dynamic_cast (child)) dw->setName (dw->getContentComponent()->getName()); } else if (tabComponent != nullptr) @@ -482,21 +482,21 @@ void MultiDocumentPanel::componentNameChanged (Component&) void MultiDocumentPanel::updateOrder() { - const Array oldList (components); + auto oldList = components; if (mode == FloatingWindows) { components.clear(); - for (int i = 0; i < getNumChildComponents(); ++i) - if (MultiDocumentPanelWindow* const dw = dynamic_cast (getChildComponent (i))) + for (auto* child : getChildren()) + if (auto* dw = dynamic_cast (child)) components.add (dw->getContentComponent()); } else { if (tabComponent != nullptr) { - if (Component* const current = tabComponent->getCurrentContentComponent()) + if (auto* current = tabComponent->getCurrentContentComponent()) { components.removeFirstMatchingValue (current); components.add (current); diff --git a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp index d6a2b857aa..3f9b05752a 100644 --- a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp +++ b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp @@ -221,8 +221,8 @@ void TabbedButtonBar::setOrientation (const Orientation newOrientation) { orientation = newOrientation; - for (int i = getNumChildComponents(); --i >= 0;) - getChildComponent (i)->resized(); + for (auto* child : getChildren()) + child->resized(); resized(); } diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp index 072a0fa8d0..9edee80c94 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -1104,6 +1104,8 @@ Component* LookAndFeel_V2::getParentComponentForMenuOptions (const PopupMenu::Op void LookAndFeel_V2::preparePopupMenuWindow (Component&) {} +bool LookAndFeel_V2::shouldPopupMenuScaleWithTargetComponent (const PopupMenu::Options&) { return true; } + //============================================================================== void LookAndFeel_V2::fillTextEditorBackground (Graphics& g, int /*width*/, int /*height*/, TextEditor& textEditor) { @@ -1482,14 +1484,14 @@ Button* LookAndFeel_V2::createSliderButton (Slider&, const bool isIncrement) class LookAndFeel_V2::SliderLabelComp : public Label { public: - SliderLabelComp() : Label (String(), String()) {} + SliderLabelComp() : Label ({}, {}) {} void mouseWheelMove (const MouseEvent&, const MouseWheelDetails&) {} }; Label* LookAndFeel_V2::createSliderTextBox (Slider& slider) { - Label* const l = new SliderLabelComp(); + auto l = new SliderLabelComp(); l->setJustificationType (Justification::centred); l->setKeyboardType (TextInputTarget::decimalKeyboard); @@ -1636,7 +1638,7 @@ void LookAndFeel_V2::layoutFilenameComponent (FilenameComponent& filenameComp, { browseButton->setSize (80, filenameComp.getHeight()); - if (TextButton* const tb = dynamic_cast (browseButton)) + if (auto* tb = dynamic_cast (browseButton)) tb->changeWidthToFitText(); browseButton->setTopRightPosition (filenameComp.getWidth(), 0); @@ -2048,7 +2050,7 @@ int LookAndFeel_V2::getTabButtonBestWidth (TabBarButton& button, int tabDepth) int width = Font (tabDepth * 0.6f).getStringWidth (button.getButtonText().trim()) + getTabButtonOverlap (tabDepth) * 2; - if (Component* const extraComponent = button.getExtraComponent()) + if (auto* extraComponent = button.getExtraComponent()) width += button.getTabbedButtonBar().isVertical() ? extraComponent->getHeight() : extraComponent->getWidth(); @@ -2059,7 +2061,7 @@ Rectangle LookAndFeel_V2::getTabButtonExtraComponentBounds (const TabBarBut { Rectangle extraComp; - const TabbedButtonBar::Orientation orientation = button.getTabbedButtonBar().getOrientation(); + auto orientation = button.getTabbedButtonBar().getOrientation(); if (button.getExtraComponentPlacement() == TabBarButton::beforeText) { @@ -2089,7 +2091,7 @@ Rectangle LookAndFeel_V2::getTabButtonExtraComponentBounds (const TabBarBut void LookAndFeel_V2::createTabButtonShape (TabBarButton& button, Path& p, bool /*isMouseOver*/, bool /*isMouseDown*/) { - const Rectangle activeArea (button.getActiveArea()); + auto activeArea = button.getActiveArea(); const float w = (float) activeArea.getWidth(); const float h = (float) activeArea.getHeight(); @@ -2149,7 +2151,7 @@ void LookAndFeel_V2::createTabButtonShape (TabBarButton& button, Path& p, bool / void LookAndFeel_V2::fillTabButtonShape (TabBarButton& button, Graphics& g, const Path& path, bool /*isMouseOver*/, bool /*isMouseDown*/) { - const Colour tabBackground (button.getTabBackgroundColour()); + auto tabBackground = button.getTabBackgroundColour(); const bool isFrontTab = button.isFrontTab(); g.setColour (isFrontTab ? tabBackground @@ -2491,7 +2493,7 @@ AttributedString LookAndFeel_V2::createFileChooserHeaderText (const String& titl AttributedString s; s.setJustification (Justification::centred); - const Colour colour (findColour (FileChooserDialogBox::titleTextColourId)); + auto colour = findColour (FileChooserDialogBox::titleTextColourId); s.append (title + "\n\n", Font (17.0f, Font::bold), colour); s.append (instructions, Font (14.0f), colour); @@ -2499,13 +2501,13 @@ AttributedString LookAndFeel_V2::createFileChooserHeaderText (const String& titl } void LookAndFeel_V2::drawFileBrowserRow (Graphics& g, int width, int height, - const String& filename, Image* icon, + const File&, const String& filename, Image* icon, const String& fileSizeDescription, const String& fileTimeDescription, - const bool isDirectory, const bool isItemSelected, - const int /*itemIndex*/, DirectoryContentsDisplayComponent& dcc) + bool isDirectory, bool isItemSelected, + int /*itemIndex*/, DirectoryContentsDisplayComponent& dcc) { - Component* const fileListComp = dynamic_cast (&dcc); + auto fileListComp = dynamic_cast (&dcc); if (isItemSelected) g.fillAll (fileListComp != nullptr ? fileListComp->findColour (DirectoryContentsDisplayComponent::highlightColourId) @@ -2522,8 +2524,8 @@ void LookAndFeel_V2::drawFileBrowserRow (Graphics& g, int width, int height, } else { - if (const Drawable* d = isDirectory ? getDefaultFolderImage() - : getDefaultDocumentFileImage()) + if (auto* d = isDirectory ? getDefaultFolderImage() + : getDefaultDocumentFileImage()) d->drawWithin (g, Rectangle (2.0f, 2.0f, x - 4.0f, height - 4.0f), RectanglePlacement::centred | RectanglePlacement::onlyReduceInSize, 1.0f); } @@ -2566,10 +2568,10 @@ void LookAndFeel_V2::drawFileBrowserRow (Graphics& g, int width, int height, Button* LookAndFeel_V2::createFileBrowserGoUpButton() { - DrawableButton* goUpButton = new DrawableButton ("up", DrawableButton::ImageOnButtonBackground); + auto goUpButton = new DrawableButton ("up", DrawableButton::ImageOnButtonBackground); Path arrowPath; - arrowPath.addArrow (Line (50.0f, 100.0f, 50.0f, 0.0f), 40.0f, 100.0f, 50.0f); + arrowPath.addArrow ({ 50.0f, 100.0f, 50.0f, 0.0f }, 40.0f, 100.0f, 50.0f); DrawablePath arrowImage; arrowImage.setFill (Colours::black.withAlpha (0.4f)); @@ -2588,11 +2590,11 @@ void LookAndFeel_V2::layoutFileBrowserComponent (FileBrowserComponent& browserCo Button* goUpButton) { const int x = 8; - int w = browserComp.getWidth() - x - x; + auto w = browserComp.getWidth() - x - x; if (previewComp != nullptr) { - const int previewWidth = w / 3; + auto previewWidth = w / 3; previewComp->setBounds (x + w - previewWidth, 0, previewWidth, browserComp.getHeight()); w -= previewWidth + 4; @@ -2609,7 +2611,7 @@ void LookAndFeel_V2::layoutFileBrowserComponent (FileBrowserComponent& browserCo y += controlsHeight + 4; - if (Component* const listAsComp = dynamic_cast (fileListComponent)) + if (auto listAsComp = dynamic_cast (fileListComponent)) { listAsComp->setBounds (x, y, w, browserComp.getHeight() - y - bottomSectionHeight); y = listAsComp->getBottom() + 4; diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h index bc11dd7982..302edef3e2 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h @@ -129,7 +129,7 @@ public: AttributedString createFileChooserHeaderText (const String& title, const String& instructions) override; void drawFileBrowserRow (Graphics&, int width, int height, - const String& filename, Image* icon, + const File& file, const String& filename, Image* icon, const String& fileSizeDescription, const String& fileTimeDescription, bool isDirectory, bool isItemSelected, int itemIndex, DirectoryContentsDisplayComponent&) override; @@ -180,6 +180,8 @@ public: Component* getParentComponentForMenuOptions (const PopupMenu::Options& options) override; + bool shouldPopupMenuScaleWithTargetComponent (const PopupMenu::Options& options) override; + //============================================================================== void drawComboBox (Graphics&, int width, int height, bool isButtonDown, int buttonX, int buttonY, int buttonW, int buttonH, diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp index a0d86faa4d..9bfbd8d106 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp @@ -378,9 +378,9 @@ AlertWindow* LookAndFeel_V4::createAlertWindow (const String& title, const Strin bounds = bounds.withSizeKeepingCentre (bounds.getWidth() + boundsOffset, bounds.getHeight() + boundsOffset); aw->setBounds (bounds); - for (int i = 0, maxI = aw->getNumChildComponents(); i < maxI; ++i) - if (auto button = dynamic_cast (aw->getChildComponent(i))) - button->setBounds (button->getBounds().withPosition (button->getX() + 25, button->getY() + 40)); + for (auto* child : aw->getChildren()) + if (auto button = dynamic_cast (child)) + button->setBounds (button->getBounds() + Point (25, 40)); return aw; } @@ -724,18 +724,18 @@ void LookAndFeel_V4::layoutFileBrowserComponent (FileBrowserComponent& browserCo } void LookAndFeel_V4::drawFileBrowserRow (Graphics& g, int width, int height, - const String& filename, Image* icon, + const File& file, const String& filename, Image* icon, const String& fileSizeDescription, const String& fileTimeDescription, - const bool isDirectory, const bool isItemSelected, - const int itemIndex, DirectoryContentsDisplayComponent& dcc) + bool isDirectory, bool isItemSelected, + int itemIndex, DirectoryContentsDisplayComponent& dcc) { if (auto fileListComp = dynamic_cast (&dcc)) fileListComp->setColour (DirectoryContentsDisplayComponent::textColourId, currentColourScheme.getUIColour (isItemSelected ? ColourScheme::UIColour::highlightedText : ColourScheme::UIColour::menuText)); - LookAndFeel_V2::drawFileBrowserRow (g, width, height, filename, icon, + LookAndFeel_V2::drawFileBrowserRow (g, width, height, file, filename, icon, fileSizeDescription, fileTimeDescription, isDirectory, isItemSelected, itemIndex, dcc); } @@ -922,7 +922,6 @@ void LookAndFeel_V4::positionComboBoxText (ComboBox& box, Label& label) box.getHeight() - 2); label.setFont (getComboBoxFont (box)); - label.setJustificationType (Justification::centredLeft); } //============================================================================== diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.h b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.h index fead65aec4..76b1371f98 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.h +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.h @@ -155,7 +155,7 @@ public: Button* goUpButton) override; void drawFileBrowserRow (Graphics&, int width, int height, - const String& filename, Image* icon, + const File& file, const String& filename, Image* icon, const String& fileSizeDescription, const String& fileTimeDescription, bool isDirectory, bool isItemSelected, int itemIndex, DirectoryContentsDisplayComponent&) override; diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp index ff847a6e0a..27aa3e5d0d 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp @@ -159,12 +159,11 @@ private: && item.shortcutKeyDescription.isEmpty()) { String shortcutKey; - const Array keyPresses (item.commandManager->getKeyMappings() - ->getKeyPressesAssignedToCommand (item.itemID)); - for (int i = 0; i < keyPresses.size(); ++i) + for (auto& keypress : item.commandManager->getKeyMappings() + ->getKeyPressesAssignedToCommand (item.itemID)) { - const String key (keyPresses.getReference (i).getTextDescriptionWithIcons()); + auto key = keypress.getTextDescriptionWithIcons(); if (shortcutKey.isNotEmpty()) shortcutKey << ", "; @@ -192,29 +191,19 @@ private: class MenuWindow : public Component { public: - MenuWindow (const PopupMenu& menu, MenuWindow* const parentWindow, - const Options& opts, - const bool alignToRectangle, - const bool shouldDismissOnMouseUp, - ApplicationCommandManager** const manager) + MenuWindow (const PopupMenu& menu, MenuWindow* parentWindow, + const Options& opts, bool alignToRectangle, bool shouldDismissOnMouseUp, + ApplicationCommandManager** manager, float parentScaleFactor = 1.0f) : Component ("menu"), parent (parentWindow), options (opts), managerOfChosenCommand (manager), componentAttachedTo (options.targetComponent), - parentComponent (nullptr), - hasBeenOver (false), - needsToScroll (false), dismissOnMouseUp (shouldDismissOnMouseUp), - hideOnExit (false), - disableMouseMoves (false), - hasAnyJuceCompHadFocus (false), - numColumns (0), - contentHeight (0), - childYOffset (0), windowCreationTime (Time::getMillisecondCounter()), lastFocusedTime (windowCreationTime), - timeEnteredCurrentChildComp (windowCreationTime) + timeEnteredCurrentChildComp (windowCreationTime), + scaleFactor (parentWindow != nullptr ? parentScaleFactor : 1.0f) { setWantsKeyboardFocus (false); setMouseClickGrabsKeyboardFocus (false); @@ -223,32 +212,37 @@ public: setLookAndFeel (parent != nullptr ? &(parent->getLookAndFeel()) : menu.lookAndFeel.get()); - LookAndFeel& lf = getLookAndFeel(); + auto& lf = getLookAndFeel(); parentComponent = lf.getParentComponentForMenuOptions (options); + if (parentComponent == nullptr && parentWindow == nullptr && lf.shouldPopupMenuScaleWithTargetComponent (options)) + if (auto* targetComponent = options.getTargetComponent()) + scaleFactor = getApproximateScaleFactorForTargetComponent (targetComponent); + setOpaque (lf.findColour (PopupMenu::backgroundColourId).isOpaque() || ! Desktop::canUseSemiTransparentWindows()); for (int i = 0; i < menu.items.size(); ++i) { - PopupMenu::Item* const item = menu.items.getUnchecked (i); + auto item = menu.items.getUnchecked (i); if (i < menu.items.size() - 1 || ! item->isSeparator) items.add (new ItemComponent (*item, options.standardHeight, *this)); } - calculateWindowPos (options.targetArea, alignToRectangle); + Rectangle targetArea = options.targetArea / scaleFactor; + + calculateWindowPos (targetArea, alignToRectangle); setTopLeftPosition (windowPos.getPosition()); updateYPositions(); if (options.visibleItemID != 0) { - const Point targetPosition = - (parentComponent != nullptr ? parentComponent->getLocalPoint (nullptr, options.targetArea.getTopLeft()) - : options.targetArea.getTopLeft()); + auto targetPosition = parentComponent != nullptr ? parentComponent->getLocalPoint (nullptr, targetArea.getTopLeft()) + : targetArea.getTopLeft(); - const int y = targetPosition.getY() - windowPos.getY(); + auto y = targetPosition.getY() - windowPos.getY(); ensureItemIsVisible (options.visibleItemID, isPositiveAndBelow (y, windowPos.getHeight()) ? y : -1); } @@ -270,6 +264,8 @@ public: } lf.preparePopupMenuWindow (*this); + + getMouseState (Desktop::getInstance().getMainMouseSource()); // forces creation of a mouse source watcher for the main mouse } ~MenuWindow() @@ -291,7 +287,7 @@ public: void paintOverChildren (Graphics& g) override { - LookAndFeel& lf = getLookAndFeel(); + auto& lf = getLookAndFeel(); if (parentComponent != nullptr) lf.drawResizableFrame (g, getWidth(), getHeight(), BorderSize (PopupMenuSettings::borderSize)); @@ -311,7 +307,7 @@ public: //============================================================================== // hide this and all sub-comps - void hide (const PopupMenu::Item* const item, const bool makeInvisible) + void hide (const PopupMenu::Item* item, bool makeInvisible) { if (isVisible()) { @@ -339,7 +335,7 @@ public: if (item == nullptr) return 0; - if (CustomCallback* cc = item->customCallback) + if (auto* cc = item->customCallback.get()) if (! cc->menuItemTriggered()) return 0; @@ -357,7 +353,7 @@ public: if (item != nullptr) { // need a copy of this on the stack as the one passed in will get deleted during this call - const PopupMenu::Item mi (*item); + auto mi (*item); hide (&mi, false); } else @@ -367,6 +363,8 @@ public: } } + float getDesktopScaleFactor() const override { return scaleFactor * Desktop::getInstance().getGlobalScaleFactor(); } + //============================================================================== bool keyPressed (const KeyPress& key) override { @@ -431,9 +429,9 @@ public: { WeakReference deletionChecker (this); - for (int i = mouseSourceStates.size(); --i >= 0;) + for (auto* ms : mouseSourceStates) { - mouseSourceStates.getUnchecked (i)->timerCallback(); + ms->timerCallback(); if (deletionChecker == nullptr) return; @@ -449,7 +447,7 @@ public: // as they'll expect the menu to go away, and in fact it'll just // come back. So only dismiss synchronously if they're not on the original // comp that we're attached to. - const Point mousePos (componentAttachedTo->getMouseXYRelative()); + auto mousePos = componentAttachedTo->getMouseXYRelative(); if (componentAttachedTo->reallyContains (mousePos, true)) { @@ -497,7 +495,7 @@ public: return false; } - if (MenuWindow* currentlyModalWindow = dynamic_cast (Component::getCurrentlyModalComponent())) + if (auto* currentlyModalWindow = dynamic_cast (Component::getCurrentlyModalComponent())) if (! treeContains (currentlyModalWindow)) return false; @@ -512,14 +510,11 @@ public: MouseSourceState& getMouseState (MouseInputSource source) { - for (int i = mouseSourceStates.size(); --i >= 0;) - { - MouseSourceState& ms = *mouseSourceStates.getUnchecked (i); - if (ms.source == source) - return ms; - } + for (auto* ms : mouseSourceStates) + if (ms->source == source) + return *ms; - MouseSourceState* ms = new MouseSourceState (*this, source); + auto ms = new MouseSourceState (*this, source); mouseSourceStates.add (ms); return *ms; } @@ -539,8 +534,8 @@ public: bool isAnyMouseOver() const { - for (int i = 0; i < mouseSourceStates.size(); ++i) - if (mouseSourceStates.getUnchecked (i)->isOver()) + for (auto* ms : mouseSourceStates) + if (ms->isOver()) return true; return false; @@ -591,13 +586,12 @@ public: //============================================================================== Rectangle getParentArea (Point targetPoint) { - Rectangle parentArea (Desktop::getInstance().getDisplays() - .getDisplayContaining (targetPoint) - #if JUCE_MAC - .userArea); - #else - .totalArea); // on windows, don't stop the menu overlapping the taskbar - #endif + auto parentArea = Desktop::getInstance().getDisplays().getDisplayContaining (targetPoint) + #if JUCE_MAC + .userArea; + #else + .totalArea; // on windows, don't stop the menu overlapping the taskbar + #endif if (parentComponent == nullptr) return parentArea; @@ -610,7 +604,7 @@ public: void calculateWindowPos (Rectangle target, const bool alignToRectangle) { - const Rectangle parentArea = getParentArea (target.getCentre()); + auto parentArea = getParentArea (target.getCentre()); if (parentComponent != nullptr) target = parentComponent->getLocalArea (nullptr, target).getIntersection (parentArea); @@ -706,10 +700,9 @@ public: workOutBestSize (maxMenuW); // to update col widths break; } - else if (totalW > maxMenuW / 2 || contentHeight < maxMenuH) - { + + if (totalW > maxMenuW / 2 || contentHeight < maxMenuH) break; - } } while (numColumns < maximumNumColumns); @@ -769,12 +762,12 @@ public: for (int i = items.size(); --i >= 0;) { - if (ItemComponent* const m = items.getUnchecked (i)) + if (auto* m = items.getUnchecked (i)) { if (m->item.itemID == itemID && windowPos.getHeight() > PopupMenuSettings::scrollZone * 4) { - const int currentY = m->getY(); + auto currentY = m->getY(); if (wantedY > 0 || currentY < 0 || m->getBottom() > windowPos.getHeight()) { @@ -784,16 +777,16 @@ public: windowPos.getHeight() - (PopupMenuSettings::scrollZone + m->getHeight())), currentY); - const Rectangle parantArea = getParentArea (windowPos.getPosition()); + auto parentArea = getParentArea (windowPos.getPosition()); int deltaY = wantedY - currentY; - windowPos.setSize (jmin (windowPos.getWidth(), parantArea.getWidth()), - jmin (windowPos.getHeight(), parantArea.getHeight())); + windowPos.setSize (jmin (windowPos.getWidth(), parentArea.getWidth()), + jmin (windowPos.getHeight(), parentArea.getHeight())); - const int newY = jlimit (parantArea.getY(), - parantArea.getBottom() - windowPos.getHeight(), - windowPos.getY() + deltaY); + auto newY = jlimit (parentArea.getY(), + parentArea.getBottom() - windowPos.getHeight(), + windowPos.getY() + deltaY); deltaY -= newY - windowPos.getY(); @@ -811,7 +804,7 @@ public: void resizeToBestWindowPos() { - Rectangle r (windowPos); + auto r = windowPos; if (childYOffset < 0) { @@ -868,7 +861,7 @@ public: for (int i = 0; i < numChildren; ++i) { - Component* const c = items.getUnchecked (childNum + i); + auto* c = items.getUnchecked (childNum + i); c->setBounds (x, y, colW, c->getHeight()); y += c->getHeight(); } @@ -907,7 +900,7 @@ public: options.withTargetScreenArea (childComp->getScreenBounds()) .withMinimumWidth (0) .withTargetComponent (nullptr), - false, dismissOnMouseUp, managerOfChosenCommand); + false, dismissOnMouseUp, managerOfChosenCommand, scaleFactor); activeSubMenu->setVisible (true); // (must be called before enterModalState on Windows to avoid DropShadower confusion) activeSubMenu->enterModalState (false); @@ -939,7 +932,7 @@ public: { start += delta; - if (ItemComponent* mic = items.getUnchecked ((start + items.size()) % items.size())) + if (auto* mic = items.getUnchecked ((start + items.size()) % items.size())) { if (canBeTriggered (mic->item) || hasActiveSubMenu (mic->item)) { @@ -962,22 +955,39 @@ public: bool isTopScrollZoneActive() const noexcept { return canScroll() && childYOffset > 0; } bool isBottomScrollZoneActive() const noexcept { return canScroll() && childYOffset < contentHeight - windowPos.getHeight(); } + //============================================================================== + static float getApproximateScaleFactorForTargetComponent (Component* targetComponent) + { + AffineTransform transform; + + for (auto* target = targetComponent; target != nullptr; target = target->getParentComponent()) + { + transform = transform.followedBy (target->getTransform()); + + if (target->isOnDesktop()) + transform = transform.scaled (target->getDesktopScaleFactor()); + } + + return (transform.getScaleFactor() / Desktop::getInstance().getGlobalScaleFactor()); + } + //============================================================================== MenuWindow* parent; const Options options; OwnedArray items; ApplicationCommandManager** managerOfChosenCommand; WeakReference componentAttachedTo; - Component* parentComponent; + Component* parentComponent = nullptr; Rectangle windowPos; - bool hasBeenOver, needsToScroll; - bool dismissOnMouseUp, hideOnExit, disableMouseMoves, hasAnyJuceCompHadFocus; - int numColumns, contentHeight, childYOffset; + bool hasBeenOver = false, needsToScroll = false; + bool dismissOnMouseUp, hideOnExit = false, disableMouseMoves = false, hasAnyJuceCompHadFocus = false; + int numColumns = 0, contentHeight = 0, childYOffset = 0; Component::SafePointer currentChild; ScopedPointer activeSubMenu; Array columnWidths; uint32 windowCreationTime, lastFocusedTime, timeEnteredCurrentChildComp; OwnedArray mouseSourceStates; + float scaleFactor; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MenuWindow) }; @@ -987,10 +997,9 @@ class MouseSourceState : private Timer { public: MouseSourceState (MenuWindow& w, MouseInputSource s) - : window (w), source (s), scrollAcceleration (1.0), - lastScrollTime (Time::getMillisecondCounter()), - lastMouseMoveTime (0), isDown (false) + : window (w), source (s), lastScrollTime (Time::getMillisecondCounter()) { + startTimerHz (20); } void handleMouseEvent (const MouseEvent& e) @@ -1018,15 +1027,14 @@ public: private: Point lastMousePos; - double scrollAcceleration; - uint32 lastScrollTime, lastMouseMoveTime; - bool isDown; + double scrollAcceleration = 0; + uint32 lastScrollTime, lastMouseMoveTime = 0; + bool isDown = false; void handleMousePosition (Point globalMousePos) { - const Point localMousePos (window.getLocalPoint (nullptr, globalMousePos)); - - const uint32 timeNow = Time::getMillisecondCounter(); + auto localMousePos = window.getLocalPoint (nullptr, globalMousePos); + auto timeNow = Time::getMillisecondCounter(); if (timeNow > window.timeEnteredCurrentChildComp + 100 && window.reallyContains (localMousePos, true) @@ -1106,11 +1114,11 @@ private: if (! isMovingTowardsMenu) { - Component* c = window.getComponentAt (localMousePos); + auto* c = window.getComponentAt (localMousePos); if (c == &window) c = nullptr; - ItemComponent* itemUnderMouse = dynamic_cast (c); + auto* itemUnderMouse = dynamic_cast (c); if (itemUnderMouse == nullptr && c != nullptr) itemUnderMouse = c->findParentComponentOfClass(); @@ -1139,10 +1147,10 @@ private: // submenu. To do this, look at whether the mouse stays inside a triangular region that // extends from the last mouse pos to the submenu's rectangle.. - const Rectangle itemScreenBounds (window.activeSubMenu->getScreenBounds()); - float subX = (float) itemScreenBounds.getX(); + auto itemScreenBounds = window.activeSubMenu->getScreenBounds(); + auto subX = (float) itemScreenBounds.getX(); - Point oldGlobalPos (lastMousePos); + auto oldGlobalPos = lastMousePos; if (itemScreenBounds.getX() > window.getX()) { @@ -1202,8 +1210,7 @@ private: //============================================================================== struct NormalComponentWrapper : public PopupMenu::CustomComponent { - NormalComponentWrapper (Component* const comp, const int w, const int h, - const bool triggerMenuItemAutomaticallyWhenClicked) + NormalComponentWrapper (Component* comp, int w, int h, bool triggerMenuItemAutomaticallyWhenClicked) : PopupMenu::CustomComponent (triggerMenuItemAutomaticallyWhenClicked), width (w), height (h) { @@ -1218,7 +1225,7 @@ struct NormalComponentWrapper : public PopupMenu::CustomComponent void resized() override { - if (Component* const child = getChildComponent (0)) + if (auto* child = getChildComponent (0)) child->setBounds (getLocalBounds()); } @@ -1349,7 +1356,7 @@ static Drawable* createDrawableFromImage (const Image& im) { if (im.isValid()) { - DrawableImage* d = new DrawableImage(); + auto d = new DrawableImage(); d->setImage (im); return d; } @@ -1380,10 +1387,10 @@ void PopupMenu::addCommandItem (ApplicationCommandManager* commandManager, { jassert (commandManager != nullptr && commandID != 0); - if (const ApplicationCommandInfo* const registeredInfo = commandManager->getCommandForID (commandID)) + if (auto* registeredInfo = commandManager->getCommandForID (commandID)) { ApplicationCommandInfo info (*registeredInfo); - ApplicationCommandTarget* const target = commandManager->getTargetForCommand (commandID, info); + auto* target = commandManager->getTargetForCommand (commandID, info); Item i; i.text = displayName.isNotEmpty() ? displayName : info.shortName; @@ -1564,8 +1571,7 @@ Component* PopupMenu::createWindow (const Options& options, struct PopupMenuCompletionCallback : public ModalComponentManager::Callback { PopupMenuCompletionCallback() - : managerOfChosenCommand (nullptr), - prevFocused (Component::getCurrentlyFocusedComponent()), + : prevFocused (Component::getCurrentlyFocusedComponent()), prevTopLevel (prevFocused != nullptr ? prevFocused->getTopLevelComponent() : nullptr) { PopupMenuSettings::menuWasHiddenBecauseOfAppChange = false; @@ -1594,7 +1600,7 @@ struct PopupMenuCompletionCallback : public ModalComponentManager::Callback } } - ApplicationCommandManager* managerOfChosenCommand; + ApplicationCommandManager* managerOfChosenCommand = nullptr; ScopedPointer component; WeakReference prevFocused, prevTopLevel; @@ -1607,7 +1613,7 @@ int PopupMenu::showWithOptionalCallback (const Options& options, ModalComponentM ScopedPointer userCallbackDeleter (userCallback); ScopedPointer callback (new PopupMenuCompletionCallback()); - if (Component* window = createWindow (options, &(callback->managerOfChosenCommand))) + if (auto* window = createWindow (options, &(callback->managerOfChosenCommand))) { callback->component = window; @@ -1695,11 +1701,11 @@ int PopupMenu::showAt (Component* componentToAttachTo, bool JUCE_CALLTYPE PopupMenu::dismissAllActiveMenus() { - const Array& windows = HelperClasses::MenuWindow::getActiveWindows(); - const int numWindows = windows.size(); + auto& windows = HelperClasses::MenuWindow::getActiveWindows(); + auto numWindows = windows.size(); for (int i = numWindows; --i >= 0;) - if (HelperClasses::MenuWindow* const pmw = windows[i]) + if (auto* pmw = windows[i]) pmw->dismissMenu (nullptr); return numWindows > 0; @@ -1710,8 +1716,8 @@ int PopupMenu::getNumItems() const noexcept { int num = 0; - for (int i = items.size(); --i >= 0;) - if (! items.getUnchecked (i)->isSeparator) + for (auto* mi : items) + if (! mi->isSeparator) ++num; return num; @@ -1719,30 +1725,24 @@ int PopupMenu::getNumItems() const noexcept bool PopupMenu::containsCommandItem (const int commandID) const { - for (int i = items.size(); --i >= 0;) - { - const Item& mi = *items.getUnchecked (i); - - if ((mi.itemID == commandID && mi.commandManager != nullptr) - || (mi.subMenu != nullptr && mi.subMenu->containsCommandItem (commandID))) + for (auto* mi : items) + if ((mi->itemID == commandID && mi->commandManager != nullptr) + || (mi->subMenu != nullptr && mi->subMenu->containsCommandItem (commandID))) return true; - } return false; } bool PopupMenu::containsAnyActiveItems() const noexcept { - for (int i = items.size(); --i >= 0;) + for (auto* mi : items) { - const Item& mi = *items.getUnchecked (i); - - if (mi.subMenu != nullptr) + if (mi->subMenu != nullptr) { - if (mi.subMenu->containsAnyActiveItems()) + if (mi->subMenu->containsAnyActiveItems()) return true; } - else if (mi.isEnabled) + else if (mi->isEnabled) { return true; } @@ -1775,9 +1775,9 @@ void PopupMenu::CustomComponent::setHighlighted (bool shouldBeHighlighted) void PopupMenu::CustomComponent::triggerMenuItem() { - if (HelperClasses::ItemComponent* const mic = findParentComponentOfClass()) + if (auto* mic = findParentComponentOfClass()) { - if (HelperClasses::MenuWindow* const pmw = mic->findParentComponentOfClass()) + if (auto* pmw = mic->findParentComponentOfClass()) { pmw->dismissMenu (&mic->item); } diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.h b/modules/juce_gui_basics/menus/juce_PopupMenu.h index d119a14993..14d36b8fc1 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.h +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.h @@ -719,6 +719,10 @@ public: virtual Component* getParentComponentForMenuOptions (const PopupMenu::Options& options) = 0; virtual void preparePopupMenuWindow (Component& newWindow) = 0; + + /** Return true if you want your popup menus to scale with the target component's AffineTransform + or scale factor */ + virtual bool shouldPopupMenuScaleWithTargetComponent (const PopupMenu::Options& options) = 0; }; private: diff --git a/modules/juce_gui_basics/misc/juce_JUCESplashScreen.cpp b/modules/juce_gui_basics/misc/juce_JUCESplashScreen.cpp index b0b4ee9be2..103266104a 100644 --- a/modules/juce_gui_basics/misc/juce_JUCESplashScreen.cpp +++ b/modules/juce_gui_basics/misc/juce_JUCESplashScreen.cpp @@ -227,6 +227,8 @@ JUCESplashScreen::JUCESplashScreen (Component& parent) appUsageReported = true; } } + #else + ignoreUnused (appUsageReported); #endif #if JUCE_DISPLAY_SPLASH_SCREEN diff --git a/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.h b/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.h index b1553ca0d2..05793358ea 100644 --- a/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.h +++ b/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.h @@ -131,11 +131,14 @@ public: @param files a list of filenames to drag @param canMoveFiles if true, the app that receives the files is allowed to move the files to a new location (if this is appropriate). If false, the receiver is expected to make a copy of them. + @param sourceComponent Normally, JUCE will assume that the component under the mouse is the source component + of the drag, but you can use this parameter to override this. @returns true if the files were successfully dropped somewhere, or false if it was interrupted @see performExternalDragDropOfText */ - static bool performExternalDragDropOfFiles (const StringArray& files, bool canMoveFiles); + static bool performExternalDragDropOfFiles (const StringArray& files, bool canMoveFiles, + Component* sourceComponent = nullptr); /** This performs a synchronous drag-and-drop of a block of text to some external application. @@ -145,12 +148,14 @@ public: uses a native operating system drag-and-drop operation to move or copy some text to another application. - @param text the text to copy - @returns true if the text was successfully dropped somewhere, or false if it - was interrupted + @param text the text to copy + @param sourceComponent Normally, JUCE will assume that the component under the mouse is the source component + of the drag, but you can use this parameter to override this. + @returns true if the text was successfully dropped somewhere, or false if it + was interrupted @see performExternalDragDropOfFiles */ - static bool performExternalDragDropOfText (const String& text); + static bool performExternalDragDropOfText (const String& text, Component* sourceComponent = nullptr); protected: /** Override this if you want to be able to perform an external drag of a set of files diff --git a/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp b/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp index 13b8d9d461..7ca6f099a6 100644 --- a/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp +++ b/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp @@ -27,11 +27,7 @@ class MouseInputSourceInternal : private AsyncUpdater { public: - //============================================================================== - MouseInputSourceInternal (const int i, const MouseInputSource::InputSourceType type) - : index (i), inputType (type), pressure (0.0f), orientation (0.0f), rotation (0.0f), tiltX (0.0f), tiltY (0.0f), - isUnboundedMouseModeOn (false), isCursorVisibleUntilOffscreen (false), lastPeer (nullptr), - currentCursorHandle (nullptr), mouseEventCounter (0), mouseMovedSignificantlySincePressed (false) + MouseInputSourceInternal (int i, MouseInputSource::InputSourceType type) : index (i), inputType (type) { } @@ -61,10 +57,10 @@ public: static Point screenPosToLocalPos (Component& comp, Point pos) { - if (ComponentPeer* const peer = comp.getPeer()) + if (auto* peer = comp.getPeer()) { pos = peer->globalToLocal (pos); - Component& peerComp = peer->getComponent(); + auto& peerComp = peer->getComponent(); return comp.getLocalPoint (&peerComp, ScalingHelpers::unscaledScreenPosToScaled (peerComp, pos)); } @@ -73,13 +69,12 @@ public: Component* findComponentAt (Point screenPos) { - if (ComponentPeer* const peer = getPeer()) + if (auto* peer = getPeer()) { - Point relativePos (ScalingHelpers::unscaledScreenPosToScaled (peer->getComponent(), - peer->globalToLocal (screenPos))); - Component& comp = peer->getComponent(); - - const Point pos (relativePos.roundToInt()); + auto relativePos = ScalingHelpers::unscaledScreenPosToScaled (peer->getComponent(), + peer->globalToLocal (screenPos)); + auto& comp = peer->getComponent(); + auto pos = relativePos.roundToInt(); // (the contains() call is needed to test for overlapping desktop windows) if (comp.contains (pos)) @@ -110,8 +105,7 @@ public: //============================================================================== #if JUCE_DUMP_MOUSE_EVENTS - #define JUCE_MOUSE_EVENT_ - (desc) DBG ("Mouse " << desc << " #" << index \ + #define JUCE_MOUSE_EVENT_DBG(desc) DBG ("Mouse " << desc << " #" << index \ << ": " << screenPosToLocalPos (comp, screenPos).toString() \ << " - Comp: " << String::toHexString ((pointer_sized_int) &comp)); #else @@ -184,13 +178,13 @@ public: return false; } - const int lastCounter = mouseEventCounter; + auto lastCounter = mouseEventCounter; if (buttonState.isAnyMouseButtonDown()) { - if (Component* const current = getComponentUnderMouse()) + if (auto* current = getComponentUnderMouse()) { - const ModifierKeys oldMods (getCurrentModifiers()); + auto oldMods = getCurrentModifiers(); buttonState = newButtonState; // must change this before calling sendMouseUp, in case it runs a modal loop sendMouseUp (*current, screenPos + unboundedMouseOffset, time, oldMods); @@ -208,7 +202,7 @@ public: { Desktop::getInstance().incrementMouseClickCounter(); - if (Component* const current = getComponentUnderMouse()) + if (auto* current = getComponentUnderMouse()) { registerMouseDown (screenPos, time, *current, buttonState); sendMouseDown (*current, screenPos, time); @@ -220,12 +214,12 @@ public: void setComponentUnderMouse (Component* const newComponent, Point screenPos, Time time) { - Component* current = getComponentUnderMouse(); + auto* current = getComponentUnderMouse(); if (newComponent != current) { WeakReference safeNewComp (newComponent); - const ModifierKeys originalButtonState (buttonState); + auto originalButtonState = buttonState; if (current != nullptr) { @@ -273,7 +267,7 @@ public: cancelPendingUpdate(); lastScreenPos = newScreenPos; - if (Component* const current = getComponentUnderMouse()) + if (auto* current = getComponentUnderMouse()) { if (isDragging()) { @@ -316,7 +310,7 @@ public: ++mouseEventCounter; - const Point screenPos (newPeer.localToGlobal (positionWithinPeer)); + auto screenPos = newPeer.localToGlobal (positionWithinPeer); if (isDragging() && newMods.isAnyMouseButtonDown()) { @@ -326,7 +320,7 @@ public: { setPeer (newPeer, screenPos, time); - if (ComponentPeer* peer = getPeer()) + if (auto* peer = getPeer()) { if (setButtons (screenPos, time, newMods)) return; // some modal events have been dispatched, so the current event is now out-of-date @@ -376,7 +370,8 @@ public: Time time, const float scaleFactor) { Point screenPos; - if (Component* current = getTargetForGesture (peer, positionWithinPeer, time, screenPos)) + + if (auto* current = getTargetForGesture (peer, positionWithinPeer, time, screenPos)) sendMagnifyGesture (*current, screenPos, time, scaleFactor); } @@ -430,13 +425,13 @@ public: if ((! enable) && ((! isCursorVisibleUntilOffscreen) || ! unboundedMouseOffset.isOrigin())) { // when released, return the mouse to within the component's bounds - if (Component* current = getComponentUnderMouse()) + if (auto* current = getComponentUnderMouse()) setScreenPosition (current->getScreenBounds().toFloat() .getConstrainedPoint (ScalingHelpers::unscaledScreenPosToScaled (lastScreenPos))); } isUnboundedMouseModeOn = enable; - unboundedMouseOffset = Point(); + unboundedMouseOffset = {}; revealCursor (true); } @@ -444,12 +439,11 @@ public: void handleUnboundedDrag (Component& current) { - const Rectangle componentScreenBounds - = ScalingHelpers::scaledScreenPosToUnscaled (current.getParentMonitorArea().reduced (2, 2).toFloat()); + auto componentScreenBounds = ScalingHelpers::scaledScreenPosToUnscaled (current.getParentMonitorArea().reduced (2, 2).toFloat()); if (! componentScreenBounds.contains (lastScreenPos)) { - const Point componentCentre (current.getScreenBounds().toFloat().getCentre()); + auto componentCentre = current.getScreenBounds().toFloat().getCentre(); unboundedMouseOffset += (lastScreenPos - ScalingHelpers::scaledScreenPosToUnscaled (componentCentre)); setScreenPosition (componentCentre); } @@ -458,7 +452,7 @@ public: && componentScreenBounds.contains (lastScreenPos + unboundedMouseOffset)) { MouseInputSource::setRawMousePosition (lastScreenPos + unboundedMouseOffset); - unboundedMouseOffset = Point(); + unboundedMouseOffset = {}; } } @@ -487,7 +481,7 @@ public: { MouseCursor mc (MouseCursor::NormalCursor); - if (Component* current = getComponentUnderMouse()) + if (auto* current = getComponentUnderMouse()) mc = current->getLookAndFeel().getMouseCursorFor (*current); showMouseCursor (mc, forcedUpdate); @@ -498,31 +492,31 @@ public: const MouseInputSource::InputSourceType inputType; Point lastScreenPos, unboundedMouseOffset; // NB: these are unscaled coords ModifierKeys buttonState; - float pressure; - float orientation; - float rotation; - float tiltX; - float tiltY; + float pressure = 0; + float orientation = 0; + float rotation = 0; + float tiltX = 0; + float tiltY = 0; - bool isUnboundedMouseModeOn, isCursorVisibleUntilOffscreen; + bool isUnboundedMouseModeOn = false, isCursorVisibleUntilOffscreen = false; private: WeakReference componentUnderMouse, lastNonInertialWheelTarget; - ComponentPeer* lastPeer; + ComponentPeer* lastPeer = nullptr; - void* currentCursorHandle; - int mouseEventCounter; + void* currentCursorHandle = nullptr; + int mouseEventCounter = 0; struct RecentMouseDown { - RecentMouseDown() noexcept : peerID (0) {} + RecentMouseDown() = default; Point position; Time time; ModifierKeys buttons; - uint32 peerID; + uint32 peerID = 0; - bool canBePartOfMultipleClickWith (const RecentMouseDown& other, const int maxTimeBetweenMs) const + bool canBePartOfMultipleClickWith (const RecentMouseDown& other, int maxTimeBetweenMs) const noexcept { return time - other.time < RelativeTime::milliseconds (maxTimeBetweenMs) && std::abs (position.x - other.position.x) < 8 @@ -534,7 +528,7 @@ private: RecentMouseDown mouseDowns[4]; Time lastTime; - bool mouseMovedSignificantlySincePressed; + bool mouseMovedSignificantlySincePressed = false; void registerMouseDown (Point screenPos, Time time, Component& component, const ModifierKeys modifiers) noexcept @@ -546,7 +540,7 @@ private: mouseDowns[0].time = time; mouseDowns[0].buttons = modifiers.withOnlyMouseButtons(); - if (ComponentPeer* const peer = component.getPeer()) + if (auto* peer = component.getPeer()) mouseDowns[0].peerID = peer->getUniqueID(); else mouseDowns[0].peerID = 0; @@ -611,9 +605,9 @@ void MouseInputSource::forceMouseCursorUpdate() { pimpl void MouseInputSource::setScreenPosition (Point p) { pimpl->setScreenPosition (p); } void MouseInputSource::handleEvent (ComponentPeer& peer, Point pos, int64 time, ModifierKeys mods, - float pressure, float orientation, const PenDetails& pen) + float pressure, float orientation, const PenDetails& penDetails) { - pimpl->handleEvent (peer, pos, Time (time), mods.withOnlyMouseButtons(), pressure, orientation, pen); + pimpl->handleEvent (peer, pos, Time (time), mods.withOnlyMouseButtons(), pressure, orientation, penDetails); } void MouseInputSource::handleWheel (ComponentPeer& peer, Point pos, int64 time, const MouseWheelDetails& wheel) @@ -688,8 +682,8 @@ struct MouseInputSource::SourceList : public Timer { int num = 0; - for (int i = 0; i < sources.size(); ++i) - if (sources.getUnchecked(i)->isDragging()) + for (auto* s : sources) + if (s->isDragging()) ++num; return num; @@ -699,14 +693,12 @@ struct MouseInputSource::SourceList : public Timer { int num = 0; - for (int i = 0; i < sources.size(); ++i) + for (auto& s : sourceArray) { - MouseInputSource* const mi = &(sourceArray.getReference(i)); - - if (mi->isDragging()) + if (s.isDragging()) { if (index == num) - return mi; + return &s; ++num; } @@ -730,20 +722,21 @@ struct MouseInputSource::SourceList : public Timer void timerCallback() override { - int numMiceDown = 0; + bool anyDragging = false; - for (int i = 0; i < sources.size(); ++i) + for (auto* s : sources) { - MouseInputSourceInternal* const mi = sources.getUnchecked(i); - - if (mi->isDragging()) + // NB: when doing auto-repeat, we need to force an update of the current position and button state, + // because on some OSes the queue can get overloaded with messages so that mouse-events don't get through.. + if (s->isDragging() && ModifierKeys::getCurrentModifiersRealtime().isAnyMouseButtonDown()) { - mi->triggerFakeMove(); - ++numMiceDown; + s->lastScreenPos = s->getScreenPosition(); + s->triggerFakeMove(); + anyDragging = true; } } - if (numMiceDown == 0) + if (! anyDragging) stopTimer(); } diff --git a/modules/juce_gui_basics/native/juce_android_Windowing.cpp b/modules/juce_gui_basics/native/juce_android_Windowing.cpp index fc66e32129..9ae74bb91d 100644 --- a/modules/juce_gui_basics/native/juce_android_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_android_Windowing.cpp @@ -121,7 +121,6 @@ class AndroidComponentPeer : public ComponentPeer, public: AndroidComponentPeer (Component& comp, const int windowStyleFlags) : ComponentPeer (comp, windowStyleFlags), - usingAndroidGraphics (false), fullScreen (false), sizeAllocated (0), scale ((float) Desktop::getInstance().getDisplays().getMainDisplay().scale) @@ -437,6 +436,12 @@ public: { } + void handleBackButtonCallback() + { + if (JUCEApplicationBase* const app = JUCEApplicationBase::getInstance()) + app->backButtonPressed(); + } + //============================================================================== bool isFocused() const override { @@ -583,7 +588,7 @@ private: //============================================================================== GlobalRef view; GlobalRef buffer; - bool usingAndroidGraphics, fullScreen; + bool fullScreen; int sizeAllocated; float scale; static AndroidComponentPeer* frontWindow; @@ -664,6 +669,7 @@ JUCE_VIEW_CALLBACK (void, viewSizeChanged, (JNIEnv* env, jobject /*view*/, jlon JUCE_VIEW_CALLBACK (void, focusChanged, (JNIEnv* env, jobject /*view*/, jlong host, jboolean hasFocus), handleFocusChangeCallback (hasFocus)) JUCE_VIEW_CALLBACK (void, handleKeyDown, (JNIEnv* env, jobject /*view*/, jlong host, jint k, jint kc), handleKeyDownCallback ((int) k, (int) kc)) JUCE_VIEW_CALLBACK (void, handleKeyUp, (JNIEnv* env, jobject /*view*/, jlong host, jint k, jint kc), handleKeyUpCallback ((int) k, (int) kc)) +JUCE_VIEW_CALLBACK (void, handleBackButton, (JNIEnv* env, jobject /*view*/, jlong host), handleBackButtonCallback()) //============================================================================== ComponentPeer* Component::createNewPeer (int styleFlags, void*) @@ -895,12 +901,13 @@ void MouseCursor::showInWindow (ComponentPeer*) const {} void MouseCursor::showInAllWindows() const {} //============================================================================== -bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& /*files*/, const bool /*canMove*/) +bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& /*files*/, const bool /*canMove*/, + Component* /*srcComp*/) { return false; } -bool DragAndDropContainer::performExternalDragDropOfText (const String& /*text*/) +bool DragAndDropContainer::performExternalDragDropOfText (const String& /*text*/, Component* /*srcComp*/) { return false; } diff --git a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm index a2d7203cf7..e9cb4a22dd 100644 --- a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm @@ -216,7 +216,7 @@ public: UIWindow* window; JuceUIView* view; JuceUIViewController* controller; - bool isSharedWindow, fullScreen, insideDrawRect; + bool isSharedWindow, fullScreen, insideDrawRect, isAppex; static ModifierKeys currentModifiers; static int64 getMouseTime (UIEvent* e) noexcept @@ -285,7 +285,7 @@ public: return r; } - MultiTouchMapper currentTouches; + static MultiTouchMapper currentTouches; private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UIViewComponentPeer) @@ -324,6 +324,8 @@ static bool isKioskModeView (JuceUIViewController* c) return Desktop::getInstance().getKioskModeComponent() == &(juceView->owner->getComponent()); } +MultiTouchMapper UIViewComponentPeer::currentTouches; + } // (juce namespace) @@ -553,7 +555,8 @@ UIViewComponentPeer::UIViewComponentPeer (Component& comp, const int windowStyle controller (nil), isSharedWindow (viewToAttachTo != nil), fullScreen (false), - insideDrawRect (false) + insideDrawRect (false), + isAppex (SystemStats::isRunningInAppExtensionSandbox()) { CGRect r = convertToCGRect (component.getBounds()); @@ -920,6 +923,9 @@ void UIViewComponentPeer::viewFocusLoss() bool UIViewComponentPeer::isFocused() const { + if (isAppex) + return true; + return isSharedWindow ? this == currentlyFocusedPeer : (window != nil && [window isKeyWindow]); } diff --git a/modules/juce_gui_basics/native/juce_ios_Windowing.mm b/modules/juce_gui_basics/native/juce_ios_Windowing.mm index 31faa40c6d..a82990358d 100644 --- a/modules/juce_gui_basics/native/juce_ios_Windowing.mm +++ b/modules/juce_gui_basics/native/juce_ios_Windowing.mm @@ -99,15 +99,7 @@ Array appBecomingInactiveCallbacks; } }]; - MessageManager::callAsync ([self,application,app] () - { - app->suspended(); - if (appSuspendTask != UIBackgroundTaskInvalid) - { - [application endBackgroundTask:appSuspendTask]; - appSuspendTask = UIBackgroundTaskInvalid; - } - }); + MessageManager::callAsync ([self,application,app] () { app->suspended(); }); #else ignoreUnused (application); app->suspended(); @@ -377,13 +369,13 @@ int JUCE_CALLTYPE NativeMessageBox::showYesNoBox (AlertWindow::AlertIconType /*i } //============================================================================== -bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray&, bool) +bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray&, bool, Component*) { jassertfalse; // no such thing on iOS! return false; } -bool DragAndDropContainer::performExternalDragDropOfText (const String&) +bool DragAndDropContainer::performExternalDragDropOfText (const String&, Component*) { jassertfalse; // no such thing on iOS! return false; diff --git a/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp b/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp index 313620ad5b..d9bdf06713 100644 --- a/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp @@ -255,7 +255,7 @@ namespace XRender static tXRenderFindFormat xRenderFindFormat = nullptr; static tXRenderFindVisualFormat xRenderFindVisualFormat = nullptr; - static bool isAvailable(::Display* display) + static bool isAvailable (::Display* display) { static bool hasLoaded = false; @@ -292,13 +292,13 @@ namespace XRender return xRenderQueryVersion != nullptr; } - static bool hasCompositingWindowManager(::Display* display) noexcept + static bool hasCompositingWindowManager (::Display* display) noexcept { return display != nullptr && XGetSelectionOwner (display, Atoms::getCreating ("_NET_WM_CM_S0")) != 0; } - static XRenderPictFormat* findPictureFormat(::Display* display) + static XRenderPictFormat* findPictureFormat (::Display* display) { ScopedXLock xlock (display); XRenderPictFormat* pictFormat = nullptr; @@ -2214,14 +2214,19 @@ public: { updateKeyModifiers ((int) buttonPressEvent.state); - switch (pointerMap [buttonPressEvent.button - Button1]) + auto mapIndex = (uint32) (buttonPressEvent.button - Button1); + + if (mapIndex < (uint32) numElementsInArray (pointerMap)) { - case Keys::WheelUp: handleWheelEvent (buttonPressEvent, 50.0f / 256.0f); break; - case Keys::WheelDown: handleWheelEvent (buttonPressEvent, -50.0f / 256.0f); break; - case Keys::LeftButton: handleButtonPressEvent (buttonPressEvent, ModifierKeys::leftButtonModifier); break; - case Keys::RightButton: handleButtonPressEvent (buttonPressEvent, ModifierKeys::rightButtonModifier); break; - case Keys::MiddleButton: handleButtonPressEvent (buttonPressEvent, ModifierKeys::middleButtonModifier); break; - default: break; + switch (pointerMap[mapIndex]) + { + case Keys::WheelUp: handleWheelEvent (buttonPressEvent, 50.0f / 256.0f); break; + case Keys::WheelDown: handleWheelEvent (buttonPressEvent, -50.0f / 256.0f); break; + case Keys::LeftButton: handleButtonPressEvent (buttonPressEvent, ModifierKeys::leftButtonModifier); break; + case Keys::RightButton: handleButtonPressEvent (buttonPressEvent, ModifierKeys::rightButtonModifier); break; + case Keys::MiddleButton: handleButtonPressEvent (buttonPressEvent, ModifierKeys::middleButtonModifier); break; + default: break; + } } clearLastMousePos(); @@ -2234,12 +2239,17 @@ public: if (parentWindow != 0) updateWindowBounds(); - switch (pointerMap [buttonRelEvent.button - Button1]) + auto mapIndex = (uint32) (buttonRelEvent.button - Button1); + + if (mapIndex < (uint32) numElementsInArray (pointerMap)) { - case Keys::LeftButton: currentModifiers = currentModifiers.withoutFlags (ModifierKeys::leftButtonModifier); break; - case Keys::RightButton: currentModifiers = currentModifiers.withoutFlags (ModifierKeys::rightButtonModifier); break; - case Keys::MiddleButton: currentModifiers = currentModifiers.withoutFlags (ModifierKeys::middleButtonModifier); break; - default: break; + switch (pointerMap[mapIndex]) + { + case Keys::LeftButton: currentModifiers = currentModifiers.withoutFlags (ModifierKeys::leftButtonModifier); break; + case Keys::RightButton: currentModifiers = currentModifiers.withoutFlags (ModifierKeys::rightButtonModifier); break; + case Keys::MiddleButton: currentModifiers = currentModifiers.withoutFlags (ModifierKeys::middleButtonModifier); break; + default: break; + } } if (dragState->dragging) @@ -3678,7 +3688,7 @@ private: Array srcMimeTypeAtomList; - int pointerMap[5]; + int pointerMap[5] = {}; void initialisePointerMap() { @@ -3730,13 +3740,13 @@ namespace WindowingHelpers if (! juce_handleXEmbedEvent (nullptr, &event)) #endif { - if (LinuxComponentPeer* const peer = LinuxComponentPeer::getPeerFor (event.xany.window)) + if (auto* peer = LinuxComponentPeer::getPeerFor (event.xany.window)) peer->handleWindowMessage (event); } } else if (event.xany.type == KeymapNotify) { - const XKeymapEvent& keymapEvent = (const XKeymapEvent&) event.xkeymap; + auto& keymapEvent = (const XKeymapEvent&) event.xkeymap; memcpy (Keys::keyStates, keymapEvent.key_vector, 32); } } @@ -4285,31 +4295,41 @@ void MouseCursor::showInAllWindows() const } //=================================== X11 - DND ================================ +static LinuxComponentPeer* getPeerForDragEvent (Component* sourceComp) +{ + if (sourceComp == nullptr) + if (auto* draggingSource = Desktop::getInstance().getDraggingMouseSource(0)) + sourceComp = draggingSource->getComponentUnderMouse(); -bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMoveFiles) + if (sourceComp != nullptr) + if (auto* lp = dynamic_cast (sourceComp->getPeer())) + return lp; + + jassertfalse; // This method must be called in response to a component's mouseDown or mouseDrag event! + return nullptr; +} + +bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMoveFiles, + Component* sourceComp) { if (files.size() == 0) return false; - if (auto* draggingSource = Desktop::getInstance().getDraggingMouseSource (0)) - if (auto* sourceComp = draggingSource->getComponentUnderMouse()) - if (auto* lp = dynamic_cast (sourceComp->getPeer())) - return lp->externalDragFileInit (files, canMoveFiles); + if (auto* lp = getPeerForDragEvent (sourceComp)) + return lp->externalDragFileInit (files, canMoveFiles); // This method must be called in response to a component's mouseDown or mouseDrag event! jassertfalse; return false; } -bool DragAndDropContainer::performExternalDragDropOfText (const String& text) +bool DragAndDropContainer::performExternalDragDropOfText (const String& text, Component* sourceComp) { if (text.isEmpty()) return false; - if (auto* draggingSource = Desktop::getInstance().getDraggingMouseSource (0)) - if (auto* sourceComp = draggingSource->getComponentUnderMouse()) - if (auto* lp = dynamic_cast (sourceComp->getPeer())) - return lp->externalDragTextInit (text); + if (auto* lp = getPeerForDragEvent (sourceComp)) + return lp->externalDragTextInit (text); // This method must be called in response to a component's mouseDown or mouseDrag event! jassertfalse; diff --git a/modules/juce_gui_basics/native/juce_mac_FileChooser.mm b/modules/juce_gui_basics/native/juce_mac_FileChooser.mm index 6933dc4760..f0f99d8d86 100644 --- a/modules/juce_gui_basics/native/juce_mac_FileChooser.mm +++ b/modules/juce_gui_basics/native/juce_mac_FileChooser.mm @@ -213,7 +213,7 @@ void FileChooser::showPlatformDialog (Array& results, } #if defined (MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6) - [panel setDirectoryURL: [NSURL fileURLWithPath: juceStringToNS (directory)]]; + [panel setDirectoryURL: createNSURLFromFile (directory)]; [panel setNameFieldStringValue: juceStringToNS (filename)]; if ([panel runModal] == 1 /*NSModalResponseOK*/) diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index c67a5d80ce..492bea9b1a 100644 --- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -61,7 +61,7 @@ static NSRect flippedScreenRect (NSRect r) noexcept } #if JUCE_MODULE_AVAILABLE_juce_opengl -void componentPeerAboutToBeRemovedFromScreen (ComponentPeer&); +void componentPeerAboutToChange (Component&, bool); #endif //============================================================================== @@ -173,7 +173,10 @@ public: setOwner (view, nullptr); if ([view superview] != nil) + { + redirectWillMoveToWindow (nullptr); [view removeFromSuperview]; + } [view release]; @@ -668,8 +671,8 @@ public: void redirectWillMoveToWindow (NSWindow* newWindow) { #if JUCE_MODULE_AVAILABLE_juce_opengl - if ([view window] == window && newWindow == nullptr) - componentPeerAboutToBeRemovedFromScreen (*this); + if ([view window] == window) + componentPeerAboutToChange (getComponent(), newWindow == nullptr); #else ignoreUnused (newWindow); #endif diff --git a/modules/juce_gui_basics/native/juce_mac_Windowing.mm b/modules/juce_gui_basics/native/juce_mac_Windowing.mm index b22158f633..3a6e57390d 100644 --- a/modules/juce_gui_basics/native/juce_mac_Windowing.mm +++ b/modules/juce_gui_basics/native/juce_mac_Windowing.mm @@ -168,10 +168,13 @@ static NSRect getDragRect (NSView* view, NSEvent* event) fromView: nil]; } -NSView* getNSViewForDragEvent() +NSView* getNSViewForDragEvent (Component* sourceComp) { - if (auto* draggingSource = Desktop::getInstance().getDraggingMouseSource(0)) - if (auto* sourceComp = draggingSource->getComponentUnderMouse()) + if (sourceComp == nullptr) + if (auto* draggingSource = Desktop::getInstance().getDraggingMouseSource(0)) + sourceComp = draggingSource->getComponentUnderMouse(); + + if (sourceComp != nullptr) return (NSView*) sourceComp->getWindowHandle(); jassertfalse; // This method must be called in response to a component's mouseDown or mouseDrag event! @@ -210,12 +213,12 @@ private: } }; -bool DragAndDropContainer::performExternalDragDropOfText (const String& text) +bool DragAndDropContainer::performExternalDragDropOfText (const String& text, Component* sourceComponent) { if (text.isEmpty()) return false; - if (auto* view = getNSViewForDragEvent()) + if (auto* view = getNSViewForDragEvent (sourceComponent)) { JUCE_AUTORELEASEPOOL { @@ -268,12 +271,13 @@ private: static NSDraggingSourceHelper draggingSourceHelper; -bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, bool /*canMoveFiles*/) +bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, bool /*canMoveFiles*/, + Component* sourceComponent) { if (files.isEmpty()) return false; - if (auto* view = getNSViewForDragEvent()) + if (auto* view = getNSViewForDragEvent (sourceComponent)) { JUCE_AUTORELEASEPOOL { diff --git a/modules/juce_gui_basics/native/juce_win32_DragAndDrop.cpp b/modules/juce_gui_basics/native/juce_win32_DragAndDrop.cpp index 8bf1b25b52..53de33836c 100644 --- a/modules/juce_gui_basics/native/juce_win32_DragAndDrop.cpp +++ b/modules/juce_gui_basics/native/juce_win32_DragAndDrop.cpp @@ -254,7 +254,7 @@ namespace DragAndDropHelpers } //============================================================================== -bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMove) +bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMove, Component*) { FORMATETC format = { CF_HDROP, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; STGMEDIUM medium = { TYMED_HGLOBAL, { 0 }, 0 }; @@ -265,7 +265,7 @@ bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& fi : (DWORD) DROPEFFECT_COPY); } -bool DragAndDropContainer::performExternalDragDropOfText (const String& text) +bool DragAndDropContainer::performExternalDragDropOfText (const String& text, Component*) { FORMATETC format = { CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; STGMEDIUM medium = { TYMED_HGLOBAL, { 0 }, 0 }; diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index 8a086c1cda..569c400131 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -56,18 +56,6 @@ static bool shouldDeactivateTitleBar = true; extern void* getUser32Function (const char*); -//============================================================================== -typedef BOOL (WINAPI* UpdateLayeredWinFunc) (HWND, HDC, POINT*, SIZE*, HDC, POINT*, COLORREF, BLENDFUNCTION*, DWORD); -static UpdateLayeredWinFunc updateLayeredWindow = nullptr; - -bool Desktop::canUseSemiTransparentWindows() noexcept -{ - if (updateLayeredWindow == nullptr && ! juce_isRunningInWine()) - updateLayeredWindow = (UpdateLayeredWinFunc) getUser32Function ("UpdateLayeredWindow"); - - return updateLayeredWindow != nullptr; -} - //============================================================================== #ifndef WM_NCPOINTERUPDATE enum @@ -344,6 +332,8 @@ double Desktop::getDefaultMasterScale() : 1.0; } +bool Desktop::canUseSemiTransparentWindows() noexcept { return true; } + //============================================================================== Desktop::DisplayOrientation Desktop::getCurrentOrientation() const { @@ -504,7 +494,7 @@ public: ImagePixelData::Ptr clone() override { - WindowsBitmapImage* im = new WindowsBitmapImage (pixelFormat, width, height, false); + auto im = new WindowsBitmapImage (pixelFormat, width, height, false); for (int i = 0; i < height; ++i) memcpy (im->imageData + i * lineStride, imageData + i * lineStride, (size_t) lineStride); @@ -512,9 +502,7 @@ public: return im; } - void blitToWindow (HWND hwnd, HDC dc, const bool transparent, - const int x, const int y, - const uint8 updateLayeredWindowAlpha) noexcept + void blitToWindow (HWND hwnd, HDC dc, bool transparent, int x, int y, uint8 updateLayeredWindowAlpha) noexcept { SetMapMode (dc, MM_TEXT); @@ -533,7 +521,7 @@ public: bf.BlendOp = AC_SRC_OVER; bf.SourceConstantAlpha = updateLayeredWindowAlpha; - updateLayeredWindow (hwnd, 0, &pos, &size, hdc, &p, 0, &bf, 2 /*ULW_ALPHA*/); + UpdateLayeredWindow (hwnd, 0, &pos, &size, hdc, &p, 0, &bf, 2 /*ULW_ALPHA*/); } else { @@ -556,8 +544,8 @@ public: private: static bool isGraphicsCard32Bit() { - HDC dc = GetDC (0); - const int bitsPerPixel = GetDeviceCaps (dc, BITSPIXEL); + auto dc = GetDC (0); + auto bitsPerPixel = GetDeviceCaps (dc, BITSPIXEL); ReleaseDC (0, dc); return bitsPerPixel > 24; } @@ -568,13 +556,13 @@ private: //============================================================================== Image createSnapshotOfNativeWindow (void* nativeWindowHandle) { - HWND hwnd = (HWND) nativeWindowHandle; + auto hwnd = (HWND) nativeWindowHandle; auto r = getWindowRect (hwnd); const int w = r.right - r.left; const int h = r.bottom - r.top; - WindowsBitmapImage* nativeBitmap = new WindowsBitmapImage (Image::RGB, w, h, true); + auto nativeBitmap = new WindowsBitmapImage (Image::RGB, w, h, true); Image bitmap (nativeBitmap); HDC dc = GetDC (hwnd); @@ -598,8 +586,8 @@ namespace IconConverters if (GetObject (bitmap, sizeof (BITMAP), &bm) && bm.bmWidth > 0 && bm.bmHeight > 0) { - HDC tempDC = GetDC (0); - HDC dc = CreateCompatibleDC (tempDC); + auto tempDC = GetDC (0); + auto dc = CreateCompatibleDC (tempDC); ReleaseDC (0, tempDC); SelectObject (dc, bitmap); @@ -611,7 +599,7 @@ namespace IconConverters { for (int x = bm.bmWidth; --x >= 0;) { - COLORREF col = GetPixel (dc, x, y); + auto col = GetPixel (dc, x, y); imageData.setPixelColour (x, y, Colour ((uint8) GetRValue (col), (uint8) GetGValue (col), @@ -632,8 +620,8 @@ namespace IconConverters if (GetIconInfo (icon, &info)) { - Image mask (createImageFromHBITMAP (info.hbmMask)); - Image image (createImageFromHBITMAP (info.hbmColor)); + auto mask = createImageFromHBITMAP (info.hbmMask); + auto image = createImageFromHBITMAP (info.hbmColor); if (mask.isValid() && image.isValid()) { @@ -641,7 +629,7 @@ namespace IconConverters { for (int x = image.getWidth(); --x >= 0;) { - const float brightness = mask.getPixelAt (x, y).getBrightness(); + auto brightness = mask.getPixelAt (x, y).getBrightness(); if (brightness > 0.0f) image.multiplyAlphaAt (x, y, 1.0f - brightness); @@ -657,7 +645,7 @@ namespace IconConverters HICON createHICONFromImage (const Image& image, const BOOL isIcon, int hotspotX, int hotspotY) { - WindowsBitmapImage* nativeBitmap = new WindowsBitmapImage (Image::ARGB, image.getWidth(), image.getHeight(), true); + auto nativeBitmap = new WindowsBitmapImage (Image::ARGB, image.getWidth(), image.getHeight(), true); Image bitmap (nativeBitmap); { @@ -665,7 +653,7 @@ namespace IconConverters g.drawImageAt (image, 0, 0); } - HBITMAP mask = CreateBitmap (image.getWidth(), image.getHeight(), 1, 1, 0); + auto mask = CreateBitmap (image.getWidth(), image.getHeight(), 1, 1, 0); ICONINFO info; info.fIcon = isIcon; @@ -674,44 +662,23 @@ namespace IconConverters info.hbmMask = mask; info.hbmColor = nativeBitmap->hBitmap; - HICON hi = CreateIconIndirect (&info); + auto hi = CreateIconIndirect (&info); DeleteObject (mask); return hi; } } //============================================================================== -class -#if (! JUCE_MINGW) - __declspec (uuid ("37c994e7-432b-4834-a2f7-dce1f13b834b")) -#endif - ITipInvocation : public IUnknown +JUCE_COMCLASS (ITipInvocation, "37c994e7-432b-4834-a2f7-dce1f13b834b") : public IUnknown { -public: - static const CLSID clsid; + static CLSID getCLSID() noexcept { return { 0x4ce576fa, 0x83dc, 0x4f88, { 0x95, 0x1c, 0x9d, 0x07, 0x82, 0xb4, 0xe3, 0x76 } }; } - virtual ::HRESULT STDMETHODCALLTYPE Toggle (::HWND wnd) = 0; + virtual HRESULT STDMETHODCALLTYPE Toggle (HWND) = 0; }; -#if JUCE_MINGW || (! (defined (_MSC_VER) || defined (__uuidof))) -template <> -struct UUIDGetter +struct OnScreenKeyboard : public DeletedAtShutdown, + private Timer { - static CLSID get() - { - GUID g = {0x37c994e7, 0x432b, 0x4834, {0xa2, 0xf7, 0xdc, 0xe1, 0xf1, 0x3b, 0x83, 0x4b}}; - return g; - } -}; -#endif - -const CLSID ITipInvocation::clsid = {0x4CE576FA, 0x83DC, 0x4f88, {0x95, 0x1C, 0x9D, 0x07, 0x82, 0xB4, 0xE3, 0x76}}; -//============================================================================== -class OnScreenKeyboard : public DeletedAtShutdown, - private Timer -{ -public: - void activate() { shouldBeActive = true; @@ -727,49 +694,48 @@ public: juce_DeclareSingleton_SingleThreaded (OnScreenKeyboard, true) private: - OnScreenKeyboard() - : shouldBeActive (false), reentrant (false) { - tipInvocation.CoCreateInstance (ITipInvocation::clsid, CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER); + tipInvocation.CoCreateInstance (ITipInvocation::getCLSID(), CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER); } void timerCallback() override { stopTimer(); - if (reentrant || tipInvocation == nullptr) return; + if (reentrant || tipInvocation == nullptr) + return; + const ScopedValueSetter setter (reentrant, true, false); const bool isActive = isVisible(); - if (isActive == shouldBeActive) return; - if (! isActive) + if (isActive != shouldBeActive) { - tipInvocation->Toggle(::GetDesktopWindow()); - } - else - { - ::HWND hwnd = ::FindWindow (L"IPTip_Main_Window", NULL); - - if (hwnd != nullptr) - ::PostMessage(hwnd, WM_SYSCOMMAND, (int) SC_CLOSE, 0); + if (! isActive) + { + tipInvocation->Toggle (GetDesktopWindow()); + } + else + { + if (auto hwnd = FindWindow (L"IPTip_Main_Window", NULL)) + PostMessage (hwnd, WM_SYSCOMMAND, (int) SC_CLOSE, 0); + } } } bool isVisible() { - ::HWND hwnd = ::FindWindow (L"IPTip_Main_Window", NULL); - if (hwnd != nullptr) + if (auto hwnd = FindWindow (L"IPTip_Main_Window", NULL)) { - ::LONG style = ::GetWindowLong (hwnd, GWL_STYLE); - return ((style & WS_DISABLED) == 0 && (style & WS_VISIBLE) != 0); + auto style = GetWindowLong (hwnd, GWL_STYLE); + return (style & WS_DISABLED) == 0 && (style & WS_VISIBLE) != 0; } return false; } - bool shouldBeActive, reentrant; + bool shouldBeActive = false, reentrant = false; ComSmartPtr tipInvocation; }; @@ -779,65 +745,32 @@ juce_ImplementSingleton_SingleThreaded (OnScreenKeyboard) struct HSTRING_PRIVATE; typedef HSTRING_PRIVATE* HSTRING; -class IInspectable : public IUnknown +struct IInspectable : public IUnknown { -public: - virtual ::HRESULT STDMETHODCALLTYPE GetIids (ULONG* ,IID**) = 0; - virtual ::HRESULT STDMETHODCALLTYPE GetRuntimeClassName(HSTRING*) = 0; - virtual ::HRESULT STDMETHODCALLTYPE GetTrustLevel(void*) = 0; + virtual HRESULT STDMETHODCALLTYPE GetIids (ULONG* ,IID**) = 0; + virtual HRESULT STDMETHODCALLTYPE GetRuntimeClassName (HSTRING*) = 0; + virtual HRESULT STDMETHODCALLTYPE GetTrustLevel (void*) = 0; }; -class - #if (! JUCE_MINGW) - __declspec (uuid ("3694dbf9-8f68-44be-8ff5-195c98ede8a6")) - #endif - IUIViewSettingsInterop : public IInspectable +JUCE_COMCLASS (IUIViewSettingsInterop, "3694dbf9-8f68-44be-8ff5-195c98ede8a6") : public IInspectable { -public: - virtual HRESULT STDMETHODCALLTYPE GetForWindow(HWND hwnd, REFIID riid, void **ppv) = 0; + virtual HRESULT STDMETHODCALLTYPE GetForWindow (HWND, REFIID, void**) = 0; }; -class - #if (! JUCE_MINGW) - __declspec (uuid ("C63657F6-8850-470D-88F8-455E16EA2C26")) - #endif - IUIViewSettings : public IInspectable +JUCE_COMCLASS (IUIViewSettings, "c63657f6-8850-470d-88f8-455e16ea2c26") : public IInspectable { -public: enum UserInteractionMode { Mouse = 0, Touch = 1 }; - virtual HRESULT STDMETHODCALLTYPE GetUserInteractionMode (UserInteractionMode *value) = 0; + virtual HRESULT STDMETHODCALLTYPE GetUserInteractionMode (UserInteractionMode*) = 0; }; -#if JUCE_MINGW || (! (defined (_MSC_VER) || defined (__uuidof))) -template <> -struct UUIDGetter -{ - static CLSID get() - { - GUID g = {0x3694dbf9, 0x8f68, 0x44be, {0x8f, 0xf5, 0x19, 0x5c, 0x98, 0xed, 0xe8, 0xa6}}; - return g; - } -}; -template <> -struct UUIDGetter +struct UWPUIViewSettings { - static CLSID get() - { - GUID g = {0xC63657F6, 0x8850, 0x470D, {0x88, 0xf8, 0x45, 0x5e, 0x16, 0xea, 0x2c, 0x26}}; - return g; - } -}; -#endif - -class UWPUIViewSettings -{ -public: UWPUIViewSettings() { ComBaseModule dll (L"api-ms-win-core-winrt-l1-1-0"); @@ -850,21 +783,23 @@ public: deleteHString = (WindowsDeleteStringFuncPtr) ::GetProcAddress (dll.h, "WindowsDeleteString"); if (roInitialize == nullptr || roGetActivationFactory == nullptr - || createHString == nullptr || deleteHString == nullptr) + || createHString == nullptr || deleteHString == nullptr) return; - ::HRESULT status = roInitialize (1); - if (status != S_OK && status != S_FALSE && status != 0x80010106L) + auto status = roInitialize (1); + + if (status != S_OK && status != S_FALSE && (unsigned) status != 0x80010106L) return; LPCWSTR uwpClassName = L"Windows.UI.ViewManagement.UIViewSettings"; HSTRING uwpClassId; if (createHString (uwpClassName, (::UINT32) wcslen (uwpClassName), &uwpClassId) != S_OK - || uwpClassId == nullptr) + || uwpClassId == nullptr) return; - status = roGetActivationFactory (uwpClassId, __uuidof (IUIViewSettingsInterop), (void**) viewSettingsInterop.resetAndGetPointerAddress()); + status = roGetActivationFactory (uwpClassId, __uuidof (IUIViewSettingsInterop), + (void**) viewSettingsInterop.resetAndGetPointerAddress()); deleteHString (uwpClassId); if (status != S_OK || viewSettingsInterop == nullptr) @@ -881,13 +816,15 @@ public: return false; ComSmartPtr viewSettings; - if (viewSettingsInterop->GetForWindow(hWnd, __uuidof (IUIViewSettings), (void**) viewSettings.resetAndGetPointerAddress()) == S_OK - && viewSettings != nullptr) + + if (viewSettingsInterop->GetForWindow (hWnd, __uuidof (IUIViewSettings), + (void**) viewSettings.resetAndGetPointerAddress()) == S_OK + && viewSettings != nullptr) { IUIViewSettings::UserInteractionMode mode; if (viewSettings->GetUserInteractionMode (&mode) == S_OK) - return (mode == IUIViewSettings::Touch); + return mode == IUIViewSettings::Touch; } return false; @@ -897,14 +834,15 @@ private: //============================================================================== struct ComBaseModule { - ::HMODULE h; + ComBaseModule() {} + ComBaseModule (LPCWSTR libraryName) : h (::LoadLibrary (libraryName)) {} + ComBaseModule (ComBaseModule&& o) : h (o.h) { o.h = nullptr; } + ~ComBaseModule() { release(); } - ComBaseModule() : h (nullptr) {} - ComBaseModule(LPCWSTR libraryName) : h (::LoadLibrary (libraryName)) {} - ComBaseModule(ComBaseModule&& o) : h (o.h) { o.h = nullptr; } - ~ComBaseModule() { if (h != nullptr) ::FreeLibrary (h); h = nullptr; } + void release() { if (h != nullptr) ::FreeLibrary (h); h = nullptr; } + ComBaseModule& operator= (ComBaseModule&& o) { release(); h = o.h; o.h = nullptr; return *this; } - ComBaseModule& operator=(ComBaseModule&& o) { h = o.h; o.h = nullptr; return *this; } + HMODULE h = {}; }; typedef HRESULT (WINAPI* RoInitializeFuncPtr) (int); @@ -947,7 +885,6 @@ public: setTitle (component.getName()); if ((windowStyleFlags & windowHasDropShadow) != 0 - && Desktop::canUseSemiTransparentWindows() && ((! hasTitleBar()) || SystemStats::getOperatingSystemType() < SystemStats::WinVista)) { shadower = component.getLookAndFeel().createDropShadowerForComponent (&component); @@ -1033,18 +970,18 @@ public: { fullScreen = isNowFullScreen; - Rectangle newBounds (windowBorder.addedTo (bounds)); + auto newBounds = windowBorder.addedTo (bounds); if (isUsingUpdateLayeredWindow()) { - if (HWND parentHwnd = GetParent (hwnd)) + if (auto parentHwnd = GetParent (hwnd)) { auto parentRect = getWindowRect (parentHwnd); newBounds.translate (parentRect.left, parentRect.top); } } - const Rectangle oldBounds (getBounds()); + auto oldBounds = getBounds(); const bool hasMoved = (oldBounds.getPosition() != bounds.getPosition()); const bool hasResized = (oldBounds.getWidth() != bounds.getWidth() || oldBounds.getHeight() != bounds.getHeight()); @@ -1079,8 +1016,8 @@ public: { auto r = getWindowRect (hwnd); - return Point (r.left + windowBorder.getLeft(), - r.top + windowBorder.getTop()); + return { r.left + windowBorder.getLeft(), + r.top + windowBorder.getTop() }; } Point localToGlobal (Point relativePosition) override { return relativePosition + getScreenPosition().toFloat(); } @@ -1088,7 +1025,7 @@ public: void setAlpha (float newAlpha) override { - const uint8 intAlpha = (uint8) jlimit (0, 255, (int) (newAlpha * 255.0f)); + auto intAlpha = (uint8) jlimit (0, 255, (int) (newAlpha * 255.0f)); if (component.isOpaque()) { @@ -1139,7 +1076,7 @@ public: if (! fullScreen) { - const Rectangle boundsCopy (lastNonFullscreenBounds); + auto boundsCopy = lastNonFullscreenBounds; if (hasTitleBar()) ShowWindow (hwnd, SW_SHOWNORMAL); @@ -1230,7 +1167,7 @@ public: void toBehind (ComponentPeer* other) override { - if (HWNDComponentPeer* const otherPeer = dynamic_cast (other)) + if (auto* otherPeer = dynamic_cast (other)) { setMinimised (false); @@ -1417,9 +1354,7 @@ public: template void parseFileList (const CharType* names, const SIZE_T totalLen) { - unsigned int i = 0; - - for (;;) + for (unsigned int i = 0;;) { unsigned int len = 0; while (i + len < totalLen && names [i + len] != 0) @@ -1526,17 +1461,18 @@ private: FileDropTarget* dropTarget = nullptr; uint8 updateLayeredWindowAlpha = 255; UWPUIViewSettings uwpViewSettings; - MultiTouchMapper currentTouches; #if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client ModifierKeyProvider* modProvider = nullptr; #endif + static MultiTouchMapper currentTouches; + //============================================================================== struct TemporaryImage : private Timer { TemporaryImage() {} - Image& getImage (const bool transparent, const int w, const int h) + Image& getImage (bool transparent, int w, int h) { auto format = transparent ? Image::ARGB : Image::RGB; @@ -1731,9 +1667,7 @@ private: if ((styleFlags & windowHasMinimiseButton) != 0) type |= WS_MINIMIZEBOX; if ((styleFlags & windowHasMaximiseButton) != 0) type |= WS_MAXIMIZEBOX; if ((styleFlags & windowIgnoresMouseClicks) != 0) exstyle |= WS_EX_TRANSPARENT; - - if ((styleFlags & windowIsSemiTransparent) != 0 && Desktop::canUseSemiTransparentWindows()) - exstyle |= WS_EX_LAYERED; + if ((styleFlags & windowIsSemiTransparent) != 0) exstyle |= WS_EX_LAYERED; hwnd = CreateWindowEx (exstyle, WindowClassHolder::getInstance()->getWindowClassName(), L"", type, 0, 0, 0, 0, parentToAddTo, 0, @@ -1903,34 +1837,36 @@ private: } else #endif - - HRGN rgn = CreateRectRgn (0, 0, 0, 0); - const int regionType = GetUpdateRgn (hwnd, rgn, false); - - PAINTSTRUCT paintStruct; - HDC dc = BeginPaint (hwnd, &paintStruct); // Note this can immediately generate a WM_NCPAINT - // message and become re-entrant, but that's OK - - // if something in a paint handler calls, e.g. a message box, this can become reentrant and - // corrupt the image it's using to paint into, so do a check here. - static bool reentrant = false; - if (! reentrant) { - const ScopedValueSetter setter (reentrant, true, false); + HRGN rgn = CreateRectRgn (0, 0, 0, 0); + const int regionType = GetUpdateRgn (hwnd, rgn, false); + + PAINTSTRUCT paintStruct; + HDC dc = BeginPaint (hwnd, &paintStruct); // Note this can immediately generate a WM_NCPAINT + // message and become re-entrant, but that's OK + + // if something in a paint handler calls, e.g. a message box, this can become reentrant and + // corrupt the image it's using to paint into, so do a check here. + static bool reentrant = false; + if (! reentrant) + { + const ScopedValueSetter setter (reentrant, true, false); + + if (dontRepaint) + component.handleCommandMessage (0); // (this triggers a repaint in the openGL context) + else + performPaint (dc, rgn, regionType, paintStruct); + } + + DeleteObject (rgn); + EndPaint (hwnd, &paintStruct); + + #if JUCE_MSVC + _fpreset(); // because some graphics cards can unmask FP exceptions + #endif - if (dontRepaint) - component.handleCommandMessage (0); // (this triggers a repaint in the openGL context) - else - performPaint (dc, rgn, regionType, paintStruct); } - DeleteObject (rgn); - EndPaint (hwnd, &paintStruct); - - #if JUCE_MSVC - _fpreset(); // because some graphics cards can unmask FP exceptions - #endif - lastPaintTime = Time::getMillisecondCounter(); } @@ -2020,9 +1956,6 @@ private: for (auto& i : contextClip) offscreenImage.clear (i); - // if the component's not opaque, this won't draw properly unless the platform can support this - jassert (Desktop::canUseSemiTransparentWindows() || component.isOpaque()); - { ScopedPointer context (component.getLookAndFeel() .createGraphicsContext (offscreenImage, Point (-x, -y), contextClip)); @@ -2062,8 +1995,8 @@ private: void updateDirect2DContext() { if (currentRenderingEngine != direct2DRenderingEngine) - direct2DContext = 0; - else if (direct2DContext == 0) + direct2DContext = nullptr; + else if (direct2DContext == nullptr) direct2DContext = new Direct2DLowLevelGraphicsContext (hwnd); } #endif @@ -2306,7 +2239,7 @@ private: updateKeyModifiers(); Point localPos; - if (ComponentPeer* const peer = findPeerUnderMouse (localPos)) + if (auto* peer = findPeerUnderMouse (localPos)) { switch (gi.dwID) { @@ -2360,14 +2293,13 @@ private: const float touchPressure = MouseInputSource::invalidPressure, const float orientation = 0.0f) { - bool isCancel = false; + auto isCancel = false; - const int touchIndex = currentTouches.getIndexOfTouch (touch.dwID); - auto time = getMouseEventTime(); - auto pos = globalToLocal (Point (touch.x / 100.0f, - touch.y / 100.0f)); - const float pressure = touchPressure; - ModifierKeys modsToSend (currentModifiers); + const auto touchIndex = currentTouches.getIndexOfTouch (touch.dwID); + const auto time = getMouseEventTime(); + const auto pos = globalToLocal ({ touch.x / 100.0f, touch.y / 100.0f }); + const auto pressure = touchPressure; + auto modsToSend = currentModifiers; if (isDown) { @@ -2375,7 +2307,8 @@ private: modsToSend = currentModifiers; // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before. - handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, modsToSend.withoutMouseButtons(), pressure, orientation, time, PenDetails(), touchIndex); + handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, modsToSend.withoutMouseButtons(), + pressure, orientation, time, {}, touchIndex); if (! isValidPeer (this)) // (in case this component was deleted by the event) return false; @@ -2393,23 +2326,25 @@ private: modsToSend = currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier); } - if (isCancel) - { - currentTouches.clear(); - currentModifiers = currentModifiers.withoutMouseButtons(); - } + handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, modsToSend, + pressure, orientation, time, {}, touchIndex); - handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, modsToSend, pressure, orientation, time, PenDetails(), touchIndex); - - if (! isValidPeer (this)) // (in case this component was deleted by the event) + if (! isValidPeer (this)) return false; - if (isUp || isCancel) + if (isUp) { - handleMouseEvent (MouseInputSource::InputSourceType::touch, Point (-10.0f, -10.0f), currentModifiers, pressure, orientation, time, PenDetails(), touchIndex); + handleMouseEvent (MouseInputSource::InputSourceType::touch, { -10.0f, -10.0f }, currentModifiers.withoutMouseButtons(), + pressure, orientation, time, {}, touchIndex); if (! isValidPeer (this)) return false; + + if (isCancel) + { + currentTouches.clear(); + currentModifiers = currentModifiers.withoutMouseButtons(); + } } return true; @@ -2905,14 +2840,13 @@ private: void doSettingChange() { - Desktop& desktop = Desktop::getInstance(); + auto& desktop = Desktop::getInstance(); const_cast (desktop.getDisplays()).refresh(); if (fullScreen && ! isMinimised()) { - const Desktop::Displays::Display& display - = desktop.getDisplays().getDisplayContaining (component.getScreenBounds().getCentre()); + auto& display = desktop.getDisplays().getDisplayContaining (component.getScreenBounds().getCentre()); setWindowPos (hwnd, display.userArea * display.scale, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_NOSENDCHANGING); @@ -2952,16 +2886,18 @@ public: private: static void* callFunctionIfNotLocked (MessageCallbackFunction* callback, void* userData) { - if (MessageManager::getInstance()->currentThreadHasLockedMessageManager()) + auto& mm = *MessageManager::getInstance(); + + if (mm.currentThreadHasLockedMessageManager()) return callback (userData); - return MessageManager::getInstance()->callFunctionOnMessageThread (callback, userData); + return mm.callFunctionOnMessageThread (callback, userData); } static Point getPointFromLParam (LPARAM lParam) noexcept { - return Point (static_cast (GET_X_LPARAM (lParam)), - static_cast (GET_Y_LPARAM (lParam))); + return { static_cast (GET_X_LPARAM (lParam)), + static_cast (GET_Y_LPARAM (lParam)) }; } static Point getCurrentMousePosGlobal() noexcept @@ -3336,9 +3272,8 @@ private: } //============================================================================== - class IMEHandler + struct IMEHandler { - public: IMEHandler() { reset(); @@ -3362,7 +3297,7 @@ private: { reset(); - if (TextInputTarget* const target = owner.findCurrentTextInputTarget()) + if (auto* target = owner.findCurrentTextInputTarget()) target->insertTextAtCaret (String()); } @@ -3371,7 +3306,7 @@ private: if (compositionInProgress) { // If this occurs, the user has cancelled the composition, so clear their changes.. - if (TextInputTarget* const target = owner.findCurrentTextInputTarget()) + if (auto* target = owner.findCurrentTextInputTarget()) { target->setHighlightedRegion (compositionRange); target->insertTextAtCaret (String()); @@ -3381,7 +3316,7 @@ private: target->setTemporaryUnderlining (Array >()); } - if (HIMC hImc = ImmGetContext (hWnd)) + if (auto hImc = ImmGetContext (hWnd)) { ImmNotifyIME (hImc, NI_CLOSECANDIDATE, 0, 0); ImmReleaseContext (hWnd, hImc); @@ -3393,34 +3328,34 @@ private: void handleComposition (ComponentPeer& owner, HWND hWnd, const LPARAM lParam) { - TextInputTarget* const target = owner.findCurrentTextInputTarget(); - HIMC hImc = ImmGetContext (hWnd); - - if (target == nullptr || hImc == 0) - return; - - if (compositionRange.getStart() < 0) - compositionRange = Range::emptyRange (target->getHighlightedRegion().getStart()); - - if ((lParam & GCS_RESULTSTR) != 0) // (composition has finished) + if (auto* target = owner.findCurrentTextInputTarget()) { - replaceCurrentSelection (target, getCompositionString (hImc, GCS_RESULTSTR), - Range::emptyRange (-1)); + if (auto hImc = ImmGetContext (hWnd)) + { + if (compositionRange.getStart() < 0) + compositionRange = Range::emptyRange (target->getHighlightedRegion().getStart()); - reset(); - target->setTemporaryUnderlining (Array >()); + if ((lParam & GCS_RESULTSTR) != 0) // (composition has finished) + { + replaceCurrentSelection (target, getCompositionString (hImc, GCS_RESULTSTR), + Range::emptyRange (-1)); + + reset(); + target->setTemporaryUnderlining (Array >()); + } + else if ((lParam & GCS_COMPSTR) != 0) // (composition is still in-progress) + { + replaceCurrentSelection (target, getCompositionString (hImc, GCS_COMPSTR), + getCompositionSelection (hImc, lParam)); + + target->setTemporaryUnderlining (getCompositionUnderlines (hImc, lParam)); + compositionInProgress = true; + } + + moveCandidateWindowToLeftAlignWithSelection (hImc, owner, target); + ImmReleaseContext (hWnd, hImc); + } } - else if ((lParam & GCS_COMPSTR) != 0) // (composition is still in-progress) - { - replaceCurrentSelection (target, getCompositionString (hImc, GCS_COMPSTR), - getCompositionSelection (hImc, lParam)); - - target->setTemporaryUnderlining (getCompositionUnderlines (hImc, lParam)); - compositionInProgress = true; - } - - moveCandidateWindowToLeftAlignWithSelection (hImc, owner, target); - ImmReleaseContext (hWnd, hImc); } private: @@ -3516,13 +3451,13 @@ private: target->setHighlightedRegion (newSelection); } - Array > getCompositionUnderlines (HIMC hImc, LPARAM lParam) const + Array> getCompositionUnderlines (HIMC hImc, LPARAM lParam) const { - Array > result; + Array> result; if (hImc != 0 && (lParam & GCS_COMPCLAUSE) != 0) { - const int clauseDataSizeBytes = ImmGetCompositionString (hImc, GCS_COMPCLAUSE, 0, 0); + auto clauseDataSizeBytes = ImmGetCompositionString (hImc, GCS_COMPCLAUSE, 0, 0); if (clauseDataSizeBytes > 0) { @@ -3540,9 +3475,9 @@ private: void moveCandidateWindowToLeftAlignWithSelection (HIMC hImc, ComponentPeer& peer, TextInputTarget* target) const { - if (Component* const targetComp = dynamic_cast (target)) + if (auto* targetComp = dynamic_cast (target)) { - const Rectangle area (peer.getComponent().getLocalArea (targetComp, target->getCaretRectangle())); + auto area = peer.getComponent().getLocalArea (targetComp, target->getCaretRectangle()); CANDIDATEFORM pos = { 0, CFS_CANDIDATEPOS, { area.getX(), area.getBottom() }, { 0, 0, 0, 0 } }; ImmSetCandidateWindow (hImc, &pos); @@ -3567,6 +3502,8 @@ private: ModifierKeys HWNDComponentPeer::currentModifiers; ModifierKeys HWNDComponentPeer::modifiersAtLastCallback; +MultiTouchMapper HWNDComponentPeer::currentTouches; + ComponentPeer* Component::createNewPeer (int styleFlags, void* parentHWND) { return new HWNDComponentPeer (*this, styleFlags, (HWND) parentHWND, false); @@ -3606,7 +3543,7 @@ ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept //============================================================================== bool KeyPress::isKeyCurrentlyDown (const int keyCode) { - SHORT k = (SHORT) keyCode; + auto k = (SHORT) keyCode; if ((keyCode & extendedKeyModifier) == 0) { @@ -3639,15 +3576,15 @@ bool offerKeyMessageToJUCEWindow (MSG& m) { return HWNDComponentPeer::offerKey //============================================================================== bool JUCE_CALLTYPE Process::isForegroundProcess() { - HWND fg = GetForegroundWindow(); + if (auto fg = GetForegroundWindow()) + { + DWORD processID = 0; + GetWindowThreadProcessId (fg, &processID); - if (fg == 0) - return true; + return processID == GetCurrentProcessId(); + } - DWORD processID = 0; - GetWindowThreadProcessId (fg, &processID); - - return (processID == GetCurrentProcessId()); + return true; } // N/A on Windows as far as I know. @@ -3807,7 +3744,7 @@ int JUCE_CALLTYPE NativeMessageBox::showYesNoBox (AlertWindow::AlertIconType ico //============================================================================== bool MouseInputSource::SourceList::addSource() { - const int numSources = sources.size(); + auto numSources = sources.size(); if (numSources == 0 || canUseMultiTouch()) { @@ -3828,7 +3765,7 @@ Point MouseInputSource::getCurrentRawMousePosition() { POINT mousePos; GetCursorPos (&mousePos); - return Point ((float) mousePos.x, (float) mousePos.y); + return { (float) mousePos.x, (float) mousePos.y }; } void MouseInputSource::setRawMousePosition (Point newPosition) @@ -3888,13 +3825,13 @@ void SystemClipboard::copyTextToClipboard (const String& text) { if (EmptyClipboard() != 0) { - const size_t bytesNeeded = CharPointer_UTF16::getBytesRequiredFor (text.getCharPointer()) + 4; + auto bytesNeeded = CharPointer_UTF16::getBytesRequiredFor (text.getCharPointer()) + 4; if (bytesNeeded > 0) { - if (HGLOBAL bufH = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE | GMEM_ZEROINIT, bytesNeeded + sizeof (WCHAR))) + if (auto bufH = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE | GMEM_ZEROINIT, bytesNeeded + sizeof (WCHAR))) { - if (WCHAR* const data = static_cast (GlobalLock (bufH))) + if (auto* data = static_cast (GlobalLock (bufH))) { text.copyToUTF16 (data, bytesNeeded); GlobalUnlock (bufH); @@ -3915,9 +3852,9 @@ String SystemClipboard::getTextFromClipboard() if (OpenClipboard (0) != 0) { - if (HANDLE bufH = GetClipboardData (CF_UNICODETEXT)) + if (auto bufH = GetClipboardData (CF_UNICODETEXT)) { - if (const WCHAR* const data = (const WCHAR*) GlobalLock (bufH)) + if (auto* data = (const WCHAR*) GlobalLock (bufH)) { result = String (data, (size_t) (GlobalSize (bufH) / sizeof (WCHAR))); GlobalUnlock (bufH); @@ -3933,7 +3870,7 @@ String SystemClipboard::getTextFromClipboard() //============================================================================== void Desktop::setKioskComponent (Component* kioskModeComp, bool enableOrDisable, bool /*allowMenusAndBars*/) { - if (TopLevelWindow* tlw = dynamic_cast (kioskModeComp)) + if (auto* tlw = dynamic_cast (kioskModeComp)) tlw->setUsingNativeTitleBar (! enableOrDisable); if (enableOrDisable) @@ -4032,7 +3969,8 @@ static HICON extractFileHICON (const File& file) Image juce_createIconForFile (const File& file) { Image image; - if (HICON icon = extractFileHICON (file)) + + if (auto icon = extractFileHICON (file)) { image = IconConverters::createImageFromHICON (icon); DestroyIcon (icon); @@ -4062,7 +4000,7 @@ void* CustomMouseCursorInfo::create() const return IconConverters::createHICONFromImage (im, FALSE, hotspotX, hotspotY); } -void MouseCursor::deleteMouseCursor (void* const cursorHandle, const bool isStandard) +void MouseCursor::deleteMouseCursor (void* cursorHandle, bool isStandard) { if (cursorHandle != nullptr && ! isStandard) DestroyCursor ((HCURSOR) cursorHandle); @@ -4153,7 +4091,7 @@ void* MouseCursor::createStandardMouseCursor (const MouseCursor::StandardCursorT //============================================================================== void MouseCursor::showInWindow (ComponentPeer*) const { - HCURSOR c = (HCURSOR) getHandle(); + auto c = (HCURSOR) getHandle(); if (c == 0) c = LoadCursor (0, IDC_ARROW); diff --git a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp index d09ed7f56d..3193f110bf 100644 --- a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp +++ b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp @@ -41,7 +41,7 @@ public: bool isInterestedInFileDrag (const StringArray&) override { - return true; + return interestedInFileDrag; } void filesDropped (const StringArray& files, int, int) override @@ -77,10 +77,16 @@ public: repaint(); } + void setInterestedInFileDrag (bool isInterested) + { + interestedInFileDrag = isInterested; + } + private: TextPropertyComponent& owner; int maxChars; bool isMultiline; + bool interestedInFileDrag = true; }; //============================================================================== @@ -169,3 +175,9 @@ void TextPropertyComponent::colourChanged() PropertyComponent::colourChanged(); textEditor->updateColours(); } + +void TextPropertyComponent::setInterestedInFileDrag (bool isInterested) +{ + if (textEditor != nullptr) + textEditor->setInterestedInFileDrag (isInterested); +} diff --git a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h index e0b4c84e80..5a10ca6f5e 100644 --- a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h +++ b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h @@ -122,6 +122,14 @@ public: */ void removeListener (Listener* listener); + //============================================================================== + /** Sets whether the text property component can have files dropped onto it by an external application. + + The default setting for this is true but you may want to disable this behaviour if you derive + from this class and want your subclass to respond to the file drag. + */ + void setInterestedInFileDrag (bool isInterested); + //============================================================================== /** @internal */ void refresh() override; diff --git a/modules/juce_gui_basics/widgets/juce_Slider.cpp b/modules/juce_gui_basics/widgets/juce_Slider.cpp index c3dfd59abd..d6b23ea816 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.cpp +++ b/modules/juce_gui_basics/widgets/juce_Slider.cpp @@ -138,11 +138,12 @@ public: { int v = std::abs (roundToInt (newInt * 10000000)); - while ((v % 10) == 0) - { - --numDecimalPlaces; - v /= 10; - } + if (v > 0) + while ((v % 10) == 0) + { + --numDecimalPlaces; + v /= 10; + } } // keep the current values inside the new range.. diff --git a/modules/juce_gui_basics/widgets/juce_Slider.h b/modules/juce_gui_basics/widgets/juce_Slider.h index b306d3f882..fd2d205edb 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.h +++ b/modules/juce_gui_basics/widgets/juce_Slider.h @@ -129,7 +129,7 @@ public: /** Changes the type of slider interface being used. @param newStyle the type of interface - @see setRotaryParameters, setVelocityBasedMode, + @see setRotaryParameters, setVelocityBasedMode */ void setSliderStyle (SliderStyle newStyle); @@ -142,19 +142,22 @@ public: struct RotaryParameters { /** The angle (in radians, clockwise from the top) at which - the slider's minimum value is represented. */ + the slider's minimum value is represented. + */ float startAngleRadians; /** The angle (in radians, clockwise from the top) at which the slider's maximum value is represented. This must be - greater than startAngleRadians. */ + greater than startAngleRadians. + */ float endAngleRadians; /** Determines what happens when a circular drag action rotates beyond the minimum or maximum angle. If true, the value will stop changing until the mouse moves back the way it came; if false, the value will snap back to the value nearest to the mouse. Note that this has - no effect if the drag mode is vertical or horizontal.*/ + no effect if the drag mode is vertical or horizontal. + */ bool stopAtEnd; }; diff --git a/modules/juce_gui_basics/widgets/juce_TextEditor.cpp b/modules/juce_gui_basics/widgets/juce_TextEditor.cpp index 6b55a8387d..21fd56ea88 100644 --- a/modules/juce_gui_basics/widgets/juce_TextEditor.cpp +++ b/modules/juce_gui_basics/widgets/juce_TextEditor.cpp @@ -1027,14 +1027,15 @@ void TextEditor::setFont (const Font& newFont) scrollToMakeSureCursorIsVisible(); } -void TextEditor::applyFontToAllText (const Font& newFont) +void TextEditor::applyFontToAllText (const Font& newFont, bool changeCurrentFont) { - currentFont = newFont; + if (changeCurrentFont) + currentFont = newFont; + auto overallColour = findColour (textColourId); - for (int i = sections.size(); --i >= 0;) + for (auto* uts : sections) { - auto* uts = sections.getUnchecked (i); uts->setFont (newFont, passwordCharacter); uts->colour = overallColour; } @@ -1045,11 +1046,21 @@ void TextEditor::applyFontToAllText (const Font& newFont) repaint(); } +void TextEditor::applyColourToAllText (const Colour& newColour, bool changeCurrentTextColour) +{ + for (auto* uts : sections) + uts->colour = newColour; + + if (changeCurrentTextColour) + setColour (TextEditor::textColourId, newColour); + else + repaint(); +} + void TextEditor::colourChanged() { setOpaque (findColour (backgroundColourId).isOpaque()); repaint(); - styleChanged = true; } void TextEditor::lookAndFeelChanged() @@ -1163,7 +1174,7 @@ void TextEditor::setText (const String& newText, { const int newLength = newText.length(); - if (newLength != getTotalNumChars() || getText() != newText || styleChanged) + if (newLength != getTotalNumChars() || getText() != newText) { if (! sendTextChangeMessage) textValue.removeListener (textHolder); @@ -1194,8 +1205,6 @@ void TextEditor::setText (const String& newText, scrollToMakeSureCursorIsVisible(); undoManager.clearUndoHistory(); - styleChanged = false; - repaint(); } } diff --git a/modules/juce_gui_basics/widgets/juce_TextEditor.h b/modules/juce_gui_basics/widgets/juce_TextEditor.h index 5f1e5f8324..30a6465141 100644 --- a/modules/juce_gui_basics/widgets/juce_TextEditor.h +++ b/modules/juce_gui_basics/widgets/juce_TextEditor.h @@ -207,8 +207,8 @@ public: textColourId = 0x1000201, /**< The colour that will be used when text is added to the editor. Note that because the editor can contain multiple colours, calling this - method won't change the colour of existing text - to do that, call - applyFontToAllText() after calling this method.*/ + method won't change the colour of existing text - to do that, use + the applyColourToAllText() method */ highlightColourId = 0x1000202, /**< The colour with which to fill the background of highlighted sections of the text - this can be transparent if you don't want to show any @@ -238,16 +238,27 @@ public: void setFont (const Font& newFont); /** Applies a font to all the text in the editor. - This will also set the current font to use for any new text that's added. + + If the changeCurrentFont argument is true then this will also set the + new font as the font to be used for any new text that's added. + @see setFont */ - void applyFontToAllText (const Font& newFont); + void applyFontToAllText (const Font& newFont, bool changeCurrentFont = true); /** Returns the font that's currently being used for new text. + @see setFont */ const Font& getFont() const noexcept { return currentFont; } + /** Applies a colour to all the text in the editor. + + If the changeCurrentTextColour argument is true then this will also set the + new colour as the colour to be used for any new text that's added. + */ + void applyColourToAllText (const Colour& newColour, bool changeCurrentTextColour = true); + //============================================================================== /** If set to true, focusing on the editor will highlight all its text. @@ -697,7 +708,6 @@ private: bool menuActive = false; bool valueTextNeedsUpdating = false; bool consumeEscAndReturnKeys = true; - bool styleChanged = false; UndoManager undoManager; ScopedPointer caret; diff --git a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp index 6aaa4c383a..a2bab5484b 100644 --- a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp +++ b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp @@ -177,7 +177,7 @@ public: { for (int i = 0; i < getNumChildComponents(); ++i) { - if (ToolbarItemComponent* const tc = dynamic_cast (getChildComponent (i))) + if (auto* tc = dynamic_cast (getChildComponent (i))) { tc->setVisible (false); const int index = oldIndexes.removeAndReturn (i); @@ -197,9 +197,9 @@ public: int y = indent; int maxX = 0; - for (int i = 0; i < getNumChildComponents(); ++i) + for (auto* c : getChildren()) { - if (ToolbarItemComponent* const tc = dynamic_cast (getChildComponent (i))) + if (auto* tc = dynamic_cast (c)) { int preferredSize = 1, minSize = 1, maxSize = 1; diff --git a/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp b/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp index 7261d5e5f9..00ee3c687d 100644 --- a/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp @@ -242,7 +242,7 @@ void ResizableWindow::childBoundsChanged (Component* child) jassert (child->getWidth() > 0); jassert (child->getHeight() > 0); - const BorderSize borders (getContentComponentBorder()); + auto borders = getContentComponentBorder(); setSize (child->getWidth() + borders.getLeftAndRight(), child->getHeight() + borders.getTopAndBottom()); diff --git a/modules/juce_gui_extra/juce_gui_extra.h b/modules/juce_gui_extra/juce_gui_extra.h index 05f828094a..12e43b0ce0 100644 --- a/modules/juce_gui_extra/juce_gui_extra.h +++ b/modules/juce_gui_extra/juce_gui_extra.h @@ -35,7 +35,7 @@ ID: juce_gui_extra vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE extended GUI classes description: Miscellaneous GUI classes for specialised tasks. website: http://www.juce.com/juce diff --git a/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp b/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp index ef5b2fb683..88ee4a8e36 100644 --- a/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp +++ b/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp @@ -101,8 +101,8 @@ public: addButton (TRANS("Cancel"), 0); // (avoid return + escape keys getting processed by the buttons..) - for (int i = getNumChildComponents(); --i >= 0;) - getChildComponent (i)->setWantsKeyboardFocus (false); + for (auto* child : getChildren()) + child->setWantsKeyboardFocus (false); setWantsKeyboardFocus (true); grabKeyboardFocus(); @@ -113,7 +113,7 @@ public: lastPress = key; String message (TRANS("Key") + ": " + owner.getDescriptionForKeyPress (key)); - const CommandID previousCommand = owner.getMappings().findCommandForKeyPress (key); + auto previousCommand = owner.getMappings().findCommandForKeyPress (key); if (previousCommand != 0) message << "\n\n(" @@ -148,7 +148,7 @@ public: { if (newKey.isValid()) { - const CommandID previousCommand = owner.getMappings().findCommandForKeyPress (newKey); + auto previousCommand = owner.getMappings().findCommandForKeyPress (newKey); if (previousCommand == 0 || dontAskUser) { @@ -209,14 +209,14 @@ private: class KeyMappingEditorComponent::ItemComponent : public Component { public: - ItemComponent (KeyMappingEditorComponent& kec, const CommandID command) + ItemComponent (KeyMappingEditorComponent& kec, CommandID command) : owner (kec), commandID (command) { setInterceptsMouseClicks (false, true); const bool isReadOnly = owner.isCommandReadOnly (commandID); - const Array keyPresses (owner.getMappings().getKeyPressesAssignedToCommand (commandID)); + auto keyPresses = owner.getMappings().getKeyPressesAssignedToCommand (commandID); for (int i = 0; i < jmin ((int) maxNumAssignments, keyPresses.size()); ++i) addKeyPressButton (owner.getDescriptionForKeyPress (keyPresses.getReference (i)), i, isReadOnly); @@ -226,7 +226,7 @@ public: void addKeyPressButton (const String& desc, const int index, const bool isReadOnly) { - ChangeKeyButton* const b = new ChangeKeyButton (owner, commandID, desc, index); + auto* b = new ChangeKeyButton (owner, commandID, desc, index); keyChangeButtons.add (b); b->setEnabled (! isReadOnly); @@ -250,7 +250,7 @@ public: for (int i = keyChangeButtons.size(); --i >= 0;) { - ChangeKeyButton* const b = keyChangeButtons.getUnchecked(i); + auto* b = keyChangeButtons.getUnchecked(i); b->fitToContent (getHeight() - 2); b->setTopRightPosition (x, 1); @@ -272,7 +272,7 @@ private: class KeyMappingEditorComponent::MappingItem : public TreeViewItem { public: - MappingItem (KeyMappingEditorComponent& kec, const CommandID command) + MappingItem (KeyMappingEditorComponent& kec, CommandID command) : owner (kec), commandID (command) {} @@ -314,13 +314,9 @@ public: if (isNowOpen) { if (getNumSubItems() == 0) - { - const Array commands (owner.getCommandManager().getCommandsInCategory (categoryName)); - - for (int i = 0; i < commands.size(); ++i) - if (owner.shouldCommandBeIncluded (commands.getUnchecked(i))) - addSubItem (new MappingItem (owner, commands.getUnchecked(i))); - } + for (auto command : owner.getCommandManager().getCommandsInCategory (categoryName)) + if (owner.shouldCommandBeIncluded (command)) + addSubItem (new MappingItem (owner, command)); } else { @@ -360,19 +356,16 @@ public: const OpennessRestorer opennessRestorer (*this); clearSubItems(); - const StringArray categories (owner.getCommandManager().getCommandCategories()); - - for (int i = 0; i < categories.size(); ++i) + for (auto category : owner.getCommandManager().getCommandCategories()) { - const Array commands (owner.getCommandManager().getCommandsInCategory (categories[i])); int count = 0; - for (int j = 0; j < commands.size(); ++j) - if (owner.shouldCommandBeIncluded (commands.getUnchecked(j))) + for (auto command : owner.getCommandManager().getCommandsInCategory (category)) + if (owner.shouldCommandBeIncluded (command)) ++count; if (count > 0) - addSubItem (new CategoryItem (owner, categories[i])); + addSubItem (new CategoryItem (owner, category)); } } @@ -459,14 +452,14 @@ void KeyMappingEditorComponent::resized() //============================================================================== bool KeyMappingEditorComponent::shouldCommandBeIncluded (const CommandID commandID) { - const ApplicationCommandInfo* const ci = mappings.getCommandManager().getCommandForID (commandID); + auto* ci = mappings.getCommandManager().getCommandForID (commandID); return ci != nullptr && (ci->flags & ApplicationCommandInfo::hiddenFromKeyEditor) == 0; } bool KeyMappingEditorComponent::isCommandReadOnly (const CommandID commandID) { - const ApplicationCommandInfo* const ci = mappings.getCommandManager().getCommandForID (commandID); + auto* ci = mappings.getCommandManager().getCommandForID (commandID); return ci != nullptr && (ci->flags & ApplicationCommandInfo::readOnlyInKeyEditor) != 0; } diff --git a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp index f0fda61407..e87c817d98 100644 --- a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp +++ b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp @@ -53,13 +53,13 @@ private: Array alreadyDone; for (int i = TopLevelWindow::getNumTopLevelWindows(); --i >= 0;) - if (Component* c = TopLevelWindow::getTopLevelWindow(i)) + if (auto* c = TopLevelWindow::getTopLevelWindow(i)) repaintAndResizeAllComps (c, alreadyDone); - Desktop& desktop = Desktop::getInstance(); + auto& desktop = Desktop::getInstance(); for (int i = desktop.getNumComponents(); --i >= 0;) - if (Component* c = desktop.getComponent(i)) + if (auto* c = desktop.getComponent(i)) repaintAndResizeAllComps (c, alreadyDone); } @@ -73,7 +73,7 @@ private: for (int i = c->getNumChildComponents(); --i >= 0;) { - if (Component* child = c->getChildComponent(i)) + if (auto* child = c->getChildComponent(i)) { repaintAndResizeAllComps (child, alreadyDone); alreadyDone.add (child); @@ -124,7 +124,7 @@ LiveValueBase::~LiveValueBase() //============================================================================== LivePropertyEditorBase::LivePropertyEditorBase (LiveValueBase& v, CodeDocument& d) - : value (v), resetButton ("reset"), document (d), sourceEditor (document, &tokeniser), wasHex (false) + : value (v), document (d), sourceEditor (document, &tokeniser) { setSize (600, 100); @@ -155,11 +155,11 @@ void LivePropertyEditorBase::paint (Graphics& g) void LivePropertyEditorBase::resized() { - Rectangle r (getLocalBounds().reduced (0, 3).withTrimmedBottom (1)); + auto r = getLocalBounds().reduced (0, 3).withTrimmedBottom (1); - Rectangle left (r.removeFromLeft (jmax (200, r.getWidth() / 3))); + auto left = r.removeFromLeft (jmax (200, r.getWidth() / 3)); - Rectangle top (left.removeFromTop (25)); + auto top = left.removeFromTop (25); resetButton.setBounds (top.removeFromRight (35).reduced (0, 3)); name.setBounds (top); @@ -208,8 +208,8 @@ void LivePropertyEditorBase::selectOriginalValue() void LivePropertyEditorBase::findOriginalValueInCode() { CodeDocument::Position pos (document, value.sourceLine, 0); - String line (pos.getLineText()); - String::CharPointerType p (line.getCharPointer()); + auto line = pos.getLineText(); + auto p = line.getCharPointer(); p = CharacterFunctions::find (p, CharPointer_ASCII ("JUCE_LIVE_CONSTANT")); @@ -233,13 +233,13 @@ void LivePropertyEditorBase::findOriginalValueInCode() if (p.getAndAdvance() == '(') { - String::CharPointerType start (p), end (p); + auto start = p, end = p; int depth = 1; while (! end.isEmpty()) { - const juce_wchar c = end.getAndAdvance(); + auto c = end.getAndAdvance(); if (c == '(') ++depth; if (c == ')') --depth; @@ -328,11 +328,11 @@ public: void updateItems (ValueList& list) { - if (ValueListHolderComponent* l = dynamic_cast (viewport.getViewedComponent())) + if (auto* l = dynamic_cast (viewport.getViewedComponent())) { while (l->getNumChildComponents() < list.values.size()) { - if (LiveValueBase* v = list.values [l->getNumChildComponents()]) + if (auto* v = list.values [l->getNumChildComponents()]) l->addItem (viewport.getMaximumVisibleWidth(), *v, list.getDocument (v->sourceFile)); else break; @@ -346,7 +346,7 @@ public: { DocumentWindow::resized(); - if (ValueListHolderComponent* l = dynamic_cast (viewport.getViewedComponent())) + if (auto* l = dynamic_cast (viewport.getViewedComponent())) l->layout (viewport.getMaximumVisibleWidth()); } @@ -379,7 +379,7 @@ CodeDocument& ValueList::getDocument (const File& file) if (index >= 0) return *documents.getUnchecked (index); - CodeDocument* doc = documents.add (new CodeDocument()); + auto* doc = documents.add (new CodeDocument()); documentFiles.add (file); doc->replaceAllContent (file.loadFileAsString()); doc->clearUndoHistory(); @@ -409,7 +409,7 @@ struct ColourEditorComp : public Component, void mouseDown (const MouseEvent&) override { - ColourSelector* colourSelector = new ColourSelector(); + auto* colourSelector = new ColourSelector(); colourSelector->setName ("Colour"); colourSelector->setCurrentColour (getColour()); colourSelector->addChangeListener (this); @@ -421,7 +421,7 @@ struct ColourEditorComp : public Component, void changeListenerCallback (ChangeBroadcaster* source) override { - if (ColourSelector* cs = dynamic_cast (source)) + if (auto* cs = dynamic_cast (source)) editor.applyNewValue (getAsString (cs->getCurrentColour(), true)); repaint(); @@ -493,9 +493,9 @@ struct BoolSliderComp : public SliderComp void sliderValueChanged (Slider*) override { editor.applyNewValue (slider.getValue() > 0.5 ? "true" : "false"); } }; -Component* createIntegerSlider (LivePropertyEditorBase& editor) { return new SliderComp (editor, false); } -Component* createFloatSlider (LivePropertyEditorBase& editor) { return new SliderComp (editor, true); } -Component* createBoolSlider (LivePropertyEditorBase& editor) { return new BoolSliderComp (editor); } +Component* createIntegerSlider (LivePropertyEditorBase& editor) { return new SliderComp (editor, false); } +Component* createFloatSlider (LivePropertyEditorBase& editor) { return new SliderComp (editor, true); } +Component* createBoolSlider (LivePropertyEditorBase& editor) { return new BoolSliderComp (editor); } } diff --git a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h index 10be7df96c..c4281b5b07 100644 --- a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h +++ b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h @@ -123,13 +123,13 @@ namespace LiveConstantEditor LiveValueBase& value; Label name; TextEditor valueEditor; - TextButton resetButton; + TextButton resetButton { "reset" }; CodeDocument& document; CPlusPlusCodeTokeniser tokeniser; CodeEditorComponent sourceEditor; CodeDocument::Position valueStart, valueEnd; ScopedPointer customComp; - bool wasHex; + bool wasHex = false; JUCE_DECLARE_NON_COPYABLE (LivePropertyEditorBase) }; diff --git a/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp b/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp index a3b518f1cb..d7470f6c92 100644 --- a/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp +++ b/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp @@ -139,8 +139,7 @@ void RecentlyOpenedFilesList::registerRecentFileNatively (const File& file) #if JUCE_MAC JUCE_AUTORELEASEPOOL { - [[NSDocumentController sharedDocumentController] - noteNewRecentDocumentURL: [NSURL fileURLWithPath: juceStringToNS (file.getFullPathName())]]; + [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL: createNSURLFromFile (file)]; } #else ignoreUnused (file); diff --git a/modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp b/modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp index 8c59ff0c8c..49cde5eb2f 100644 --- a/modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp +++ b/modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp @@ -36,9 +36,7 @@ class SystemTrayIconComponent::Pimpl : private Timer { public: Pimpl (SystemTrayIconComponent& iconComp, const Image& im) - : owner (iconComp), statusItem (nil), - statusIcon (MouseCursorHelpers::createNSImage (im)), - view (nil), isHighlighted (false) + : owner (iconComp), statusIcon (MouseCursorHelpers::createNSImage (im)) { static SystemTrayViewClass cls; view = [cls.createInstance() init]; @@ -105,8 +103,7 @@ public: eventMods = eventMods.withFlags (ModifierKeys::commandModifier); auto now = Time::getCurrentTime(); - - MouseInputSource mouseSource = Desktop::getInstance().getMainMouseSource(); + auto mouseSource = Desktop::getInstance().getMainMouseSource(); auto pressure = (float) e.pressure; if (isLeft || isRight) // Only mouse up is sent by the OS, so simulate a down/up @@ -148,12 +145,12 @@ public: } SystemTrayIconComponent& owner; - NSStatusItem* statusItem; + NSStatusItem* statusItem = nil; private: - NSImage* statusIcon; - NSControl* view; - bool isHighlighted; + NSImage* statusIcon = nil; + NSControl* view = nil; + bool isHighlighted = false; void setIconSize() { @@ -188,7 +185,7 @@ private: static void frameChanged (id self, SEL, NSNotification*) { - if (Pimpl* const owner = getOwner (self)) + if (auto* owner = getOwner (self)) { NSRect r = [[[owner->statusItem view] window] frame]; NSRect sr = [[[NSScreen screens] objectAtIndex: 0] frame]; diff --git a/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp b/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp index 79186f904f..188385b632 100644 --- a/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp +++ b/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp @@ -26,23 +26,9 @@ extern int64 getMouseEventTime(); -#if JUCE_MINGW - #define JUCE_COMCLASS(name, guid) \ - template<> struct UUIDGetter<::name> { static CLSID get() { return uuidFromString (guid); } }; - - #ifdef __uuidof - #undef __uuidof - #endif - - #define __uuidof(cls) UUIDGetter<::cls>::get() - -#else - #define JUCE_COMCLASS(name, guid) -#endif - -JUCE_COMCLASS (IOleObject, "00000112-0000-0000-C000-000000000046") -JUCE_COMCLASS (IOleWindow, "00000114-0000-0000-C000-000000000046") -JUCE_COMCLASS (IOleInPlaceSite, "00000119-0000-0000-C000-000000000046") +JUCE_DECLARE_UUID_GETTER (IOleObject, "00000112-0000-0000-C000-000000000046") +JUCE_DECLARE_UUID_GETTER (IOleWindow, "00000114-0000-0000-C000-000000000046") +JUCE_DECLARE_UUID_GETTER (IOleInPlaceSite, "00000119-0000-0000-C000-000000000046") namespace ActiveXHelpers { diff --git a/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp b/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp index 806d9df090..5831a9cc0d 100644 --- a/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp +++ b/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp @@ -24,20 +24,15 @@ ============================================================================== */ -JUCE_COMCLASS (DWebBrowserEvents2, "34A715A0-6587-11D0-924A-0020AFC7AC4D") -JUCE_COMCLASS (IConnectionPointContainer, "B196B284-BAB4-101A-B69C-00AA00341D07") -JUCE_COMCLASS (IWebBrowser2, "D30C1661-CDAF-11D0-8A3E-00C04FC9E26E") -JUCE_COMCLASS (WebBrowser, "8856F961-340A-11D0-A96B-00C04FD705A2") +JUCE_DECLARE_UUID_GETTER (DWebBrowserEvents2, "34A715A0-6587-11D0-924A-0020AFC7AC4D") +JUCE_DECLARE_UUID_GETTER (IConnectionPointContainer, "B196B284-BAB4-101A-B69C-00AA00341D07") +JUCE_DECLARE_UUID_GETTER (IWebBrowser2, "D30C1661-CDAF-11D0-8A3E-00C04FC9E26E") +JUCE_DECLARE_UUID_GETTER (WebBrowser, "8856F961-340A-11D0-A96B-00C04FD705A2") class WebBrowserComponent::Pimpl : public ActiveXControlComponent { public: - Pimpl() - : browser (nullptr), - connectionPoint (nullptr), - adviseCookie (0) - { - } + Pimpl() {} ~Pimpl() { @@ -50,25 +45,24 @@ public: void createBrowser() { - CLSID webCLSID = __uuidof (WebBrowser); + auto webCLSID = __uuidof (WebBrowser); createControl (&webCLSID); - GUID iidWebBrowser2 = __uuidof (IWebBrowser2); - GUID iidConnectionPointContainer = __uuidof (IConnectionPointContainer); + auto iidWebBrowser2 = __uuidof (IWebBrowser2); + auto iidConnectionPointContainer = __uuidof (IConnectionPointContainer); browser = (IWebBrowser2*) queryInterface (&iidWebBrowser2); - if (IConnectionPointContainer* connectionPointContainer - = (IConnectionPointContainer*) queryInterface (&iidConnectionPointContainer)) + if (auto connectionPointContainer = (IConnectionPointContainer*) queryInterface (&iidConnectionPointContainer)) { connectionPointContainer->FindConnectionPoint (__uuidof (DWebBrowserEvents2), &connectionPoint); if (connectionPoint != nullptr) { - WebBrowserComponent* const owner = dynamic_cast (getParentComponent()); + auto* owner = dynamic_cast (getParentComponent()); jassert (owner != nullptr); - EventHandler* handler = new EventHandler (*owner); + auto handler = new EventHandler (*owner); connectionPoint->Advise (handler, &adviseCookie); handler->Release(); } @@ -120,7 +114,7 @@ public: } } - BSTR urlBSTR = SysAllocString ((const OLECHAR*) url.toWideCharPointer()); + auto urlBSTR = SysAllocString ((const OLECHAR*) url.toWideCharPointer()); browser->Navigate (urlBSTR, &headerFlags, &frame, &postDataVar, &headersVar); SysFreeString (urlBSTR); @@ -135,11 +129,11 @@ public: } //============================================================================== - IWebBrowser2* browser; + IWebBrowser2* browser = nullptr; private: - IConnectionPoint* connectionPoint; - DWORD adviseCookie; + IConnectionPoint* connectionPoint = nullptr; + DWORD adviseCookie = 0; //============================================================================== struct EventHandler : public ComBaseClassHelper, @@ -185,13 +179,14 @@ private: if (statusCode < 0) { LPTSTR messageBuffer = nullptr; - size_t size = FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, statusCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &messageBuffer, 0, NULL); + auto size = FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + nullptr, statusCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR) &messageBuffer, 0, nullptr); - String message(messageBuffer, size); - LocalFree(messageBuffer); + String message (messageBuffer, size); + LocalFree (messageBuffer); - if (!owner.pageLoadHadNetworkError(message)) + if (! owner.pageLoadHadNetworkError (message)) *pDispParams->rgvarg[0].pboolVal = VARIANT_TRUE; } @@ -366,12 +361,12 @@ void WebBrowserComponent::visibilityChanged() void WebBrowserComponent::focusGained (FocusChangeType) { - GUID iidOleObject = __uuidof (IOleObject); - GUID iidOleWindow = __uuidof (IOleWindow); + auto iidOleObject = __uuidof (IOleObject); + auto iidOleWindow = __uuidof (IOleWindow); - if (IOleObject* oleObject = (IOleObject*) browser->queryInterface (&iidOleObject)) + if (auto oleObject = (IOleObject*) browser->queryInterface (&iidOleObject)) { - if (IOleWindow* oleWindow = (IOleWindow*) browser->queryInterface (&iidOleWindow)) + if (auto oleWindow = (IOleWindow*) browser->queryInterface (&iidOleWindow)) { IOleClientSite* oleClientSite = nullptr; diff --git a/modules/juce_opengl/juce_opengl.cpp b/modules/juce_opengl/juce_opengl.cpp index 3938dd566b..593931b3d8 100644 --- a/modules/juce_opengl/juce_opengl.cpp +++ b/modules/juce_opengl/juce_opengl.cpp @@ -71,7 +71,17 @@ #ifndef GL_GLEXT_PROTOTYPES #define GL_GLEXT_PROTOTYPES 1 #endif - #include + + #if JUCE_ANDROID_GL_ES_VERSION_3_0 + #include + + // workaround for a bug in SDK 18 and 19 + // see: https://stackoverflow.com/questions/31003863/gles-3-0-including-gl2ext-h + #define __gl2_h_ + #include + #else + #include + #endif #endif namespace juce @@ -142,6 +152,55 @@ static const char* getGLErrorMessage (const GLenum e) noexcept return "Unknown error"; } +#if JUCE_MAC || JUCE_IOS + + #ifndef JUCE_IOS_MAC_VIEW + #if JUCE_IOS + #define JUCE_IOS_MAC_VIEW UIView + #define JUCE_IOS_MAC_WINDOW UIWindow + #else + #define JUCE_IOS_MAC_VIEW NSView + #define JUCE_IOS_MAC_WINDOW NSWindow + #endif + #endif + +#endif + +static bool checkPeerIsValid (OpenGLContext* context) +{ + jassert (context != nullptr); + + if (context != nullptr) + { + if (auto* comp = context->getTargetComponent()) + { + if (auto* peer = comp->getPeer()) + { + #if JUCE_MAC || JUCE_IOS + if (auto* nsView = (JUCE_IOS_MAC_VIEW*) peer->getNativeHandle()) + { + if (auto* nsWindow = [nsView window]) + { + #if JUCE_MAC + return ([nsWindow isVisible] + && (! [nsWindow hidesOnDeactivate] || [NSApp isActive])); + #else + ignoreUnused (nsWindow); + return true; + #endif + } + } + #else + ignoreUnused (peer); + return true; + #endif + } + } + } + + return false; +} + static void checkGLError (const char* file, const int line) { for (;;) @@ -151,6 +210,10 @@ static void checkGLError (const char* file, const int line) if (e == GL_NO_ERROR) break; + // if the peer is not valid then ignore errors + if (! checkPeerIsValid (OpenGLContext::getCurrentContext())) + continue; + DBG ("***** " << getGLErrorMessage (e) << " at " << file << " : " << line); jassertfalse; } diff --git a/modules/juce_opengl/juce_opengl.h b/modules/juce_opengl/juce_opengl.h index 4fb6d52276..983b00f2c2 100644 --- a/modules/juce_opengl/juce_opengl.h +++ b/modules/juce_opengl/juce_opengl.h @@ -35,7 +35,7 @@ ID: juce_opengl vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE OpenGL classes description: Classes for rendering OpenGL in a JUCE window. website: http://www.juce.com/juce diff --git a/modules/juce_opengl/native/juce_OpenGL_linux_X11.h b/modules/juce_opengl/native/juce_OpenGL_linux_X11.h index c65f358058..dc287b947d 100644 --- a/modules/juce_opengl/native/juce_OpenGL_linux_X11.h +++ b/modules/juce_opengl/native/juce_OpenGL_linux_X11.h @@ -241,7 +241,7 @@ bool OpenGLHelpers::isContextActive() { ScopedXDisplay xDisplay; - if (auto display = xDisplay.display) + if (xDisplay.display) { ScopedXLock xlock (xDisplay.display); return glXGetCurrentContext() != 0; diff --git a/modules/juce_opengl/native/juce_OpenGL_osx.h b/modules/juce_opengl/native/juce_OpenGL_osx.h index 3bc4bc5a10..706486ebe5 100644 --- a/modules/juce_opengl/native/juce_OpenGL_osx.h +++ b/modules/juce_opengl/native/juce_OpenGL_osx.h @@ -247,21 +247,11 @@ bool OpenGLHelpers::isContextActive() } //============================================================================== -void componentPeerAboutToBeRemovedFromScreen (ComponentPeer& peer) +void componentPeerAboutToChange (Component& comp, bool shouldSuspend) { - Array stack; - stack.add (&peer.getComponent()); + if (auto* context = OpenGLContext::getContextAttachedTo (comp)) + context->overrideCanBeAttached (shouldSuspend); - while (stack.size() != 0) - { - Component& comp = *stack.removeAndReturn (0); - - const int n = comp.getNumChildComponents(); - for (int i = 0; i < n; ++i) - if (Component* child = comp.getChildComponent (i)) - stack.add (child); - - if (OpenGLContext* context = OpenGLContext::getContextAttachedTo (comp)) - context->detach(); - } + for (auto* child : comp.getChildren()) + componentPeerAboutToChange (*child, shouldSuspend); } diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp index a92c32c8c8..495ea985d2 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp @@ -664,16 +664,9 @@ public: void detach() { - stopTimer(); - Component& comp = *getComponent(); - #if JUCE_MAC - [[(NSView*) comp.getWindowHandle() window] disableScreenUpdatesUntilFlush]; - #endif - - if (CachedImage* const oldCachedImage = CachedImage::get (comp)) - oldCachedImage->stop(); // (must stop this before detaching it from the component) + stop(); comp.setCachedComponentImage (nullptr); context.nativeContext = nullptr; @@ -732,12 +725,22 @@ public: } #endif + void update() + { + Component& comp = *getComponent(); + + if (canBeAttached (comp)) + start(); + else + stop(); + } + private: OpenGLContext& context; - static bool canBeAttached (const Component& comp) noexcept + bool canBeAttached (const Component& comp) noexcept { - return comp.getWidth() > 0 && comp.getHeight() > 0 && isShowingOrMinimised (comp); + return (! context.overrideCanAttach) && comp.getWidth() > 0 && comp.getHeight() > 0 && isShowingOrMinimised (comp); } static bool isShowingOrMinimised (const Component& c) @@ -763,10 +766,35 @@ private: context.openGLPixelFormat, context.contextToShareWith); comp.setCachedComponentImage (newCachedImage); - newCachedImage->start(); // (must wait until this is attached before starting its thread) - newCachedImage->updateViewportSize (true); - startTimer (400); + start(); + } + + void stop() + { + stopTimer(); + + Component& comp = *getComponent(); + + #if JUCE_MAC + [[(NSView*) comp.getWindowHandle() window] disableScreenUpdatesUntilFlush]; + #endif + + if (CachedImage* const oldCachedImage = CachedImage::get (comp)) + oldCachedImage->stop(); // (must stop this before detaching it from the component) + } + + void start() + { + Component& comp = *getComponent(); + + if (CachedImage* const cachedImage = CachedImage::get (comp)) + { + cachedImage->start(); // (must wait until this is attached before starting its thread) + cachedImage->updateViewportSize (true); + + startTimer (400); + } } void timerCallback() override @@ -784,7 +812,8 @@ OpenGLContext::OpenGLContext() imageCacheMaxSize (8 * 1024 * 1024), renderComponents (true), useMultisampling (false), - continuousRepaint (false) + continuousRepaint (false), + overrideCanAttach (false) { } @@ -1024,6 +1053,17 @@ void OpenGLContext::execute (OpenGLContext::AsyncWorker::Ptr workerToUse, bool s jassertfalse; // You must have attached the context to a component } +void OpenGLContext::overrideCanBeAttached (bool newCanAttach) +{ + if (overrideCanAttach != newCanAttach) + { + overrideCanAttach = newCanAttach; + + if (Attachment* a = attachment) + a->update(); + } +} + //============================================================================== struct DepthTestDisabler { diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.h b/modules/juce_opengl/opengl/juce_OpenGLContext.h index a3c43d09c8..fe6627d35e 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.h +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.h @@ -308,7 +308,7 @@ private: void* contextToShareWith; OpenGLVersion versionRequired; size_t imageCacheMaxSize; - bool renderComponents, useMultisampling, continuousRepaint; + bool renderComponents, useMultisampling, continuousRepaint, overrideCanAttach; //============================================================================== struct AsyncWorker : ReferenceCountedObject @@ -322,12 +322,16 @@ private: struct AsyncWorkerFunctor : AsyncWorker { AsyncWorkerFunctor (T functorToUse) : functor (functorToUse) {} - void operator() (OpenGLContext& callerContext) override { functor (callerContext); } + void operator() (OpenGLContext& callerContext) override { functor (callerContext); } T functor; - JUCE_DECLARE_NON_COPYABLE(AsyncWorkerFunctor) + JUCE_DECLARE_NON_COPYABLE (AsyncWorkerFunctor) }; + //============================================================================== + friend void componentPeerAboutToChange (Component&, bool); + void overrideCanBeAttached (bool); + //============================================================================== CachedImage* getCachedImage() const noexcept; void execute (AsyncWorker::Ptr, bool); diff --git a/modules/juce_osc/juce_osc.h b/modules/juce_osc/juce_osc.h index 720b1c6992..4d889a4177 100644 --- a/modules/juce_osc/juce_osc.h +++ b/modules/juce_osc/juce_osc.h @@ -35,7 +35,7 @@ ID: juce_osc vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE OSC classes description: Open Sound Control implementation. website: http://www.juce.com/juce diff --git a/modules/juce_osc/osc/juce_OSCAddress.cpp b/modules/juce_osc/osc/juce_OSCAddress.cpp index 44312fcd89..888a3f1010 100644 --- a/modules/juce_osc/osc/juce_OSCAddress.cpp +++ b/modules/juce_osc/osc/juce_OSCAddress.cpp @@ -397,7 +397,7 @@ String OSCAddressPattern::toString() const noexcept class OSCAddressTests : public UnitTest { public: - OSCAddressTests() : UnitTest ("OSCAddress class") {} + OSCAddressTests() : UnitTest ("OSCAddress class", "OSC") {} void runTest() { @@ -441,7 +441,7 @@ static OSCAddressTests OSCAddressUnitTests; class OSCAddressPatternTests : public UnitTest { public: - OSCAddressPatternTests() : UnitTest ("OSCAddressPattern class") {} + OSCAddressPatternTests() : UnitTest ("OSCAddressPattern class", "OSC") {} void runTest() { @@ -580,7 +580,7 @@ static OSCAddressPatternTests OSCAddressPatternUnitTests; class OSCPatternMatcherTests : public UnitTest { public: - OSCPatternMatcherTests() : UnitTest ("OSCAddress class / pattern matching") {} + OSCPatternMatcherTests() : UnitTest ("OSCAddress class / pattern matching", "OSC") {} void runTest() { diff --git a/modules/juce_osc/osc/juce_OSCArgument.cpp b/modules/juce_osc/osc/juce_OSCArgument.cpp index 56028aeb0c..1bde638129 100644 --- a/modules/juce_osc/osc/juce_OSCArgument.cpp +++ b/modules/juce_osc/osc/juce_OSCArgument.cpp @@ -88,7 +88,7 @@ const MemoryBlock& OSCArgument::getBlob() const noexcept class OSCArgumentTests : public UnitTest { public: - OSCArgumentTests() : UnitTest ("OSCArgument class") {} + OSCArgumentTests() : UnitTest ("OSCArgument class", "OSC") {} MemoryBlock getMemoryBlockWithRandomData (size_t numBytes) diff --git a/modules/juce_osc/osc/juce_OSCBundle.cpp b/modules/juce_osc/osc/juce_OSCBundle.cpp index ce1b139fd3..d2dcaf1ecf 100644 --- a/modules/juce_osc/osc/juce_OSCBundle.cpp +++ b/modules/juce_osc/osc/juce_OSCBundle.cpp @@ -111,7 +111,7 @@ const OSCBundle& OSCBundle::Element::getBundle() const class OSCBundleTests : public UnitTest { public: - OSCBundleTests() : UnitTest ("OSCBundle class") {} + OSCBundleTests() : UnitTest ("OSCBundle class", "OSC") {} void runTest() { @@ -214,7 +214,7 @@ static OSCBundleTests OSCBundleUnitTests; class OSCBundleElementTests : public UnitTest { public: - OSCBundleElementTests() : UnitTest ("OSCBundle::Element class") {} + OSCBundleElementTests() : UnitTest ("OSCBundle::Element class", "OSC") {} void runTest() { diff --git a/modules/juce_osc/osc/juce_OSCMessage.cpp b/modules/juce_osc/osc/juce_OSCMessage.cpp index 8204cdaf8a..b62b61e8bc 100644 --- a/modules/juce_osc/osc/juce_OSCMessage.cpp +++ b/modules/juce_osc/osc/juce_OSCMessage.cpp @@ -85,7 +85,7 @@ void OSCMessage::addArgument (OSCArgument arg) { arguments.add (arg); } class OSCMessageTests : public UnitTest { public: - OSCMessageTests() : UnitTest ("OSCMessage class") {} + OSCMessageTests() : UnitTest ("OSCMessage class", "OSC") {} void runTest() { diff --git a/modules/juce_osc/osc/juce_OSCReceiver.cpp b/modules/juce_osc/osc/juce_OSCReceiver.cpp index 02b53676fc..35da262ef0 100644 --- a/modules/juce_osc/osc/juce_OSCReceiver.cpp +++ b/modules/juce_osc/osc/juce_OSCReceiver.cpp @@ -234,7 +234,7 @@ namespace bundle.addElement (readElement()); auto newPos = getPosition(); - bytesRead += newPos - pos; + bytesRead += (size_t) (newPos - pos); pos = newPos; } @@ -635,7 +635,7 @@ void OSCReceiver::registerFormatErrorHandler (FormatErrorHandler handler) class OSCInputStreamTests : public UnitTest { public: - OSCInputStreamTests() : UnitTest ("OSCInputStream class") {} + OSCInputStreamTests() : UnitTest ("OSCInputStream class", "OSC") {} void runTest() { diff --git a/modules/juce_osc/osc/juce_OSCReceiver.h b/modules/juce_osc/osc/juce_OSCReceiver.h index fc3bbd5ab3..63871192bc 100644 --- a/modules/juce_osc/osc/juce_OSCReceiver.h +++ b/modules/juce_osc/osc/juce_OSCReceiver.h @@ -189,11 +189,7 @@ public: The arguments passed are the pointer to and the data of the buffer that the OSCReceiver has failed to parse. */ - #if JUCE_COMPILER_SUPPORTS_LAMBDAS typedef std::function FormatErrorHandler; - #else - typedef void (*FormatErrorHandler) (const char* data, int dataSize); - #endif /** Installs a custom error handler which is called in case the receiver encounters a stream it cannot parse as an OSC bundle or OSC message. diff --git a/modules/juce_osc/osc/juce_OSCSender.cpp b/modules/juce_osc/osc/juce_OSCSender.cpp index 80084c1c71..c0fe39854c 100644 --- a/modules/juce_osc/osc/juce_OSCSender.cpp +++ b/modules/juce_osc/osc/juce_OSCSender.cpp @@ -314,7 +314,7 @@ bool OSCSender::sendToIPAddress (const String& host, int port, const OSCBundle& class OSCBinaryWriterTests : public UnitTest { public: - OSCBinaryWriterTests() : UnitTest ("OSCBinaryWriter class") {} + OSCBinaryWriterTests() : UnitTest ("OSCBinaryWriter class", "OSC") {} void runTest() { @@ -641,7 +641,7 @@ static OSCBinaryWriterTests OSCBinaryWriterUnitTests; class OSCRoundTripTests : public UnitTest { public: - OSCRoundTripTests() : UnitTest ("OSCRoundTripTests class") {} + OSCRoundTripTests() : UnitTest ("OSCRoundTripTests class", "OSC") {} void runTest() { diff --git a/modules/juce_osc/osc/juce_OSCTimeTag.cpp b/modules/juce_osc/osc/juce_OSCTimeTag.cpp index 453b67be4b..35021a2ec8 100644 --- a/modules/juce_osc/osc/juce_OSCTimeTag.cpp +++ b/modules/juce_osc/osc/juce_OSCTimeTag.cpp @@ -80,7 +80,7 @@ bool OSCTimeTag::isImmediately() const noexcept class OSCTimeTagTests : public UnitTest { public: - OSCTimeTagTests() : UnitTest ("OSCTimeTag class") {} + OSCTimeTagTests() : UnitTest ("OSCTimeTag class", "OSC") {} void runTest() { diff --git a/modules/juce_product_unlocking/juce_product_unlocking.h b/modules/juce_product_unlocking/juce_product_unlocking.h index 3141f906de..e2231d4c3d 100644 --- a/modules/juce_product_unlocking/juce_product_unlocking.h +++ b/modules/juce_product_unlocking/juce_product_unlocking.h @@ -35,7 +35,7 @@ ID: juce_product_unlocking vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE Online marketplace support description: Classes for online product authentication website: http://www.juce.com/juce diff --git a/modules/juce_video/capture/juce_CameraDevice.cpp b/modules/juce_video/capture/juce_CameraDevice.cpp index 06cd075017..91955d59ee 100644 --- a/modules/juce_video/capture/juce_CameraDevice.cpp +++ b/modules/juce_video/capture/juce_CameraDevice.cpp @@ -24,9 +24,18 @@ ============================================================================== */ -CameraDevice::CameraDevice (const String& nm, int index, int minWidth, int minHeight, int maxWidth, int maxHeight, - bool highQuality) - : name (nm), pimpl (new Pimpl (name, index, minWidth, minHeight, maxWidth, maxHeight, highQuality)) + +#if JUCE_MAC || JUCE_IOS + #include "../native/juce_mac_CameraDevice.h" +#elif JUCE_WINDOWS + #include "../native/juce_win32_CameraDevice.h" +#elif JUCE_ANDROID + #include "../native/juce_android_CameraDevice.h" +#endif + +//============================================================================== +CameraDevice::CameraDevice (const String& nm, int index, int minWidth, int minHeight, int maxWidth, int maxHeight, bool useHighQuality) + : name (nm), pimpl (new Pimpl (name, index, minWidth, minHeight, maxWidth, maxHeight, useHighQuality)) { } @@ -81,14 +90,12 @@ StringArray CameraDevice::getAvailableDevices() CameraDevice* CameraDevice::openDevice (int index, int minWidth, int minHeight, int maxWidth, int maxHeight, - bool highQuality) + bool useHighQuality) { - ScopedPointer d (new CameraDevice (getAvailableDevices() [index], index, - minWidth, minHeight, maxWidth, maxHeight, - highQuality)); - - if (d->pimpl->openedOk()) - return d.release(); + if (ScopedPointer d = new CameraDevice (getAvailableDevices() [index], index, + minWidth, minHeight, maxWidth, maxHeight, useHighQuality)) + if (d->pimpl->openedOk()) + return d.release(); return nullptr; } diff --git a/modules/juce_video/juce_video.cpp b/modules/juce_video/juce_video.cpp index f876f73f15..6edb8a60d6 100644 --- a/modules/juce_video/juce_video.cpp +++ b/modules/juce_video/juce_video.cpp @@ -34,50 +34,23 @@ #endif #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1 +#define JUCE_CORE_INCLUDE_JNI_HELPERS 1 #define JUCE_CORE_INCLUDE_COM_SMART_PTR 1 #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1 #include "juce_video.h" -#if JUCE_MAC - #import +#if JUCE_MAC || JUCE_IOS + #import + #import //============================================================================== -#elif JUCE_WINDOWS - #if JUCE_QUICKTIME - /* If you've got an include error here, you probably need to install the QuickTime SDK and - add its header directory to your include path. - - Alternatively, if you don't need any QuickTime services, just set the JUCE_QUICKTIME flag to 0. - */ - #include - #include - #include - #include - #include - - /* If you've got QuickTime 7 installed, then these COM objects should be found in - the "\Program Files\Quicktime" directory. You'll need to add this directory to - your include search path to make these import statements work. - */ - #import - #import - - #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - #pragma comment (lib, "QTMLClient.lib") - #endif - #endif - - #if JUCE_USE_CAMERA || JUCE_DIRECTSHOW - /* If you're using the camera classes, you'll need access to a few DirectShow headers. +#elif JUCE_MSVC + /* If you're using the camera classes, you'll need access to a few DirectShow headers. These files are provided in the normal Windows SDK. */ - #include - #include - #endif - - #if JUCE_DIRECTSHOW && JUCE_MEDIAFOUNDATION - #include - #endif + #include + #include + #include #if JUCE_USE_CAMERA && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES #pragma comment (lib, "Strmiids.lib") @@ -88,7 +61,7 @@ #pragma comment (lib, "mfuuid.lib") #endif - #if JUCE_DIRECTSHOW && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES #pragma comment (lib, "strmiids.lib") #endif #endif @@ -99,32 +72,7 @@ using namespace juce; namespace juce { -#if JUCE_MAC || JUCE_IOS - #if JUCE_USE_CAMERA - #include "native/juce_mac_CameraDevice.mm" - #endif - - #if JUCE_MAC - #include "native/juce_mac_MovieComponent.mm" - #endif - -#elif JUCE_WINDOWS - - #if JUCE_USE_CAMERA - #include "native/juce_win32_CameraDevice.cpp" - #endif - - #if JUCE_DIRECTSHOW - #include "native/juce_win32_DirectShowComponent.cpp" - #endif - -#elif JUCE_LINUX - -#elif JUCE_ANDROID - #if JUCE_USE_CAMERA - #include "native/juce_android_CameraDevice.cpp" - #endif -#endif +#include "playback/juce_VideoComponent.cpp" #if JUCE_USE_CAMERA #include "capture/juce_CameraDevice.cpp" diff --git a/modules/juce_video/juce_video.h b/modules/juce_video/juce_video.h index 5c8852ab6c..6052ed1a3f 100644 --- a/modules/juce_video/juce_video.h +++ b/modules/juce_video/juce_video.h @@ -36,14 +36,15 @@ ID: juce_video vendor: juce - version: 5.0.2 + version: 5.1.0 name: JUCE video playback and capture classes description: Classes for playing video and capturing camera input. website: http://www.juce.com/juce license: GPL/Commercial dependencies: juce_data_structures juce_cryptography - OSXFrameworks: AVFoundation CoreMedia + OSXFrameworks: AVKit AVFoundation CoreMedia + iOSFrameworks: AVKit AVFoundation CoreMedia END_JUCE_MODULE_DECLARATION @@ -56,59 +57,26 @@ //============================================================================== #include -//============================================================================== -/** Config: JUCE_DIRECTSHOW - Enables DirectShow media-streaming architecture (MS Windows only). -*/ -#ifndef JUCE_DIRECTSHOW - #define JUCE_DIRECTSHOW 0 -#endif - -/** Config: JUCE_MEDIAFOUNDATION - Enables Media Foundation multimedia platform (Windows Vista and above). -*/ -#ifndef JUCE_MEDIAFOUNDATION - #define JUCE_MEDIAFOUNDATION 0 -#endif - -#if ! JUCE_WINDOWS - #undef JUCE_DIRECTSHOW - #undef JUCE_MEDIAFOUNDATION -#endif - -/** Config: JUCE_QUICKTIME - Enables the QuickTimeMovieComponent class (Mac and Windows). - If you're building on Windows, you'll need to have the Apple QuickTime SDK - installed, and its header files will need to be on your include path. -*/ -#if ! (defined (JUCE_QUICKTIME) || JUCE_LINUX || JUCE_IOS || JUCE_ANDROID || (JUCE_WINDOWS && ! JUCE_MSVC)) - #define JUCE_QUICKTIME 0 -#endif +//============================================================================= +#include "../juce_gui_extra/juce_gui_extra.h" +//============================================================================= /** Config: JUCE_USE_CAMERA Enables web-cam support using the CameraDevice class (Mac and Windows). */ -#if (JUCE_QUICKTIME || JUCE_WINDOWS) && ! defined (JUCE_USE_CAMERA) +#ifndef JUCE_USE_CAMERA #define JUCE_USE_CAMERA 0 #endif #if ! (JUCE_MAC || JUCE_WINDOWS) - #undef JUCE_QUICKTIME #undef JUCE_USE_CAMERA #endif -//============================================================================== +//============================================================================= namespace juce { -#if JUCE_DIRECTSHOW || DOXYGEN - #include "playback/juce_DirectShowComponent.h" -#endif - -#if JUCE_MAC || DOXYGEN - #include "playback/juce_MovieComponent.h" -#endif - +#include "playback/juce_VideoComponent.h" #include "capture/juce_CameraDevice.h" } diff --git a/modules/juce_video/native/juce_android_CameraDevice.cpp b/modules/juce_video/native/juce_android_CameraDevice.h similarity index 100% rename from modules/juce_video/native/juce_android_CameraDevice.cpp rename to modules/juce_video/native/juce_android_CameraDevice.h diff --git a/modules/juce_video/native/juce_mac_CameraDevice.h b/modules/juce_video/native/juce_mac_CameraDevice.h new file mode 100644 index 0000000000..fbd812c497 --- /dev/null +++ b/modules/juce_video/native/juce_mac_CameraDevice.h @@ -0,0 +1,276 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2017 - ROLI Ltd. + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +struct CameraDevice::Pimpl +{ + Pimpl (const String&, int /*index*/, int /*minWidth*/, int /*minHeight*/, + int /*maxWidth*/, int /*maxHeight*/, bool useHighQuality) + { + JUCE_AUTORELEASEPOOL + { + captureView = [[AVCaptureView alloc] init]; + session = captureView.session; + + session.sessionPreset = useHighQuality ? AVCaptureSessionPresetHigh + : AVCaptureSessionPresetMedium; + + refreshConnections(); + + static DelegateClass cls; + callbackDelegate = (id) [cls.createInstance() init]; + DelegateClass::setOwner (callbackDelegate, this); + } + } + + ~Pimpl() + { + [session stopRunning]; + removeImageCapture(); + removeMovieCapture(); + [session release]; + [callbackDelegate release]; + } + + bool openedOk() const noexcept { return openingError.isEmpty(); } + + void addImageCapture() + { + if (imageOutput == nil) + { + imageOutput = [[AVCaptureStillImageOutput alloc] init]; + auto* imageSettings = [[NSDictionary alloc] initWithObjectsAndKeys: AVVideoCodecJPEG, AVVideoCodecKey, nil]; + [imageOutput setOutputSettings: imageSettings]; + [imageSettings release]; + [session addOutput: imageOutput]; + } + } + + void addMovieCapture() + { + if (fileOutput == nil) + { + fileOutput = [[AVCaptureMovieFileOutput alloc] init]; + [session addOutput: fileOutput]; + } + } + + void removeImageCapture() + { + if (imageOutput != nil) + { + [session removeOutput: imageOutput]; + [imageOutput release]; + imageOutput = nil; + } + } + + void removeMovieCapture() + { + if (fileOutput != nil) + { + [session removeOutput: fileOutput]; + [fileOutput release]; + fileOutput = nil; + } + } + + void refreshConnections() + { + [session beginConfiguration]; + removeImageCapture(); + removeMovieCapture(); + addImageCapture(); + addMovieCapture(); + [session commitConfiguration]; + } + + void refreshIfNeeded() + { + if (getVideoConnection() == nullptr) + refreshConnections(); + } + + void startRecordingToFile (const File& file, int /*quality*/) + { + stopRecording(); + refreshIfNeeded(); + firstPresentationTime = Time::getCurrentTime(); + file.deleteFile(); + + [fileOutput startRecordingToOutputFileURL: createNSURLFromFile (file) + recordingDelegate: callbackDelegate]; + } + + void stopRecording() + { + if (isRecording) + { + [fileOutput stopRecording]; + isRecording = false; + } + } + + Time getTimeOfFirstRecordedFrame() const + { + return firstPresentationTime; + } + + AVCaptureConnection* getVideoConnection() const + { + if (imageOutput != nil) + for (AVCaptureConnection* connection in imageOutput.connections) + if ([connection isActive] && [connection isEnabled]) + for (AVCaptureInputPort* port in [connection inputPorts]) + if ([[port mediaType] isEqual: AVMediaTypeVideo]) + return connection; + + return nil; + } + + void handleImageCapture (const void* data, size_t size) + { + auto image = ImageFileFormat::loadFrom (data, size); + + const ScopedLock sl (listenerLock); + + if (! listeners.isEmpty()) + { + for (int i = listeners.size(); --i >= 0;) + if (auto* l = listeners[i]) + l->imageReceived (image); + + if (! listeners.isEmpty()) + triggerImageCapture(); + } + } + + void triggerImageCapture() + { + refreshIfNeeded(); + + if (auto* videoConnection = getVideoConnection()) + { + [imageOutput captureStillImageAsynchronouslyFromConnection: videoConnection + completionHandler: ^(CMSampleBufferRef sampleBuffer, NSError*) + { + auto buffer = CMSampleBufferGetDataBuffer (sampleBuffer); + size_t size = CMBlockBufferGetDataLength (buffer); + jassert (CMBlockBufferIsRangeContiguous (buffer, 0, size)); // TODO: need to add code to handle this if it happens + char* data = nullptr; + CMBlockBufferGetDataPointer (buffer, 0, &size, nullptr, &data); + handleImageCapture (data, size); + }]; + } + } + + void addListener (CameraDevice::Listener* listenerToAdd) + { + const ScopedLock sl (listenerLock); + listeners.addIfNotAlreadyThere (listenerToAdd); + + if (listeners.size() == 1) + triggerImageCapture(); + } + + void removeListener (CameraDevice::Listener* listenerToRemove) + { + const ScopedLock sl (listenerLock); + listeners.removeFirstMatchingValue (listenerToRemove); + } + + static StringArray getAvailableDevices() + { + StringArray results; + results.add ("default"); + return results; + } + + AVCaptureView* captureView = nil; + AVCaptureSession* session = nil; + AVCaptureMovieFileOutput* fileOutput = nil; + AVCaptureStillImageOutput* imageOutput = nil; + + id callbackDelegate = nil; + String openingError; + Time firstPresentationTime; + bool isRecording = false; + + Array listeners; + CriticalSection listenerLock; + +private: + //============================================================================== + struct DelegateClass : public ObjCClass + { + DelegateClass() : ObjCClass ("JUCECameraDelegate_") + { + addIvar ("owner"); + addProtocol (@protocol (AVCaptureFileOutputRecordingDelegate)); + + addMethod (@selector (captureOutput:didStartRecordingToOutputFileAtURL: fromConnections:), didStartRecordingToOutputFileAtURL, "v@:@@@"); + addMethod (@selector (captureOutput:didPauseRecordingToOutputFileAtURL: fromConnections:), didPauseRecordingToOutputFileAtURL, "v@:@@@"); + addMethod (@selector (captureOutput:didResumeRecordingToOutputFileAtURL: fromConnections:), didResumeRecordingToOutputFileAtURL, "v@:@@@"); + addMethod (@selector (captureOutput:willFinishRecordingToOutputFileAtURL:fromConnections:error:), willFinishRecordingToOutputFileAtURL, "v@:@@@@"); + + registerClass(); + } + + static void setOwner (id self, Pimpl* owner) { object_setInstanceVariable (self, "owner", owner); } + static Pimpl* getOwner (id self) { return getIvar (self, "owner"); } + + private: + static void didStartRecordingToOutputFileAtURL (id, SEL, AVCaptureFileOutput*, NSURL*, NSArray*) {} + static void didPauseRecordingToOutputFileAtURL (id, SEL, AVCaptureFileOutput*, NSURL*, NSArray*) {} + static void didResumeRecordingToOutputFileAtURL (id, SEL, AVCaptureFileOutput*, NSURL*, NSArray*) {} + static void willFinishRecordingToOutputFileAtURL (id, SEL, AVCaptureFileOutput*, NSURL*, NSArray*, NSError*) {} + }; + + JUCE_DECLARE_NON_COPYABLE (Pimpl) +}; + +struct CameraDevice::ViewerComponent : public NSViewComponent +{ + ViewerComponent (CameraDevice& d) + { + JUCE_AUTORELEASEPOOL + { + setSize (640, 480); + setView (d.pimpl->captureView); + } + } + + ~ViewerComponent() + { + setView (nil); + } + + JUCE_DECLARE_NON_COPYABLE (ViewerComponent) +}; + +String CameraDevice::getFileExtension() +{ + return ".mov"; +} diff --git a/modules/juce_video/native/juce_mac_CameraDevice.mm b/modules/juce_video/native/juce_mac_CameraDevice.mm deleted file mode 100644 index f49bfd18f1..0000000000 --- a/modules/juce_video/native/juce_mac_CameraDevice.mm +++ /dev/null @@ -1,353 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 5 End-User License - Agreement and JUCE 5 Privacy Policy (both updated and effective as of the - 27th April 2017). - - End User License Agreement: www.juce.com/juce-5-licence - Privacy Policy: www.juce.com/juce-5-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#if ! JUCE_QUICKTIME - #error "To support cameras in OSX you'll need to enable the JUCE_QUICKTIME flag" -#endif - -extern Image juce_createImageFromCIImage (CIImage*, int w, int h); - -struct CameraDevice::Pimpl -{ - Pimpl (const String&, const int index, int /*minWidth*/, int /*minHeight*/, int /*maxWidth*/, int /*maxHeight*/, - bool useHighQuality) - : input (nil), - audioDevice (nil), - audioInput (nil), - session (nil), - fileOutput (nil), - imageOutput (nil), - firstPresentationTime (0), - averageTimeOffset (0), - isRecording (false) - { - JUCE_AUTORELEASEPOOL - { - session = [[QTCaptureSession alloc] init]; - - NSArray* devs = [QTCaptureDevice inputDevicesWithMediaType: QTMediaTypeVideo]; - device = (QTCaptureDevice*) [devs objectAtIndex: index]; - - static DelegateClass cls; - callbackDelegate = [cls.createInstance() init]; - DelegateClass::setOwner (callbackDelegate, this); - - NSError* err = nil; - [device retain]; - [device open: &err]; - - if (err == nil) - { - input = [[QTCaptureDeviceInput alloc] initWithDevice: device]; - audioInput = [[QTCaptureDeviceInput alloc] initWithDevice: device]; - - [session addInput: input error: &err]; - - if (err == nil) - { - resetFile(); - imageOutput = useHighQuality ? [[QTCaptureDecompressedVideoOutput alloc] init] : - [[QTCaptureVideoPreviewOutput alloc] init]; - - [imageOutput setDelegate: callbackDelegate]; - - if (err == nil) - { - [session startRunning]; - return; - } - } - } - - openingError = nsStringToJuce ([err description]); - DBG (openingError); - } - } - - ~Pimpl() - { - [session stopRunning]; - [session removeOutput: imageOutput]; - - [session release]; - [input release]; - [device release]; - [audioDevice release]; - [audioInput release]; - [fileOutput release]; - [imageOutput release]; - [callbackDelegate release]; - } - - bool openedOk() const noexcept { return openingError.isEmpty(); } - - void resetFile() - { - [fileOutput recordToOutputFileURL: nil]; - [session removeOutput: fileOutput]; - [fileOutput release]; - fileOutput = [[QTCaptureMovieFileOutput alloc] init]; - - [session removeInput: audioInput]; - [audioInput release]; - audioInput = nil; - [audioDevice release]; - audioDevice = nil; - - [fileOutput setDelegate: callbackDelegate]; - } - - void addDefaultAudioInput() - { - NSError* err = nil; - audioDevice = [QTCaptureDevice defaultInputDeviceWithMediaType: QTMediaTypeSound]; - - if ([audioDevice open: &err]) - [audioDevice retain]; - else - audioDevice = nil; - - if (audioDevice != nil) - { - audioInput = [[QTCaptureDeviceInput alloc] initWithDevice: audioDevice]; - [session addInput: audioInput error: &err]; - } - } - - void startRecordingToFile (const File& file, int quality) - { - stopRecording(); - - firstPresentationTime = 0; - file.deleteFile(); - - // In some versions of QT (e.g. on 10.5), if you record video without audio, the speed comes - // out wrong, so we'll put some audio in there too.., - addDefaultAudioInput(); - - [session addOutput: fileOutput error: nil]; - - NSEnumerator* connectionEnumerator = [[fileOutput connections] objectEnumerator]; - - for (;;) - { - QTCaptureConnection* connection = [connectionEnumerator nextObject]; - if (connection == nil) - break; - - QTCompressionOptions* options = nil; - NSString* mediaType = [connection mediaType]; - - if ([mediaType isEqualToString: QTMediaTypeVideo]) - options = [QTCompressionOptions compressionOptionsWithIdentifier: - quality >= 1 ? nsStringLiteral ("QTCompressionOptionsSD480SizeH264Video") - : nsStringLiteral ("QTCompressionOptions240SizeH264Video")]; - else if ([mediaType isEqualToString: QTMediaTypeSound]) - options = [QTCompressionOptions compressionOptionsWithIdentifier: nsStringLiteral ("QTCompressionOptionsHighQualityAACAudio")]; - - [fileOutput setCompressionOptions: options forConnection: connection]; - } - - [fileOutput recordToOutputFileURL: [NSURL fileURLWithPath: juceStringToNS (file.getFullPathName())]]; - isRecording = true; - } - - void stopRecording() - { - if (isRecording) - { - resetFile(); - isRecording = false; - } - } - - Time getTimeOfFirstRecordedFrame() const - { - return firstPresentationTime != 0 ? Time (firstPresentationTime + averageTimeOffset) - : Time(); - } - - void addListener (CameraDevice::Listener* listenerToAdd) - { - const ScopedLock sl (listenerLock); - - if (listeners.size() == 0) - [session addOutput: imageOutput error: nil]; - - listeners.addIfNotAlreadyThere (listenerToAdd); - } - - void removeListener (CameraDevice::Listener* listenerToRemove) - { - const ScopedLock sl (listenerLock); - listeners.removeFirstMatchingValue (listenerToRemove); - - if (listeners.size() == 0) - [session removeOutput: imageOutput]; - } - - void callListeners (CIImage* frame, int w, int h) - { - Image image (juce_createImageFromCIImage (frame, w, h)); - - const ScopedLock sl (listenerLock); - - for (int i = listeners.size(); --i >= 0;) - { - CameraDevice::Listener* const l = listeners[i]; - - if (l != nullptr) - l->imageReceived (image); - } - } - - void captureBuffer (QTSampleBuffer* sampleBuffer) - { - const Time now (Time::getCurrentTime()); - - NSNumber* hosttime = (NSNumber*) [sampleBuffer attributeForKey: QTSampleBufferHostTimeAttribute]; - - int64 presentationTime = (hosttime != nil) - ? ((int64) AudioConvertHostTimeToNanos ([hosttime unsignedLongLongValue]) / 1000000 + 40) - : (([sampleBuffer presentationTime].timeValue * 1000) / [sampleBuffer presentationTime].timeScale + 50); - - const int64 timeDiff = now.toMilliseconds() - presentationTime; - - if (firstPresentationTime == 0) - { - firstPresentationTime = presentationTime; - averageTimeOffset = timeDiff; - } - else - { - averageTimeOffset = (averageTimeOffset * 120 + timeDiff * 8) / 128; - } - } - - static StringArray getAvailableDevices() - { - StringArray results; - NSArray* devs = [QTCaptureDevice inputDevicesWithMediaType: QTMediaTypeVideo]; - - for (int i = 0; i < (int) [devs count]; ++i) - { - QTCaptureDevice* dev = (QTCaptureDevice*) [devs objectAtIndex: i]; - results.add (nsStringToJuce ([dev localizedDisplayName])); - } - - return results; - } - - QTCaptureDevice* device; - QTCaptureDevice* audioDevice; - QTCaptureDeviceInput* input; - QTCaptureDeviceInput* audioInput; - QTCaptureSession* session; - QTCaptureMovieFileOutput* fileOutput; - QTCaptureOutput* imageOutput; - NSObject* callbackDelegate; - String openingError; - int64 firstPresentationTime, averageTimeOffset; - bool isRecording; - - Array listeners; - CriticalSection listenerLock; - -private: - //============================================================================== - struct DelegateClass : public ObjCClass - { - DelegateClass() : ObjCClass ("JUCEAppDelegate_") - { - addIvar ("owner"); - - addMethod (@selector (captureOutput:didOutputVideoFrame:withSampleBuffer:fromConnection:), - didOutputVideoFrame, "v@:@", @encode (CVImageBufferRef), "@@"); - addMethod (@selector (captureOutput:didOutputSampleBuffer:fromConnection:), - didOutputVideoFrame, "v@:@@@"); - - registerClass(); - } - - static void setOwner (id self, Pimpl* owner) { object_setInstanceVariable (self, "owner", owner); } - static Pimpl* getOwner (id self) { return getIvar (self, "owner"); } - - private: - static void didOutputVideoFrame (id self, SEL, QTCaptureOutput*, CVImageBufferRef videoFrame, - QTSampleBuffer*, QTCaptureConnection*) - { - Pimpl* const internal = getOwner (self); - - if (internal->listeners.size() > 0) - { - JUCE_AUTORELEASEPOOL - { - internal->callListeners ([CIImage imageWithCVImageBuffer: videoFrame], - (int) CVPixelBufferGetWidth (videoFrame), - (int) CVPixelBufferGetHeight (videoFrame)); - } - } - } - - static void didOutputSampleBuffer (id self, SEL, QTCaptureFileOutput*, QTSampleBuffer* sampleBuffer, QTCaptureConnection*) - { - getOwner (self)->captureBuffer (sampleBuffer); - } - }; - - JUCE_DECLARE_NON_COPYABLE (Pimpl) -}; - -struct CameraDevice::ViewerComponent : public NSViewComponent -{ - ViewerComponent (CameraDevice& d) - { - JUCE_AUTORELEASEPOOL - { - captureView = [[QTCaptureView alloc] init]; - [captureView setCaptureSession: d.pimpl->session]; - - setSize (640, 480); - setView (captureView); - } - } - - ~ViewerComponent() - { - setView (nil); - [captureView setCaptureSession: nil]; - [captureView release]; - } - - QTCaptureView* captureView; - - JUCE_DECLARE_NON_COPYABLE (ViewerComponent) -}; - -String CameraDevice::getFileExtension() -{ - return ".mov"; -} diff --git a/modules/juce_video/native/juce_mac_MovieComponent.mm b/modules/juce_video/native/juce_mac_MovieComponent.mm deleted file mode 100644 index 6852f32aeb..0000000000 --- a/modules/juce_video/native/juce_mac_MovieComponent.mm +++ /dev/null @@ -1,228 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 5 End-User License - Agreement and JUCE 5 Privacy Policy (both updated and effective as of the - 27th April 2017). - - End User License Agreement: www.juce.com/juce-5-licence - Privacy Policy: www.juce.com/juce-5-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -struct MovieComponent::Pimpl -{ - bool open (MovieComponent& parent, const String& newPath) - { - JUCE_AUTORELEASEPOOL - { - close(); - - NSString* videoFile = [NSString stringWithUTF8String: newPath.toUTF8()]; - NSURL* url = [NSURL fileURLWithPath: videoFile]; - - AVAsset* asset = [AVAsset assetWithURL: url]; - duration = CMTimeGetSeconds (asset.duration); - nativeSize = [[[asset tracksWithMediaType: AVMediaTypeVideo] objectAtIndex: 0] naturalSize]; - - if (duration <= 0) - return false; - - auto frame = CGRectMake (0, 0, nativeSize.width, nativeSize.height); - - view = [[NSView alloc] initWithFrame: NSRectFromCGRect (frame)]; - [view setHidden: NO]; - [view setNeedsDisplay: YES]; - [view setWantsLayer: YES]; - [view makeBackingLayer]; - - parent.setView (view); - path = newPath; - - player = [[AVPlayer alloc] initWithURL: url]; - player.actionAtItemEnd = AVPlayerActionAtItemEndPause; - player.masterClock = CMClockGetHostTimeClock(); - - if ([player respondsToSelector: @selector (setAutomaticallyWaitsToMinimizeStalling:)]) - [player performSelector: @selector (setAutomaticallyWaitsToMinimizeStalling:) - withObject: nil]; - - [player pause]; - - playerLayer = [[AVPlayerLayer playerLayerWithPlayer: player] retain]; - [playerLayer setFrame: frame]; - [playerLayer setHidden: NO]; - - [[view layer] addSublayer: playerLayer]; - - parent.resized(); - } - - return true; - } - - void close() - { - [playerLayer release]; - playerLayer = nil; - - [player release]; - player = nil; - - [view release]; - view = nil; - - playing = false; - duration = 0; - nativeSize = { 0, 0 }; - path = {}; - } - - String path; - NSView* view = nil; - AVPlayer* player = nil; - AVPlayerLayer* playerLayer = nil; - double duration = 0; - CGSize nativeSize = { 0, 0 }; - bool playing = false; -}; - -MovieComponent::MovieComponent() : pimpl (new Pimpl()) {} - -MovieComponent::~MovieComponent() -{ - closeMovie(); - pimpl = nullptr; -} - -bool MovieComponent::loadMovie (const File& file) -{ - return file.existsAsFile() - && pimpl->open (*this, file.getFullPathName()); -} - -bool MovieComponent::loadMovie (const URL& file) -{ - return pimpl->open (*this, file.toString (true)); -} - -void MovieComponent::closeMovie() -{ - setView (nullptr); - pimpl->close(); -} - -bool MovieComponent::isMovieOpen() const -{ - return pimpl->player != nil && pimpl->player.status != AVPlayerStatusFailed; -} - -String MovieComponent::getCurrentMoviePath() const -{ - return pimpl->path; -} - -void MovieComponent::play() -{ - pimpl->playing = true; - [pimpl->player play]; -} - -void MovieComponent::stop() -{ - pimpl->playing = false; - [pimpl->player pause]; -} - -double MovieComponent::getDuration() const -{ - return pimpl->duration; -} - -double MovieComponent::getPosition() const -{ - return CMTimeGetSeconds ([pimpl->player currentTime]); -} - -void MovieComponent::setPosition (double seconds) -{ - auto delta = std::abs (seconds - getPosition()); - auto newTime = CMTimeMakeWithSeconds (seconds, 600); - - if (! pimpl->playing) - { - [pimpl->player seekToTime: newTime - toleranceBefore: kCMTimeZero - toleranceAfter: kCMTimeZero]; - } - else if (delta > 0.035) - { - auto masterClock = CMClockGetTime (CMClockGetHostTimeClock()); - - try - { - [pimpl->player setRate: 1.0f - time: newTime - atHostTime: masterClock]; - } - catch (...) - { - // We should never end up in here, unless somehow automaticallyWaitsToMinimizeStalling - // got reset to YES - jassertfalse; - - if (delta > 0.3) - [pimpl->player seekToTime: newTime - toleranceBefore: kCMTimeZero - toleranceAfter: kCMTimeZero]; - } - } -} - -void MovieComponent::setVolume (float newVolume) -{ - pimpl->player.volume = static_cast (newVolume); -} - -float MovieComponent::getVolume() const -{ - return (float) pimpl->player.volume; -} - -Rectangle MovieComponent::getNativeSize() const -{ - return { 0, 0, roundToInt (pimpl->nativeSize.width), roundToInt (pimpl->nativeSize.height) }; -} - -void MovieComponent::setBoundsWithCorrectAspectRatio (Rectangle spaceToFitWithin, RectanglePlacement placement) -{ - auto nativeSize = getNativeSize(); - - setBounds ((spaceToFitWithin.isEmpty() || nativeSize.isEmpty()) - ? spaceToFitWithin - : placement.appliedTo (nativeSize, spaceToFitWithin)); -} - -void MovieComponent::resized() -{ - JUCE_AUTORELEASEPOOL - { - auto frame = CGRectMake (0, 0, (CGFloat) getWidth(), (CGFloat) getHeight()); - [pimpl->view setFrame: NSRectFromCGRect (frame)]; - [pimpl->playerLayer setFrame: frame]; - } -} diff --git a/modules/juce_video/native/juce_mac_Video.h b/modules/juce_video/native/juce_mac_Video.h new file mode 100644 index 0000000000..c6d50e76ed --- /dev/null +++ b/modules/juce_video/native/juce_mac_Video.h @@ -0,0 +1,199 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2015 - ROLI Ltd. + + Permission is granted to use this software under the terms of either: + a) the GPL v2 (or any later version) + b) the Affero GPL v3 + + Details of these licenses can be found at: www.gnu.org/licenses + + JUCE is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + ------------------------------------------------------------------------------ + + To release a closed-source product which uses JUCE, commercial licenses are + available: visit www.juce.com for more information. + + ============================================================================== +*/ + +#if JUCE_IOS + using BaseClass = UIViewComponent; +#else + using BaseClass = NSViewComponent; +#endif + +struct VideoComponent::Pimpl : public BaseClass +{ + Pimpl() + { + setVisible (true); + + #if JUCE_MAC && JUCE_32BIT + auto view = [[NSView alloc] init]; // 32-bit builds don't have AVPlayerView, so need to use a layer + controller = [[AVPlayerLayer alloc] init]; + setView (view); + [view setNextResponder: [view superview]]; + [view setWantsLayer: YES]; + [view setLayer: controller]; + [view release]; + #elif JUCE_MAC + controller = [[AVPlayerView alloc] init]; + setView (controller); + [controller setNextResponder: [controller superview]]; + [controller setWantsLayer: YES]; + #else + controller = [[AVPlayerViewController alloc] init]; + setView ([controller view]); + #endif + } + + ~Pimpl() + { + close(); + setView (nil); + [controller release]; + } + + Result load (const File& file) + { + auto r = load (createNSURLFromFile (file)); + + if (r.wasOk()) + currentFile = file; + + return r; + } + + Result load (const URL& url) + { + auto r = load ([NSURL URLWithString: juceStringToNS (url.toString (true))]); + + if (r.wasOk()) + currentURL = url; + + return r; + } + + Result load (NSURL* url) + { + if (url != nil) + { + close(); + + if (auto* player = [AVPlayer playerWithURL: url]) + { + [controller setPlayer: player]; + return Result::ok(); + } + } + + return Result::fail ("Couldn't open movie"); + } + + void close() + { + stop(); + [controller setPlayer: nil]; + currentFile = File(); + currentURL = {}; + } + + bool isOpen() const noexcept { return getAVPlayer() != nil; } + bool isPlaying() const noexcept { return getSpeed() != 0; } + + void play() noexcept { [getAVPlayer() play]; } + void stop() noexcept { [getAVPlayer() pause]; } + + void setPosition (double newPosition) + { + if (auto* p = getAVPlayer()) + { + CMTime t = { (CMTimeValue) (100000.0 * newPosition), + (CMTimeScale) 100000, kCMTimeFlags_Valid }; + + [p seekToTime: t + toleranceBefore: kCMTimeZero + toleranceAfter: kCMTimeZero]; + } + } + + double getPosition() const + { + if (auto* p = getAVPlayer()) + return toSeconds ([p currentTime]); + + return 0.0; + } + + void setSpeed (double newSpeed) + { + [getAVPlayer() setRate: (float) newSpeed]; + } + + double getSpeed() const + { + if (auto* p = getAVPlayer()) + return [p rate]; + + return 0.0; + } + + Rectangle getNativeSize() const + { + if (auto* player = getAVPlayer()) + { + auto s = [[player currentItem] presentationSize]; + return { (int) s.width, (int) s.height }; + } + + return {}; + } + + double getDuration() const + { + if (auto* player = getAVPlayer()) + return toSeconds ([[player currentItem] duration]); + + return 0.0; + } + + void setVolume (float newVolume) + { + [getAVPlayer() setVolume: newVolume]; + } + + float getVolume() const + { + if (auto* p = getAVPlayer()) + return [p volume]; + + return 0.0f; + } + + File currentFile; + URL currentURL; + +private: + #if JUCE_IOS + AVPlayerViewController* controller = nil; + #elif JUCE_32BIT + AVPlayerLayer* controller = nil; + #else + AVPlayerView* controller = nil; + #endif + + AVPlayer* getAVPlayer() const noexcept { return [controller player]; } + + static double toSeconds (const CMTime& t) noexcept + { + return t.timescale != 0 ? (t.value / (double) t.timescale) : 0.0; + } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl) +}; diff --git a/modules/juce_video/native/juce_win32_CameraDevice.cpp b/modules/juce_video/native/juce_win32_CameraDevice.h similarity index 96% rename from modules/juce_video/native/juce_win32_CameraDevice.cpp rename to modules/juce_video/native/juce_win32_CameraDevice.h index 1864a43b5c..f49fe82c78 100644 --- a/modules/juce_video/native/juce_win32_CameraDevice.cpp +++ b/modules/juce_video/native/juce_win32_CameraDevice.h @@ -494,9 +494,8 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster return devs; } - class GrabberCallback : public ComBaseClassHelperBase + struct GrabberCallback : public ComBaseClassHelperBase { - public: GrabberCallback (Pimpl& p) : ComBaseClassHelperBase (0), owner (p) {} @@ -516,7 +515,6 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster return S_OK; } - private: Pimpl& owner; JUCE_DECLARE_NON_COPYABLE (GrabberCallback) diff --git a/modules/juce_video/native/juce_win32_DirectShowComponent.cpp b/modules/juce_video/native/juce_win32_DirectShowComponent.cpp deleted file mode 100644 index 2641a71f0c..0000000000 --- a/modules/juce_video/native/juce_win32_DirectShowComponent.cpp +++ /dev/null @@ -1,928 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 5 End-User License - Agreement and JUCE 5 Privacy Policy (both updated and effective as of the - 27th April 2017). - - End User License Agreement: www.juce.com/juce-5-licence - Privacy Policy: www.juce.com/juce-5-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -namespace DirectShowHelpers -{ - bool checkDShowAvailability() - { - ComSmartPtr graph; - return SUCCEEDED (graph.CoCreateInstance (CLSID_FilterGraph)); - } - - //============================================================================== - class VideoRenderer - { - public: - VideoRenderer() {} - virtual ~VideoRenderer() {} - - virtual HRESULT create (ComSmartPtr& graphBuilder, - ComSmartPtr& baseFilter, HWND hwnd) = 0; - - virtual void setVideoWindow (HWND hwnd) = 0; - virtual void setVideoPosition (HWND hwnd, long videoWidth, long videoHeight) = 0; - virtual void repaintVideo (HWND hwnd, HDC hdc) = 0; - virtual void displayModeChanged() = 0; - virtual HRESULT getVideoSize (long& videoWidth, long& videoHeight) = 0; - }; - - //============================================================================== - class VMR7 : public VideoRenderer - { - public: - VMR7() {} - - HRESULT create (ComSmartPtr& graphBuilder, - ComSmartPtr& baseFilter, HWND hwnd) - { - ComSmartPtr filterConfig; - - HRESULT hr = baseFilter.CoCreateInstance (CLSID_VideoMixingRenderer); - - if (SUCCEEDED (hr)) hr = graphBuilder->AddFilter (baseFilter, L"VMR-7"); - if (SUCCEEDED (hr)) hr = baseFilter.QueryInterface (filterConfig); - if (SUCCEEDED (hr)) hr = filterConfig->SetRenderingMode (VMRMode_Windowless); - if (SUCCEEDED (hr)) hr = baseFilter.QueryInterface (windowlessControl); - if (SUCCEEDED (hr)) hr = windowlessControl->SetVideoClippingWindow (hwnd); - if (SUCCEEDED (hr)) hr = windowlessControl->SetAspectRatioMode (VMR_ARMODE_LETTER_BOX); - - return hr; - } - - void setVideoWindow (HWND hwnd) - { - windowlessControl->SetVideoClippingWindow (hwnd); - } - - void setVideoPosition (HWND hwnd, long videoWidth, long videoHeight) - { - RECT src, dest; - - SetRect (&src, 0, 0, videoWidth, videoHeight); - GetClientRect (hwnd, &dest); - - windowlessControl->SetVideoPosition (&src, &dest); - } - - void repaintVideo (HWND hwnd, HDC hdc) - { - windowlessControl->RepaintVideo (hwnd, hdc); - } - - void displayModeChanged() - { - windowlessControl->DisplayModeChanged(); - } - - HRESULT getVideoSize (long& videoWidth, long& videoHeight) - { - return windowlessControl->GetNativeVideoSize (&videoWidth, &videoHeight, nullptr, nullptr); - } - - private: - ComSmartPtr windowlessControl; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VMR7) - }; - - - //============================================================================== -#if JUCE_MEDIAFOUNDATION - class EVR : public VideoRenderer - { - public: - EVR() {} - - HRESULT create (ComSmartPtr& graphBuilder, - ComSmartPtr& baseFilter, HWND hwnd) - { - ComSmartPtr getService; - - HRESULT hr = baseFilter.CoCreateInstance (CLSID_EnhancedVideoRenderer); - - if (SUCCEEDED (hr)) hr = graphBuilder->AddFilter (baseFilter, L"EVR"); - if (SUCCEEDED (hr)) hr = baseFilter.QueryInterface (getService); - if (SUCCEEDED (hr)) hr = getService->GetService (MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl, - (LPVOID*) videoDisplayControl.resetAndGetPointerAddress()); - if (SUCCEEDED (hr)) hr = videoDisplayControl->SetVideoWindow (hwnd); - if (SUCCEEDED (hr)) hr = videoDisplayControl->SetAspectRatioMode (MFVideoARMode_PreservePicture); - - return hr; - } - - void setVideoWindow (HWND hwnd) - { - videoDisplayControl->SetVideoWindow (hwnd); - } - - void setVideoPosition (HWND hwnd, long /*videoWidth*/, long /*videoHeight*/) - { - const MFVideoNormalizedRect src = { 0.0f, 0.0f, 1.0f, 1.0f }; - - RECT dest; - GetClientRect (hwnd, &dest); - - videoDisplayControl->SetVideoPosition (&src, &dest); - } - - void repaintVideo (HWND /*hwnd*/, HDC /*hdc*/) - { - videoDisplayControl->RepaintVideo(); - } - - void displayModeChanged() {} - - HRESULT getVideoSize (long& videoWidth, long& videoHeight) - { - SIZE sz; - HRESULT hr = videoDisplayControl->GetNativeVideoSize (&sz, nullptr); - videoWidth = sz.cx; - videoHeight = sz.cy; - return hr; - } - - private: - ComSmartPtr videoDisplayControl; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EVR) - }; -#endif -} - - -//============================================================================== -class DirectShowComponent::DirectShowContext : public AsyncUpdater -{ -public: - DirectShowContext (DirectShowComponent& c, VideoRendererType renderType) - : component (c), - hwnd (0), - hdc (0), - state (uninitializedState), - hasVideo (false), - videoWidth (0), - videoHeight (0), - type (renderType), - needToUpdateViewport (true), - needToRecreateNativeWindow (false) - { - CoInitialize (0); - - if (type == dshowDefault) - { - type = dshowVMR7; - - #if JUCE_MEDIAFOUNDATION - if (SystemStats::getOperatingSystemType() >= SystemStats::WinVista) - type = dshowEVR; - #endif - } - } - - ~DirectShowContext() - { - release(); - CoUninitialize(); - } - - //============================================================================== - void updateWindowPosition (const Rectangle& newBounds) - { - nativeWindow->setWindowPosition (newBounds); - } - - void showWindow (bool shouldBeVisible) - { - nativeWindow->showWindow (shouldBeVisible); - } - - //============================================================================== - void repaint() - { - if (hasVideo) - videoRenderer->repaintVideo (nativeWindow->getHandle(), nativeWindow->getContext()); - } - - void updateVideoPosition() - { - if (hasVideo) - videoRenderer->setVideoPosition (nativeWindow->getHandle(), videoWidth, videoHeight); - } - - void displayResolutionChanged() - { - if (hasVideo) - videoRenderer->displayModeChanged(); - } - - //============================================================================== - void peerChanged() - { - deleteNativeWindow(); - - mediaEvent->SetNotifyWindow (0, 0, 0); - if (videoRenderer != nullptr) - videoRenderer->setVideoWindow (nullptr); - - createNativeWindow(); - - mediaEvent->SetNotifyWindow ((OAHWND) hwnd, graphEventID, 0); - if (videoRenderer != nullptr) - videoRenderer->setVideoWindow (hwnd); - } - - void handleAsyncUpdate() override - { - if (hwnd != 0) - { - if (needToRecreateNativeWindow) - { - peerChanged(); - needToRecreateNativeWindow = false; - } - - if (needToUpdateViewport) - { - updateVideoPosition(); - needToUpdateViewport = false; - } - - repaint(); - } - else - { - triggerAsyncUpdate(); - } - } - - void recreateNativeWindowAsync() - { - needToRecreateNativeWindow = true; - triggerAsyncUpdate(); - } - - void updateContextPosition() - { - needToUpdateViewport = true; - triggerAsyncUpdate(); - } - - //============================================================================== - bool loadFile (const String& fileOrURLPath) - { - jassert (state == uninitializedState); - - if (! createNativeWindow()) - return false; - - HRESULT hr = graphBuilder.CoCreateInstance (CLSID_FilterGraph); - - // basic playback interfaces - if (SUCCEEDED (hr)) hr = graphBuilder.QueryInterface (mediaControl); - if (SUCCEEDED (hr)) hr = graphBuilder.QueryInterface (mediaPosition); - if (SUCCEEDED (hr)) hr = graphBuilder.QueryInterface (mediaEvent); - if (SUCCEEDED (hr)) hr = graphBuilder.QueryInterface (basicAudio); - - // video renderer interface - if (SUCCEEDED (hr)) - { - #if JUCE_MEDIAFOUNDATION - if (type == dshowEVR) - videoRenderer = new DirectShowHelpers::EVR(); - else - #endif - videoRenderer = new DirectShowHelpers::VMR7(); - - hr = videoRenderer->create (graphBuilder, baseFilter, hwnd); - } - - // build filter graph - if (SUCCEEDED (hr)) - { - hr = graphBuilder->RenderFile (fileOrURLPath.toWideCharPointer(), nullptr); - - if (FAILED (hr)) - { - // Annoyingly, if we don't run the msg loop between failing and deleting the window, the - // whole OS message-dispatch system gets itself into a state, and refuses to deliver any - // more messages for the whole app. (That's what happens in Win7, anyway) - MessageManager::getInstance()->runDispatchLoopUntil (200); - } - } - - // remove video renderer if not connected (no video) - if (SUCCEEDED (hr)) - { - if (isRendererConnected()) - { - hasVideo = true; - hr = videoRenderer->getVideoSize (videoWidth, videoHeight); - } - else - { - hasVideo = false; - graphBuilder->RemoveFilter (baseFilter); - videoRenderer = nullptr; - baseFilter = nullptr; - } - } - - // set window to receive events - if (SUCCEEDED (hr)) - hr = mediaEvent->SetNotifyWindow ((OAHWND) hwnd, graphEventID, 0); - - if (SUCCEEDED (hr)) - { - state = stoppedState; - pause(); - return true; - } - - // Note that if you're trying to open a file and this method fails, you may - // just need to install a suitable codec. It seems that by default DirectShow - // doesn't support a very good range of formats. - release(); - return false; - } - - void release() - { - if (mediaControl != nullptr) - mediaControl->Stop(); - - if (mediaEvent != nullptr) - mediaEvent->SetNotifyWindow (0, 0, 0); - - if (videoRenderer != nullptr) - videoRenderer->setVideoWindow (0); - - hasVideo = false; - videoRenderer = nullptr; - - baseFilter = nullptr; - basicAudio = nullptr; - mediaEvent = nullptr; - mediaPosition = nullptr; - mediaControl = nullptr; - graphBuilder = nullptr; - - state = uninitializedState; - - videoWidth = 0; - videoHeight = 0; - - if (nativeWindow != nullptr) - deleteNativeWindow(); - } - - void graphEventProc() - { - LONG ec; - LONG_PTR p1, p2; - - jassert (mediaEvent != nullptr); - - while (SUCCEEDED (mediaEvent->GetEvent (&ec, &p1, &p2, 0))) - { - mediaEvent->FreeEventParams (ec, p1, p2); - - switch (ec) - { - case EC_REPAINT: - component.repaint(); - break; - - case EC_COMPLETE: - if (component.isLooping()) - component.goToStart(); - else - component.stop(); - break; - - case EC_USERABORT: - case EC_ERRORABORT: - case EC_ERRORABORTEX: - component.closeMovie(); - break; - - default: - break; - } - } - } - - //============================================================================== - void run() - { - mediaControl->Run(); - state = runningState; - } - - void stop() - { - mediaControl->Stop(); - state = stoppedState; - } - - void pause() - { - mediaControl->Pause(); - state = pausedState; - } - - //============================================================================== - bool isInitialised() const noexcept { return state != uninitializedState; } - bool isRunning() const noexcept { return state == runningState; } - bool isPaused() const noexcept { return state == pausedState; } - bool isStopped() const noexcept { return state == stoppedState; } - bool containsVideo() const noexcept { return hasVideo; } - int getVideoWidth() const noexcept { return (int) videoWidth; } - int getVideoHeight() const noexcept { return (int) videoHeight; } - - //============================================================================== - double getDuration() const - { - REFTIME duration; - mediaPosition->get_Duration (&duration); - return duration; - } - - double getPosition() const - { - REFTIME seconds; - mediaPosition->get_CurrentPosition (&seconds); - return seconds; - } - - //============================================================================== - void setSpeed (const float newSpeed) { mediaPosition->put_Rate (newSpeed); } - void setPosition (const double seconds) { mediaPosition->put_CurrentPosition (seconds); } - void setVolume (const float newVolume) { basicAudio->put_Volume (convertToDShowVolume (newVolume)); } - - // in DirectShow, full volume is 0, silence is -10000 - static long convertToDShowVolume (const float vol) noexcept - { - if (vol >= 1.0f) return 0; - if (vol <= 0.0f) return -10000; - - return roundToInt ((vol * 10000.0f) - 10000.0f); - } - - float getVolume() const - { - long volume; - basicAudio->get_Volume (&volume); - return (volume + 10000) / 10000.0f; - } - -private: - //============================================================================== - enum { graphEventID = WM_APP + 0x43f0 }; - - DirectShowComponent& component; - HWND hwnd; - HDC hdc; - - enum State { uninitializedState, runningState, pausedState, stoppedState }; - State state; - - bool hasVideo; - long videoWidth, videoHeight; - - VideoRendererType type; - - ComSmartPtr graphBuilder; - ComSmartPtr mediaControl; - ComSmartPtr mediaPosition; - ComSmartPtr mediaEvent; - ComSmartPtr basicAudio; - ComSmartPtr baseFilter; - - ScopedPointer videoRenderer; - - bool needToUpdateViewport, needToRecreateNativeWindow; - - //============================================================================== - class NativeWindowClass : private DeletedAtShutdown - { - public: - bool isRegistered() const noexcept { return atom != 0; } - LPCTSTR getWindowClassName() const noexcept { return (LPCTSTR) MAKELONG (atom, 0); } - - juce_DeclareSingleton_SingleThreaded_Minimal (NativeWindowClass) - - private: - NativeWindowClass() - : atom (0) - { - String windowClassName ("JUCE_DIRECTSHOW_"); - windowClassName << (int) (Time::currentTimeMillis() & 0x7fffffff); - - HINSTANCE moduleHandle = (HINSTANCE) Process::getCurrentModuleInstanceHandle(); - - TCHAR moduleFile [1024] = { 0 }; - GetModuleFileName (moduleHandle, moduleFile, 1024); - - WNDCLASSEX wcex = { 0 }; - wcex.cbSize = sizeof (wcex); - wcex.style = CS_OWNDC; - wcex.lpfnWndProc = (WNDPROC) wndProc; - wcex.lpszClassName = windowClassName.toWideCharPointer(); - wcex.hInstance = moduleHandle; - - atom = RegisterClassEx (&wcex); - jassert (atom != 0); - } - - ~NativeWindowClass() - { - if (atom != 0) - UnregisterClass (getWindowClassName(), (HINSTANCE) Process::getCurrentModuleInstanceHandle()); - - clearSingletonInstance(); - } - - static LRESULT CALLBACK wndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) - { - if (DirectShowContext* const c = (DirectShowContext*) GetWindowLongPtr (hwnd, GWLP_USERDATA)) - { - switch (msg) - { - case WM_NCHITTEST: return HTTRANSPARENT; - case WM_ERASEBKGND: return 1; - case WM_DISPLAYCHANGE: c->displayResolutionChanged(); break; - case graphEventID: c->graphEventProc(); return 0; - default: break; - } - } - - return DefWindowProc (hwnd, msg, wParam, lParam); - } - - ATOM atom; - - JUCE_DECLARE_NON_COPYABLE (NativeWindowClass) - }; - - //============================================================================== - class NativeWindow - { - public: - NativeWindow (HWND parentToAddTo, void* const userData) - : hwnd (0), hdc (0) - { - NativeWindowClass* const wc = NativeWindowClass::getInstance(); - - if (wc->isRegistered()) - { - DWORD exstyle = 0; - DWORD windowType = WS_CHILD; - - hwnd = CreateWindowEx (exstyle, wc->getWindowClassName(), - L"", windowType, 0, 0, 0, 0, parentToAddTo, 0, - (HINSTANCE) Process::getCurrentModuleInstanceHandle(), 0); - - if (hwnd != 0) - { - hdc = GetDC (hwnd); - SetWindowLongPtr (hwnd, GWLP_USERDATA, (LONG_PTR) userData); - } - } - - jassert (hwnd != 0); - } - - ~NativeWindow() - { - if (hwnd != 0) - { - SetWindowLongPtr (hwnd, GWLP_USERDATA, (LONG_PTR) 0); - DestroyWindow (hwnd); - } - } - - HWND getHandle() const noexcept { return hwnd; } - HDC getContext() const noexcept { return hdc; } - - void setWindowPosition (const Rectangle& newBounds) - { - SetWindowPos (hwnd, 0, newBounds.getX(), newBounds.getY(), - newBounds.getWidth(), newBounds.getHeight(), - SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER); - } - - void showWindow (const bool shouldBeVisible) - { - ShowWindow (hwnd, shouldBeVisible ? SW_SHOWNA : SW_HIDE); - } - - private: - HWND hwnd; - HDC hdc; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NativeWindow) - }; - - ScopedPointer nativeWindow; - - //============================================================================== - bool createNativeWindow() - { - jassert (nativeWindow == nullptr); - - if (ComponentPeer* const topLevelPeer = component.getTopLevelComponent()->getPeer()) - { - nativeWindow = new NativeWindow ((HWND) topLevelPeer->getNativeHandle(), this); - - hwnd = nativeWindow->getHandle(); - - if (hwnd != 0) - { - hdc = GetDC (hwnd); - component.updateContextPosition(); - component.showContext (component.isShowing()); - return true; - } - else - { - nativeWindow = nullptr; - } - } - else - { - jassertfalse; - } - - return false; - } - - void deleteNativeWindow() - { - jassert (nativeWindow != nullptr); - ReleaseDC (hwnd, hdc); - hwnd = 0; - hdc = 0; - nativeWindow = nullptr; - } - - bool isRendererConnected() - { - ComSmartPtr enumPins; - - HRESULT hr = baseFilter->EnumPins (enumPins.resetAndGetPointerAddress()); - - if (SUCCEEDED (hr)) - hr = enumPins->Reset(); - - ComSmartPtr pin; - - while (SUCCEEDED (hr) - && enumPins->Next (1, pin.resetAndGetPointerAddress(), nullptr) == S_OK) - { - ComSmartPtr otherPin; - - hr = pin->ConnectedTo (otherPin.resetAndGetPointerAddress()); - - if (SUCCEEDED (hr)) - { - PIN_DIRECTION direction; - hr = pin->QueryDirection (&direction); - - if (SUCCEEDED (hr) && direction == PINDIR_INPUT) - return true; - } - else if (hr == VFW_E_NOT_CONNECTED) - { - hr = S_OK; - } - } - - return false; - } - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DirectShowContext) -}; - -juce_ImplementSingleton_SingleThreaded (DirectShowComponent::DirectShowContext::NativeWindowClass) - - -//============================================================================== -class DirectShowComponent::DirectShowComponentWatcher : public ComponentMovementWatcher -{ -public: - DirectShowComponentWatcher (DirectShowComponent* const c) - : ComponentMovementWatcher (c), - owner (c) - { - } - - void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override - { - if (owner->videoLoaded) - owner->updateContextPosition(); - } - - void componentPeerChanged() override - { - if (owner->videoLoaded) - owner->recreateNativeWindowAsync(); - } - - void componentVisibilityChanged() override - { - if (owner->videoLoaded) - owner->showContext (owner->isShowing()); - } - -private: - DirectShowComponent* const owner; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DirectShowComponentWatcher) -}; - - -//============================================================================== -DirectShowComponent::DirectShowComponent (VideoRendererType type) - : videoLoaded (false), - looping (false) -{ - setOpaque (true); - context = new DirectShowContext (*this, type); - componentWatcher = new DirectShowComponentWatcher (this); -} - -DirectShowComponent::~DirectShowComponent() -{ - componentWatcher = nullptr; -} - -bool DirectShowComponent::isDirectShowAvailable() -{ - static bool isDSAvailable = DirectShowHelpers::checkDShowAvailability(); - return isDSAvailable; -} - -void DirectShowComponent::recreateNativeWindowAsync() -{ - context->recreateNativeWindowAsync(); - repaint(); -} - -void DirectShowComponent::updateContextPosition() -{ - context->updateContextPosition(); - - if (getWidth() > 0 && getHeight() > 0) - if (ComponentPeer* peer = getTopLevelComponent()->getPeer()) - context->updateWindowPosition (peer->getAreaCoveredBy (*this)); -} - -void DirectShowComponent::showContext (const bool shouldBeVisible) -{ - context->showWindow (shouldBeVisible); -} - -void DirectShowComponent::paint (Graphics& g) -{ - if (videoLoaded) - context->handleUpdateNowIfNeeded(); - else - g.fillAll (Colours::grey); -} - -//============================================================================== -bool DirectShowComponent::loadMovie (const String& fileOrURLPath) -{ - closeMovie(); - - videoLoaded = context->loadFile (fileOrURLPath); - - if (videoLoaded) - { - videoPath = fileOrURLPath; - context->updateVideoPosition(); - } - - return videoLoaded; -} - -bool DirectShowComponent::loadMovie (const File& videoFile) -{ - return loadMovie (videoFile.getFullPathName()); -} - -bool DirectShowComponent::loadMovie (const URL& videoURL) -{ - return loadMovie (videoURL.toString (false)); -} - -void DirectShowComponent::closeMovie() -{ - if (videoLoaded) - context->release(); - - videoLoaded = false; - videoPath.clear(); -} - -//============================================================================== -File DirectShowComponent::getCurrentMoviePath() const { return videoPath; } -bool DirectShowComponent::isMovieOpen() const { return videoLoaded; } -double DirectShowComponent::getMovieDuration() const { return videoLoaded ? context->getDuration() : 0.0; } -void DirectShowComponent::setLooping (const bool shouldLoop) { looping = shouldLoop; } -bool DirectShowComponent::isLooping() const { return looping; } - -void DirectShowComponent::getMovieNormalSize (int &width, int &height) const -{ - width = context->getVideoWidth(); - height = context->getVideoHeight(); -} - -//============================================================================== -void DirectShowComponent::setBoundsWithCorrectAspectRatio (const Rectangle& spaceToFitWithin, - RectanglePlacement placement) -{ - int normalWidth, normalHeight; - getMovieNormalSize (normalWidth, normalHeight); - - const Rectangle normalSize (0, 0, normalWidth, normalHeight); - - if (! (spaceToFitWithin.isEmpty() || normalSize.isEmpty())) - setBounds (placement.appliedTo (normalSize, spaceToFitWithin)); - else - setBounds (spaceToFitWithin); -} - -//============================================================================== -void DirectShowComponent::play() -{ - if (videoLoaded) - context->run(); -} - -void DirectShowComponent::stop() -{ - if (videoLoaded) - context->pause(); -} - -bool DirectShowComponent::isPlaying() const -{ - return context->isRunning(); -} - -void DirectShowComponent::goToStart() -{ - setPosition (0.0); -} - -void DirectShowComponent::setPosition (const double seconds) -{ - if (videoLoaded) - context->setPosition (seconds); -} - -double DirectShowComponent::getPosition() const -{ - return videoLoaded ? context->getPosition() : 0.0; -} - -void DirectShowComponent::setSpeed (const float newSpeed) -{ - if (videoLoaded) - context->setSpeed (newSpeed); -} - -void DirectShowComponent::setMovieVolume (const float newVolume) -{ - if (videoLoaded) - context->setVolume (newVolume); -} - -float DirectShowComponent::getMovieVolume() const -{ - return videoLoaded ? context->getVolume() : 0.0f; -} diff --git a/modules/juce_video/native/juce_win32_Video.h b/modules/juce_video/native/juce_win32_Video.h new file mode 100644 index 0000000000..f71f9cd385 --- /dev/null +++ b/modules/juce_video/native/juce_win32_Video.h @@ -0,0 +1,892 @@ +/* + ============================================================================== + + + This file is part of the JUCE library. + Copyright (c) 2015 - ROLI Ltd. + + Permission is granted to use this software under the terms of either: + a) the GPL v2 (or any later version) + b) the Affero GPL v3 + + Details of these licenses can be found at: www.gnu.org/licenses + + JUCE is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + ------------------------------------------------------------------------------ + + To release a closed-source product which uses JUCE, commercial licenses are + available: visit www.juce.com for more information. + + ============================================================================== +*/ + +namespace VideoRenderers +{ + //====================================================================== + struct Base + { + virtual ~Base() {} + + virtual HRESULT create (ComSmartPtr&, ComSmartPtr&, HWND) = 0; + virtual void setVideoWindow (HWND) = 0; + virtual void setVideoPosition (HWND) = 0; + virtual void repaintVideo (HWND, HDC) = 0; + virtual void displayModeChanged() = 0; + virtual HRESULT getVideoSize (long& videoWidth, long& videoHeight) = 0; + }; + + //====================================================================== + struct VMR7 : public Base + { + VMR7() {} + + HRESULT create (ComSmartPtr& graphBuilder, + ComSmartPtr& baseFilter, HWND hwnd) override + { + ComSmartPtr filterConfig; + + HRESULT hr = baseFilter.CoCreateInstance (CLSID_VideoMixingRenderer); + + if (SUCCEEDED (hr)) hr = graphBuilder->AddFilter (baseFilter, L"VMR-7"); + if (SUCCEEDED (hr)) hr = baseFilter.QueryInterface (filterConfig); + if (SUCCEEDED (hr)) hr = filterConfig->SetRenderingMode (VMRMode_Windowless); + if (SUCCEEDED (hr)) hr = baseFilter.QueryInterface (windowlessControl); + if (SUCCEEDED (hr)) hr = windowlessControl->SetVideoClippingWindow (hwnd); + if (SUCCEEDED (hr)) hr = windowlessControl->SetAspectRatioMode (VMR_ARMODE_LETTER_BOX); + + return hr; + } + + void setVideoWindow (HWND hwnd) override + { + windowlessControl->SetVideoClippingWindow (hwnd); + } + + void setVideoPosition (HWND hwnd) override + { + long videoWidth = 0, videoHeight = 0; + windowlessControl->GetNativeVideoSize (&videoWidth, &videoHeight, nullptr, nullptr); + + RECT src, dest; + SetRect (&src, 0, 0, videoWidth, videoHeight); + GetClientRect (hwnd, &dest); + + windowlessControl->SetVideoPosition (&src, &dest); + } + + void repaintVideo (HWND hwnd, HDC hdc) override + { + windowlessControl->RepaintVideo (hwnd, hdc); + } + + void displayModeChanged() override + { + windowlessControl->DisplayModeChanged(); + } + + HRESULT getVideoSize (long& videoWidth, long& videoHeight) override + { + return windowlessControl->GetNativeVideoSize (&videoWidth, &videoHeight, nullptr, nullptr); + } + + ComSmartPtr windowlessControl; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VMR7) + }; + + + //====================================================================== + struct EVR : public Base + { + EVR() {} + + HRESULT create (ComSmartPtr& graphBuilder, + ComSmartPtr& baseFilter, HWND hwnd) override + { + ComSmartPtr getService; + + HRESULT hr = baseFilter.CoCreateInstance (CLSID_EnhancedVideoRenderer); + + if (SUCCEEDED (hr)) hr = graphBuilder->AddFilter (baseFilter, L"EVR"); + if (SUCCEEDED (hr)) hr = baseFilter.QueryInterface (getService); + if (SUCCEEDED (hr)) hr = getService->GetService (MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl, + (void**) videoDisplayControl.resetAndGetPointerAddress()); + if (SUCCEEDED (hr)) hr = videoDisplayControl->SetVideoWindow (hwnd); + if (SUCCEEDED (hr)) hr = videoDisplayControl->SetAspectRatioMode (MFVideoARMode_PreservePicture); + + return hr; + } + + void setVideoWindow (HWND hwnd) override + { + videoDisplayControl->SetVideoWindow (hwnd); + } + + void setVideoPosition (HWND hwnd) override + { + const MFVideoNormalizedRect src = { 0.0f, 0.0f, 1.0f, 1.0f }; + + RECT dest; + GetClientRect (hwnd, &dest); + + videoDisplayControl->SetVideoPosition (&src, &dest); + } + + void repaintVideo (HWND, HDC) override + { + videoDisplayControl->RepaintVideo(); + } + + void displayModeChanged() override {} + + HRESULT getVideoSize (long& videoWidth, long& videoHeight) override + { + SIZE sz = { 0, 0 }; + HRESULT hr = videoDisplayControl->GetNativeVideoSize (&sz, nullptr); + videoWidth = sz.cx; + videoHeight = sz.cy; + return hr; + } + + ComSmartPtr videoDisplayControl; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EVR) + }; +}; + +//============================================================================== +struct VideoComponent::Pimpl : public Component +{ + Pimpl() : videoLoaded (false) + { + setOpaque (true); + context = new DirectShowContext (*this); + componentWatcher = new ComponentWatcher (*this); + } + + ~Pimpl() + { + close(); + context = nullptr; + componentWatcher = nullptr; + } + + Result loadFromString (const String& fileOrURLPath) + { + close(); + auto r = context->loadFile (fileOrURLPath); + + if (r.wasOk()) + { + videoLoaded = true; + context->updateVideoPosition(); + } + + return r; + } + + Result load (const File& file) + { + auto r = loadFromString (file.getFullPathName()); + + if (r.wasOk()) + currentFile = file; + + return r; + } + + Result load (const URL& url) + { + auto r = loadFromString (url.toString (true)); + + if (r.wasOk()) + currentURL = url; + + return r; + } + + void close() + { + stop(); + context->release(); + + videoLoaded = false; + currentFile = File(); + currentURL = {}; + } + + bool isOpen() const + { + return videoLoaded; + } + + bool isPlaying() const + { + return context->state == DirectShowContext::runningState; + } + + void play() + { + if (videoLoaded) + context->play(); + } + + void stop() + { + if (videoLoaded) + context->pause(); + } + + void setPosition (double newPosition) + { + if (videoLoaded) + context->setPosition (newPosition); + } + + double getPosition() const + { + return videoLoaded ? context->getPosition() : 0.0; + } + + void setSpeed (double newSpeed) + { + if (videoLoaded) + context->setSpeed (newSpeed); + } + + Rectangle getNativeSize() const + { + return videoLoaded ? context->getVideoSize() + : Rectangle(); + } + + double getDuration() const + { + return videoLoaded ? context->getDuration() : 0.0; + } + + void setVolume (float newVolume) + { + if (videoLoaded) + context->setVolume (newVolume); + } + + float getVolume() const + { + return videoLoaded ? context->getVolume() : 0.0f; + } + + void paint (Graphics& g) override + { + if (videoLoaded) + context->handleUpdateNowIfNeeded(); + else + g.fillAll (Colours::grey); + } + + void updateContextPosition() + { + context->updateContextPosition(); + + if (getWidth() > 0 && getHeight() > 0) + if (auto* peer = getTopLevelComponent()->getPeer()) + context->updateWindowPosition (peer->getAreaCoveredBy (*this)); + } + + void updateContextVisibility() + { + context->showWindow (isShowing()); + } + + void recreateNativeWindowAsync() + { + context->recreateNativeWindowAsync(); + repaint(); + } + + File currentFile; + URL currentURL; + +private: + bool videoLoaded; + + //============================================================================== + struct ComponentWatcher : public ComponentMovementWatcher + { + ComponentWatcher (Pimpl& c) : ComponentMovementWatcher (&c), owner (c) + { + } + + void componentMovedOrResized (bool, bool) override + { + if (owner.videoLoaded) + owner.updateContextPosition(); + } + + void componentPeerChanged() override + { + if (owner.videoLoaded) + owner.recreateNativeWindowAsync(); + } + + void componentVisibilityChanged() override + { + if (owner.videoLoaded) + owner.updateContextVisibility(); + } + + Pimpl& owner; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComponentWatcher) + }; + + ScopedPointer componentWatcher; + + //====================================================================== + struct DirectShowContext : public AsyncUpdater + { + DirectShowContext (Pimpl& c) : component (c) + { + CoInitialize (0); + } + + ~DirectShowContext() + { + release(); + CoUninitialize(); + } + + //====================================================================== + void updateWindowPosition (const Rectangle& newBounds) + { + nativeWindow->setWindowPosition (newBounds); + } + + void showWindow (bool shouldBeVisible) + { + nativeWindow->showWindow (shouldBeVisible); + } + + //====================================================================== + void repaint() + { + if (hasVideo) + videoRenderer->repaintVideo (nativeWindow->hwnd, nativeWindow->hdc); + } + + void updateVideoPosition() + { + if (hasVideo) + videoRenderer->setVideoPosition (nativeWindow->hwnd); + } + + void displayResolutionChanged() + { + if (hasVideo) + videoRenderer->displayModeChanged(); + } + + //====================================================================== + void peerChanged() + { + deleteNativeWindow(); + + mediaEvent->SetNotifyWindow (0, 0, 0); + if (videoRenderer != nullptr) + videoRenderer->setVideoWindow (nullptr); + + createNativeWindow(); + + mediaEvent->SetNotifyWindow ((OAHWND) hwnd, graphEventID, 0); + if (videoRenderer != nullptr) + videoRenderer->setVideoWindow (hwnd); + } + + void handleAsyncUpdate() override + { + if (hwnd != 0) + { + if (needToRecreateNativeWindow) + { + peerChanged(); + needToRecreateNativeWindow = false; + } + + if (needToUpdateViewport) + { + updateVideoPosition(); + needToUpdateViewport = false; + } + + repaint(); + } + else + { + triggerAsyncUpdate(); + } + } + + void recreateNativeWindowAsync() + { + needToRecreateNativeWindow = true; + triggerAsyncUpdate(); + } + + void updateContextPosition() + { + needToUpdateViewport = true; + triggerAsyncUpdate(); + } + + //====================================================================== + Result loadFile (const String& fileOrURLPath) + { + jassert (state == uninitializedState); + + if (! createNativeWindow()) + return Result::fail ("Can't create window"); + + HRESULT hr = graphBuilder.CoCreateInstance (CLSID_FilterGraph); + + // basic playback interfaces + if (SUCCEEDED (hr)) hr = graphBuilder.QueryInterface (mediaControl); + if (SUCCEEDED (hr)) hr = graphBuilder.QueryInterface (mediaPosition); + if (SUCCEEDED (hr)) hr = graphBuilder.QueryInterface (mediaEvent); + if (SUCCEEDED (hr)) hr = graphBuilder.QueryInterface (basicAudio); + + // video renderer interface + if (SUCCEEDED (hr)) + { + if (SystemStats::getOperatingSystemType() >= SystemStats::WinVista) + { + videoRenderer = new VideoRenderers::EVR(); + hr = videoRenderer->create (graphBuilder, baseFilter, hwnd); + + if (FAILED (hr)) + videoRenderer = nullptr; + } + + if (videoRenderer == nullptr) + { + videoRenderer = new VideoRenderers::VMR7(); + hr = videoRenderer->create (graphBuilder, baseFilter, hwnd); + } + } + + // build filter graph + if (SUCCEEDED (hr)) + { + hr = graphBuilder->RenderFile (fileOrURLPath.toWideCharPointer(), nullptr); + + if (FAILED (hr)) + { + #if JUCE_MODAL_LOOPS_PERMITTED + // Annoyingly, if we don't run the msg loop between failing and deleting the window, the + // whole OS message-dispatch system gets itself into a state, and refuses to deliver any + // more messages for the whole app. (That's what happens in Win7, anyway) + MessageManager::getInstance()->runDispatchLoopUntil (200); + #endif + } + } + + // remove video renderer if not connected (no video) + if (SUCCEEDED (hr)) + { + if (isRendererConnected()) + { + hasVideo = true; + } + else + { + hasVideo = false; + graphBuilder->RemoveFilter (baseFilter); + videoRenderer = nullptr; + baseFilter = nullptr; + } + } + + // set window to receive events + if (SUCCEEDED (hr)) + hr = mediaEvent->SetNotifyWindow ((OAHWND) hwnd, graphEventID, 0); + + if (SUCCEEDED (hr)) + { + state = stoppedState; + pause(); + return Result::ok(); + } + + // Note that if you're trying to open a file and this method fails, you may + // just need to install a suitable codec. It seems that by default DirectShow + // doesn't support a very good range of formats. + release(); + return getErrorMessageFromResult (hr); + } + + static Result getErrorMessageFromResult (HRESULT hr) + { + switch (hr) + { + case VFW_E_INVALID_FILE_FORMAT: return Result::fail ("Invalid file format"); + case VFW_E_NOT_FOUND: return Result::fail ("File not found"); + case VFW_E_UNKNOWN_FILE_TYPE: return Result::fail ("Unknown file type"); + case VFW_E_UNSUPPORTED_STREAM: return Result::fail ("Unsupported stream"); + case VFW_E_CANNOT_CONNECT: return Result::fail ("Cannot connect"); + case VFW_E_CANNOT_LOAD_SOURCE_FILTER: return Result::fail ("Cannot load source filter"); + } + + TCHAR messageBuffer[512] = { 0 }; + + FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + nullptr, hr, MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), + messageBuffer, (DWORD) numElementsInArray (messageBuffer) - 1, nullptr); + + return Result::fail (String (messageBuffer)); + } + + void release() + { + if (mediaControl != nullptr) + mediaControl->Stop(); + + if (mediaEvent != nullptr) + mediaEvent->SetNotifyWindow (0, 0, 0); + + if (videoRenderer != nullptr) + videoRenderer->setVideoWindow (0); + + hasVideo = false; + videoRenderer = nullptr; + baseFilter = nullptr; + basicAudio = nullptr; + mediaEvent = nullptr; + mediaPosition = nullptr; + mediaControl = nullptr; + graphBuilder = nullptr; + + state = uninitializedState; + + if (nativeWindow != nullptr) + deleteNativeWindow(); + } + + void graphEventProc() + { + LONG ec = 0; + LONG_PTR p1 = {}, p2 = {}; + + jassert (mediaEvent != nullptr); + + while (SUCCEEDED (mediaEvent->GetEvent (&ec, &p1, &p2, 0))) + { + mediaEvent->FreeEventParams (ec, p1, p2); + + switch (ec) + { + case EC_REPAINT: + component.repaint(); + break; + + case EC_COMPLETE: + component.stop(); + break; + + case EC_USERABORT: + case EC_ERRORABORT: + case EC_ERRORABORTEX: + component.close(); + break; + + default: + break; + } + } + } + + //====================================================================== + void play() + { + mediaControl->Run(); + state = runningState; + } + + void stop() + { + mediaControl->Stop(); + state = stoppedState; + } + + void pause() + { + mediaControl->Pause(); + state = pausedState; + } + + //====================================================================== + Rectangle getVideoSize() const noexcept + { + long width = 0, height = 0; + + if (hasVideo) + videoRenderer->getVideoSize (width, height); + + return { (int) width, (int) height }; + } + + //====================================================================== + double getDuration() const + { + REFTIME duration; + mediaPosition->get_Duration (&duration); + return duration; + } + + double getPosition() const + { + REFTIME seconds; + mediaPosition->get_CurrentPosition (&seconds); + return seconds; + } + + void setSpeed (double newSpeed) { mediaPosition->put_Rate (newSpeed); } + void setPosition (double seconds) { mediaPosition->put_CurrentPosition (seconds); } + void setVolume (float newVolume) { basicAudio->put_Volume (convertToDShowVolume (newVolume)); } + + // in DirectShow, full volume is 0, silence is -10000 + static long convertToDShowVolume (float vol) noexcept + { + if (vol >= 1.0f) return 0; + if (vol <= 0.0f) return -10000; + + return roundToInt ((vol * 10000.0f) - 10000.0f); + } + + float getVolume() const + { + long volume; + basicAudio->get_Volume (&volume); + return (volume + 10000) / 10000.0f; + } + + enum State { uninitializedState, runningState, pausedState, stoppedState }; + State state = uninitializedState; + + private: + //====================================================================== + enum { graphEventID = WM_APP + 0x43f0 }; + + Pimpl& component; + HWND hwnd = {}; + HDC hdc = {}; + + ComSmartPtr graphBuilder; + ComSmartPtr mediaControl; + ComSmartPtr mediaPosition; + ComSmartPtr mediaEvent; + ComSmartPtr basicAudio; + ComSmartPtr baseFilter; + + ScopedPointer videoRenderer; + + bool hasVideo = false, needToUpdateViewport = true, needToRecreateNativeWindow = false; + + //====================================================================== + bool createNativeWindow() + { + jassert (nativeWindow == nullptr); + + if (auto* topLevelPeer = component.getTopLevelComponent()->getPeer()) + { + nativeWindow = new NativeWindow ((HWND) topLevelPeer->getNativeHandle(), this); + + hwnd = nativeWindow->hwnd; + + if (hwnd != 0) + { + hdc = GetDC (hwnd); + component.updateContextPosition(); + component.updateContextVisibility(); + return true; + } + + nativeWindow = nullptr; + } + else + { + jassertfalse; + } + + return false; + } + + void deleteNativeWindow() + { + jassert (nativeWindow != nullptr); + ReleaseDC (hwnd, hdc); + hwnd = {}; + hdc = {}; + nativeWindow = nullptr; + } + + bool isRendererConnected() + { + ComSmartPtr enumPins; + + HRESULT hr = baseFilter->EnumPins (enumPins.resetAndGetPointerAddress()); + + if (SUCCEEDED (hr)) + hr = enumPins->Reset(); + + ComSmartPtr pin; + + while (SUCCEEDED (hr) + && enumPins->Next (1, pin.resetAndGetPointerAddress(), nullptr) == S_OK) + { + ComSmartPtr otherPin; + + hr = pin->ConnectedTo (otherPin.resetAndGetPointerAddress()); + + if (SUCCEEDED (hr)) + { + PIN_DIRECTION direction; + hr = pin->QueryDirection (&direction); + + if (SUCCEEDED (hr) && direction == PINDIR_INPUT) + return true; + } + else if (hr == VFW_E_NOT_CONNECTED) + { + hr = S_OK; + } + } + + return false; + } + + //====================================================================== + struct NativeWindowClass : private DeletedAtShutdown + { + bool isRegistered() const noexcept { return atom != 0; } + LPCTSTR getWindowClassName() const noexcept { return (LPCTSTR) (pointer_sized_uint) MAKELONG (atom, 0); } + + juce_DeclareSingleton_SingleThreaded_Minimal (NativeWindowClass) + + private: + NativeWindowClass() + { + String windowClassName ("JUCE_DIRECTSHOW_"); + windowClassName << (int) (Time::currentTimeMillis() & 0x7fffffff); + + HINSTANCE moduleHandle = (HINSTANCE) Process::getCurrentModuleInstanceHandle(); + + TCHAR moduleFile [1024] = { 0 }; + GetModuleFileName (moduleHandle, moduleFile, 1024); + + WNDCLASSEX wcex = { 0 }; + wcex.cbSize = sizeof (wcex); + wcex.style = CS_OWNDC; + wcex.lpfnWndProc = (WNDPROC) wndProc; + wcex.lpszClassName = windowClassName.toWideCharPointer(); + wcex.hInstance = moduleHandle; + + atom = RegisterClassEx (&wcex); + jassert (atom != 0); + } + + ~NativeWindowClass() + { + if (atom != 0) + UnregisterClass (getWindowClassName(), (HINSTANCE) Process::getCurrentModuleInstanceHandle()); + + clearSingletonInstance(); + } + + static LRESULT CALLBACK wndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) + { + if (auto* c = (DirectShowContext*) GetWindowLongPtr (hwnd, GWLP_USERDATA)) + { + switch (msg) + { + case WM_NCHITTEST: return HTTRANSPARENT; + case WM_ERASEBKGND: return 1; + case WM_DISPLAYCHANGE: c->displayResolutionChanged(); break; + case graphEventID: c->graphEventProc(); return 0; + default: break; + } + } + + return DefWindowProc (hwnd, msg, wParam, lParam); + } + + ATOM atom = {}; + + JUCE_DECLARE_NON_COPYABLE (NativeWindowClass) + }; + + //====================================================================== + struct NativeWindow + { + NativeWindow (HWND parentToAddTo, void* userData) + { + auto* wc = NativeWindowClass::getInstance(); + + if (wc->isRegistered()) + { + DWORD exstyle = 0; + DWORD type = WS_CHILD; + + hwnd = CreateWindowEx (exstyle, wc->getWindowClassName(), + L"", type, 0, 0, 0, 0, parentToAddTo, 0, + (HINSTANCE) Process::getCurrentModuleInstanceHandle(), 0); + + if (hwnd != 0) + { + hdc = GetDC (hwnd); + SetWindowLongPtr (hwnd, GWLP_USERDATA, (LONG_PTR) userData); + } + } + + jassert (hwnd != 0); + } + + ~NativeWindow() + { + if (hwnd != 0) + { + SetWindowLongPtr (hwnd, GWLP_USERDATA, (LONG_PTR) 0); + DestroyWindow (hwnd); + } + } + + void setWindowPosition (Rectangle newBounds) + { + SetWindowPos (hwnd, 0, newBounds.getX(), newBounds.getY(), + newBounds.getWidth(), newBounds.getHeight(), + SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER); + } + + void showWindow (bool shouldBeVisible) + { + ShowWindow (hwnd, shouldBeVisible ? SW_SHOWNA : SW_HIDE); + } + + HWND hwnd = {}; + HDC hdc = {}; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NativeWindow) + }; + + ScopedPointer nativeWindow; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DirectShowContext) + }; + + ScopedPointer context; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl) +}; + +juce_ImplementSingleton_SingleThreaded (VideoComponent::Pimpl::DirectShowContext::NativeWindowClass) diff --git a/modules/juce_video/playback/juce_DirectShowComponent.h b/modules/juce_video/playback/juce_DirectShowComponent.h deleted file mode 100644 index fdb20eb060..0000000000 --- a/modules/juce_video/playback/juce_DirectShowComponent.h +++ /dev/null @@ -1,213 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. - - JUCE is an open source library subject to commercial or open-source - licensing. - - By using JUCE, you agree to the terms of both the JUCE 5 End-User License - Agreement and JUCE 5 Privacy Policy (both updated and effective as of the - 27th April 2017). - - End User License Agreement: www.juce.com/juce-5-licence - Privacy Policy: www.juce.com/juce-5-privacy-policy - - Or: You may also use this code under the terms of the GPL v3 (see - www.gnu.org/licenses). - - JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER - EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE - DISCLAIMED. - - ============================================================================== -*/ - -#pragma once - - -//============================================================================== -/** - A window that can play back a DirectShow video. - - @note Controller is not implemented -*/ -class JUCE_API DirectShowComponent : public Component -{ -public: - //============================================================================== - /** DirectShow video renderer type. - - See MSDN for advice about choosing the right renderer. - */ - enum VideoRendererType - { - dshowDefault, /**< VMR7 for Windows XP, EVR for Windows Vista and later */ - dshowVMR7, /**< Video Mixing Renderer 7 */ - dshowEVR /**< Enhanced Video Renderer */ - }; - - /** Creates a DirectShowComponent, initially blank. - - Use the loadMovie() method to load a video once you've added the - component to a window, (or put it on the desktop as a heavyweight window). - Loading a video when the component isn't visible can cause problems, as - DirectShow needs a window handle to initialise properly. - - @see VideoRendererType - */ - DirectShowComponent (VideoRendererType type = dshowDefault); - - /** Destructor. */ - ~DirectShowComponent(); - - /** Returns true if DirectShow is installed and working on this machine. */ - static bool isDirectShowAvailable(); - - //============================================================================== - /** Tries to load a DirectShow video from a file or URL into the player. - - It's best to call this function once you've added the component to a window, - (or put it on the desktop as a heavyweight window). Loading a video when the - component isn't visible can cause problems, because DirectShow needs a window - handle to do its stuff. - - @param fileOrURLPath the file or URL path to open - @returns true if the video opens successfully - */ - bool loadMovie (const String& fileOrURLPath); - - /** Tries to load a DirectShow video from a file into the player. - - It's best to call this function once you've added the component to a window, - (or put it on the desktop as a heavyweight window). Loading a video when the - component isn't visible can cause problems, because DirectShow needs a window - handle to do its stuff. - - @param videoFile the video file to open - @returns true if the video opens successfully - */ - bool loadMovie (const File& videoFile); - - /** Tries to load a DirectShow video from a URL into the player. - - It's best to call this function once you've added the component to a window, - (or put it on the desktop as a heavyweight window). Loading a video when the - component isn't visible can cause problems, because DirectShow needs a window - handle to do its stuff. - - @param videoURL the video URL to open - @returns true if the video opens successfully - */ - bool loadMovie (const URL& videoURL); - - /** Closes the video, if one is open. */ - void closeMovie(); - - /** Returns the file path or URL from which the video file was loaded. - If there isn't one, this returns an empty string. - */ - File getCurrentMoviePath() const; - - /** Returns true if there's currently a video open. */ - bool isMovieOpen() const; - - /** Returns the length of the video, in seconds. */ - double getMovieDuration() const; - - /** Returns the video's natural size, in pixels. - - You can use this to resize the component to show the video at its preferred - scale. - - If no video is loaded, the size returned will be 0 x 0. - */ - void getMovieNormalSize (int& width, int& height) const; - - /** This will position the component within a given area, keeping its aspect - ratio correct according to the video's normal size. - - The component will be made as large as it can go within the space, and will - be aligned according to the justification value if this means there are gaps at - the top or sides. - - @note Not implemented - */ - void setBoundsWithCorrectAspectRatio (const Rectangle& spaceToFitWithin, - RectanglePlacement placement); - - /** Starts the video playing. */ - void play(); - - /** Stops the video playing. */ - void stop(); - - /** Returns true if the video is currently playing. */ - bool isPlaying() const; - - /** Moves the video's position back to the start. */ - void goToStart(); - - /** Sets the video's position to a given time. */ - void setPosition (double seconds); - - /** Returns the current play position of the video. */ - double getPosition() const; - - /** Changes the video playback rate. - - A value of 1 is normal speed, greater values play it proportionately faster, - smaller values play it slower. - */ - void setSpeed (float newSpeed); - - /** Changes the video's playback volume. - - @param newVolume the volume in the range 0 (silent) to 1.0 (full) - */ - void setMovieVolume (float newVolume); - - /** Returns the video's playback volume. - - @returns the volume in the range 0 (silent) to 1.0 (full) - */ - float getMovieVolume() const; - - /** Tells the video whether it should loop. */ - void setLooping (bool shouldLoop); - - /** Returns true if the video is currently looping. - - @see setLooping - */ - bool isLooping() const; - - - //============================================================================== - /** @internal */ - void paint (Graphics&) override; - -private: - //============================================================================== - String videoPath; - bool videoLoaded, looping; - - class DirectShowContext; - friend class DirectShowContext; - friend struct ContainerDeletePolicy; - ScopedPointer context; - - class DirectShowComponentWatcher; - friend class DirectShowComponentWatcher; - friend struct ContainerDeletePolicy; - ScopedPointer componentWatcher; - - //============================================================================== - void updateContextPosition(); - void showContext (bool shouldBeVisible); - void recreateNativeWindowAsync(); - - //============================================================================== - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DirectShowComponent) -}; diff --git a/modules/juce_video/playback/juce_VideoComponent.cpp b/modules/juce_video/playback/juce_VideoComponent.cpp new file mode 100644 index 0000000000..0d0552d1b4 --- /dev/null +++ b/modules/juce_video/playback/juce_VideoComponent.cpp @@ -0,0 +1,118 @@ + /* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2015 - ROLI Ltd. + + Permission is granted to use this software under the terms of either: + a) the GPL v2 (or any later version) + b) the Affero GPL v3 + + Details of these licenses can be found at: www.gnu.org/licenses + + JUCE is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + ------------------------------------------------------------------------------ + + To release a closed-source product which uses JUCE, commercial licenses are + available: visit www.juce.com for more information. + + ============================================================================== +*/ + +#if JUCE_MAC || JUCE_IOS || JUCE_MSVC + +#if JUCE_MAC || JUCE_IOS + #include "../native/juce_mac_Video.h" +#elif JUCE_WINDOWS + #include "../native/juce_win32_Video.h" +#endif + +//============================================================================== +VideoComponent::VideoComponent() : pimpl (new Pimpl()) +{ + addAndMakeVisible (pimpl); +} + +VideoComponent::~VideoComponent() +{ + pimpl = nullptr; +} + +Result VideoComponent::load (const File& file) +{ + Result r = pimpl->load (file); + resized(); + return r; +} + +Result VideoComponent::load (const URL& url) +{ + Result r = pimpl->load (url); + resized(); + return r; +} + +void VideoComponent::closeVideo() +{ + pimpl->close(); + resized(); +} + +bool VideoComponent::isVideoOpen() const { return pimpl->isOpen(); } + +File VideoComponent::getCurrentVideoFile() const { return pimpl->currentFile; } +URL VideoComponent::getCurrentVideoURL() const { return pimpl->currentURL; } + +double VideoComponent::getVideoDuration() const { return pimpl->getDuration(); } +Rectangle VideoComponent::getVideoNativeSize() const { return pimpl->getNativeSize(); } + +void VideoComponent::play() { pimpl->play(); } +void VideoComponent::stop() { pimpl->stop(); } + +bool VideoComponent::isPlaying() const { return pimpl->isPlaying(); } + +void VideoComponent::setPlayPosition (double newPos) { pimpl->setPosition (newPos); } +double VideoComponent::getPlayPosition() const { return pimpl->getPosition(); } + +void VideoComponent::setPlaySpeed (double newSpeed) { pimpl->setSpeed (newSpeed); } +void VideoComponent::setAudioVolume (float newVolume) { pimpl->setVolume (newVolume); } +float VideoComponent::getAudioVolume() const { return pimpl->getVolume(); } + +void VideoComponent::resized() +{ + Rectangle r = getLocalBounds(); + + if (isVideoOpen() && ! r.isEmpty()) + { + Rectangle nativeSize = getVideoNativeSize(); + + if (nativeSize.isEmpty()) + { + // if we've just opened the file and are still waiting for it to + // figure out the size, start our timer.. + if (! isTimerRunning()) + startTimer (50); + } + else + { + r = RectanglePlacement (RectanglePlacement::centred).appliedTo (nativeSize, r); + stopTimer(); + } + } + else + { + stopTimer(); + } + + pimpl->setBounds (r); +} + +void VideoComponent::timerCallback() +{ + resized(); +} + +#endif diff --git a/modules/juce_video/playback/juce_VideoComponent.h b/modules/juce_video/playback/juce_VideoComponent.h new file mode 100644 index 0000000000..1980e1c897 --- /dev/null +++ b/modules/juce_video/playback/juce_VideoComponent.h @@ -0,0 +1,132 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2015 - ROLI Ltd. + + Permission is granted to use this software under the terms of either: + a) the GPL v2 (or any later version) + b) the Affero GPL v3 + + Details of these licenses can be found at: www.gnu.org/licenses + + JUCE is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + ------------------------------------------------------------------------------ + + To release a closed-source product which uses JUCE, commercial licenses are + available: visit www.juce.com for more information. + + ============================================================================== +*/ + +#ifndef JUCE_VIDEOCOMPONENT_H_INCLUDED +#define JUCE_VIDEOCOMPONENT_H_INCLUDED + + +//============================================================================== +/** + A component that can play a movie. + + Use the load() method to open a video once you've added this component to + a parent (or put it on the desktop). +*/ +class JUCE_API VideoComponent : public Component, + private Timer +{ +public: + //============================================================================== + /** Creates an empty VideoComponent. + + Use the load() method to open a video once you've added this component to + a parent (or put it on the desktop). + */ + VideoComponent(); + + /** Destructor. */ + ~VideoComponent(); + + //============================================================================== + /** Tries to load a video from a local file. + @returns am error if the file failed to be loaded correctly + */ + Result load (const File& file); + + /** Tries to load a video from a URL. + @returns am error if the file failed to be loaded correctly + */ + Result load (const URL& url); + + /** Closes the video and resets the component. */ + void closeVideo(); + + /** Returns true if a video is currently open. */ + bool isVideoOpen() const; + + /** Returns the last file that was loaded. + If nothing is open, or if it was a URL rather than a file, this will return File(). + */ + File getCurrentVideoFile() const; + + /** Returns the last URL that was loaded. + If nothing is open, or if it was a file rather than a URL, this will return File(). + */ + URL getCurrentVideoURL() const; + + //============================================================================== + /** Returns the length of the video, in seconds. */ + double getVideoDuration() const; + + /** Returns the video's natural size, in pixels. + If no video is loaded, an empty rectangle will be returned. + */ + Rectangle getVideoNativeSize() const; + + /** Starts the video playing. */ + void play(); + + /** Stops the video playing. */ + void stop(); + + /** Returns true if the video is currently playing. */ + bool isPlaying() const; + + /** Sets the video's position to a given time. */ + void setPlayPosition (double newPositionSeconds); + + /** Returns the current play position of the video. */ + double getPlayPosition() const; + + /** Changes the video playback rate. + A value of 1.0 is normal speed, greater values will play faster, smaller + values play more slowly. + */ + void setPlaySpeed (double newSpeed); + + /** Changes the video's playback volume. + @param newVolume the volume in the range 0 (silent) to 1.0 (full) + */ + void setAudioVolume (float newVolume); + + /** Returns the video's playback volume. + @returns the volume in the range 0 (silent) to 1.0 (full) + */ + float getAudioVolume() const; + +private: + //============================================================================== + struct Pimpl; + friend struct Pimpl; + friend struct ContainerDeletePolicy; + ScopedPointer pimpl; + + void resized() override; + void timerCallback() override; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VideoComponent) +}; + + +#endif