diff --git a/.gitignore b/.gitignore index 98f70546d3..fc1bc1fce4 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,7 @@ profile **/Builds/Android/local.properties **/Builds/Android/app/build **/Builds/Android/app/.externalNativeBuild +**/Builds/Android/app/.cxx **/Builds/Android/lib/build **/Builds/Android/lib/.externalNativeBuild **/Builds/CLion/cmake-build-* @@ -56,4 +57,5 @@ profile **/Builds/MacOSX/**/Intermediates.noindex **/doxygen/doc **/doxygen/build +**/.idea extras/Projucer/JUCECompileEngine.dylib diff --git a/BREAKING-CHANGES.txt b/BREAKING-CHANGES.txt index 846adb4a48..5f729a05fe 100644 --- a/BREAKING-CHANGES.txt +++ b/BREAKING-CHANGES.txt @@ -4,6 +4,55 @@ JUCE breaking changes Develop ======= +Change +------ +The Windows DPI handling in the VST wrapper and hosting code has been +refactored to be more stable. + +Possible Issues +--------------- +The new code uses a top-level AffineTransform to scale the JUCE editor window +instead of native methods. Therefore any AudioProcessorEditors which have their +own AffineTransform applied will no longer work correctly. + +Workaround +---------- +If you are using an AffineTransform to scale the entire plug-in window then +consider using Desktop::setGlobalScaleFactor() instead, or, for applying other +transforms, consider putting the component you want to transform in a child of +the editor and transform that instead. + +Rationale +--------- +The old code had some bugs when using OpenGL and when moving between monitors +with different scale factors. The new code should fix these and DPI-aware +plug-ins will scale correctly. + + +Change +------ +Relative Xcode subproject paths specified in the Projucer are now relative to +the build directory rather than the project directory. + +Possible Issues +--------------- +After being re-saved in the Projucer existing Xcode projects will fail to find +any subprojects specified using a relative path. + +Workaround +---------- +Update the subproject path in the Projucer. + +Rationale +--------- +Most other Xcode specific paths are specified reltive to the build directory. +This change brings the Xcode subproject path in line with the rest of the +configuration. + + +Version 5.4.6 +============= + Change ------ AudioProcessorValueTreeState::getRawParameterValue now returns a @@ -78,6 +127,28 @@ state. Version 5.4.5 ============= +Change +------ +The alignment of text rendered on macOS using CoreGraphics may have shifted +slightly, depending on the font you have used. The default macOS font has +shifted downwards. + +Possible Issues +--------------- +Meticulously aligned text components of a GUI may now be misaligned. + +Workaround +---------- +Use a custom LookAndFeel to change the location where text is drawn, or use a +different font that matches the previous alignment of your original font. + +Rationale +--------- +This was an unintentional change resulting from moving away from a deprecated +macOS text API. The new alignment is consistent with other rendering engines +(web browsers and text editors) and the software renderer. + + Change ------ The JUCEApplicationBase::backButtonPressed() method now returns a bool to diff --git a/ChangeList.txt b/ChangeList.txt index bf40c1c39e..867532c2fb 100644 --- a/ChangeList.txt +++ b/ChangeList.txt @@ -3,6 +3,23 @@ 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.4.7 + - Fixed a macOS focus bug causing Components to not receive mouse events + - Fixed a potential NullPointerException in the Android IAP code + - Fixed an entitlements file generation bug in the Projucer + - Send VST2 audioMasterUpdateDisplay opcode on the message thread to fix some hosts not updating + - Fixed some build errors and warnings when using Clang on Windows + - Changed the default architecture specified in Linux Makefiles generated by the Projucer + +Version 5.4.6 + - Fixed compatibility with macOS versions below 10.11 + - Multiple thread safety improvements + - Added dynamic parameter and parameter group names + - Updated to the latest Android In-App Purchases API + - Improvements to the Windows message queue under high load + - Replaced WaitableEvent internals with std::condition_variable + - Fixed some macOS text alignment issues + Version 5.4.5 - Improved message queue performance on Linux - Added missing lifecycle callbacks on Android Q diff --git a/doxygen/Doxyfile b/doxygen/Doxyfile index 1c0b6796d3..9e3a0a960f 100644 --- a/doxygen/Doxyfile +++ b/doxygen/Doxyfile @@ -1056,25 +1056,6 @@ USE_HTAGS = NO VERBATIM_HEADERS = NO -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- @@ -2166,12 +2147,6 @@ EXTERNAL_GROUPS = YES EXTERNAL_PAGES = YES -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of 'which perl'). -# The default file (with absolute path) is: /usr/bin/perl. - -PERL_PATH = /usr/bin/perl - #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- @@ -2185,15 +2160,6 @@ PERL_PATH = /usr/bin/perl CLASS_DIAGRAMS = YES -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see: -# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. diff --git a/examples/Assets/Box2DTests/ApplyForce.h b/examples/Assets/Box2DTests/ApplyForce.h index 5b5cd25d6b..57b90260bb 100644 --- a/examples/Assets/Box2DTests/ApplyForce.h +++ b/examples/Assets/Box2DTests/ApplyForce.h @@ -166,6 +166,9 @@ public: m_body->ApplyTorque(-50.0f); } break; + + default: + break; } } diff --git a/examples/Assets/DemoUtilities.h b/examples/Assets/DemoUtilities.h index c6438e27ed..829a883a87 100644 --- a/examples/Assets/DemoUtilities.h +++ b/examples/Assets/DemoUtilities.h @@ -19,7 +19,7 @@ #pragma once -#include "../JuceLibraryCode/JuceHeader.h" +#include #ifndef PIP_DEMO_UTILITIES_INCLUDED #define PIP_DEMO_UTILITIES_INCLUDED 1 @@ -74,11 +74,11 @@ inline File getExamplesDirectory() noexcept #endif } -inline InputStream* createAssetInputStream (const char* resourcePath) +inline std::unique_ptr createAssetInputStream (const char* resourcePath) { #if JUCE_ANDROID ZipFile apkZip (File::getSpecialLocation (File::invokedExecutableFile)); - return apkZip.createStreamForEntry (apkZip.getIndexOfFileName ("assets/" + String (resourcePath))); + return std::unique_ptr (apkZip.createStreamForEntry (apkZip.getIndexOfFileName ("assets/" + String (resourcePath)))); #else #if JUCE_IOS auto assetsDir = File::getSpecialLocation (File::currentExecutableFile) diff --git a/examples/Audio/AudioRecordingDemo.h b/examples/Audio/AudioRecordingDemo.h index ceaecba3d6..21a792c73a 100644 --- a/examples/Audio/AudioRecordingDemo.h +++ b/examples/Audio/AudioRecordingDemo.h @@ -348,7 +348,7 @@ private: { recorder.stop(); - #if (JUCE_ANDROID || JUCE_IOS) + #if JUCE_CONTENT_SHARING SafePointer safeThis (this); File fileToShare = lastRecording; diff --git a/examples/Audio/AudioSynthesiserDemo.h b/examples/Audio/AudioSynthesiserDemo.h index 644f061f83..8acdcf705e 100644 --- a/examples/Audio/AudioSynthesiserDemo.h +++ b/examples/Audio/AudioSynthesiserDemo.h @@ -182,7 +182,7 @@ struct SynthAudioSource : public AudioSource { WavAudioFormat wavFormat; - std::unique_ptr audioReader (wavFormat.createReaderFor (createAssetInputStream ("cello.wav"), true)); + std::unique_ptr audioReader (wavFormat.createReaderFor (createAssetInputStream ("cello.wav").release(), true)); BigInteger allNotes; allNotes.setRange (0, 128, true); diff --git a/examples/BLOCKS/BlocksDrawingDemo.h b/examples/BLOCKS/BlocksDrawingDemo.h index d3539397d2..929ca78c40 100644 --- a/examples/BLOCKS/BlocksDrawingDemo.h +++ b/examples/BLOCKS/BlocksDrawingDemo.h @@ -511,14 +511,14 @@ private: { if (currentMode == canvas) { - block.setProgram (new BitmapLEDProgram (block)); + block.setProgram (std::make_unique(block)); // Redraw any previously drawn LEDs redrawLEDs(); } else if (currentMode == colourPalette) { - block.setProgram (new DrumPadGridProgram (block)); + block.setProgram (std::make_unique (block)); // Setup the grid layout if (auto* program = getPaletteProgram()) diff --git a/examples/BLOCKS/BlocksMonitorDemo.h b/examples/BLOCKS/BlocksMonitorDemo.h index c92c0e63b2..2e17964d32 100644 --- a/examples/BLOCKS/BlocksMonitorDemo.h +++ b/examples/BLOCKS/BlocksMonitorDemo.h @@ -75,7 +75,7 @@ public: // If this is a Lightpad then set the grid program to be blank if (block->getLEDGrid() != nullptr) - block->setProgram (new BitmapLEDProgram (*block)); + block->setProgram (std::make_unique(*block)); // If this is a Lightpad then redraw it at 25Hz if (block->getType() == Block::lightPadBlock) @@ -175,7 +175,11 @@ public: return { static_cast (port.index), static_cast (block->getHeight()) }; case e::west: return { 0.0f, static_cast (port.index) }; + default: + break; } + + break; } case 90: { @@ -189,7 +193,11 @@ public: return { static_cast (0.0f - block->getHeight()), static_cast (port.index) }; case e::west: return { static_cast (-1.0f - port.index), 0.0f }; + default: + break; } + + break; } case 180: { @@ -203,7 +211,11 @@ public: return { static_cast (-1.0f - port.index), static_cast (0.0f - block->getHeight()) }; case e::west: return { 0.0f, static_cast (-1.0f - port.index) }; + default: + break; } + + break; } case 270: { @@ -217,8 +229,15 @@ public: return { static_cast (block->getHeight()), static_cast (-1.0f - port.index) }; case e::west: return { static_cast (port.index), 0.0f }; + default: + break; } + + break; } + + default: + break; } return {}; @@ -626,7 +645,7 @@ public: auto numBlockComponents = blockComponents.size(); // If there are no currently connected Blocks then display some text on the screen - if (numBlockComponents == 0) + if (masterBlockComponent == nullptr || numBlockComponents == 0) { noBlocksLabel.setVisible (true); noBlocksLabel.setBounds (0, (getHeight() / 2) - 50, getWidth(), 100); @@ -776,6 +795,9 @@ private: /** Calculates the position and rotation of each connected Block relative to the master Block */ void positionBlocks (BlockTopology topology) { + if (masterBlockComponent == nullptr) + return; + Array blocksConnectedToMaster; auto maxDelta = std::numeric_limits::max(); @@ -921,7 +943,11 @@ private: return 90; case edge::west: return 270; + default: + break; } + + break; } case edge::south: { @@ -935,7 +961,11 @@ private: return 270; case edge::west: return 90; + default: + break; } + + break; } case edge::east: { @@ -949,7 +979,11 @@ private: return 180; case edge::west: return 0; + default: + break; } + + break; } case edge::west: @@ -964,8 +998,15 @@ private: return 0; case edge::west: return 180; + default: + break; } + + break; } + + default: + break; } return 0; diff --git a/examples/BLOCKS/BlocksSynthDemo.h b/examples/BLOCKS/BlocksSynthDemo.h index aa34dc1270..56b5122025 100644 --- a/examples/BLOCKS/BlocksSynthDemo.h +++ b/examples/BLOCKS/BlocksSynthDemo.h @@ -411,7 +411,7 @@ public: } else { - if (squareWaveY[x - 1] == 1) + if (x > 0 && squareWaveY[x - 1] == 1) squareWaveY[x - 1] = 255; squareWaveY[x] = 13; @@ -643,7 +643,7 @@ public: detachActiveBlock(); // Get the array of currently connected Block objects from the PhysicalTopologySource - auto blocks = topologySource.getCurrentTopology().blocks; + auto blocks = topologySource.getBlocks(); // Iterate over the array of Block objects for (auto b : blocks) @@ -785,7 +785,7 @@ private: if (currentMode == waveformSelectionMode) { // Set the LEDGrid program - block.setProgram (new WaveshapeProgram (block)); + block.setProgram (std::make_unique(block)); // Initialise the program if (auto* waveshapeProgram = getWaveshapeProgram()) @@ -797,7 +797,7 @@ private: else if (currentMode == playMode) { // Set the LEDGrid program - auto error = block.setProgram (new DrumPadGridProgram (block)); + auto error = block.setProgram (std::make_unique(block)); if (error.failed()) { diff --git a/examples/DSP/ConvolutionDemo.h b/examples/DSP/ConvolutionDemo.h index c27773b1ce..26816cd46d 100644 --- a/examples/DSP/ConvolutionDemo.h +++ b/examples/DSP/ConvolutionDemo.h @@ -90,8 +90,7 @@ struct ConvolutionDemoDSP auto selectedType = cabinetTypeParameter->getCurrentSelectedID(); auto assetName = (selectedType == 2 ? "guitar_amp.wav" : "cassette_recorder.wav"); - std::unique_ptr assetInputStream (createAssetInputStream (assetName)); - if (assetInputStream != nullptr) + if (auto assetInputStream = createAssetInputStream (assetName)) { currentCabinetData.reset(); assetInputStream->readIntoMemoryBlock (currentCabinetData); diff --git a/examples/DemoRunner/Builds/Android/app/CMakeLists.txt b/examples/DemoRunner/Builds/Android/app/CMakeLists.txt index 67b3abd007..4f1aa82831 100644 --- a/examples/DemoRunner/Builds/Android/app/CMakeLists.txt +++ b/examples/DemoRunner/Builds/Android/app/CMakeLists.txt @@ -8,7 +8,7 @@ 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_PUSH_NOTIFICATIONS=1" "-DJUCE_PUSH_NOTIFICATIONS_ACTIVITY=\"com/roli/juce/JuceActivity\"" "-DJUCE_ANDROID_GL_ES_VERSION_3_0=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=5.4.5" "-DJUCE_APP_VERSION_HEX=0x50405") +add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=23" "-DJUCE_PUSH_NOTIFICATIONS=1" "-DJUCE_PUSH_NOTIFICATIONS_ACTIVITY=\"com/roli/juce/JuceActivity\"" "-DJUCE_ANDROID_GL_ES_VERSION_3_0=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=5.4.7" "-DJUCE_APP_VERSION_HEX=0x50407") include_directories( AFTER "../../../JuceLibraryCode" @@ -138,6 +138,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.h" "../../../../../modules/juce_audio_devices/native/juce_android_Audio.cpp" + "../../../../../modules/juce_audio_devices/native/juce_android_HighPerformanceAudioHelpers.h" "../../../../../modules/juce_audio_devices/native/juce_android_Midi.cpp" "../../../../../modules/juce_audio_devices/native/juce_android_Oboe.cpp" "../../../../../modules/juce_audio_devices/native/juce_android_OpenSL.cpp" @@ -729,8 +730,6 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/misc/juce_Result.h" "../../../../../modules/juce_core/misc/juce_RuntimePermissions.cpp" "../../../../../modules/juce_core/misc/juce_RuntimePermissions.h" - "../../../../../modules/juce_core/misc/juce_StdFunctionCompat.cpp" - "../../../../../modules/juce_core/misc/juce_StdFunctionCompat.h" "../../../../../modules/juce_core/misc/juce_Uuid.cpp" "../../../../../modules/juce_core/misc/juce_Uuid.h" "../../../../../modules/juce_core/misc/juce_WindowsRegistry.h" @@ -975,6 +974,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_dsp/processors/juce_Oversampling.h" "../../../../../modules/juce_dsp/processors/juce_ProcessContext.h" "../../../../../modules/juce_dsp/processors/juce_ProcessorChain.h" + "../../../../../modules/juce_dsp/processors/juce_ProcessorChain_test.cpp" "../../../../../modules/juce_dsp/processors/juce_ProcessorDuplicator.h" "../../../../../modules/juce_dsp/processors/juce_ProcessorWrapper.h" "../../../../../modules/juce_dsp/processors/juce_Reverb.h" @@ -1744,6 +1744,7 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/j set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Audio.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_HighPerformanceAudioHelpers.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Midi.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Oboe.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_OpenSL.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -2335,8 +2336,6 @@ set_source_files_properties("../../../../../modules/juce_core/misc/juce_Result.c set_source_files_properties("../../../../../modules/juce_core/misc/juce_Result.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_RuntimePermissions.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_RuntimePermissions.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_core/misc/juce_StdFunctionCompat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_core/misc/juce_StdFunctionCompat.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_Uuid.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_Uuid.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_WindowsRegistry.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -2581,6 +2580,7 @@ set_source_files_properties("../../../../../modules/juce_dsp/processors/juce_Ove set_source_files_properties("../../../../../modules/juce_dsp/processors/juce_Oversampling.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_dsp/processors/juce_ProcessContext.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_dsp/processors/juce_ProcessorChain.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_dsp/processors/juce_ProcessorChain_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_dsp/processors/juce_ProcessorDuplicator.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_dsp/processors/juce_ProcessorWrapper.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_dsp/processors/juce_Reverb.h" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/examples/DemoRunner/Builds/Android/app/build.gradle b/examples/DemoRunner/Builds/Android/app/build.gradle index 0081e10bcc..62ec23bb80 100644 --- a/examples/DemoRunner/Builds/Android/app/build.gradle +++ b/examples/DemoRunner/Builds/Android/app/build.gradle @@ -53,7 +53,7 @@ android { } externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGURATION=DEBUG", "-DCMAKE_CXX_FLAGS_DEBUG=-O0 -Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers", "-DCMAKE_C_FLAGS_DEBUG=-O0" + arguments "-DJUCE_BUILD_CONFIGURATION=DEBUG", "-DCMAKE_CXX_FLAGS_DEBUG=-O0 -Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum", "-DCMAKE_C_FLAGS_DEBUG=-O0" } } @@ -62,7 +62,7 @@ android { release_ { externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGURATION=RELEASE", "-DCMAKE_CXX_FLAGS_RELEASE=-O3 -Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers", "-DCMAKE_C_FLAGS_RELEASE=-O3" + arguments "-DJUCE_BUILD_CONFIGURATION=RELEASE", "-DCMAKE_CXX_FLAGS_RELEASE=-O3 -Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum", "-DCMAKE_C_FLAGS_RELEASE=-O3" } } @@ -86,7 +86,6 @@ android { main.java.srcDirs += ["../../../../../modules/juce_core/native/javacore/init", "../../../../../modules/juce_core/native/javacore/app", - "../../../../../modules/juce_gui_basics/native/javacore/app", "../../../../../modules/juce_gui_basics/native/javaopt/app"] main.res.srcDirs += diff --git a/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml b/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml index 5d694fa56f..7766418ecc 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml +++ b/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml @@ -1,8 +1,9 @@ - - + @@ -22,6 +23,6 @@ + android:grantUriPermissions="true" android:exported="true"/> diff --git a/examples/DemoRunner/Builds/Android/app/src/main/assets/Box2DTests/ApplyForce.h b/examples/DemoRunner/Builds/Android/app/src/main/assets/Box2DTests/ApplyForce.h index 5b5cd25d6b..57b90260bb 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/assets/Box2DTests/ApplyForce.h +++ b/examples/DemoRunner/Builds/Android/app/src/main/assets/Box2DTests/ApplyForce.h @@ -166,6 +166,9 @@ public: m_body->ApplyTorque(-50.0f); } break; + + default: + break; } } diff --git a/examples/DemoRunner/Builds/Android/app/src/main/assets/DemoUtilities.h b/examples/DemoRunner/Builds/Android/app/src/main/assets/DemoUtilities.h index c6438e27ed..829a883a87 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/assets/DemoUtilities.h +++ b/examples/DemoRunner/Builds/Android/app/src/main/assets/DemoUtilities.h @@ -19,7 +19,7 @@ #pragma once -#include "../JuceLibraryCode/JuceHeader.h" +#include #ifndef PIP_DEMO_UTILITIES_INCLUDED #define PIP_DEMO_UTILITIES_INCLUDED 1 @@ -74,11 +74,11 @@ inline File getExamplesDirectory() noexcept #endif } -inline InputStream* createAssetInputStream (const char* resourcePath) +inline std::unique_ptr createAssetInputStream (const char* resourcePath) { #if JUCE_ANDROID ZipFile apkZip (File::getSpecialLocation (File::invokedExecutableFile)); - return apkZip.createStreamForEntry (apkZip.getIndexOfFileName ("assets/" + String (resourcePath))); + return std::unique_ptr (apkZip.createStreamForEntry (apkZip.getIndexOfFileName ("assets/" + String (resourcePath)))); #else #if JUCE_IOS auto assetsDir = File::getSpecialLocation (File::currentExecutableFile) diff --git a/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-hdpi/icon.png b/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-hdpi/icon.png index e551340cfb..3c54e0a5ba 100644 Binary files a/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-hdpi/icon.png and b/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-hdpi/icon.png differ diff --git a/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-ldpi/icon.png b/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-ldpi/icon.png index 475d142e35..fb4d6f9e93 100644 Binary files a/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-ldpi/icon.png and b/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-ldpi/icon.png differ diff --git a/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-mdpi/icon.png b/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-mdpi/icon.png index eb13005911..c286139d3c 100644 Binary files a/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-mdpi/icon.png and b/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-mdpi/icon.png differ diff --git a/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-xhdpi/icon.png b/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-xhdpi/icon.png index dddc79015e..6c50b7d72f 100644 Binary files a/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-xhdpi/icon.png and b/examples/DemoRunner/Builds/Android/app/src/main/res/drawable-xhdpi/icon.png differ diff --git a/examples/DemoRunner/Builds/LinuxMakefile/Makefile b/examples/DemoRunner/Builds/LinuxMakefile/Makefile index a63eabe4e2..bbe1e96570 100644 --- a/examples/DemoRunner/Builds/LinuxMakefile/Makefile +++ b/examples/DemoRunner/Builds/LinuxMakefile/Makefile @@ -32,16 +32,16 @@ ifeq ($(CONFIG),Debug) JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) - TARGET_ARCH := -march=native + TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.4.5 -DJUCE_APP_VERSION_HEX=0x50405 $(shell pkg-config --cflags alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.4.7 -DJUCE_APP_VERSION_HEX=0x50407 $(shell pkg-config --cflags alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -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 -DJucePlugin_Build_Unity=0 JUCE_TARGET_APP := DemoRunner JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS) - JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -lrt -ldl -lpthread -lGL $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -53,10 +53,10 @@ ifeq ($(CONFIG),Release) JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) - TARGET_ARCH := -march=native + TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.4.5 -DJUCE_APP_VERSION_HEX=0x50405 $(shell pkg-config --cflags alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCE_DEMO_RUNNER=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.4.7 -DJUCE_APP_VERSION_HEX=0x50407 $(shell pkg-config --cflags alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -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 -DJucePlugin_Build_Unity=0 JUCE_TARGET_APP := DemoRunner diff --git a/examples/DemoRunner/Builds/MacOSX/App.entitlements b/examples/DemoRunner/Builds/MacOSX/App.entitlements deleted file mode 100644 index 6631ffa6f2..0000000000 --- a/examples/DemoRunner/Builds/MacOSX/App.entitlements +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj b/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj index 78ca328e61..42ff15e603 100644 --- a/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj +++ b/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj @@ -303,13 +303,6 @@ path = ../../Source/Main.cpp; sourceTree = "SOURCE_ROOT"; }; - 2CDA0CB288452DA016E874BC = { - isa = PBXFileReference; - lastKnownFileType = text.plist.xml; - name = App.entitlements; - path = App.entitlements; - sourceTree = "SOURCE_ROOT"; - }; 346450C70C964FD9640B6086 = { isa = PBXFileReference; lastKnownFileType = file; @@ -941,8 +934,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=5.4.5", - "JUCE_APP_VERSION_HEX=0x50405", + "JUCE_APP_VERSION=5.4.7", + "JUCE_APP_VERSION_HEX=0x50407", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -962,7 +955,7 @@ INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner; PRODUCT_NAME = "DemoRunner"; USE_HEADERMAP = NO; @@ -987,8 +980,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=5.4.5", - "JUCE_APP_VERSION_HEX=0x50405", + "JUCE_APP_VERSION=5.4.7", + "JUCE_APP_VERSION_HEX=0x50407", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -998,7 +991,6 @@ "JucePlugin_Build_Standalone=0", "JucePlugin_Build_Unity=0", ); - GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( "../../JuceLibraryCode", @@ -1010,7 +1002,7 @@ INSTALL_PATH = "$(HOME)/Applications"; LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.11; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner; PRODUCT_NAME = "DemoRunner"; USE_HEADERMAP = NO; @@ -1042,11 +1034,12 @@ CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; @@ -1090,10 +1083,12 @@ CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; diff --git a/examples/DemoRunner/Builds/MacOSX/Icon.icns b/examples/DemoRunner/Builds/MacOSX/Icon.icns index 6ab6915802..52f40fef10 100644 Binary files a/examples/DemoRunner/Builds/MacOSX/Icon.icns and b/examples/DemoRunner/Builds/MacOSX/Icon.icns differ diff --git a/examples/DemoRunner/Builds/MacOSX/Info-App.plist b/examples/DemoRunner/Builds/MacOSX/Info-App.plist index 9aee797cfb..9954cbe56c 100644 --- a/examples/DemoRunner/Builds/MacOSX/Info-App.plist +++ b/examples/DemoRunner/Builds/MacOSX/Info-App.plist @@ -22,9 +22,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 5.4.5 + 5.4.7 CFBundleVersion - 5.4.5 + 5.4.7 NSHumanReadableCopyright Copyright (c) 2018 - ROLI Ltd. NSHighResolutionCapable diff --git a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj index 5e63ac9540..bb8e6b8394 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj +++ b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.5;JUCE_APP_VERSION_HEX=0x50405;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.7;JUCE_APP_VERSION_HEX=0x50407;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.5;JUCE_APP_VERSION_HEX=0x50405;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.7;JUCE_APP_VERSION_HEX=0x50407;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreaded true @@ -965,9 +965,6 @@ true - - true - true @@ -1292,6 +1289,9 @@ true + + true + true @@ -2307,6 +2307,7 @@ + @@ -2644,7 +2645,6 @@ - diff --git a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters index a6517d97ef..7bc43cf36b 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters @@ -1396,9 +1396,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -1747,6 +1744,9 @@ JUCE Modules\juce_dsp\processors + + JUCE Modules\juce_dsp\processors + JUCE Modules\juce_dsp @@ -2988,6 +2988,9 @@ JUCE Modules\juce_audio_devices\midi_io + + JUCE Modules\juce_audio_devices\native + JUCE Modules\juce_audio_devices\native @@ -3999,9 +4002,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/examples/DemoRunner/Builds/VisualStudio2015/icon.ico b/examples/DemoRunner/Builds/VisualStudio2015/icon.ico index 09d32ad703..27c4228e12 100644 Binary files a/examples/DemoRunner/Builds/VisualStudio2015/icon.ico and b/examples/DemoRunner/Builds/VisualStudio2015/icon.ico differ diff --git a/examples/DemoRunner/Builds/VisualStudio2015/resources.rc b/examples/DemoRunner/Builds/VisualStudio2015/resources.rc index b9e17aa798..5271db0973 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2015/resources.rc @@ -1,3 +1,5 @@ +#pragma code_page(65001) + #ifdef JUCE_USER_DEFINED_RC_FILE #include JUCE_USER_DEFINED_RC_FILE #else @@ -7,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,4,5,0 +FILEVERSION 5,4,7,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +18,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "Copyright (c) 2018 - ROLI Ltd.\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "5.4.5\0" + VALUE "FileVersion", "5.4.7\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "5.4.5\0" + VALUE "ProductVersion", "5.4.7\0" END END diff --git a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj index c3bcf9f25e..0138ad28a6 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj +++ b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.5;JUCE_APP_VERSION_HEX=0x50405;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.7;JUCE_APP_VERSION_HEX=0x50407;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.5;JUCE_APP_VERSION_HEX=0x50405;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.7;JUCE_APP_VERSION_HEX=0x50407;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreaded true @@ -965,9 +965,6 @@ true - - true - true @@ -1292,6 +1289,9 @@ true + + true + true @@ -2307,6 +2307,7 @@ + @@ -2644,7 +2645,6 @@ - diff --git a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters index 92cb976512..fd8d8ddf9b 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters @@ -1396,9 +1396,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -1747,6 +1744,9 @@ JUCE Modules\juce_dsp\processors + + JUCE Modules\juce_dsp\processors + JUCE Modules\juce_dsp @@ -2988,6 +2988,9 @@ JUCE Modules\juce_audio_devices\midi_io + + JUCE Modules\juce_audio_devices\native + JUCE Modules\juce_audio_devices\native @@ -3999,9 +4002,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/examples/DemoRunner/Builds/VisualStudio2017/icon.ico b/examples/DemoRunner/Builds/VisualStudio2017/icon.ico index 09d32ad703..27c4228e12 100644 Binary files a/examples/DemoRunner/Builds/VisualStudio2017/icon.ico and b/examples/DemoRunner/Builds/VisualStudio2017/icon.ico differ diff --git a/examples/DemoRunner/Builds/VisualStudio2017/resources.rc b/examples/DemoRunner/Builds/VisualStudio2017/resources.rc index b9e17aa798..5271db0973 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2017/resources.rc @@ -1,3 +1,5 @@ +#pragma code_page(65001) + #ifdef JUCE_USER_DEFINED_RC_FILE #include JUCE_USER_DEFINED_RC_FILE #else @@ -7,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,4,5,0 +FILEVERSION 5,4,7,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +18,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "Copyright (c) 2018 - ROLI Ltd.\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "5.4.5\0" + VALUE "FileVersion", "5.4.7\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "5.4.5\0" + VALUE "ProductVersion", "5.4.7\0" END END diff --git a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj index 1df30041c6..e21298e00a 100644 --- a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj +++ b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=5.4.5;JUCE_APP_VERSION_HEX=0x50405;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=5.4.7;JUCE_APP_VERSION_HEX=0x50407;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=5.4.5;JUCE_APP_VERSION_HEX=0x50405;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=5.4.7;JUCE_APP_VERSION_HEX=0x50407;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreaded true @@ -965,9 +965,6 @@ true - - true - true @@ -1292,6 +1289,9 @@ true + + true + true @@ -2307,6 +2307,7 @@ + @@ -2644,7 +2645,6 @@ - diff --git a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters index 8773c26c3c..b4113685d4 100644 --- a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters @@ -1396,9 +1396,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -1747,6 +1744,9 @@ JUCE Modules\juce_dsp\processors + + JUCE Modules\juce_dsp\processors + JUCE Modules\juce_dsp @@ -2988,6 +2988,9 @@ JUCE Modules\juce_audio_devices\midi_io + + JUCE Modules\juce_audio_devices\native + JUCE Modules\juce_audio_devices\native @@ -3999,9 +4002,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/examples/DemoRunner/Builds/VisualStudio2019/icon.ico b/examples/DemoRunner/Builds/VisualStudio2019/icon.ico index 09d32ad703..27c4228e12 100644 Binary files a/examples/DemoRunner/Builds/VisualStudio2019/icon.ico and b/examples/DemoRunner/Builds/VisualStudio2019/icon.ico differ diff --git a/examples/DemoRunner/Builds/VisualStudio2019/resources.rc b/examples/DemoRunner/Builds/VisualStudio2019/resources.rc index b9e17aa798..5271db0973 100644 --- a/examples/DemoRunner/Builds/VisualStudio2019/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2019/resources.rc @@ -1,3 +1,5 @@ +#pragma code_page(65001) + #ifdef JUCE_USER_DEFINED_RC_FILE #include JUCE_USER_DEFINED_RC_FILE #else @@ -7,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,4,5,0 +FILEVERSION 5,4,7,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +18,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "Copyright (c) 2018 - ROLI Ltd.\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "5.4.5\0" + VALUE "FileVersion", "5.4.7\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "5.4.5\0" + VALUE "ProductVersion", "5.4.7\0" END END diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj b/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj index 43433a1bd4..53c72a8663 100644 --- a/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj +++ b/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj @@ -919,8 +919,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_IPHONE_5BC26AE3=1", - "JUCE_APP_VERSION=5.4.5", - "JUCE_APP_VERSION_HEX=0x50405", + "JUCE_APP_VERSION=5.4.7", + "JUCE_APP_VERSION_HEX=0x50407", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -939,7 +939,7 @@ INFOPLIST_FILE = Info-App.plist; INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner; PRODUCT_NAME = "DemoRunner"; USE_HEADERMAP = NO; @@ -966,8 +966,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_IPHONE_5BC26AE3=1", - "JUCE_APP_VERSION=5.4.5", - "JUCE_APP_VERSION_HEX=0x50405", + "JUCE_APP_VERSION=5.4.7", + "JUCE_APP_VERSION_HEX=0x50407", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -977,7 +977,6 @@ "JucePlugin_Build_Standalone=0", "JucePlugin_Build_Unity=0", ); - GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( "../../JuceLibraryCode", @@ -988,7 +987,7 @@ INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; LLVM_LTO = YES; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.demorunner; PRODUCT_NAME = "DemoRunner"; USE_HEADERMAP = NO; @@ -1020,11 +1019,12 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; @@ -1070,10 +1070,12 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-29.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-29.png index 9344000d60..74c4136e07 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-29.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-29.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png index 84a06c0479..37e6f16c47 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png index 6021b1d0c7..aace636392 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png index 635a47187a..a702b40c55 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-72.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-72.png index 52ec77a646..af1016a27d 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-72.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-72.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png index 54b2c964e8..150abcaa77 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-76.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-76.png index 1d84eb4b92..9546f1de55 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-76.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-76.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png index 4324c82b12..df42b467b9 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png index c2cfbef3f2..d643972220 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-@3x.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-@3x.png index 15deee7ec5..e6f0d36379 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-@3x.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-@3x.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-AppStore-1024.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-AppStore-1024.png index 467fc9cf7e..9d35d43022 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-AppStore-1024.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-AppStore-1024.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@2x.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@2x.png index 2a865c6fe6..7782ff99f5 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@2x.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@2x.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@3x.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@3x.png index ad988c8094..caf3d2bc85 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@3x.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@3x.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20.png index 737b345d9b..f7906935fc 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20@2x.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20@2x.png index 2a865c6fe6..7782ff99f5 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20@2x.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20@2x.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small-1.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small-1.png index 9344000d60..74c4136e07 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small-1.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small-1.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png index 3328c84262..0d2e072d0e 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png index 66506473af..2d6b6e616e 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png index 84a06c0479..37e6f16c47 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png index 2a865c6fe6..7782ff99f5 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x-1.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x-1.png index 680ebe06bf..aa039bb59c 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x-1.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x-1.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png index 680ebe06bf..aa039bb59c 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png index 635a47187a..a702b40c55 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon.png index 3ce58cfebe..d6501a4cce 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon.png differ diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon@2x.png b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon@2x.png index 21c396fa5b..7543d4cdf4 100644 Binary files a/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon@2x.png and b/examples/DemoRunner/Builds/iOS/DemoRunner/Images.xcassets/AppIcon.appiconset/Icon@2x.png differ diff --git a/examples/DemoRunner/Builds/iOS/Icon.icns b/examples/DemoRunner/Builds/iOS/Icon.icns index 6ab6915802..52f40fef10 100644 Binary files a/examples/DemoRunner/Builds/iOS/Icon.icns and b/examples/DemoRunner/Builds/iOS/Icon.icns differ diff --git a/examples/DemoRunner/Builds/iOS/Info-App.plist b/examples/DemoRunner/Builds/iOS/Info-App.plist index 39de13f091..f0906a669b 100644 --- a/examples/DemoRunner/Builds/iOS/Info-App.plist +++ b/examples/DemoRunner/Builds/iOS/Info-App.plist @@ -30,9 +30,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 5.4.5 + 5.4.7 CFBundleVersion - 5.4.5 + 5.4.7 NSHumanReadableCopyright Copyright (c) 2018 - ROLI Ltd. NSHighResolutionCapable diff --git a/examples/DemoRunner/DemoRunner.jucer b/examples/DemoRunner/DemoRunner.jucer index fb39f3acd4..64eb8169de 100644 --- a/examples/DemoRunner/DemoRunner.jucer +++ b/examples/DemoRunner/DemoRunner.jucer @@ -1,9 +1,9 @@ - + companyEmail="info@juce.com" id="yj7xMM" reportAppUsage="0"> diff --git a/examples/DemoRunner/JuceLibraryCode/AppConfig.h b/examples/DemoRunner/JuceLibraryCode/AppConfig.h index e41abbec8d..f33cd6f45a 100644 --- a/examples/DemoRunner/JuceLibraryCode/AppConfig.h +++ b/examples/DemoRunner/JuceLibraryCode/AppConfig.h @@ -40,14 +40,14 @@ #endif #ifndef JUCE_REPORT_APP_USAGE - #define JUCE_REPORT_APP_USAGE 1 + #define JUCE_REPORT_APP_USAGE 0 #endif // END SECTION A #define JUCE_USE_DARK_SPLASH_SCREEN 1 -#define JUCE_PROJUCER_VERSION 0x50405 +#define JUCE_PROJUCER_VERSION 0x50407 //============================================================================== #define JUCE_MODULE_AVAILABLE_juce_analytics 1 diff --git a/examples/DemoRunner/JuceLibraryCode/JuceHeader.h b/examples/DemoRunner/JuceLibraryCode/JuceHeader.h index c1d016dd90..4878fe6390 100644 --- a/examples/DemoRunner/JuceLibraryCode/JuceHeader.h +++ b/examples/DemoRunner/JuceLibraryCode/JuceHeader.h @@ -56,7 +56,7 @@ namespace ProjectInfo { const char* const projectName = "DemoRunner"; const char* const companyName = "ROLI Ltd."; - const char* const versionString = "5.4.5"; - const int versionNumber = 0x50405; + const char* const versionString = "5.4.7"; + const int versionNumber = 0x50407; } #endif diff --git a/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp b/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp index 9fe417f9ea..cc3ef3cf06 100644 --- a/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp +++ b/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp @@ -24,7 +24,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +#include #include "../../../Assets/DemoUtilities.h" #include "JUCEDemos.h" @@ -41,26 +41,23 @@ #include "../../../Audio/MidiDemo.h" #include "../../../Audio/MPEDemo.h" #include "../../../Audio/PluckedStringsDemo.h" +#include "../../../Audio/SimpleFFTDemo.h" -#if JUCE_HAS_CONSTEXPR - #include "../../../Audio/SimpleFFTDemo.h" - #include "../../../BLOCKS/BlocksDrawingDemo.h" - #include "../../../BLOCKS/BlocksMonitorDemo.h" - #include "../../../BLOCKS/BlocksSynthDemo.h" +#include "../../../BLOCKS/BlocksDrawingDemo.h" +#include "../../../BLOCKS/BlocksMonitorDemo.h" +#include "../../../BLOCKS/BlocksSynthDemo.h" - - #include "../../../DSP/ConvolutionDemo.h" - #include "../../../DSP/FIRFilterDemo.h" - #include "../../../DSP/GainDemo.h" - #include "../../../DSP/IIRFilterDemo.h" - #include "../../../DSP/OscillatorDemo.h" - #include "../../../DSP/OverdriveDemo.h" - #if JUCE_USE_SIMD - #include "../../../DSP/SIMDRegisterDemo.h" - #endif - #include "../../../DSP/StateVariableFilterDemo.h" - #include "../../../DSP/WaveShaperTanhDemo.h" +#include "../../../DSP/ConvolutionDemo.h" +#include "../../../DSP/FIRFilterDemo.h" +#include "../../../DSP/GainDemo.h" +#include "../../../DSP/IIRFilterDemo.h" +#include "../../../DSP/OscillatorDemo.h" +#include "../../../DSP/OverdriveDemo.h" +#if JUCE_USE_SIMD + #include "../../../DSP/SIMDRegisterDemo.h" #endif +#include "../../../DSP/StateVariableFilterDemo.h" +#include "../../../DSP/WaveShaperTanhDemo.h" #include "../../../Utilities/Box2DDemo.h" #if JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX @@ -90,7 +87,6 @@ void registerDemos_One() noexcept REGISTER_DEMO (MPEDemo, Audio, false) REGISTER_DEMO (PluckedStringsDemo, Audio, false) - #if JUCE_HAS_CONSTEXPR REGISTER_DEMO (SimpleFFTDemo, Audio, false) REGISTER_DEMO (BlocksDrawingDemo, BLOCKS, false) REGISTER_DEMO (BlocksMonitorDemo, BLOCKS, false) @@ -107,7 +103,6 @@ void registerDemos_One() noexcept #endif REGISTER_DEMO (StateVariableFilterDemo, DSP, false) REGISTER_DEMO (WaveShaperTanhDemo, DSP, false) - #endif REGISTER_DEMO (Box2DDemo, Utilities, false) #if JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX diff --git a/examples/DemoRunner/Source/Demos/DemoPIPs2.cpp b/examples/DemoRunner/Source/Demos/DemoPIPs2.cpp index b7d95de83a..ffb25a0e99 100644 --- a/examples/DemoRunner/Source/Demos/DemoPIPs2.cpp +++ b/examples/DemoRunner/Source/Demos/DemoPIPs2.cpp @@ -24,7 +24,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +#include #include "../../../Assets/DemoUtilities.h" #include "JUCEDemos.h" @@ -46,9 +46,7 @@ #include "../../../GUI/FlexBoxDemo.h" #include "../../../GUI/FontsDemo.h" #include "../../../GUI/GraphicsDemo.h" -#if JUCE_HAS_CONSTEXPR - #include "../../../GUI/GridDemo.h" -#endif +#include "../../../GUI/GridDemo.h" #include "../../../GUI/ImagesDemo.h" #include "../../../GUI/KeyMappingsDemo.h" #include "../../../GUI/LookAndFeelDemo.h" @@ -85,9 +83,7 @@ void registerDemos_Two() noexcept REGISTER_DEMO (FlexBoxDemo, GUI, false) REGISTER_DEMO (FontsDemo, GUI, false) REGISTER_DEMO (GraphicsDemo, GUI, false) - #if JUCE_HAS_CONSTEXPR REGISTER_DEMO (GridDemo, GUI, false) - #endif REGISTER_DEMO (ImagesDemo, GUI, false) REGISTER_DEMO (KeyMappingsDemo, GUI, false) REGISTER_DEMO (LookAndFeelDemo, GUI, false) diff --git a/examples/DemoRunner/Source/Demos/JUCEDemos.cpp b/examples/DemoRunner/Source/Demos/JUCEDemos.cpp index e609221670..9c7f5132d3 100644 --- a/examples/DemoRunner/Source/Demos/JUCEDemos.cpp +++ b/examples/DemoRunner/Source/Demos/JUCEDemos.cpp @@ -24,7 +24,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +#include #include "../../../Assets/DemoUtilities.h" #include "JUCEDemos.h" diff --git a/examples/DemoRunner/Source/JUCEAppIcon.png b/examples/DemoRunner/Source/JUCEAppIcon.png index 2564a24f78..978ec36fae 100644 Binary files a/examples/DemoRunner/Source/JUCEAppIcon.png and b/examples/DemoRunner/Source/JUCEAppIcon.png differ diff --git a/examples/DemoRunner/Source/Main.cpp b/examples/DemoRunner/Source/Main.cpp index edbd8f8e61..537d83079c 100644 --- a/examples/DemoRunner/Source/Main.cpp +++ b/examples/DemoRunner/Source/Main.cpp @@ -24,7 +24,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +#include #include "../../Assets/DemoUtilities.h" #include "UI/MainComponent.h" diff --git a/examples/DemoRunner/Source/UI/DemoContentComponent.cpp b/examples/DemoRunner/Source/UI/DemoContentComponent.cpp index 1c6d9a3562..c00b8165e0 100644 --- a/examples/DemoRunner/Source/UI/DemoContentComponent.cpp +++ b/examples/DemoRunner/Source/UI/DemoContentComponent.cpp @@ -103,7 +103,7 @@ struct CodeContent : public Component //============================================================================== DemoContentComponent::DemoContentComponent (Component& mainComponent, std::function callback) : TabbedComponent (TabbedButtonBar::Orientation::TabsAtTop), - demoChangedCallback (callback) + demoChangedCallback (std::move (callback)) { demoContent.reset (new DemoContent()); addTab ("Demo", Colours::transparentBlack, demoContent.get(), false); diff --git a/examples/DemoRunner/Source/UI/DemoContentComponent.h b/examples/DemoRunner/Source/UI/DemoContentComponent.h index b4daee1140..7a15f5372d 100644 --- a/examples/DemoRunner/Source/UI/DemoContentComponent.h +++ b/examples/DemoRunner/Source/UI/DemoContentComponent.h @@ -26,7 +26,7 @@ #pragma once -#include "../JuceLibraryCode/JuceHeader.h" +#include #include "../Demos/JUCEDemos.h" struct DemoContent; diff --git a/examples/DemoRunner/Source/UI/MainComponent.h b/examples/DemoRunner/Source/UI/MainComponent.h index 5833cb9171..2486383020 100644 --- a/examples/DemoRunner/Source/UI/MainComponent.h +++ b/examples/DemoRunner/Source/UI/MainComponent.h @@ -26,7 +26,7 @@ #pragma once -#include "../JuceLibraryCode/JuceHeader.h" +#include #include "DemoContentComponent.h" //============================================================================== diff --git a/examples/GUI/CameraDemo.h b/examples/GUI/CameraDemo.h index 34a8e03a00..2c345f76ce 100644 --- a/examples/GUI/CameraDemo.h +++ b/examples/GUI/CameraDemo.h @@ -303,7 +303,7 @@ private: snapshotButton.setEnabled (true); #endif - #if JUCE_ANDROID || JUCE_IOS + #if JUCE_CONTENT_SHARING URL url (recordingFile); snapshotButton .setEnabled (false); @@ -337,7 +337,7 @@ private: lastSnapshot.setImage (image); - #if JUCE_ANDROID || JUCE_IOS + #if JUCE_CONTENT_SHARING auto imageFile = File::getSpecialLocation (File::tempDirectory).getNonexistentChildFile ("JuceCameraPhotoDemo", ".jpg"); FileOutputStream stream (imageFile); diff --git a/examples/GUI/DialogsDemo.h b/examples/GUI/DialogsDemo.h index cfa22eb9ff..f1f381c3e9 100644 --- a/examples/GUI/DialogsDemo.h +++ b/examples/GUI/DialogsDemo.h @@ -144,7 +144,7 @@ public: StringArray windowNames { "Plain Alert Window", "Alert Window With Warning Icon", "Alert Window With Info Icon", "Alert Window With Question Icon", "OK Cancel Alert Window", "Alert Window With Extra Components", "CalloutBox", "Thread With Progress Window", "'Load' File Browser", "'Load' File Browser With Image Preview", "'Choose Directory' File Browser", "'Save' File Browser", - "Share Text", "Share Files", "Share Images" }; + "Share Text", "Share Files", "Share Images" }; // warn in case we add any windows jassert (windowNames.size() == numDialogs); @@ -219,13 +219,9 @@ private: { AlertWindow::AlertIconType icon = AlertWindow::NoIcon; - switch (type) - { - case warningAlertWindow: icon = AlertWindow::WarningIcon; break; - case infoAlertWindow: icon = AlertWindow::InfoIcon; break; - case questionAlertWindow: icon = AlertWindow::QuestionIcon; break; - default: break; - } + if (type == warningAlertWindow) icon = AlertWindow::WarningIcon; + if (type == infoAlertWindow) icon = AlertWindow::InfoIcon; + if (type == questionAlertWindow) icon = AlertWindow::QuestionIcon; AlertWindow::showMessageBoxAsync (icon, "This is an AlertWindow", "And this is the AlertWindow's message. Blah blah blah blah blah blah blah blah blah blah blah blah blah.", @@ -339,7 +335,7 @@ private: FileOutputStream outStream (fileToSave); if (outStream.openedOk()) - if (auto inStream = std::unique_ptr (createAssetInputStream ("juce_icon.png"))) + if (auto inStream = createAssetInputStream ("juce_icon.png")) outStream.writeFromInputStream (*inStream, -1); } @@ -419,7 +415,7 @@ private: fileToSave.replaceWithText ("Make it fast!"); Array urls; - urls.add ({ fileToSave.getFullPathName() }); + urls.add (URL (fileToSave)); ContentSharer::getInstance()->shareFiles (urls, [] (bool success, const String& error) diff --git a/examples/GUI/FlexBoxDemo.h b/examples/GUI/FlexBoxDemo.h index 7560c23c6a..e682534c68 100644 --- a/examples/GUI/FlexBoxDemo.h +++ b/examples/GUI/FlexBoxDemo.h @@ -118,6 +118,7 @@ struct DemoFlexPanel : public juce::Component case 3: flexItem.alignSelf = FlexItem::AlignSelf::flexEnd; break; case 4: flexItem.alignSelf = FlexItem::AlignSelf::center; break; case 5: flexItem.alignSelf = FlexItem::AlignSelf::stretch; break; + default: break; } refreshLayout(); diff --git a/examples/GUI/GraphicsDemo.h b/examples/GUI/GraphicsDemo.h index d5fecd464f..a870a4f261 100644 --- a/examples/GUI/GraphicsDemo.h +++ b/examples/GUI/GraphicsDemo.h @@ -489,7 +489,7 @@ public: { lastSVGLoadTime = Time::getCurrentTime(); - ZipFile icons (createAssetInputStream ("icons.zip"), true); + ZipFile icons (createAssetInputStream ("icons.zip").release(), true); // Load a random SVG file from our embedded icons.zip file. const std::unique_ptr svgFileStream (icons.createStreamForEntry (Random::getSystemRandom().nextInt (icons.getNumEntries()))); diff --git a/examples/GUI/WidgetsDemo.h b/examples/GUI/WidgetsDemo.h index 9ee29bccb9..8a99e440cd 100644 --- a/examples/GUI/WidgetsDemo.h +++ b/examples/GUI/WidgetsDemo.h @@ -667,7 +667,7 @@ private: if (iconsFromZipFile.size() == 0) { // If we've not already done so, load all the images from the zip file.. - ZipFile icons (createAssetInputStream ("icons.zip"), true); + ZipFile icons (createAssetInputStream ("icons.zip").release(), true); for (int i = 0; i < icons.getNumEntries(); ++i) { diff --git a/examples/Plugins/AUv3SynthPluginDemo.h b/examples/Plugins/AUv3SynthPluginDemo.h index 1dc742342d..b4f6516293 100644 --- a/examples/Plugins/AUv3SynthPluginDemo.h +++ b/examples/Plugins/AUv3SynthPluginDemo.h @@ -180,9 +180,9 @@ class AUv3SynthEditor : public AudioProcessorEditor, { public: //============================================================================== - AUv3SynthEditor (AudioProcessor& processor) - : AudioProcessorEditor (processor), - roomSizeSlider (Slider::LinearHorizontal, Slider::NoTextBox) + AUv3SynthEditor (AudioProcessor& processorIn) + : AudioProcessorEditor (processorIn), + roomSizeSlider (Slider::LinearHorizontal, Slider::NoTextBox) { LookAndFeel::setDefaultLookAndFeel (&materialLookAndFeel); @@ -195,10 +195,8 @@ public: roomSizeSlider.setRange (0.0, 1.0); addAndMakeVisible (roomSizeSlider); - if (auto* assetStream = createAssetInputStream ("proaudio.path")) + if (auto fileStream = createAssetInputStream ("proaudio.path")) { - std::unique_ptr fileStream (assetStream); - Path proAudioPath; proAudioPath.loadPathFromStream (*fileStream); proAudioIcon.setPath (proAudioPath); @@ -411,13 +409,13 @@ private: //============================================================================== void loadNewSampleBinary (const void* data, int dataSize, const char* format) { - auto* soundBuffer = new MemoryInputStream (data, static_cast (dataSize), false); - loadNewSample (soundBuffer, format); + auto soundBuffer = std::make_unique (data, static_cast (dataSize), false); + loadNewSample (std::move (soundBuffer), format); } - void loadNewSample (InputStream* soundBuffer, const char* format) + void loadNewSample (std::unique_ptr soundBuffer, const char* format) { - std::unique_ptr formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true)); + std::unique_ptr formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer.release(), true)); BigInteger midiNotes; midiNotes.setRange (0, 126, true); diff --git a/examples/Plugins/ArpeggiatorPluginDemo.h b/examples/Plugins/ArpeggiatorPluginDemo.h index 132e1b2ca7..74e5c9c15d 100644 --- a/examples/Plugins/ArpeggiatorPluginDemo.h +++ b/examples/Plugins/ArpeggiatorPluginDemo.h @@ -61,8 +61,6 @@ public: addParameter (speed = new AudioParameterFloat ("speed", "Arpeggiator Speed", 0.0, 1.0, 0.5)); } - ~Arpeggiator() {} - //============================================================================== void prepareToPlay (double sampleRate, int samplesPerBlock) override { diff --git a/examples/Plugins/AudioPluginDemo.h b/examples/Plugins/AudioPluginDemo.h index 4937219b46..d6bc6ac9fe 100644 --- a/examples/Plugins/AudioPluginDemo.h +++ b/examples/Plugins/AudioPluginDemo.h @@ -177,9 +177,9 @@ public: //============================================================================== JuceDemoPluginAudioProcessor() : AudioProcessor (getBusesProperties()), - state (*this, nullptr, "state", - { std::make_unique ("gain", "Gain", NormalisableRange (0.0f, 1.0f), 0.9f), - std::make_unique ("delay", "Delay Feedback", NormalisableRange (0.0f, 1.0f), 0.5f) }) + state (*this, nullptr, "state", + { std::make_unique ("gain", "Gain", NormalisableRange (0.0f, 1.0f), 0.9f), + std::make_unique ("delay", "Delay Feedback", NormalisableRange (0.0f, 1.0f), 0.5f) }) { lastPosInfo.resetToDefault(); @@ -302,10 +302,22 @@ public: //============================================================================== void updateTrackProperties (const TrackProperties& properties) override { - trackProperties = properties; + { + const ScopedLock sl (trackPropertiesLock); + trackProperties = properties; + } - if (auto* editor = dynamic_cast (getActiveEditor())) - editor->updateTrackProperties (); + MessageManager::callAsync ([this] + { + if (auto* editor = dynamic_cast (getActiveEditor())) + editor->updateTrackProperties(); + }); + } + + TrackProperties getTrackProperties() const + { + const ScopedLock sl (trackPropertiesLock); + return trackProperties; } //============================================================================== @@ -324,9 +336,6 @@ public: // Our plug-in's current state AudioProcessorValueTreeState state; - // Current track colour and name - TrackProperties trackProperties; - private: //============================================================================== /** This is the editor component that our filter will display. */ @@ -430,7 +439,7 @@ private: void updateTrackProperties() { - auto trackColour = getProcessor().trackProperties.colour; + auto trackColour = getProcessor().getTrackProperties().colour; auto& lf = getLookAndFeel(); backgroundColour = (trackColour == Colour() ? lf.findColour (ResizableWindow::backgroundColourId) @@ -592,6 +601,9 @@ private: Synthesiser synth; + CriticalSection trackPropertiesLock; + TrackProperties trackProperties; + void initialiseSynth() { auto numVoices = 8; diff --git a/examples/Plugins/DSPModulePluginDemo.h b/examples/Plugins/DSPModulePluginDemo.h index 43d4f2ef1c..ff640748c0 100644 --- a/examples/Plugins/DSPModulePluginDemo.h +++ b/examples/Plugins/DSPModulePluginDemo.h @@ -33,7 +33,7 @@ juce_audio_plugin_client, juce_audio_processors, juce_audio_utils, juce_core, juce_data_structures, juce_dsp, juce_events, juce_graphics, juce_gui_basics, juce_gui_extra - exporters: xcode_mac, vs2019 + exporters: xcode_mac, vs2019, linux_make moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1 @@ -127,8 +127,6 @@ public: cabinetType.set (0); } - ~DspModulePluginDemoAudioProcessor() {} - //============================================================================== bool isBusesLayoutSupported (const BusesLayout& layouts) const override { @@ -274,9 +272,7 @@ public: auto maxSize = static_cast (roundToInt (getSampleRate() * (8192.0 / 44100.0))); auto assetName = (type == 0 ? "Impulse1.wav" : "Impulse2.wav"); - std::unique_ptr assetInputStream (createAssetInputStream (assetName)); - - if (assetInputStream != nullptr) + if (auto assetInputStream = createAssetInputStream (assetName)) { currentCabinetData.reset(); assetInputStream->readIntoMemoryBlock (currentCabinetData); @@ -317,21 +313,21 @@ private: //============================================================================== 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) + dspProcessor (p), + inputVolumeLabel ({}, dspProcessor.inputVolumeParam->name), + outputVolumeLabel ({}, dspProcessor.outputVolumeParam->name), + lowPassFilterFreqLabel ({}, dspProcessor.lowPassFilterFreqParam->name), + highPassFilterFreqLabel ({}, dspProcessor.highPassFilterFreqParam->name), + stereoLabel ({}, dspProcessor.stereoParam->name), + slopeLabel ({}, dspProcessor.slopeParam->name), + waveshaperLabel ({}, dspProcessor.waveshaperParam->name), + cabinetTypeLabel ({}, dspProcessor.cabinetTypeParam->name) { //============================================================================== - inputVolumeSlider .reset (new ParameterSlider (*processor.inputVolumeParam)); - outputVolumeSlider .reset (new ParameterSlider (*processor.outputVolumeParam)); - lowPassFilterFreqSlider .reset (new ParameterSlider (*processor.lowPassFilterFreqParam)); - highPassFilterFreqSlider.reset (new ParameterSlider (*processor.highPassFilterFreqParam)); + inputVolumeSlider .reset (new ParameterSlider (*dspProcessor.inputVolumeParam)); + outputVolumeSlider .reset (new ParameterSlider (*dspProcessor.outputVolumeParam)); + lowPassFilterFreqSlider .reset (new ParameterSlider (*dspProcessor.lowPassFilterFreqParam)); + highPassFilterFreqSlider.reset (new ParameterSlider (*dspProcessor.highPassFilterFreqParam)); addAndMakeVisible (inputVolumeSlider .get()); addAndMakeVisible (outputVolumeSlider .get()); @@ -358,11 +354,11 @@ private: addAndMakeVisible (stereoBox); auto i = 1; - for (auto choice : processor.stereoParam->choices) + for (auto choice : dspProcessor.stereoParam->choices) stereoBox.addItem (choice, i++); - stereoBox.onChange = [this] { processor.stereoParam->operator= (stereoBox.getSelectedItemIndex()); }; - stereoBox.setSelectedId (processor.stereoParam->getIndex() + 1); + stereoBox.onChange = [this] { dspProcessor.stereoParam->operator= (stereoBox.getSelectedItemIndex()); }; + stereoBox.setSelectedId (dspProcessor.stereoParam->getIndex() + 1); addAndMakeVisible (stereoLabel); stereoLabel.setJustificationType (Justification::centredLeft); @@ -372,11 +368,11 @@ private: addAndMakeVisible(slopeBox); i = 1; - for (auto choice : processor.slopeParam->choices) + for (auto choice : dspProcessor.slopeParam->choices) slopeBox.addItem(choice, i++); - slopeBox.onChange = [this] { processor.slopeParam->operator= (slopeBox.getSelectedItemIndex()); }; - slopeBox.setSelectedId(processor.slopeParam->getIndex() + 1); + slopeBox.onChange = [this] { dspProcessor.slopeParam->operator= (slopeBox.getSelectedItemIndex()); }; + slopeBox.setSelectedId(dspProcessor.slopeParam->getIndex() + 1); addAndMakeVisible(slopeLabel); slopeLabel.setJustificationType(Justification::centredLeft); @@ -386,11 +382,11 @@ private: addAndMakeVisible (waveshaperBox); i = 1; - for (auto choice : processor.waveshaperParam->choices) + for (auto choice : dspProcessor.waveshaperParam->choices) waveshaperBox.addItem (choice, i++); - waveshaperBox.onChange = [this] { processor.waveshaperParam->operator= (waveshaperBox.getSelectedItemIndex()); }; - waveshaperBox.setSelectedId (processor.waveshaperParam->getIndex() + 1); + waveshaperBox.onChange = [this] { dspProcessor.waveshaperParam->operator= (waveshaperBox.getSelectedItemIndex()); }; + waveshaperBox.setSelectedId (dspProcessor.waveshaperParam->getIndex() + 1); addAndMakeVisible (waveshaperLabel); waveshaperLabel.setJustificationType (Justification::centredLeft); @@ -400,11 +396,11 @@ private: addAndMakeVisible (cabinetTypeBox); i = 1; - for (auto choice : processor.cabinetTypeParam->choices) + for (auto choice : dspProcessor.cabinetTypeParam->choices) cabinetTypeBox.addItem (choice, i++); - cabinetTypeBox.onChange = [this] { processor.cabinetTypeParam->operator= (cabinetTypeBox.getSelectedItemIndex()); }; - cabinetTypeBox.setSelectedId (processor.cabinetTypeParam->getIndex() + 1); + cabinetTypeBox.onChange = [this] { dspProcessor.cabinetTypeParam->operator= (cabinetTypeBox.getSelectedItemIndex()); }; + cabinetTypeBox.setSelectedId (dspProcessor.cabinetTypeParam->getIndex() + 1); addAndMakeVisible (cabinetTypeLabel); cabinetTypeLabel.setJustificationType (Justification::centredLeft); @@ -412,21 +408,19 @@ private: //============================================================================== addAndMakeVisible (cabinetSimButton); - cabinetSimButton.onClick = [this] { processor.cabinetSimParam->operator= (cabinetSimButton.getToggleState()); }; - cabinetSimButton.setButtonText (processor.cabinetSimParam->name); - cabinetSimButton.setToggleState (processor.cabinetSimParam->get(), NotificationType::dontSendNotification); + cabinetSimButton.onClick = [this] { dspProcessor.cabinetSimParam->operator= (cabinetSimButton.getToggleState()); }; + cabinetSimButton.setButtonText (dspProcessor.cabinetSimParam->name); + cabinetSimButton.setToggleState (dspProcessor.cabinetSimParam->get(), NotificationType::dontSendNotification); addAndMakeVisible (oversamplingButton); - oversamplingButton.onClick = [this] { processor.oversamplingParam->operator= (oversamplingButton.getToggleState()); }; - oversamplingButton.setButtonText (processor.oversamplingParam->name); - oversamplingButton.setToggleState (processor.oversamplingParam->get(), NotificationType::dontSendNotification); + oversamplingButton.onClick = [this] { dspProcessor.oversamplingParam->operator= (oversamplingButton.getToggleState()); }; + oversamplingButton.setButtonText (dspProcessor.oversamplingParam->name); + oversamplingButton.setToggleState (dspProcessor.oversamplingParam->get(), NotificationType::dontSendNotification); //============================================================================== setSize (600, 400); } - ~DspModulePluginDemoAudioProcessorEditor() {} - //============================================================================== void paint (Graphics& g) override { @@ -479,7 +473,7 @@ private: private: //============================================================================== - DspModulePluginDemoAudioProcessor& processor; + DspModulePluginDemoAudioProcessor& dspProcessor; std::unique_ptr inputVolumeSlider, outputVolumeSlider, lowPassFilterFreqSlider, highPassFilterFreqSlider; diff --git a/examples/Plugins/GainPluginDemo.h b/examples/Plugins/GainPluginDemo.h index 850c7de30a..4e50cdd97f 100644 --- a/examples/Plugins/GainPluginDemo.h +++ b/examples/Plugins/GainPluginDemo.h @@ -62,8 +62,6 @@ public: addParameter (gain = new AudioParameterFloat ("gain", "Gain", 0.0f, 1.0f, 0.5f)); } - ~GainProcessor() {} - //============================================================================== void prepareToPlay (double, int) override {} void releaseResources() override {} diff --git a/examples/Plugins/InterAppAudioEffectPluginDemo.h b/examples/Plugins/InterAppAudioEffectPluginDemo.h index 4b750e86ce..9a008cf83b 100644 --- a/examples/Plugins/InterAppAudioEffectPluginDemo.h +++ b/examples/Plugins/InterAppAudioEffectPluginDemo.h @@ -157,8 +157,6 @@ public: { } - ~IAAEffectProcessor() {} - //============================================================================== void prepareToPlay (double, int) override { @@ -284,11 +282,11 @@ private: IAAEffectEditor (IAAEffectProcessor& p, AudioProcessorValueTreeState& vts) : AudioProcessorEditor (p), - processor (p), + iaaEffectProcessor (p), parameters (vts) { // Register for meter value updates. - processor.addMeterListener (*this); + iaaEffectProcessor.addMeterListener (*this); gainSlider.setSliderStyle (Slider::SliderStyle::LinearVertical); gainSlider.setTextBoxStyle (Slider::TextEntryBoxPosition::TextBoxAbove, false, 60, 20); @@ -310,7 +308,7 @@ private: rewindButton.onClick = [this] { if (transportControllable()) - processor.getPlayHead()->transportRewind(); + iaaEffectProcessor.getPlayHead()->transportRewind(); }; addChildComponent (rewindButton); @@ -320,7 +318,7 @@ private: playButton.onClick = [this] { if (transportControllable()) - processor.getPlayHead()->transportPlay (! lastPosInfo.isPlaying); + iaaEffectProcessor.getPlayHead()->transportPlay (! lastPosInfo.isPlaying); }; addChildComponent (playButton); @@ -330,7 +328,7 @@ private: recordButton.onClick = [this] { if (transportControllable()) - processor.getPlayHead()->transportRecord (! lastPosInfo.isRecording); + iaaEffectProcessor.getPlayHead()->transportRecord (! lastPosInfo.isRecording); }; addChildComponent (recordButton); @@ -359,9 +357,9 @@ private: startTimerHz (60); } - ~IAAEffectEditor() + ~IAAEffectEditor() override { - processor.removeMeterListener (*this); + iaaEffectProcessor.removeMeterListener (*this); } //============================================================================== @@ -411,7 +409,7 @@ private: //============================================================================== void timerCallback () override { - auto timeInfoSuccess = processor.updateCurrentTimeInfoFromHost (lastPosInfo); + auto timeInfoSuccess = iaaEffectProcessor.updateCurrentTimeInfoFromHost (lastPosInfo); transportText.setVisible (timeInfoSuccess); if (timeInfoSuccess) @@ -425,7 +423,7 @@ private: //============================================================================== bool transportControllable() { - auto playHead = processor.getPlayHead(); + auto playHead = iaaEffectProcessor.getPlayHead(); return playHead != nullptr && playHead->canControlTransport(); } @@ -481,8 +479,8 @@ private: void updateTransportButtonsDisplay() { - auto visible = processor.getPlayHead() != nullptr - && processor.getPlayHead()->canControlTransport(); + auto visible = iaaEffectProcessor.getPlayHead() != nullptr + && iaaEffectProcessor.getPlayHead()->canControlTransport(); if (rewindButton.isVisible() != visible) { @@ -524,7 +522,7 @@ private: } } - IAAEffectProcessor& processor; + IAAEffectProcessor& iaaEffectProcessor; AudioProcessorValueTreeState& parameters; const int buttonSize = 30; @@ -549,7 +547,6 @@ private: //============================================================================== AudioProcessorValueTreeState parameters; float previousGain = 0.0f; - std::array meterValues = { { 0, 0 } }; // This keeps a copy of the last set of timing info that was acquired during an // audio callback - the UI component will display this. diff --git a/examples/Plugins/MultiOutSynthPluginDemo.h b/examples/Plugins/MultiOutSynthPluginDemo.h index 0424acc264..d10f51990e 100644 --- a/examples/Plugins/MultiOutSynthPluginDemo.h +++ b/examples/Plugins/MultiOutSynthPluginDemo.h @@ -94,8 +94,6 @@ public: loadNewSample (createAssetInputStream ("singing.ogg"), "ogg"); } - ~MultiOutSynth() {} - //============================================================================== bool canAddBus (bool isInput) const override { return (! isInput && getBusCount (false) < maxMidiChannel); } bool canRemoveBus (bool isInput) const override { return (! isInput && getBusCount (false) > 1); } @@ -157,9 +155,9 @@ private: return output; } - void loadNewSample (InputStream* soundBuffer, const char* format) + void loadNewSample (std::unique_ptr soundBuffer, const char* format) { - std::unique_ptr formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true)); + std::unique_ptr formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer.release(), true)); BigInteger midiNotes; midiNotes.setRange (0, 126, true); diff --git a/examples/Plugins/NoiseGatePluginDemo.h b/examples/Plugins/NoiseGatePluginDemo.h index 620e0936e8..a8e3b7d64d 100644 --- a/examples/Plugins/NoiseGatePluginDemo.h +++ b/examples/Plugins/NoiseGatePluginDemo.h @@ -63,8 +63,6 @@ public: addParameter (alpha = new AudioParameterFloat ("alpha", "Alpha", 0.0f, 1.0f, 0.8f)); } - ~NoiseGate() {} - //============================================================================== bool isBusesLayoutSupported (const BusesLayout& layouts) const override { diff --git a/examples/Plugins/SamplerPluginDemo.h b/examples/Plugins/SamplerPluginDemo.h index 107fb664ee..a64a71d26f 100644 --- a/examples/Plugins/SamplerPluginDemo.h +++ b/examples/Plugins/SamplerPluginDemo.h @@ -492,9 +492,9 @@ inline std::unique_ptr makeAudioFormatReader (AudioFormatMana const void* sampleData, size_t dataSize) { - return std::unique_ptr (manager.createReaderFor (new MemoryInputStream (sampleData, - dataSize, - false))); + return std::unique_ptr (manager.createReaderFor (std::make_unique (sampleData, + dataSize, + false))); } inline std::unique_ptr makeAudioFormatReader (AudioFormatManager& manager, @@ -516,9 +516,9 @@ public: class MemoryAudioFormatReaderFactory : public AudioFormatReaderFactory { public: - MemoryAudioFormatReaderFactory (const void* sampleData, size_t dataSize) - : sampleData (sampleData), - dataSize (dataSize) + MemoryAudioFormatReaderFactory (const void* sampleDataIn, size_t dataSizeIn) + : sampleData (sampleDataIn), + dataSize (dataSizeIn) {} std::unique_ptr make (AudioFormatManager&manager ) const override @@ -540,8 +540,8 @@ private: class FileAudioFormatReaderFactory : public AudioFormatReaderFactory { public: - explicit FileAudioFormatReaderFactory (File file) - : file (std::move (file)) + explicit FileAudioFormatReaderFactory (File fileIn) + : file (std::move (fileIn)) {} std::unique_ptr make (AudioFormatManager& manager) const override @@ -925,12 +925,12 @@ public: virtual void loopPointsSecondsChanged (Range) {} }; - explicit DataModel (AudioFormatManager& audioFormatManager) - : DataModel (audioFormatManager, ValueTree (IDs::DATA_MODEL)) + explicit DataModel (AudioFormatManager& audioFormatManagerIn) + : DataModel (audioFormatManagerIn, ValueTree (IDs::DATA_MODEL)) {} - DataModel (AudioFormatManager& audioFormatManager, const ValueTree& vt) - : audioFormatManager (&audioFormatManager), + DataModel (AudioFormatManager& audioFormatManagerIn, const ValueTree& vt) + : audioFormatManager (&audioFormatManagerIn), valueTree (vt), sampleReader (valueTree, IDs::sampleReader, nullptr), centreFrequencyHz (valueTree, IDs::centreFrequencyHz, nullptr), @@ -1415,13 +1415,13 @@ public: using MouseCallback = std::function; LoopPointMarker (String marker, - MouseCallback onMouseDown, - MouseCallback onMouseDrag, - MouseCallback onMouseUp) + MouseCallback onMouseDownIn, + MouseCallback onMouseDragIn, + MouseCallback onMouseUpIn) : text (std::move (marker)), - onMouseDown (move (onMouseDown)), - onMouseDrag (move (onMouseDrag)), - onMouseUp (move (onMouseUp)) + onMouseDown (std::move (onMouseDownIn)), + onMouseDrag (std::move (onMouseDragIn)), + onMouseUp (std::move (onMouseUpIn)) { setMouseCursor (MouseCursor::LeftRightResizeCursor); } @@ -1585,7 +1585,7 @@ class LoopPointsOverlay : public Component, public: LoopPointsOverlay (const DataModel& dModel, const VisibleRangeDataModel& vModel, - UndoManager& undoManager) + UndoManager& undoManagerIn) : dataModel (dModel), visibleRange (vModel), beginMarker ("B", @@ -1596,7 +1596,7 @@ public: [this] (LoopPointMarker& m, const MouseEvent& e) { this->loopPointMouseDown (m, e); }, [this] (LoopPointMarker& m, const MouseEvent& e) { this->loopPointDragged (m, e); }, [this] (LoopPointMarker& m, const MouseEvent& e) { this->loopPointMouseUp (m, e); }), - undoManager (&undoManager) + undoManager (&undoManagerIn) { dataModel .addListener (*this); visibleRange.addListener (*this); @@ -1686,9 +1686,9 @@ class PlaybackPositionOverlay : public Component, public: using Provider = std::function()>; PlaybackPositionOverlay (const VisibleRangeDataModel& model, - Provider provider) + Provider providerIn) : visibleRange (model), - provider (move (provider)) + provider (std::move (providerIn)) { visibleRange.addListener (*this); startTimer (16); @@ -1853,7 +1853,7 @@ private: loopPoints.setVisible (value != LoopMode::none); } - void sampleReaderChanged (std::shared_ptr value) override + void sampleReaderChanged (std::shared_ptr) override { auto lengthInSeconds = dataModel.getSampleLengthSeconds(); visibleRange.setTotalRange (Range (0, lengthInSeconds), nullptr); @@ -2027,34 +2027,6 @@ struct ProcessorState LoopMode loopMode; }; -//============================================================================== -// We store the current sampler sound in a shared_ptr. Although we never -// call mutating member functions on this shared_ptr, we do read from it on -// both the audio and gui threads. Such concurrent reads should be safe -// without using atomic methods, but we use a tiny wrapper to enforce atomic -// accesses anyway - if nothing else, this wrapper enforces and documents that -// we never mutate the shared_ptr in a way which could cause a data race. -template -class AtomicSharedPtr final -{ -public: - AtomicSharedPtr() = default; - explicit AtomicSharedPtr (std::shared_ptr contents) - : contents (move (contents)) - {} - - AtomicSharedPtr (const AtomicSharedPtr& other) = delete; - AtomicSharedPtr& operator= (const AtomicSharedPtr& other) = delete; - - std::shared_ptr load() const - { - return atomic_load (&contents); - } - -private: - std::shared_ptr contents; -}; - //============================================================================== class SamplerAudioProcessor : public AudioProcessor { @@ -2062,11 +2034,9 @@ public: SamplerAudioProcessor() : AudioProcessor (BusesProperties().withOutput ("Output", AudioChannelSet::stereo(), true)) { - if (auto* asset = createAssetInputStream ("cello.wav")) + if (auto inputStream = createAssetInputStream ("cello.wav")) { - std::unique_ptr inputStream (asset); inputStream->readIntoMemoryBlock (mb); - readerFactory.reset (new MemoryAudioFormatReaderFactory (mb.getData(), mb.getSize())); } @@ -2074,7 +2044,7 @@ public: AudioFormatManager manager; manager.registerBasicFormats(); auto reader = readerFactory->make (manager); - auto sound = samplerSound.load(); + auto sound = samplerSound; auto sample = std::unique_ptr (new Sample (*reader, 10.0)); auto lengthInSeconds = sample->getLength() / sample->getSampleRate(); sound->setLoopPointsInSeconds ({lengthInSeconds * 0.1, lengthInSeconds * 0.9 }); @@ -2115,7 +2085,7 @@ public: state.mpeZoneLayout = synthesiser.getZoneLayout(); state.readerFactory = readerFactory == nullptr ? nullptr : readerFactory->clone(); - auto sound = samplerSound.load(); + auto sound = samplerSound; state.loopPointsSeconds = sound->getLoopPointsInSeconds(); state.centreFrequencyHz = sound->getCentreFrequencyInHz(); state.loopMode = sound->getLoopMode(); @@ -2170,7 +2140,7 @@ public: synthesiser.renderNextBlock (buffer, midiMessages, 0, buffer.getNumSamples()); - auto loadedSamplerSound = samplerSound.load(); + auto loadedSamplerSound = samplerSound; if (loadedSamplerSound->getSample() == nullptr) return; @@ -2197,18 +2167,18 @@ public: { public: SetSampleCommand (std::unique_ptr r, - std::unique_ptr sample, - std::vector> newVoices) - : readerFactory (move (r)), - sample (move (sample)), - newVoices (move (newVoices)) + std::unique_ptr sampleIn, + std::vector> newVoicesIn) + : readerFactory (std::move (r)), + sample (std::move (sampleIn)), + newVoices (std::move (newVoicesIn)) {} void operator() (SamplerAudioProcessor& proc) { proc.readerFactory = move (readerFactory); - auto sound = proc.samplerSound.load(); - sound->setSample (move (sample)); + auto sound = proc.samplerSound; + sound->setSample (std::move (sample)); auto numberOfVoices = proc.synthesiser.getNumVoices(); proc.synthesiser.clearVoices(); @@ -2226,7 +2196,7 @@ public: // Note that all allocation happens here, on the main message thread. Then, // we transfer ownership across to the audio thread. - auto loadedSamplerSound = samplerSound.load(); + auto loadedSamplerSound = samplerSound; std::vector> newSamplerVoices; newSamplerVoices.reserve (maxVoices); @@ -2252,7 +2222,7 @@ public: { pushCommand ([centreFrequency] (SamplerAudioProcessor& proc) { - auto loaded = proc.samplerSound.load(); + auto loaded = proc.samplerSound; if (loaded != nullptr) loaded->setCentreFrequencyInHz (centreFrequency); }); @@ -2262,7 +2232,7 @@ public: { pushCommand ([loopMode] (SamplerAudioProcessor& proc) { - auto loaded = proc.samplerSound.load(); + auto loaded = proc.samplerSound; if (loaded != nullptr) loaded->setLoopMode (loopMode); }); @@ -2272,7 +2242,7 @@ public: { pushCommand ([loopPoints] (SamplerAudioProcessor& proc) { - auto loaded = proc.samplerSound.load(); + auto loaded = proc.samplerSound; if (loaded != nullptr) loaded->setLoopPointsInSeconds (loopPoints); }); @@ -2316,8 +2286,8 @@ public: class SetNumVoicesCommand { public: - SetNumVoicesCommand (std::vector> newVoices) - : newVoices (move (newVoices)) + SetNumVoicesCommand (std::vector> newVoicesIn) + : newVoices (move (newVoicesIn)) {} void operator() (SamplerAudioProcessor& proc) @@ -2334,7 +2304,7 @@ public: }; numberOfVoices = std::min (maxVoices, numberOfVoices); - auto loadedSamplerSound = samplerSound.load(); + auto loadedSamplerSound = samplerSound; std::vector> newSamplerVoices; newSamplerVoices.reserve ((size_t) numberOfVoices); @@ -2363,7 +2333,7 @@ private: public: SamplerAudioProcessorEditor (SamplerAudioProcessor& p, ProcessorState state) : AudioProcessorEditor (&p), - processor (p), + samplerAudioProcessor (p), mainSamplerView (dataModel, [&p] { @@ -2453,33 +2423,33 @@ private: void sampleReaderChanged (std::shared_ptr value) override { - processor.setSample (value == nullptr ? nullptr : value->clone(), - dataModel.getAudioFormatManager()); + samplerAudioProcessor.setSample (value == nullptr ? nullptr : value->clone(), + dataModel.getAudioFormatManager()); } void centreFrequencyHzChanged (double value) override { - processor.setCentreFrequency (value); + samplerAudioProcessor.setCentreFrequency (value); } void loopPointsSecondsChanged (Range value) override { - processor.setLoopPoints (value); + samplerAudioProcessor.setLoopPoints (value); } void loopModeChanged (LoopMode value) override { - processor.setLoopMode (value); + samplerAudioProcessor.setLoopMode (value); } void synthVoicesChanged (int value) override { - processor.setNumberOfVoices (value); + samplerAudioProcessor.setNumberOfVoices (value); } void voiceStealingEnabledChanged (bool value) override { - processor.setVoiceStealingEnabled (value); + samplerAudioProcessor.setVoiceStealingEnabled (value); } void legacyModeEnabledChanged (bool value) override @@ -2512,17 +2482,17 @@ private: void setProcessorLegacyMode() { - processor.setLegacyModeEnabled (mpeSettings.getLegacyPitchbendRange(), - Range (mpeSettings.getLegacyFirstChannel(), - mpeSettings.getLegacyLastChannel())); + samplerAudioProcessor.setLegacyModeEnabled (mpeSettings.getLegacyPitchbendRange(), + Range (mpeSettings.getLegacyFirstChannel(), + mpeSettings.getLegacyLastChannel())); } void setProcessorMPEMode() { - processor.setMPEZoneLayout (mpeSettings.getMPEZoneLayout()); + samplerAudioProcessor.setMPEZoneLayout (mpeSettings.getMPEZoneLayout()); } - SamplerAudioProcessor& processor; + SamplerAudioProcessor& samplerAudioProcessor; AudioFormatManager formatManager; DataModel dataModel { formatManager }; UndoManager undoManager; @@ -2611,7 +2581,7 @@ private: MemoryBlock mb; std::unique_ptr readerFactory; - AtomicSharedPtr samplerSound { std::make_shared() }; + std::shared_ptr samplerSound = std::make_shared(); MPESynthesiser synthesiser; // This mutex is used to ensure we don't modify the processor state during diff --git a/examples/Utilities/InAppPurchasesDemo.h b/examples/Utilities/InAppPurchasesDemo.h index 7937857d6f..1336974459 100644 --- a/examples/Utilities/InAppPurchasesDemo.h +++ b/examples/Utilities/InAppPurchasesDemo.h @@ -91,7 +91,7 @@ public: VoiceProduct {"jb", "JB", false, false, false, "Retrieving price..." } }); } - ~VoicePurchases() + ~VoicePurchases() override { InAppPurchases::getInstance()->removeListener (this); } @@ -395,11 +395,8 @@ public: setInterceptsMouseClicks (! hasBeenPurchased, ! hasBeenPurchased); - if (auto* assetStream = createAssetInputStream (String ("Purchases/" + String (imageResourceName)).toRawUTF8())) - { - std::unique_ptr fileStream (assetStream); + if (auto fileStream = createAssetInputStream (String ("Purchases/" + String (imageResourceName)).toRawUTF8())) avatar = PNGImageFormat().decodeImage (*fileStream); - } } } private: @@ -519,7 +516,7 @@ public: #endif } - ~InAppPurchasesDemo() + ~InAppPurchasesDemo() override { dm.closeAudioDevice(); dm.removeAudioCallback (&player); @@ -569,10 +566,8 @@ private: { auto assetName = "Purchases/" + soundNames[idx] + String (phraseListBox.getSelectedRow()) + ".ogg"; - if (auto* assetStream = createAssetInputStream (assetName.toRawUTF8())) + if (auto fileStream = createAssetInputStream (assetName.toRawUTF8())) { - std::unique_ptr fileStream (assetStream); - currentPhraseData.reset(); fileStream->readIntoMemoryBlock (currentPhraseData); diff --git a/examples/Utilities/PushNotificationsDemo.h b/examples/Utilities/PushNotificationsDemo.h index 7de0da7614..1daf536e6d 100644 --- a/examples/Utilities/PushNotificationsDemo.h +++ b/examples/Utilities/PushNotificationsDemo.h @@ -238,7 +238,7 @@ public: #endif } - ~PushNotificationsDemo() + ~PushNotificationsDemo() override { PushNotifications::getInstance()->removeListener (this); diff --git a/examples/Utilities/SystemInfoDemo.h b/examples/Utilities/SystemInfoDemo.h index 5e6294e406..4eaa596f8b 100644 --- a/examples/Utilities/SystemInfoDemo.h +++ b/examples/Utilities/SystemInfoDemo.h @@ -89,6 +89,7 @@ static const char* getDisplayOrientation() case Desktop::upsideDown: return "Upside-down"; case Desktop::rotatedClockwise: return "Rotated Clockwise"; case Desktop::rotatedAntiClockwise: return "Rotated Anti-clockwise"; + case Desktop::allOrientations: return "All"; default: jassertfalse; break; } diff --git a/extras/AudioPerformanceTest/AudioPerformanceTest.jucer b/extras/AudioPerformanceTest/AudioPerformanceTest.jucer index f030db7142..60b7a1320c 100644 --- a/extras/AudioPerformanceTest/AudioPerformanceTest.jucer +++ b/extras/AudioPerformanceTest/AudioPerformanceTest.jucer @@ -1,7 +1,7 @@ @@ -70,8 +70,8 @@ - - + + diff --git a/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt b/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt index 97d616e629..a27235f12b 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt +++ b/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt @@ -119,6 +119,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.h" "../../../../../modules/juce_audio_devices/native/juce_android_Audio.cpp" + "../../../../../modules/juce_audio_devices/native/juce_android_HighPerformanceAudioHelpers.h" "../../../../../modules/juce_audio_devices/native/juce_android_Midi.cpp" "../../../../../modules/juce_audio_devices/native/juce_android_Oboe.cpp" "../../../../../modules/juce_audio_devices/native/juce_android_OpenSL.cpp" @@ -568,8 +569,6 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/misc/juce_Result.h" "../../../../../modules/juce_core/misc/juce_RuntimePermissions.cpp" "../../../../../modules/juce_core/misc/juce_RuntimePermissions.h" - "../../../../../modules/juce_core/misc/juce_StdFunctionCompat.cpp" - "../../../../../modules/juce_core/misc/juce_StdFunctionCompat.h" "../../../../../modules/juce_core/misc/juce_Uuid.cpp" "../../../../../modules/juce_core/misc/juce_Uuid.h" "../../../../../modules/juce_core/misc/juce_WindowsRegistry.h" @@ -1410,6 +1409,7 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/j set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Audio.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_HighPerformanceAudioHelpers.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Midi.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Oboe.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_OpenSL.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1859,8 +1859,6 @@ set_source_files_properties("../../../../../modules/juce_core/misc/juce_Result.c set_source_files_properties("../../../../../modules/juce_core/misc/juce_Result.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_RuntimePermissions.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_RuntimePermissions.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_core/misc/juce_StdFunctionCompat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_core/misc/juce_StdFunctionCompat.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_Uuid.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_Uuid.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_WindowsRegistry.h" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/extras/AudioPerformanceTest/Builds/Android/app/build.gradle b/extras/AudioPerformanceTest/Builds/Android/app/build.gradle index d89fa68057..668b2f5baa 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/build.gradle +++ b/extras/AudioPerformanceTest/Builds/Android/app/build.gradle @@ -89,7 +89,6 @@ android { main.java.srcDirs += ["../../../../../modules/juce_core/native/javacore/init", "../../../../../modules/juce_core/native/javacore/app", - "../../../../../modules/juce_gui_basics/native/javacore/app", "../../../../../modules/juce_gui_basics/native/javaopt/app"] main.res.srcDirs += diff --git a/extras/AudioPerformanceTest/Builds/Android/app/src/main/AndroidManifest.xml b/extras/AudioPerformanceTest/Builds/Android/app/src/main/AndroidManifest.xml index 6a6b111846..ca3a390ad5 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/src/main/AndroidManifest.xml +++ b/extras/AudioPerformanceTest/Builds/Android/app/src/main/AndroidManifest.xml @@ -2,7 +2,8 @@ - + diff --git a/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java b/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java index 0bb31cb5d3..a40a251ebc 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java +++ b/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java @@ -1,25 +1,3 @@ -/* - ============================================================================== - - 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. - - ============================================================================== -*/ - package com.android.vending.billing; /** * InAppBillingService is the service that provides in-app billing version 3 and beyond. 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 3a402c1d1d..61c6f68970 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 @@ -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 diff --git a/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/juce/audioperformancetest/SharingContentProvider.java b/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/juce/audioperformancetest/SharingContentProvider.java index 5b7d4d4ac8..9bf1d88180 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/juce/audioperformancetest/SharingContentProvider.java +++ b/extras/AudioPerformanceTest/Builds/Android/app/src/main/java/com/juce/audioperformancetest/SharingContentProvider.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.juce.audioperformancetest; import android.content.ContentProvider; diff --git a/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile b/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile index cd2ac907c5..e4dead0bc8 100644 --- a/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile +++ b/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile @@ -32,7 +32,7 @@ ifeq ($(CONFIG),Debug) JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) - TARGET_ARCH := -march=native + TARGET_ARCH := 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 x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) @@ -41,7 +41,7 @@ ifeq ($(CONFIG),Debug) JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) JUCE_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 x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -lrt -ldl -lpthread $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lrt -ldl -lpthread $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -53,7 +53,7 @@ ifeq ($(CONFIG),Release) JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) - TARGET_ARCH := -march=native + TARGET_ARCH := 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 x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) @@ -62,7 +62,7 @@ ifeq ($(CONFIG),Release) JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 $(CFLAGS) JUCE_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 x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lrt -ldl -lpthread $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lrt -ldl -lpthread $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif diff --git a/extras/AudioPerformanceTest/Builds/MacOSX/App.entitlements b/extras/AudioPerformanceTest/Builds/MacOSX/App.entitlements deleted file mode 100644 index 6631ffa6f2..0000000000 --- a/extras/AudioPerformanceTest/Builds/MacOSX/App.entitlements +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj index 6b357db8c7..fd65ab1ce0 100644 --- a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj +++ b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj @@ -378,13 +378,6 @@ path = System/Library/Frameworks/DiscRecording.framework; sourceTree = SDKROOT; }; - F9E591FD0A75BCD9F600120A = { - isa = PBXFileReference; - lastKnownFileType = text.plist.xml; - name = App.entitlements; - path = App.entitlements; - sourceTree = "SOURCE_ROOT"; - }; FAAB4EAE4A57B642D3B9EC23 = { isa = PBXFileReference; lastKnownFileType = file.nib; @@ -565,7 +558,6 @@ "JucePlugin_Build_Standalone=0", "JucePlugin_Build_Unity=0", ); - GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( "../../JuceLibraryCode", @@ -608,11 +600,12 @@ CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; @@ -656,10 +649,12 @@ CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj b/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj index b91755f102..c9a43f2cfb 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj @@ -751,9 +751,6 @@ true - - true - true @@ -1904,6 +1901,7 @@ + @@ -2168,7 +2166,6 @@ - diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj.filters b/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj.filters index 80264f8ea7..6426bf7125 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj.filters +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj.filters @@ -1033,9 +1033,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -2385,6 +2382,9 @@ JUCE Modules\juce_audio_devices\midi_io + + JUCE Modules\juce_audio_devices\native + JUCE Modules\juce_audio_devices\native @@ -3177,9 +3177,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2019/resources.rc b/extras/AudioPerformanceTest/Builds/VisualStudio2019/resources.rc index 2dec142923..ecc9951fab 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2019/resources.rc +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2019/resources.rc @@ -1,3 +1,5 @@ +#pragma code_page(65001) + #ifdef JUCE_USER_DEFINED_RC_FILE #include JUCE_USER_DEFINED_RC_FILE #else diff --git a/extras/AudioPerformanceTest/Builds/iOS/App.entitlements b/extras/AudioPerformanceTest/Builds/iOS/App.entitlements deleted file mode 100644 index 6631ffa6f2..0000000000 --- a/extras/AudioPerformanceTest/Builds/iOS/App.entitlements +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj index a0c15f52a9..7f45bedf90 100644 --- a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj +++ b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj @@ -418,13 +418,6 @@ path = System/Library/Frameworks/CoreImage.framework; sourceTree = SDKROOT; }; - F9E591FD0A75BCD9F600120A = { - isa = PBXFileReference; - lastKnownFileType = text.plist.xml; - name = App.entitlements; - path = App.entitlements; - sourceTree = "SOURCE_ROOT"; - }; 9F54D12C977843F8FEFCF041 = { isa = PBXGroup; children = ( @@ -602,7 +595,6 @@ "JucePlugin_Build_Standalone=0", "JucePlugin_Build_Unity=0", ); - GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( "../../JuceLibraryCode", @@ -644,11 +636,12 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; @@ -694,10 +687,12 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; diff --git a/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h b/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h index d8878c5095..140961cad8 100644 --- a/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h +++ b/extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h @@ -47,7 +47,7 @@ #define JUCE_USE_DARK_SPLASH_SCREEN 1 -#define JUCE_PROJUCER_VERSION 0x50405 +#define JUCE_PROJUCER_VERSION 0x50407 //============================================================================== #define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 diff --git a/extras/AudioPerformanceTest/Source/Main.cpp b/extras/AudioPerformanceTest/Source/Main.cpp index bfce625b56..76c3337fd9 100644 --- a/extras/AudioPerformanceTest/Source/Main.cpp +++ b/extras/AudioPerformanceTest/Source/Main.cpp @@ -24,7 +24,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +#include #include "MainComponent.h" Component* createMainContentComponent(); diff --git a/extras/AudioPerformanceTest/Source/MainComponent.h b/extras/AudioPerformanceTest/Source/MainComponent.h index f30b83e4c5..73dc3a1853 100644 --- a/extras/AudioPerformanceTest/Source/MainComponent.h +++ b/extras/AudioPerformanceTest/Source/MainComponent.h @@ -26,7 +26,7 @@ #pragma once -#include "../JuceLibraryCode/JuceHeader.h" +#include #include //============================================================================== diff --git a/extras/AudioPluginHost/AudioPluginHost.jucer b/extras/AudioPluginHost/AudioPluginHost.jucer index 8ace7ccf00..5e44ba948b 100644 --- a/extras/AudioPluginHost/AudioPluginHost.jucer +++ b/extras/AudioPluginHost/AudioPluginHost.jucer @@ -2,11 +2,12 @@ + smallIcon="c97aUr" bigIcon="c97aUr" microphonePermissionNeeded="1" + sendAppleEventsPermissionNeeded="1" sendAppleEventsPermissionText="This is required for some third-party plug-ins to function correctly."> - - + + @@ -205,10 +205,10 @@ - + diff --git a/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt b/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt index b066fa5ed5..e0fe9df244 100644 --- a/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt +++ b/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt @@ -136,6 +136,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.h" "../../../../../modules/juce_audio_devices/native/juce_android_Audio.cpp" + "../../../../../modules/juce_audio_devices/native/juce_android_HighPerformanceAudioHelpers.h" "../../../../../modules/juce_audio_devices/native/juce_android_Midi.cpp" "../../../../../modules/juce_audio_devices/native/juce_android_Oboe.cpp" "../../../../../modules/juce_audio_devices/native/juce_android_OpenSL.cpp" @@ -585,8 +586,6 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/misc/juce_Result.h" "../../../../../modules/juce_core/misc/juce_RuntimePermissions.cpp" "../../../../../modules/juce_core/misc/juce_RuntimePermissions.h" - "../../../../../modules/juce_core/misc/juce_StdFunctionCompat.cpp" - "../../../../../modules/juce_core/misc/juce_StdFunctionCompat.h" "../../../../../modules/juce_core/misc/juce_Uuid.cpp" "../../../../../modules/juce_core/misc/juce_Uuid.h" "../../../../../modules/juce_core/misc/juce_WindowsRegistry.h" @@ -1500,6 +1499,7 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/j set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Audio.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_HighPerformanceAudioHelpers.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Midi.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Oboe.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_OpenSL.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1949,8 +1949,6 @@ set_source_files_properties("../../../../../modules/juce_core/misc/juce_Result.c set_source_files_properties("../../../../../modules/juce_core/misc/juce_Result.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_RuntimePermissions.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_RuntimePermissions.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_core/misc/juce_StdFunctionCompat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_core/misc/juce_StdFunctionCompat.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_Uuid.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_Uuid.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_WindowsRegistry.h" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/extras/AudioPluginHost/Builds/Android/app/build.gradle b/extras/AudioPluginHost/Builds/Android/app/build.gradle index 838821bb36..8bcc1873dc 100644 --- a/extras/AudioPluginHost/Builds/Android/app/build.gradle +++ b/extras/AudioPluginHost/Builds/Android/app/build.gradle @@ -53,7 +53,7 @@ android { } externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGURATION=DEBUG", "-DCMAKE_CXX_FLAGS_DEBUG=-O0 -Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers", "-DCMAKE_C_FLAGS_DEBUG=-O0" + arguments "-DJUCE_BUILD_CONFIGURATION=DEBUG", "-DCMAKE_CXX_FLAGS_DEBUG=-O0 -Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum", "-DCMAKE_C_FLAGS_DEBUG=-O0" } } @@ -62,7 +62,7 @@ android { release_ { externalNativeBuild { cmake { - arguments "-DJUCE_BUILD_CONFIGURATION=RELEASE", "-DCMAKE_CXX_FLAGS_RELEASE=-O3 -Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers", "-DCMAKE_C_FLAGS_RELEASE=-O3" + arguments "-DJUCE_BUILD_CONFIGURATION=RELEASE", "-DCMAKE_CXX_FLAGS_RELEASE=-O3 -Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum", "-DCMAKE_C_FLAGS_RELEASE=-O3" } } @@ -86,7 +86,6 @@ android { main.java.srcDirs += ["../../../../../modules/juce_core/native/javacore/init", "../../../../../modules/juce_core/native/javacore/app", - "../../../../../modules/juce_gui_basics/native/javacore/app", "../../../../../modules/juce_gui_basics/native/javaopt/app"] main.res.srcDirs += diff --git a/extras/AudioPluginHost/Builds/Android/app/src/main/AndroidManifest.xml b/extras/AudioPluginHost/Builds/Android/app/src/main/AndroidManifest.xml index bc70468168..30c57b2ae3 100644 --- a/extras/AudioPluginHost/Builds/Android/app/src/main/AndroidManifest.xml +++ b/extras/AudioPluginHost/Builds/Android/app/src/main/AndroidManifest.xml @@ -2,7 +2,8 @@ - + diff --git a/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-hdpi/icon.png b/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-hdpi/icon.png index e551340cfb..f5caa4ef2a 100644 Binary files a/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-hdpi/icon.png and b/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-hdpi/icon.png differ diff --git a/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-ldpi/icon.png b/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-ldpi/icon.png index 475d142e35..8caa9bb885 100644 Binary files a/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-ldpi/icon.png and b/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-ldpi/icon.png differ diff --git a/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-mdpi/icon.png b/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-mdpi/icon.png index eb13005911..b87302b4f9 100644 Binary files a/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-mdpi/icon.png and b/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-mdpi/icon.png differ diff --git a/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-xhdpi/icon.png b/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-xhdpi/icon.png index dddc79015e..1895bc1c73 100644 Binary files a/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-xhdpi/icon.png and b/extras/AudioPluginHost/Builds/Android/app/src/main/res/drawable-xhdpi/icon.png differ diff --git a/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile b/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile index e6bb5df34d..ae247e8196 100644 --- a/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile +++ b/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile @@ -32,7 +32,7 @@ ifeq ($(CONFIG),Debug) JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) - TARGET_ARCH := -march=native + TARGET_ARCH := 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 x11 xinerama xext freetype2 libcurl) -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) @@ -41,7 +41,7 @@ ifeq ($(CONFIG),Debug) JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) JUCE_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 x11 xinerama xext freetype2 libcurl) -lrt -ldl -lpthread -lGL $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa x11 xinerama xext freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -53,7 +53,7 @@ ifeq ($(CONFIG),Release) JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) - TARGET_ARCH := -march=native + TARGET_ARCH := 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 x11 xinerama xext freetype2 libcurl) -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) @@ -62,7 +62,7 @@ ifeq ($(CONFIG),Release) JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -Os $(CFLAGS) JUCE_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 x11 xinerama xext freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa x11 xinerama xext freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif diff --git a/extras/AudioPluginHost/Builds/MacOSX/App.entitlements b/extras/AudioPluginHost/Builds/MacOSX/App.entitlements deleted file mode 100644 index 6631ffa6f2..0000000000 --- a/extras/AudioPluginHost/Builds/MacOSX/App.entitlements +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj b/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj index ba89b87e35..4332e368ae 100644 --- a/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj +++ b/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj @@ -459,13 +459,6 @@ path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - 9A92E8C5ECBBF926B5CF57BC = { - isa = PBXFileReference; - lastKnownFileType = text.plist.xml; - name = App.entitlements; - path = App.entitlements; - sourceTree = "SOURCE_ROOT"; - }; 9F9B445E6755CAA19E4344ED = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; @@ -809,7 +802,7 @@ INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.pluginhost; PRODUCT_NAME = "AudioPluginHost"; USE_HEADERMAP = NO; @@ -843,7 +836,6 @@ "JucePlugin_Build_Standalone=0", "JucePlugin_Build_Unity=0", ); - GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( "../../../../modules/juce_audio_processors/format_types/VST3_SDK", @@ -856,7 +848,7 @@ INSTALL_PATH = "$(HOME)/Applications"; LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.11; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.pluginhost; PRODUCT_NAME = "AudioPluginHost"; USE_HEADERMAP = NO; @@ -888,11 +880,12 @@ CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; @@ -936,10 +929,12 @@ CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; diff --git a/extras/AudioPluginHost/Builds/MacOSX/Icon.icns b/extras/AudioPluginHost/Builds/MacOSX/Icon.icns index 6ab6915802..f207907bcc 100644 Binary files a/extras/AudioPluginHost/Builds/MacOSX/Icon.icns and b/extras/AudioPluginHost/Builds/MacOSX/Icon.icns differ diff --git a/extras/AudioPluginHost/Builds/MacOSX/Info-App.plist b/extras/AudioPluginHost/Builds/MacOSX/Info-App.plist index ef1b5254c5..87c84ba7b6 100644 --- a/extras/AudioPluginHost/Builds/MacOSX/Info-App.plist +++ b/extras/AudioPluginHost/Builds/MacOSX/Info-App.plist @@ -5,6 +5,8 @@ NSMicrophoneUsageDescription This app requires audio input. If you do not have an audio interface connected it will use the built-in microphone. + NSAppleEventsUsageDescription + This is required for some third-party plug-ins to function correctly. CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile diff --git a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj index 0f84cdc103..5a99ed64cf 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj @@ -758,9 +758,6 @@ true - - true - true @@ -1980,6 +1977,7 @@ + @@ -2244,7 +2242,6 @@ - diff --git a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters index 2602de1bcd..f0c6cf3367 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters @@ -1090,9 +1090,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -2538,6 +2535,9 @@ JUCE Modules\juce_audio_devices\midi_io + + JUCE Modules\juce_audio_devices\native + JUCE Modules\juce_audio_devices\native @@ -3330,9 +3330,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/extras/AudioPluginHost/Builds/VisualStudio2015/icon.ico b/extras/AudioPluginHost/Builds/VisualStudio2015/icon.ico index 09d32ad703..a2d5c802ee 100644 Binary files a/extras/AudioPluginHost/Builds/VisualStudio2015/icon.ico and b/extras/AudioPluginHost/Builds/VisualStudio2015/icon.ico differ diff --git a/extras/AudioPluginHost/Builds/VisualStudio2015/resources.rc b/extras/AudioPluginHost/Builds/VisualStudio2015/resources.rc index 8af2d39631..f2130b947d 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2015/resources.rc +++ b/extras/AudioPluginHost/Builds/VisualStudio2015/resources.rc @@ -1,3 +1,5 @@ +#pragma code_page(65001) + #ifdef JUCE_USER_DEFINED_RC_FILE #include JUCE_USER_DEFINED_RC_FILE #else diff --git a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj index 0649e62d3b..33e5961ed8 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj @@ -758,9 +758,6 @@ true - - true - true @@ -1980,6 +1977,7 @@ + @@ -2244,7 +2242,6 @@ - diff --git a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters index 851fe93e92..460c20f892 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters @@ -1090,9 +1090,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -2538,6 +2535,9 @@ JUCE Modules\juce_audio_devices\midi_io + + JUCE Modules\juce_audio_devices\native + JUCE Modules\juce_audio_devices\native @@ -3330,9 +3330,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/extras/AudioPluginHost/Builds/VisualStudio2017/icon.ico b/extras/AudioPluginHost/Builds/VisualStudio2017/icon.ico index 09d32ad703..a2d5c802ee 100644 Binary files a/extras/AudioPluginHost/Builds/VisualStudio2017/icon.ico and b/extras/AudioPluginHost/Builds/VisualStudio2017/icon.ico differ diff --git a/extras/AudioPluginHost/Builds/VisualStudio2017/resources.rc b/extras/AudioPluginHost/Builds/VisualStudio2017/resources.rc index 8af2d39631..f2130b947d 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2017/resources.rc +++ b/extras/AudioPluginHost/Builds/VisualStudio2017/resources.rc @@ -1,3 +1,5 @@ +#pragma code_page(65001) + #ifdef JUCE_USER_DEFINED_RC_FILE #include JUCE_USER_DEFINED_RC_FILE #else diff --git a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj index ad4238c7d5..fe7896c327 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj @@ -758,9 +758,6 @@ true - - true - true @@ -1980,6 +1977,7 @@ + @@ -2244,7 +2242,6 @@ - diff --git a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters index b28a2171c1..649eb2a925 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters @@ -1090,9 +1090,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -2538,6 +2535,9 @@ JUCE Modules\juce_audio_devices\midi_io + + JUCE Modules\juce_audio_devices\native + JUCE Modules\juce_audio_devices\native @@ -3330,9 +3330,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/extras/AudioPluginHost/Builds/VisualStudio2019/icon.ico b/extras/AudioPluginHost/Builds/VisualStudio2019/icon.ico index 09d32ad703..a2d5c802ee 100644 Binary files a/extras/AudioPluginHost/Builds/VisualStudio2019/icon.ico and b/extras/AudioPluginHost/Builds/VisualStudio2019/icon.ico differ diff --git a/extras/AudioPluginHost/Builds/VisualStudio2019/resources.rc b/extras/AudioPluginHost/Builds/VisualStudio2019/resources.rc index 8af2d39631..f2130b947d 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2019/resources.rc +++ b/extras/AudioPluginHost/Builds/VisualStudio2019/resources.rc @@ -1,3 +1,5 @@ +#pragma code_page(65001) + #ifdef JUCE_USER_DEFINED_RC_FILE #include JUCE_USER_DEFINED_RC_FILE #else diff --git a/extras/AudioPluginHost/Builds/iOS/App.entitlements b/extras/AudioPluginHost/Builds/iOS/App.entitlements deleted file mode 100644 index 6631ffa6f2..0000000000 --- a/extras/AudioPluginHost/Builds/iOS/App.entitlements +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj index 3149ab36da..686cb5ef5c 100644 --- a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj +++ b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj @@ -463,13 +463,6 @@ path = ../../Source/UI/PluginWindow.h; sourceTree = "SOURCE_ROOT"; }; - 9A92E8C5ECBBF926B5CF57BC = { - isa = PBXFileReference; - lastKnownFileType = text.plist.xml; - name = App.entitlements; - path = App.entitlements; - sourceTree = "SOURCE_ROOT"; - }; 9F9B445E6755CAA19E4344ED = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; @@ -821,7 +814,7 @@ INFOPLIST_FILE = Info-App.plist; INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.pluginhost; PRODUCT_NAME = "Plugin Host"; USE_HEADERMAP = NO; @@ -856,7 +849,6 @@ "JucePlugin_Build_Standalone=0", "JucePlugin_Build_Unity=0", ); - GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( "../../../../modules/juce_audio_processors/format_types/VST3_SDK", @@ -868,7 +860,7 @@ INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; LLVM_LTO = YES; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.pluginhost; PRODUCT_NAME = "Plugin Host"; USE_HEADERMAP = NO; @@ -900,11 +892,12 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; @@ -950,10 +943,12 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-29.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-29.png index 9344000d60..64686e41e6 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-29.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-29.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png index 84a06c0479..e48be2d3ff 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png index 6021b1d0c7..5b71bf3d3d 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png index 635a47187a..c07c472f62 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-72.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-72.png index 52ec77a646..29c57add7a 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-72.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-72.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png index 54b2c964e8..c45a6e8632 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-76.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-76.png index 1d84eb4b92..7494cb731e 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-76.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-76.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png index 4324c82b12..88b8868496 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png index c2cfbef3f2..640134b647 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-@3x.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-@3x.png index 15deee7ec5..4b608c00a0 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-@3x.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-@3x.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-AppStore-1024.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-AppStore-1024.png index 467fc9cf7e..a35af3124b 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-AppStore-1024.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-AppStore-1024.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@2x.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@2x.png index 2a865c6fe6..3191f39780 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@2x.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@2x.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@3x.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@3x.png index ad988c8094..ac3045dabc 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@3x.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@3x.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20.png index 737b345d9b..3bf42a8349 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20@2x.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20@2x.png index 2a865c6fe6..3191f39780 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20@2x.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Notifications-20@2x.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small-1.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small-1.png index 9344000d60..64686e41e6 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small-1.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small-1.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png index 3328c84262..807dfb4c10 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png index 66506473af..de626e8952 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png index 84a06c0479..e48be2d3ff 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png index 2a865c6fe6..3191f39780 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x-1.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x-1.png index 680ebe06bf..c6e2c9cf6b 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x-1.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x-1.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png index 680ebe06bf..c6e2c9cf6b 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png index 635a47187a..c07c472f62 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon.png index 3ce58cfebe..deb4a6cac1 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon@2x.png b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon@2x.png index 21c396fa5b..19a9694ee6 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon@2x.png and b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost/Images.xcassets/AppIcon.appiconset/Icon@2x.png differ diff --git a/extras/AudioPluginHost/Builds/iOS/Icon.icns b/extras/AudioPluginHost/Builds/iOS/Icon.icns index 6ab6915802..f207907bcc 100644 Binary files a/extras/AudioPluginHost/Builds/iOS/Icon.icns and b/extras/AudioPluginHost/Builds/iOS/Icon.icns differ diff --git a/extras/AudioPluginHost/JuceLibraryCode/AppConfig.h b/extras/AudioPluginHost/JuceLibraryCode/AppConfig.h index cdd7662548..3c4df5804e 100644 --- a/extras/AudioPluginHost/JuceLibraryCode/AppConfig.h +++ b/extras/AudioPluginHost/JuceLibraryCode/AppConfig.h @@ -49,7 +49,7 @@ #define JUCE_USE_DARK_SPLASH_SCREEN 1 -#define JUCE_PROJUCER_VERSION 0x50405 +#define JUCE_PROJUCER_VERSION 0x50407 //============================================================================== #define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 diff --git a/extras/AudioPluginHost/JuceLibraryCode/BinaryData.cpp b/extras/AudioPluginHost/JuceLibraryCode/BinaryData.cpp index de10104fc5..b2c91fe718 100644 --- a/extras/AudioPluginHost/JuceLibraryCode/BinaryData.cpp +++ b/extras/AudioPluginHost/JuceLibraryCode/BinaryData.cpp @@ -9,650 +9,675 @@ namespace BinaryData //================== JUCEAppIcon.png ================== static const unsigned char temp_binary_data_0[] = -{ 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,2,0,0,0,2,0,8,6,0,0,0,244,120,212,250,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109,97,103,101,82,101,97,100,121,113,201,101,60,0,0,3,40,105,84,88,116,88,77,76,58, -99,111,109,46,97,100,111,98,101,46,120,109,112,0,0,0,0,0,60,63,120,112,97,99,107,101,116,32,98,101,103,105,110,61,34,239,187,191,34,32,105,100,61,34,87,53,77,48,77,112,67,101,104,105,72,122,114,101,83,122,78,84,99,122,107,99,57,100,34,63,62,32,60,120, -58,120,109,112,109,101,116,97,32,120,109,108,110,115,58,120,61,34,97,100,111,98,101,58,110,115,58,109,101,116,97,47,34,32,120,58,120,109,112,116,107,61,34,65,100,111,98,101,32,88,77,80,32,67,111,114,101,32,53,46,54,45,99,48,54,55,32,55,57,46,49,53,55, -55,52,55,44,32,50,48,49,53,47,48,51,47,51,48,45,50,51,58,52,48,58,52,50,32,32,32,32,32,32,32,32,34,62,32,60,114,100,102,58,82,68,70,32,120,109,108,110,115,58,114,100,102,61,34,104,116,116,112,58,47,47,119,119,119,46,119,51,46,111,114,103,47,49,57,57, -57,47,48,50,47,50,50,45,114,100,102,45,115,121,110,116,97,120,45,110,115,35,34,62,32,60,114,100,102,58,68,101,115,99,114,105,112,116,105,111,110,32,114,100,102,58,97,98,111,117,116,61,34,34,32,120,109,108,110,115,58,120,109,112,61,34,104,116,116,112, -58,47,47,110,115,46,97,100,111,98,101,46,99,111,109,47,120,97,112,47,49,46,48,47,34,32,120,109,108,110,115,58,120,109,112,77,77,61,34,104,116,116,112,58,47,47,110,115,46,97,100,111,98,101,46,99,111,109,47,120,97,112,47,49,46,48,47,109,109,47,34,32,120, -109,108,110,115,58,115,116,82,101,102,61,34,104,116,116,112,58,47,47,110,115,46,97,100,111,98,101,46,99,111,109,47,120,97,112,47,49,46,48,47,115,84,121,112,101,47,82,101,115,111,117,114,99,101,82,101,102,35,34,32,120,109,112,58,67,114,101,97,116,111, -114,84,111,111,108,61,34,65,100,111,98,101,32,80,104,111,116,111,115,104,111,112,32,67,67,32,50,48,49,53,32,40,77,97,99,105,110,116,111,115,104,41,34,32,120,109,112,77,77,58,73,110,115,116,97,110,99,101,73,68,61,34,120,109,112,46,105,105,100,58,53,52, -53,66,70,48,69,70,55,66,48,54,49,49,69,53,66,51,49,53,69,69,54,51,67,65,56,68,70,50,56,48,34,32,120,109,112,77,77,58,68,111,99,117,109,101,110,116,73,68,61,34,120,109,112,46,100,105,100,58,53,52,53,66,70,48,70,48,55,66,48,54,49,49,69,53,66,51,49,53,69, -69,54,51,67,65,56,68,70,50,56,48,34,62,32,60,120,109,112,77,77,58,68,101,114,105,118,101,100,70,114,111,109,32,115,116,82,101,102,58,105,110,115,116,97,110,99,101,73,68,61,34,120,109,112,46,105,105,100,58,53,52,53,66,70,48,69,68,55,66,48,54,49,49,69, -53,66,51,49,53,69,69,54,51,67,65,56,68,70,50,56,48,34,32,115,116,82,101,102,58,100,111,99,117,109,101,110,116,73,68,61,34,120,109,112,46,100,105,100,58,53,52,53,66,70,48,69,69,55,66,48,54,49,49,69,53,66,51,49,53,69,69,54,51,67,65,56,68,70,50,56,48,34, -47,62,32,60,47,114,100,102,58,68,101,115,99,114,105,112,116,105,111,110,62,32,60,47,114,100,102,58,82,68,70,62,32,60,47,120,58,120,109,112,109,101,116,97,62,32,60,63,120,112,97,99,107,101,116,32,101,110,100,61,34,114,34,63,62,115,115,54,90,0,0,175,140, -73,68,65,84,120,218,236,157,7,128,92,117,181,255,207,45,211,251,236,204,246,94,179,61,189,247,144,70,11,45,244,14,74,81,154,20,17,241,1,239,161,40,54,44,207,191,138,138,62,124,2,250,176,32,85,233,32,37,72,9,9,73,72,239,61,219,119,218,109,255,223,239, -55,155,80,4,201,220,123,103,167,157,79,24,118,179,73,238,220,185,237,124,207,249,157,194,105,154,6,8,130,32,8,130,20,22,60,30,2,4,65,16,4,65,1,128,32,8,130,32,8,10,0,4,65,16,4,65,80,0,32,8,130,32,8,130,2,0,65,16,4,65,16,20,0,8,130,32,8,130,160,0,64,16, -4,65,16,4,5,0,130,32,8,130,32,40,0,16,4,65,16,4,65,1,128,32,8,130,32,8,10,0,4,65,16,4,65,80,0,32,8,130,32,8,130,2,0,65,16,4,65,16,20,0,8,130,32,8,130,160,0,64,16,4,65,16,4,5,0,130,32,8,130,32,40,0,16,4,65,16,4,65,1,128,32,8,130,32,40,0,16,4,65,16,4,65, -1,128,32,8,130,32,8,10,0,4,65,16,4,65,80,0,32,8,130,32,8,130,2,0,65,16,4,65,16,20,0,8,130,32,8,130,160,0,64,16,4,65,16,4,5,0,130,32,8,130,32,40,0,16,4,65,16,4,65,1,128,32,8,130,32,8,10,0,4,65,16,4,65,204,70,204,228,155,39,18,9,60,3,8,242,41,104,154,70, -254,207,129,166,210,175,26,249,10,160,42,90,242,207,200,207,52,250,61,151,252,187,28,207,125,228,223,90,28,2,136,86,129,254,171,195,63,226,224,200,223,102,247,61,247,9,111,41,147,151,58,242,103,106,242,31,113,228,61,85,136,15,201,255,186,111,201,221, -98,239,205,9,220,200,126,16,175,66,224,217,31,28,222,39,186,141,79,124,55,4,65,64,20,69,224,249,204,248,226,25,19,0,146,36,193,130,5,11,96,231,206,157,120,5,32,5,13,51,234,228,63,85,86,129,218,85,250,123,142,163,134,52,105,53,109,30,11,8,22,94,180,186, -69,167,59,108,247,17,227,239,119,23,59,124,158,18,71,144,124,31,176,216,5,127,184,217,235,35,127,213,71,254,185,151,124,245,120,74,236,14,103,192,102,39,127,238,36,191,23,200,203,245,33,163,79,191,255,164,39,78,100,68,4,208,191,23,165,223,115,28,23,149, -98,74,172,103,219,16,253,253,16,121,13,240,60,55,208,187,125,184,47,210,19,31,32,6,191,55,62,40,31,234,217,58,216,79,12,126,127,124,64,234,27,58,24,31,34,251,31,143,13,74,160,74,42,168,106,82,188,80,113,64,182,199,62,23,21,12,60,143,194,0,65,238,186, -235,46,56,243,204,51,11,75,0,80,15,98,243,230,205,176,123,247,110,188,2,144,2,119,1,136,53,182,130,215,95,233,12,19,207,189,44,212,228,173,180,58,197,202,80,163,183,130,220,41,85,254,74,23,253,121,88,180,11,1,135,207,234,34,247,142,155,23,121,142,136, -2,96,138,129,69,4,134,142,184,249,148,65,101,16,6,134,52,115,246,143,108,84,168,251,168,94,8,212,2,4,57,203,72,132,194,2,85,9,43,48,177,16,149,135,163,253,210,0,177,243,251,251,119,69,14,202,49,101,119,223,206,200,174,72,111,124,199,240,193,248,142,129, -61,145,61,145,158,196,190,200,65,169,15,18,32,227,201,71,10,157,190,190,190,76,62,122,50,135,213,106,197,179,143,20,4,212,163,119,4,108,78,95,133,179,212,225,183,214,16,35,223,20,168,118,53,187,66,182,6,242,179,42,209,42,148,147,159,7,136,23,109,103, -134,29,52,226,57,143,68,8,104,100,64,101,170,153,121,211,28,36,163,239,144,248,136,141,254,8,212,229,55,53,195,71,249,183,250,0,172,34,93,110,0,135,197,99,117,184,253,92,136,236,106,125,113,93,128,236,3,199,62,59,93,14,160,75,22,170,162,41,137,136,220, -79,94,123,7,118,69,118,70,251,19,27,15,109,26,220,60,180,63,182,190,111,199,240,150,222,29,195,187,162,125,137,94,37,161,226,69,131,20,4,130,32,20,166,0,64,144,124,196,234,18,121,111,153,163,140,24,246,70,226,197,183,133,155,188,157,158,18,71,139,167, -212,81,103,243,136,101,196,192,219,233,58,57,91,199,39,47,69,214,152,113,87,228,164,209,147,227,202,191,221,190,150,133,159,121,36,16,193,34,123,138,170,141,8,151,79,121,222,89,248,160,51,96,13,186,195,246,54,142,227,22,53,31,83,206,142,131,42,107,74, -108,80,58,56,124,48,182,131,8,130,181,68,24,172,233,221,54,188,234,224,166,129,13,228,247,59,134,14,196,162,120,117,33,8,10,0,4,201,10,44,78,17,136,177,175,40,170,115,183,21,143,241,141,35,6,127,188,191,202,213,78,60,251,26,171,67,244,208,117,111,234, -201,51,239,151,122,242,228,171,36,43,255,222,165,206,115,180,145,156,0,85,86,62,30,74,16,44,14,161,36,88,235,46,9,53,120,38,214,207,44,97,130,66,142,41,82,124,88,222,49,176,59,178,238,208,150,161,119,14,174,31,120,107,207,234,222,213,253,187,34,91,163, -125,137,56,94,133,8,130,2,0,65,210,14,241,226,93,129,42,87,115,89,87,96,2,49,246,83,194,77,158,241,174,176,189,145,24,123,47,13,185,39,13,125,242,149,136,224,18,119,106,202,32,121,252,20,250,98,63,72,254,159,227,192,98,115,137,245,37,173,254,250,178, -206,192,177,116,73,65,138,169,82,164,55,190,109,96,119,116,21,17,3,43,14,172,31,120,125,255,218,190,247,250,118,70,246,107,170,134,199,18,65,80,0,32,136,97,131,239,41,110,241,117,86,116,7,166,149,118,4,102,4,106,220,227,236,94,177,150,174,211,83,207, -158,101,185,163,177,79,175,46,24,17,6,170,66,4,193,136,191,79,69,129,51,96,109,116,19,241,85,57,33,120,50,21,15,241,65,233,16,17,0,171,247,173,233,123,109,247,202,158,151,247,174,233,127,171,127,231,240,238,195,165,147,8,130,160,0,64,144,79,197,225,179, -90,66,77,158,182,154,41,225,217,229,221,193,185,129,26,215,68,135,223,86,205,11,192,214,234,21,98,240,229,4,121,197,49,73,45,227,162,128,69,90,62,88,70,224,69,190,40,220,232,153,83,210,234,155,211,117,106,205,151,227,67,82,127,255,142,200,187,251,214, -246,189,176,107,101,239,243,68,24,188,213,179,117,168,23,143,30,130,160,0,64,16,98,52,56,8,84,187,43,171,38,21,205,168,28,87,180,176,180,195,63,195,85,100,107,33,30,62,71,13,62,245,240,165,40,122,247,57,33,10,84,141,136,51,162,12,70,42,8,120,129,247, -133,26,61,179,138,91,125,179,58,79,169,185,53,62,40,237,57,184,113,240,181,157,111,31,122,122,199,138,131,47,238,93,219,191,70,138,200,168,228,16,20,0,8,82,40,208,44,125,226,221,119,86,79,14,45,168,28,31,92,66,4,192,100,155,91,244,209,144,190,146,80, -208,195,207,87,65,32,242,101,101,93,129,147,43,198,7,79,158,116,126,163,210,191,43,178,234,192,250,254,167,55,191,180,239,137,237,111,28,92,49,124,48,62,132,71,13,65,1,128,32,121,6,241,234,173,229,93,129,201,213,147,195,75,171,38,135,150,248,43,156,99, -137,65,224,169,193,167,158,254,199,91,221,34,121,42,8,98,35,75,6,28,8,222,50,199,216,64,181,107,108,243,194,242,27,134,246,199,182,31,218,52,248,236,150,87,246,63,178,245,213,3,47,244,110,27,234,193,35,134,160,0,64,144,92,53,250,33,155,181,106,98,104, -74,195,156,210,19,43,186,3,199,186,66,246,54,218,181,134,54,153,145,98,133,93,138,135,106,0,88,62,7,125,81,236,94,75,117,245,148,208,133,181,211,139,47,140,13,36,246,237,93,211,247,252,150,151,247,255,105,235,43,251,159,233,221,62,124,16,15,24,130,2, -0,65,178,28,171,75,132,138,238,224,148,230,99,202,78,174,153,86,124,2,17,1,109,244,97,79,155,235,96,166,62,242,105,208,74,1,53,154,20,133,188,200,151,84,79,10,157,81,59,181,248,140,88,63,17,3,107,251,254,78,196,192,31,54,60,179,231,133,161,3,177,126, -60,90,8,10,0,4,201,18,232,112,153,146,86,127,203,152,37,21,167,212,78,15,159,234,43,119,78,160,195,102,104,184,55,49,92,200,70,95,251,88,215,192,145,185,1,159,82,21,199,29,233,39,252,65,99,97,238,99,191,47,136,163,166,106,32,29,22,3,22,34,6,38,134,206, -37,98,224,220,73,231,55,108,223,181,178,247,209,13,207,238,249,253,214,127,236,127,41,129,9,132,8,10,0,4,201,12,129,106,87,81,211,130,178,165,228,117,78,176,214,51,87,180,243,118,37,126,56,188,159,127,166,156,118,197,35,126,234,145,175,234,200,215,164, -81,255,192,170,243,28,207,70,240,114,35,95,217,48,31,78,36,63,23,152,6,160,163,71,121,78,132,15,154,10,115,108,59,10,237,221,203,141,180,243,213,228,15,189,39,253,170,30,249,154,28,240,155,220,238,225,247,161,191,232,164,63,238,200,215,252,16,14,76,12, -140,44,23,217,60,150,234,230,5,101,87,146,235,237,202,254,157,195,43,183,188,178,255,247,239,63,185,235,255,246,174,233,95,143,205,135,16,20,0,8,146,102,104,136,191,114,124,209,180,214,165,21,231,84,79,14,159,236,240,91,203,21,73,97,235,250,137,161,220, -117,200,14,27,87,149,189,20,106,222,143,24,117,129,23,153,1,183,10,54,176,11,14,242,114,130,83,116,147,151,7,156,150,145,175,228,247,118,209,69,94,78,246,231,54,242,119,173,188,29,44,188,13,68,242,239,69,222,194,182,65,223,135,126,165,191,255,240,84, -1,250,94,146,26,63,34,6,36,37,193,246,35,174,198,200,207,19,144,80,98,16,147,163,16,87,34,16,37,175,136,60,4,195,210,0,68,229,225,35,223,199,200,207,227,74,148,189,36,34,38,152,136,208,180,35,194,128,10,147,195,47,14,248,156,59,71,116,153,224,240,50, -146,167,196,209,61,238,140,186,238,174,147,107,110,221,255,126,255,51,235,158,220,245,155,141,207,237,125,98,232,64,108,24,239,82,4,5,0,130,152,136,159,120,251,205,243,203,78,110,59,190,234,34,127,149,115,58,53,42,82,156,24,168,33,41,183,12,61,53,240, -212,219,166,70,158,188,168,129,164,6,145,26,106,106,196,221,86,31,248,172,69,16,176,133,193,79,94,65,242,242,218,130,228,103,65,112,89,188,224,32,70,222,33,184,70,12,120,246,64,141,125,156,136,132,40,17,3,84,16,12,36,122,161,63,209,3,125,241,131,208, -27,219,15,189,228,43,253,126,80,234,35,127,62,200,4,133,60,50,45,136,70,38,4,242,226,217,139,203,137,200,193,225,4,66,178,187,142,146,86,255,241,229,93,129,227,39,95,212,180,113,203,203,251,126,191,246,137,93,191,221,245,78,207,90,140,10,32,40,0,16,68, -39,116,132,108,221,244,240,216,214,99,43,47,172,158,28,90,238,8,216,202,233,186,126,114,125,54,55,60,122,106,232,15,123,194,2,47,48,239,220,111,13,16,195,94,12,197,142,10,40,118,86,64,152,124,45,178,151,48,35,239,182,248,178,206,184,31,13,52,170,144, -140,74,184,161,232,83,143,137,10,195,210,32,19,1,135,162,251,224,96,108,15,236,143,238,130,253,145,157,228,251,189,76,48,68,165,33,34,12,164,145,72,133,192,162,31,84,24,112,89,42,10,180,145,4,83,57,14,96,115,139,141,29,39,85,223,66,68,234,151,246,172, -234,125,226,189,191,238,248,229,166,23,246,254,45,54,32,73,120,55,35,40,0,16,228,40,176,185,45,98,219,241,149,75,90,22,149,127,190,180,221,191,132,120,251,22,230,237,15,102,239,115,84,101,198,254,131,176,183,133,183,18,99,238,133,32,49,236,165,206,106, -40,119,213,66,133,187,142,25,123,191,173,136,9,129,130,19,116,192,51,129,67,95,101,206,154,143,252,25,53,250,3,82,47,28,136,238,134,189,195,219,97,247,240,86,216,51,188,13,14,196,118,195,64,188,7,98,106,116,68,68,37,151,67,4,58,102,49,203,68,1,91,34, -24,102,121,20,118,218,112,168,114,124,240,228,254,221,205,239,110,120,102,207,47,222,125,120,219,3,125,59,177,156,16,65,1,128,32,159,136,183,220,233,239,62,181,230,204,134,185,165,159,11,214,184,199,43,172,13,111,118,122,251,204,179,39,70,139,126,165, -30,170,203,226,33,94,124,13,51,242,53,238,102,168,242,52,66,137,163,146,133,239,185,2,203,162,215,245,32,226,45,44,42,66,95,45,254,177,71,126,78,151,19,168,40,216,53,180,25,182,15,109,128,29,67,155,96,127,100,23,12,38,122,89,110,2,93,62,17,88,126,67, -22,69,9,104,84,32,166,0,93,224,112,6,109,93,19,207,171,255,97,251,9,85,55,111,123,253,192,253,111,63,184,229,87,123,86,245,174,199,51,142,160,0,64,16,66,105,135,191,178,109,105,229,197,77,11,202,46,118,133,237,53,244,225,153,109,107,251,116,189,94,30, -49,248,52,169,206,107,13,66,153,171,6,106,61,45,80,231,109,133,74,119,3,11,227,179,76,123,196,52,232,146,66,141,167,153,189,166,195,18,246,51,154,95,176,39,178,13,182,13,188,15,91,6,214,18,81,176,17,122,98,7,88,18,98,182,9,2,85,86,201,181,172,130,96, -227,203,91,22,149,127,185,97,78,201,23,247,174,238,123,248,173,7,54,255,100,211,11,251,94,199,51,140,160,0,64,10,211,240,183,251,155,198,159,93,127,69,195,236,146,243,45,78,177,72,138,200,89,19,230,167,235,213,52,73,141,26,125,106,76,168,193,167,222, -125,189,183,13,26,253,29,196,224,55,178,53,123,100,244,241,90,3,236,117,56,82,64,171,14,246,68,182,195,150,254,181,176,190,111,37,108,31,92,15,61,241,253,144,80,226,236,220,209,232,66,166,133,153,54,178,60,192,113,224,170,24,23,60,159,188,206,221,249, -86,207,99,171,255,188,253,135,155,95,218,247,52,54,169,66,80,0,32,5,65,205,212,112,71,251,241,85,95,32,222,208,121,162,93,112,209,48,127,54,24,126,133,121,249,9,182,158,79,203,235,106,60,245,196,216,119,194,24,255,56,168,246,52,129,223,22,194,147,151, -133,216,4,7,139,196,208,215,188,202,147,32,38,71,96,231,240,38,34,6,222,133,245,189,239,176,101,131,129,68,15,75,44,20,57,11,203,35,200,84,116,128,38,13,178,101,45,14,120,34,2,78,168,158,20,58,225,208,230,193,103,222,249,195,214,123,214,60,182,243,81, -9,133,0,50,138,112,154,150,153,82,149,68,34,1,45,45,45,176,117,235,86,60,11,5,66,195,220,210,174,241,103,213,93,91,49,54,120,54,199,113,54,250,32,204,212,245,119,24,234,225,203,154,196,18,212,168,129,175,243,142,129,214,224,4,104,246,119,67,185,179,134, -53,185,65,114,27,90,126,184,169,255,61,88,211,243,79,216,208,255,46,171,60,160,125,14,104,100,128,190,50,189,84,32,88,121,16,201,235,208,166,161,23,222,249,195,150,239,172,121,124,23,10,129,2,226,231,63,255,57,124,238,115,159,195,8,0,146,159,148,119, -7,219,102,92,209,114,35,241,120,206,38,191,181,102,58,177,143,26,125,154,64,70,215,242,195,142,114,102,236,59,138,166,64,163,175,147,133,150,145,252,130,10,187,9,197,115,216,139,246,31,216,54,180,1,222,59,180,130,9,130,93,195,91,88,51,35,26,21,160,149, -27,153,16,3,180,137,21,125,249,170,156,115,22,220,220,57,167,251,244,186,231,87,254,97,235,119,215,62,182,243,81,92,26,64,48,2,128,228,36,165,29,254,134,241,103,213,95,223,48,187,228,2,226,229,56,89,75,213,12,57,252,180,60,143,173,9,147,7,61,205,206, -111,13,142,135,238,208,116,104,240,117,20,100,73,30,146,204,243,216,49,184,9,222,235,89,1,239,30,122,141,124,191,145,137,129,100,231,68,107,198,34,3,201,136,128,0,135,182,12,254,253,173,223,109,254,214,170,63,109,127,6,207,22,70,0,48,2,128,228,4,197, -99,124,165,147,206,111,184,174,126,86,201,101,162,93,240,81,143,63,19,94,63,205,220,79,168,113,22,222,15,59,202,160,189,104,50,51,250,77,196,211,167,235,198,72,129,123,63,228,186,160,185,29,244,181,180,230,28,216,57,180,9,222,57,248,50,188,123,240,53, -246,125,76,137,177,168,192,104,55,102,58,28,17,240,87,56,23,30,243,149,174,133,99,22,87,252,133,8,129,187,54,189,136,85,3,8,10,0,36,75,241,150,59,61,99,151,215,94,209,177,172,234,58,187,215,82,154,136,140,254,52,62,154,232,37,17,79,159,38,244,209,208, -239,184,192,108,152,88,60,7,90,2,227,88,73,25,130,124,26,180,148,147,190,142,171,61,15,54,247,175,133,183,15,190,68,196,192,171,176,55,178,157,37,134,90,121,219,168,86,19,200,68,4,16,5,11,21,227,130,203,42,199,23,29,183,253,141,131,247,255,227,255,173, -251,230,222,213,125,216,71,0,49,71,4,227,18,0,98,20,155,91,228,186,79,171,61,103,252,57,245,95,117,6,108,99,18,81,153,149,61,141,38,178,38,51,195,111,23,29,172,84,111,66,241,92,230,237,211,158,250,8,162,23,90,98,248,126,239,219,176,98,255,179,176,166, -231,77,232,143,31,202,204,18,1,121,43,139,93,160,145,129,193,141,47,236,253,241,171,63,93,255,253,190,157,195,7,240,12,229,62,184,4,128,228,166,122,228,57,104,154,95,58,119,218,101,45,183,23,213,185,231,176,114,190,81,108,224,115,216,219,167,195,117, -104,95,253,113,225,153,48,169,100,1,43,7,67,16,83,196,173,224,128,46,34,36,233,235,80,108,31,91,34,88,177,239,89,216,54,248,62,200,138,196,38,52,142,74,84,96,164,124,144,220,115,158,49,139,43,190,82,51,37,124,206,170,63,109,187,235,141,223,108,250,69, -98,88,198,76,65,4,35,0,200,232,81,214,17,168,159,126,69,203,127,84,79,14,93,192,38,163,37,70,111,20,47,13,239,211,108,110,155,96,103,117,250,211,75,23,179,7,52,134,248,145,209,17,158,42,235,49,240,234,158,167,88,242,96,50,42,96,97,249,2,163,5,47,112, -32,58,4,232,219,54,252,218,235,247,109,188,109,237,99,59,254,166,225,240,65,140,0,96,4,0,73,39,142,128,213,49,229,162,166,171,59,78,170,190,73,180,241,193,209,92,227,167,165,123,180,132,143,134,245,103,150,45,133,105,101,139,89,184,31,65,70,213,107,2, -158,117,33,164,47,26,21,120,99,223,179,240,218,190,191,179,121,5,244,79,105,84,32,221,203,3,108,240,208,144,12,158,50,199,212,197,183,117,63,53,102,113,249,111,95,253,217,250,219,247,172,238,221,132,103,8,65,1,128,152,251,208,35,207,179,182,227,171,142, -157,114,73,211,157,254,42,215,56,106,248,71,35,179,255,112,152,159,122,93,229,174,122,152,78,140,254,228,146,5,184,182,143,100,5,116,254,195,146,154,179,96,126,213,41,176,234,224,171,240,210,158,199,224,253,222,149,68,172,198,193,202,219,217,108,130, -116,114,184,98,160,102,74,248,220,242,238,224,177,171,254,180,237,155,43,126,181,241,135,209,254,68,28,207,14,130,2,0,49,76,121,87,160,102,234,231,155,255,139,60,100,206,163,15,155,209,104,219,75,13,63,13,243,211,245,213,38,127,23,204,174,56,1,198,133, -102,18,239,202,158,215,199,90,147,162,160,197,7,65,27,62,8,234,240,33,80,135,246,147,239,15,145,159,13,177,68,48,206,230,1,222,83,10,66,184,9,132,162,6,0,193,146,241,125,86,135,183,129,58,176,46,249,53,222,75,63,4,112,130,131,236,107,17,112,116,64,146, -189,152,124,31,6,206,234,7,206,226,205,203,243,70,43,4,104,226,41,125,109,236,95,5,47,238,250,43,188,115,240,21,24,150,6,216,53,43,164,57,79,128,54,12,226,120,46,56,225,156,134,187,27,102,151,158,241,218,47,215,223,180,230,177,157,207,2,46,11,32,40,0, -16,61,216,189,22,24,127,78,253,149,19,206,174,191,77,176,9,197,163,17,238,215,52,34,48,212,24,123,160,142,13,207,132,121,21,203,160,45,56,41,255,12,61,49,242,42,49,242,218,192,94,80,250,119,18,3,186,135,188,246,130,22,33,198,62,54,64,108,104,12,52,37, -145,108,30,127,56,4,147,60,64,201,223,138,86,224,125,149,96,169,39,162,168,101,49,112,206,81,238,96,72,206,147,188,239,89,144,118,61,6,10,49,254,154,52,4,201,46,79,28,251,239,200,126,211,96,56,79,30,51,196,8,82,227,207,89,131,192,59,136,40,112,84,0,231, -170,6,222,89,65,4,66,25,17,8,116,255,243,163,237,50,237,40,73,95,123,134,183,194,139,187,31,101,73,131,180,29,49,93,26,16,56,49,141,167,68,99,73,184,238,98,251,132,37,183,143,125,166,101,81,197,207,94,188,103,205,109,135,54,15,238,195,167,25,242,73,96, -18,32,242,137,212,207,44,233,158,117,117,235,119,138,26,60,199,80,195,79,31,46,105,245,34,137,65,97,137,125,162,131,101,243,207,175,56,25,234,125,237,249,97,236,35,61,160,246,239,2,165,119,27,40,61,196,75,238,219,65,60,251,3,196,208,247,3,80,67,79,62, -59,179,155,212,75,228,5,90,94,49,98,240,185,127,27,35,1,69,102,34,129,247,148,128,109,220,153,96,29,179,100,84,62,143,210,255,30,36,214,255,63,80,250,86,38,141,54,77,126,251,183,161,110,109,68,16,168,116,44,30,19,15,236,51,83,113,32,88,147,194,192,22, -38,98,160,18,120,119,29,8,238,6,224,220,181,192,211,101,30,222,146,243,231,159,230,9,188,188,231,49,120,101,207,147,112,48,186,55,237,66,224,72,84,194,41,66,180,47,177,253,205,255,221,124,243,91,15,108,126,96,52,19,117,145,163,39,147,73,128,40,0,144, -143,123,253,214,233,151,183,220,216,121,114,205,45,228,183,78,57,158,222,117,126,106,8,98,74,148,77,223,155,24,158,11,243,42,79,102,157,217,114,214,216,75,81,98,236,119,131,122,104,19,40,7,55,18,131,191,37,233,217,83,175,94,145,62,102,232,133,15,60,123, -67,22,89,34,54,85,2,107,203,66,112,76,191,18,64,180,165,237,243,73,59,31,129,248,250,255,38,239,25,37,94,189,25,221,20,53,38,8,168,48,208,52,153,9,5,118,124,200,245,192,219,138,153,32,224,189,77,32,120,90,200,247,181,44,130,144,171,208,137,132,47,239, -126,156,69,5,14,68,119,131,133,8,1,49,205,66,128,86,11,88,93,34,236,124,187,231,15,47,222,179,230,166,61,171,122,241,129,139,2,0,5,0,242,137,94,255,100,226,245,255,128,120,253,83,105,134,113,58,175,13,186,198,31,87,34,96,23,92,48,169,120,30,44,168,58, -149,117,97,203,57,131,31,31,2,149,122,246,251,215,129,188,255,125,80,123,182,38,67,251,114,44,121,131,209,7,188,48,226,213,167,53,51,92,99,251,98,169,159,5,206,121,55,166,69,4,72,219,30,76,26,127,230,241,167,217,131,61,34,10,164,164,40,160,83,251,172, -1,224,93,213,32,120,199,0,239,239,32,162,160,25,56,123,113,206,93,51,131,137,62,120,137,136,128,164,16,216,53,146,35,144,222,227,105,113,8,32,199,213,253,111,254,118,211,87,87,220,183,241,23,180,116,23,65,1,128,2,0,1,187,207,98,153,126,89,203,87,70,188, -126,91,58,189,254,164,225,143,178,53,254,241,197,179,97,97,213,114,168,201,165,198,61,74,130,133,241,149,189,239,129,188,119,53,40,135,182,36,215,237,229,4,51,242,156,32,154,231,217,235,20,36,214,214,165,224,152,125,141,169,219,149,247,62,3,177,85,119, -16,227,111,251,140,112,127,250,174,28,38,10,84,137,232,1,133,69,9,104,82,33,239,170,1,193,215,14,66,112,44,240,222,22,224,44,254,220,17,2,82,31,60,191,243,47,68,8,60,2,61,177,253,172,233,80,58,155,10,113,52,26,224,20,97,247,59,61,15,191,112,207,154,27, -48,26,128,2,0,5,64,129,83,55,163,120,236,236,107,218,126,72,188,254,89,233,246,250,233,26,63,71,140,71,87,104,42,44,169,57,27,26,188,185,177,198,175,13,29,0,121,223,26,144,119,175,4,101,223,58,80,7,247,178,36,189,35,6,159,134,243,51,60,83,254,35,18,43, -17,1,231,220,47,129,165,121,161,41,91,84,163,187,33,186,226,242,100,162,95,54,173,201,211,124,2,85,102,75,7,52,209,144,179,133,88,84,64,8,78,0,33,48,150,45,25,192,40,246,238,215,75,111,252,0,60,179,227,97,120,121,207,227,44,58,64,219,89,115,105,76,136, -28,137,6,236,253,231,253,155,110,124,237,222,245,191,197,167,96,225,10,0,172,2,40,80,68,27,15,51,174,28,115,245,184,51,234,190,78,108,190,59,157,165,125,180,129,15,29,199,75,27,167,44,37,134,191,163,104,74,182,155,124,22,202,151,119,173,36,175,183,217, -90,190,26,237,99,63,167,161,104,160,198,198,154,173,35,132,147,137,117,177,55,127,7,98,245,100,224,236,62,227,194,109,211,175,64,139,31,34,23,77,150,117,90,164,198,93,16,200,39,78,46,119,104,137,94,144,15,188,12,210,254,23,129,19,93,44,58,32,6,199,129, -16,154,2,130,183,213,164,156,5,243,161,61,45,78,107,188,28,102,149,31,7,79,110,127,16,86,236,125,26,98,106,20,236,172,228,213,124,97,73,251,119,240,2,87,58,253,242,150,251,203,58,252,139,94,184,103,205,245,61,91,134,112,174,64,33,218,1,60,4,133,71,73, -171,175,122,254,151,59,127,76,110,254,19,232,196,190,116,101,248,83,163,159,80,226,80,233,174,103,134,127,74,233,49,105,245,108,140,217,124,149,24,250,13,32,239,124,27,228,29,255,4,133,8,0,234,73,3,207,143,100,170,231,208,248,96,193,194,202,10,19,239, -255,13,108,221,203,141,121,255,131,27,65,38,6,21,68,103,246,127,110,150,111,33,142,152,76,34,226,6,55,64,188,127,13,112,219,126,207,202,13,133,192,56,16,195,211,129,247,119,146,191,154,125,109,163,75,156,85,112,193,152,27,153,16,120,108,235,253,176,234, -224,107,108,41,137,46,151,153,13,237,36,72,69,127,237,180,226,243,74,59,2,211,94,250,193,154,47,174,126,100,199,83,248,116,68,1,128,228,49,227,207,170,63,101,202,165,77,63,178,185,197,242,248,80,122,234,250,233,58,127,76,142,128,223,86,4,39,212,93,0, -243,43,79,33,222,76,118,26,16,229,208,38,144,183,173,32,70,255,13,150,177,79,67,251,28,109,174,195,146,206,156,57,123,158,105,159,0,105,211,11,96,235,56,201,80,179,32,105,207,83,160,201,195,89,105,48,63,43,18,66,147,21,57,214,159,159,136,129,200,110, -80,134,182,178,42,6,206,81,14,98,209,4,16,139,103,131,64,196,64,182,69,6,104,123,235,171,186,238,130,183,15,188,4,143,18,33,176,117,96,93,218,74,7,105,3,33,209,198,55,46,188,181,235,137,170,201,161,187,158,251,246,123,183,199,250,19,18,32,40,0,144,252, -193,225,183,218,231,223,216,241,141,150,197,21,215,73,177,244,181,241,165,235,252,2,47,194,236,242,227,225,184,186,243,32,100,47,203,186,99,65,203,242,228,109,175,129,180,237,85,22,222,167,158,254,7,70,223,149,31,39,156,70,1,250,118,50,81,35,132,155, -117,30,40,137,252,251,55,71,140,104,46,195,37,207,237,72,254,130,22,223,15,137,29,127,6,105,215,163,192,19,175,91,12,77,5,161,120,14,17,3,237,144,61,185,28,0,227,194,179,160,189,104,50,188,176,235,47,240,212,246,135,160,55,118,0,236,162,211,244,57,3, -170,76,187,110,42,92,235,146,202,91,194,77,222,25,79,127,227,221,203,118,175,236,125,31,159,154,40,0,144,60,160,118,122,113,251,220,47,181,221,27,172,245,76,75,215,184,222,195,225,254,102,127,55,156,84,127,49,180,4,198,101,213,49,208,18,195,32,239,124, -139,121,197,52,131,95,141,246,19,131,64,215,144,173,249,99,244,63,102,244,104,101,130,114,96,131,110,1,160,198,246,146,227,180,55,253,37,127,163,31,30,33,255,137,35,145,129,93,16,223,250,0,112,59,254,200,18,8,197,146,57,44,50,64,163,4,217,0,13,255,47, -172,58,29,198,135,231,192,163,91,255,7,94,221,251,20,168,170,98,126,75,108,13,88,23,193,64,181,123,206,169,255,61,245,229,21,247,109,188,122,197,125,27,30,208,176,90,16,5,0,146,187,76,185,164,233,28,242,250,33,199,113,193,116,24,255,195,225,254,160,189, -24,150,54,158,13,115,42,78,28,149,46,103,71,45,76,136,135,79,141,190,188,245,53,80,6,118,143,60,255,109,57,29,222,79,197,241,165,29,8,117,159,219,216,62,114,0,35,201,210,191,124,61,64,71,34,3,26,185,62,214,130,220,183,10,248,45,191,101,149,4,98,217,98, -16,139,38,101,69,229,3,29,58,68,243,3,166,148,44,128,63,111,254,37,108,32,251,153,142,101,1,90,2,204,9,92,104,198,149,99,126,87,60,198,55,245,239,119,190,123,83,12,7,11,161,0,64,114,11,135,223,106,157,119,99,199,183,90,22,149,95,43,199,20,80,20,243,165, -60,157,120,70,153,89,126,44,156,88,119,17,123,72,101,133,183,47,69,147,33,254,13,207,129,76,188,125,250,123,186,38,158,83,137,124,102,69,1,232,16,33,221,81,147,129,100,169,93,129,28,43,42,116,56,242,210,148,56,155,115,32,239,123,30,120,119,61,136,165, -11,192,82,58,63,43,162,2,99,2,227,225,134,241,157,240,236,142,63,194,147,219,126,7,3,82,31,216,89,14,131,121,203,2,218,72,130,96,227,220,210,171,3,213,174,113,79,127,99,213,37,187,87,246,108,192,167,42,10,0,36,7,168,24,27,172,59,230,150,174,95,21,213, -187,231,198,233,0,31,147,147,252,105,223,126,218,197,175,202,211,4,167,212,127,14,186,66,211,178,226,115,171,196,195,151,54,60,11,210,230,151,64,233,219,201,50,168,57,161,64,188,253,127,19,163,49,160,164,14,143,247,41,48,221,196,3,140,36,173,170,195, -91,33,190,225,167,32,109,123,8,132,240,116,176,16,177,43,4,186,51,251,208,230,44,176,168,250,12,232,14,205,128,63,110,190,23,222,218,255,2,139,4,136,38,71,42,232,12,144,64,141,123,214,41,63,156,242,210,63,254,223,186,207,191,253,224,150,71,240,233,138, -2,0,201,98,58,150,85,47,154,115,93,219,175,68,187,80,145,142,44,127,154,228,39,242,86,88,90,123,46,28,87,115,46,56,196,204,175,159,43,251,214,66,98,221,147,32,109,127,29,52,186,182,95,144,222,126,154,188,226,66,103,164,146,64,83,162,32,239,122,28,228, -189,127,7,193,223,5,150,138,227,64,12,207,98,83,14,51,69,137,179,18,174,232,184,3,94,223,251,52,252,105,243,47,216,124,1,179,147,4,105,244,144,23,185,146,185,215,183,255,185,168,222,243,181,231,190,189,250,235,216,70,24,5,0,146,109,207,41,145,135,89, -95,28,115,237,248,115,234,239,150,227,138,133,222,184,230,123,253,81,168,247,181,193,233,141,87,66,19,121,8,102,214,177,85,65,222,190,2,18,107,159,0,121,247,187,44,108,203,137,246,60,77,232,67,50,175,133,132,145,94,8,26,40,61,111,131,220,243,38,155,90, -200,132,64,233,66,214,150,56,83,208,254,26,99,130,227,224,143,155,238,101,73,130,60,249,37,154,88,185,65,171,4,36,69,230,186,78,173,185,51,80,227,234,122,234,246,149,151,13,236,137,244,225,69,129,2,0,201,2,188,101,14,251,130,155,59,127,84,63,171,228, -82,186,118,103,118,55,223,195,94,63,173,233,63,150,120,254,214,76,38,133,201,9,144,182,188,76,12,255,227,108,0,15,11,81,211,48,191,197,137,23,2,50,58,81,17,226,245,83,31,91,29,222,6,241,117,63,128,196,182,63,128,165,124,9,17,3,199,103,108,56,145,207, -90,4,23,181,222,12,93,69,83,225,255,54,253,12,246,71,118,153,26,13,160,207,20,250,108,169,28,95,116,250,242,159,78,107,122,250,27,239,158,187,237,245,3,107,240,122,64,1,128,100,144,146,86,95,213,226,219,198,222,31,106,242,206,137,13,152,155,229,175,129, -10,81,57,2,245,222,86,56,189,233,139,208,156,65,175,159,38,242,73,27,95,32,134,255,49,80,14,109,102,51,5,64,180,99,144,26,201,28,212,203,166,203,3,137,67,16,223,244,75,144,118,253,21,68,226,141,91,171,78,206,88,194,224,132,226,185,208,232,239,132,255, -219,248,51,120,109,239,223,76,207,13,160,121,1,238,98,251,184,19,190,61,241,185,127,252,100,221,69,111,63,184,229,113,188,16,80,0,32,25,128,120,252,83,150,220,49,246,119,86,167,88,111,118,47,127,218,191,159,178,184,250,76,88,86,127,81,230,58,249,73,49, -72,108,120,6,18,107,30,99,237,121,233,240,29,92,223,71,178,43,40,32,178,78,137,154,52,8,137,173,191,3,121,207,83,172,132,48,83,66,128,70,3,46,105,187,5,218,130,19,225,225,77,63,131,190,248,65,83,239,95,90,42,200,139,92,241,156,235,218,30,241,150,57,174, -123,233,135,107,127,68,91,11,35,40,0,144,209,82,250,231,212,47,159,117,85,235,47,21,89,243,72,38,175,247,71,229,97,150,96,116,102,243,85,208,85,148,161,12,127,69,34,30,255,243,16,95,253,103,80,15,109,97,157,237,10,59,155,31,201,126,33,32,36,133,128,28, -25,17,2,79,130,165,108,41,88,170,79,203,200,210,192,180,210,69,208,232,235,128,7,214,255,16,86,30,124,5,108,130,221,180,113,195,52,47,64,83,20,97,210,249,141,63,116,6,109,245,207,222,189,250,122,226,132,96,118,32,10,0,36,189,207,24,14,230,94,215,126, -67,247,242,154,111,43,9,21,204,84,222,138,166,176,218,254,201,37,11,136,241,255,34,243,36,70,29,77,3,105,243,139,16,95,245,39,80,14,172,103,99,94,1,13,63,146,147,66,32,202,132,128,180,247,239,96,169,60,145,188,78,30,245,100,193,176,163,28,174,234,190, -11,158,218,246,32,252,117,235,111,32,65,238,111,179,114,120,104,94,64,180,63,1,173,75,43,175,13,84,187,106,30,185,225,159,23,13,29,136,245,227,5,128,2,0,73,3,118,175,133,159,127,83,231,247,91,143,171,184,58,62,64,231,160,155,103,252,227,74,140,205,33, -95,222,120,57,27,222,147,9,104,171,222,248,59,191,39,158,211,106,182,198,143,137,125,72,174,11,1,16,93,160,73,3,144,216,248,11,144,118,63,9,214,154,211,193,82,126,220,168,150,15,210,68,192,37,53,103,65,131,191,29,254,247,253,123,96,251,224,6,112,178, -242,93,115,50,104,104,135,209,226,86,255,201,167,253,116,90,249,223,239,92,121,250,174,183,123,182,227,201,207,13,120,60,4,185,129,59,108,119,157,242,227,169,15,142,89,90,113,117,172,95,50,209,248,107,16,149,135,160,202,211,0,95,26,251,221,140,24,127, -58,145,47,242,204,93,16,121,234,14,144,247,18,227,111,33,15,71,209,138,39,29,201,19,33,64,252,44,26,17,136,29,128,216,218,239,67,228,141,47,176,78,131,163,77,147,175,11,110,28,119,15,235,220,25,83,34,44,226,103,22,82,68,6,127,165,115,202,9,119,79,124, -174,122,82,104,44,158,116,20,0,136,73,132,155,188,37,203,190,63,249,177,146,86,223,114,51,147,253,84,242,0,136,42,81,242,64,56,14,110,32,15,134,58,111,235,168,126,46,45,210,3,177,87,127,14,195,127,253,50,72,155,95,78,206,114,23,237,120,194,145,60,125, -218,90,200,245,237,2,117,104,19,196,222,189,29,162,111,221,0,74,223,234,81,221,5,151,197,11,23,183,126,5,206,105,254,18,155,218,153,80,205,107,243,79,39,140,210,132,228,147,238,153,252,247,238,229,181,199,224,9,207,126,112,9,32,203,169,28,23,108,56,225, -219,19,255,100,243,88,58,105,9,142,105,55,43,185,241,45,188,141,60,8,174,37,94,255,201,163,251,161,84,5,18,235,158,128,248,202,135,65,29,220,203,178,250,49,179,31,41,28,33,144,92,131,87,14,173,128,104,239,59,96,169,88,10,214,186,243,129,179,133,71,109, -23,230,85,158,4,213,158,70,248,205,186,239,192,174,161,205,166,117,244,164,93,2,121,145,11,205,187,161,227,17,14,224,194,119,254,176,245,247,120,194,49,2,128,232,160,98,92,81,55,49,254,127,183,186,44,157,84,93,155,5,205,242,15,59,42,224,154,238,111,141, -186,241,151,119,175,132,225,71,111,134,232,203,63,1,45,218,155,236,220,199,225,101,136,20,32,35,67,124,18,219,255,4,145,215,47,7,105,251,195,163,58,124,169,193,215,1,55,142,191,7,38,22,207,101,203,128,180,239,135,41,250,94,214,64,73,40,142,57,215,183, -63,48,235,170,214,203,56,108,214,129,17,0,36,53,58,150,85,205,156,117,117,219,195,22,135,80,76,235,110,205,64,99,235,253,195,48,54,60,19,206,111,185,30,252,182,208,168,125,30,109,248,16,196,222,126,0,164,245,79,211,39,4,150,244,33,8,133,38,187,178,68, -193,62,136,173,251,62,155,64,104,109,188,116,212,6,14,121,44,126,184,162,243,14,248,235,150,122,120,116,235,253,192,17,107,77,135,13,25,22,1,10,121,218,104,42,63,229,226,166,159,218,125,22,223,223,191,254,238,221,128,173,2,80,0,32,159,77,247,242,218, -197,243,111,236,120,72,145,84,31,45,245,51,3,154,240,35,171,9,88,90,115,54,156,210,240,121,16,76,170,7,62,26,18,239,255,13,226,111,61,48,18,238,39,134,95,196,203,14,65,62,42,4,104,254,139,8,74,223,187,16,125,235,122,176,84,46,3,107,253,249,228,126,241, -141,198,155,195,9,117,23,66,185,187,22,126,75,68,200,176,52,0,86,19,170,20,52,85,99,101,130,93,167,212,124,139,24,127,239,211,223,120,247,86,13,69,0,10,0,228,223,26,255,147,231,221,208,254,91,41,174,56,53,83,106,252,57,144,212,88,114,189,127,204,141, -44,225,111,180,80,123,183,65,108,197,175,217,148,62,78,176,226,160,30,4,249,44,168,225,213,84,72,108,123,16,148,131,175,129,181,241,115,32,150,204,29,149,183,158,16,158,203,150,6,127,181,230,27,176,99,112,147,105,121,1,180,69,121,215,169,53,95,37,143, -34,247,211,223,88,117,45,21,6,72,118,128,139,175,217,101,252,151,207,163,158,127,66,53,201,248,211,250,254,8,4,108,197,112,117,247,55,71,207,248,107,10,36,86,253,41,153,221,191,125,69,210,235,231,81,107,34,200,209,105,118,158,53,18,82,163,187,33,246, -238,109,16,91,125,39,104,241,3,163,242,214,213,238,38,248,210,216,239,65,119,104,58,68,88,94,128,57,207,161,216,160,68,71,149,95,115,242,15,38,255,212,25,176,98,86,0,10,0,228,99,198,255,2,98,252,31,160,163,124,205,234,238,71,215,251,233,248,222,235,199, -125,15,154,253,163,179,166,72,7,245,12,63,126,43,68,95,189,23,52,57,142,217,253,8,162,251,233,108,5,16,108,172,129,80,100,197,149,32,239,125,122,84,222,214,107,13,192,23,186,238,132,133,85,203,217,8,112,58,10,220,184,83,144,28,36,84,55,189,248,178,19, -191,59,233,94,103,192,134,34,0,5,0,242,33,227,255,43,37,174,8,102,120,254,84,181,83,245,62,177,100,46,92,219,125,55,107,7,58,10,110,63,107,223,27,121,236,43,32,239,94,149,76,242,227,5,60,185,8,98,44,28,144,76,18,140,31,130,216,170,255,76,70,3,18,135, -210,254,174,116,138,224,89,205,87,195,233,141,87,178,126,33,138,102,78,9,50,141,4,148,119,5,47,57,241,187,19,239,117,96,36,0,5,0,26,127,98,252,111,104,167,198,159,55,195,243,167,106,61,70,84,251,162,234,51,224,178,246,219,193,33,186,211,254,25,212,254, -221,16,121,242,118,214,212,71,147,19,201,78,126,8,130,152,248,164,182,176,252,128,100,52,224,11,32,31,120,105,84,222,150,62,71,46,109,191,21,44,188,245,200,132,80,163,208,214,193,101,157,129,75,150,125,119,18,21,1,120,110,81,0,20,184,231,159,80,77,49, -254,84,165,203,154,68,84,251,21,112,102,211,23,129,31,133,250,122,105,195,51,48,252,232,77,32,237,248,103,50,201,15,189,126,4,73,111,52,32,182,15,98,43,191,6,241,247,127,72,110,250,104,218,223,149,246,9,248,98,215,93,224,179,6,217,146,128,25,208,229, -128,178,46,38,2,126,225,12,226,114,0,10,128,194,51,254,203,169,231,47,155,228,249,203,170,68,78,38,15,23,181,222,12,139,171,207,76,251,254,107,241,65,136,190,120,15,68,158,255,30,249,126,8,215,250,17,100,212,158,218,86,246,74,108,123,8,34,255,188,26, -148,129,117,105,127,203,102,127,23,92,59,246,219,80,238,170,101,115,4,76,17,1,67,50,148,19,17,112,252,55,39,220,43,88,208,20,161,0,40,28,227,127,242,188,27,58,126,75,61,127,227,107,254,28,107,235,107,23,157,112,69,231,127,178,25,224,233,70,217,183,134, -117,243,75,172,123,42,25,238,199,12,127,4,201,64,52,192,13,234,192,122,136,190,121,45,72,59,254,152,246,119,164,198,255,186,177,223,129,38,95,39,75,48,54,131,56,17,1,21,227,139,46,153,255,229,142,31,112,216,50,16,5,64,1,24,255,197,243,110,236,248,173, -156,80,172,170,9,198,159,134,228,104,104,142,206,252,238,40,154,146,246,253,79,172,250,51,12,63,241,31,160,246,110,31,169,235,199,155,22,65,50,6,237,27,160,202,16,91,251,61,150,36,168,73,253,105,125,59,218,61,244,170,238,111,30,41,19,52,39,18,32,209, -102,65,87,31,115,75,231,93,40,2,80,0,228,45,237,39,84,205,156,127,83,199,239,21,83,154,252,112,172,198,191,216,81,1,87,119,223,13,13,222,246,180,238,187,22,27,128,232,179,223,134,232,171,63,79,246,43,23,109,120,66,17,36,43,130,1,2,203,13,144,246,60,5, -81,186,36,208,255,94,90,223,206,41,186,225,242,142,59,96,106,233,66,211,68,192,72,179,160,155,137,8,248,42,138,0,20,0,121,71,197,184,96,215,156,107,219,30,86,18,170,215,140,53,255,152,50,12,149,238,6,184,102,236,183,200,215,250,180,238,187,114,96,61, -12,63,118,11,36,54,62,155,44,239,227,48,209,15,65,178,78,7,208,37,129,161,109,172,149,176,180,243,47,105,125,47,171,96,131,75,218,110,129,185,21,39,154,214,48,136,150,8,118,157,82,115,231,130,175,116,94,133,103,19,5,64,62,25,255,134,19,191,61,241,17, -209,33,20,211,113,153,198,141,127,4,234,188,99,88,119,63,26,1,72,39,52,203,63,242,196,215,88,91,95,108,229,139,32,89,14,49,204,160,74,16,95,251,29,136,175,251,46,251,62,109,111,197,137,112,222,152,27,96,81,245,233,16,147,35,198,69,0,249,231,177,33,22, -9,248,225,184,51,235,206,193,147,137,2,32,231,41,170,247,20,19,227,255,103,171,75,172,49,99,176,15,77,190,105,244,117,16,227,255,45,8,164,121,126,120,124,229,31,32,242,194,247,89,71,63,12,249,35,72,206,132,2,216,168,225,196,246,135,33,186,242,86,114, -255,14,167,239,173,200,175,51,155,174,98,149,71,102,137,0,90,34,56,231,186,182,95,117,47,175,93,130,39,19,5,64,206,226,14,219,93,75,254,115,220,255,217,60,150,14,57,110,134,231,63,12,77,254,78,248,66,231,215,217,24,207,116,146,120,239,175,16,123,253, -62,54,196,7,179,252,17,36,231,84,0,209,1,30,144,247,191,4,177,213,95,39,134,85,78,235,187,157,222,116,37,156,88,119,33,139,78,26,21,1,116,88,16,113,150,172,243,110,236,120,176,110,102,241,100,60,151,40,0,114,14,98,244,249,101,223,155,244,235,226,22,239, -44,41,170,24,247,252,21,234,249,19,227,223,69,140,191,53,189,198,95,217,179,138,24,255,95,2,103,177,177,193,36,8,130,228,168,12,176,16,17,176,239,121,72,108,186,47,237,239,181,172,254,98,56,177,246,66,83,34,1,52,79,138,142,67,95,124,219,216,135,43,198, -21,213,227,153,68,1,144,51,208,166,22,243,191,220,241,253,146,54,255,105,52,156,101,134,241,111,58,108,252,211,236,249,131,28,135,232,107,247,210,59,16,147,253,16,36,31,68,128,232,74,142,23,78,115,117,192,17,17,80,119,33,43,79,54,44,2,36,21,236,30,75, -229,177,119,142,251,163,167,196,17,196,51,137,2,32,39,152,117,77,235,245,237,199,85,93,29,31,52,158,128,67,67,106,204,248,119,222,153,126,227,79,72,108,120,22,148,3,27,112,205,31,65,242,70,1,144,199,188,154,128,196,230,251,71,229,237,168,8,88,82,115, -22,203,87,50,42,2,164,152,2,174,144,173,251,196,239,76,124,192,21,182,227,224,0,20,0,217,205,248,179,235,79,27,123,90,237,183,105,93,171,193,187,246,72,182,63,29,205,233,177,6,210,191,243,196,235,151,222,255,27,113,252,45,120,34,17,36,159,16,236,160, -244,188,9,234,224,134,81,121,187,211,26,46,135,37,35,137,129,96,84,4,68,21,40,105,243,47,90,116,107,215,127,243,34,246,8,64,1,144,165,212,205,40,158,52,251,154,214,251,20,73,229,52,205,200,69,159,108,242,83,229,110,128,43,153,231,31,24,149,253,87,122, -54,147,215,86,186,134,129,39,19,65,242,236,81,175,145,103,138,124,224,31,163,246,142,167,55,125,1,230,86,158,4,17,19,170,16,104,52,181,110,102,201,165,243,111,234,188,25,207,37,10,128,172,35,220,226,173,88,250,95,227,126,175,72,154,219,104,163,159,184, -26,133,98,103,37,49,254,255,149,246,82,191,143,8,128,125,235,146,37,127,216,222,23,65,242,14,142,19,65,233,95,51,170,239,121,110,203,117,48,163,108,137,41,29,3,105,203,224,142,147,170,239,162,81,86,60,155,40,0,178,6,79,137,195,190,244,142,113,15,88,157, -98,173,42,27,43,247,163,131,125,252,214,16,92,217,241,95,16,78,115,147,159,127,17,0,125,59,209,246,35,72,222,42,0,1,180,232,94,114,163,199,71,239,45,201,175,11,198,220,4,227,195,179,13,15,16,162,65,85,37,174,192,172,171,90,127,89,59,45,60,14,79,40,10, -128,140,35,218,4,56,230,150,206,31,135,154,188,179,104,194,138,17,232,72,95,135,232,130,43,58,238,128,10,119,221,168,127,22,45,62,128,222,63,130,228,111,8,0,52,37,6,154,26,31,213,183,21,121,11,92,218,254,85,24,19,24,103,120,148,48,141,174,106,170,230, -93,124,251,216,223,251,43,93,97,60,169,40,0,50,202,244,43,90,174,169,159,85,122,137,209,140,127,69,147,65,224,5,184,180,237,107,80,239,107,203,208,167,209,240,132,34,72,94,147,153,123,220,46,56,225,178,142,219,161,202,221,196,74,4,141,56,26,180,157,186, -195,103,109,60,225,238,137,247,219,125,86,172,85,70,1,144,25,218,79,168,58,102,226,185,13,223,137,15,38,140,169,90,77,37,2,64,129,243,90,110,128,142,162,204,53,190,226,44,46,20,1,8,146,207,182,159,120,227,92,134,58,123,122,173,1,184,162,243,14,8,217, -75,33,161,198,12,109,139,70,91,195,45,222,197,243,110,104,255,22,158,88,20,0,163,78,121,87,160,122,238,245,237,247,75,49,89,52,146,240,79,235,100,105,210,223,169,13,159,103,227,53,51,122,49,120,203,146,11,109,8,130,228,33,10,240,182,34,54,39,32,83,208, -225,101,151,117,222,14,78,209,5,178,102,44,106,26,31,146,96,204,146,138,235,39,158,223,112,54,158,91,20,0,163,134,221,103,177,46,188,181,251,126,209,46,148,170,178,49,131,73,19,99,22,85,157,206,134,105,100,26,33,220,8,156,128,125,255,17,36,47,3,0,170, -76,68,126,11,100,58,207,167,214,51,6,46,110,189,133,37,8,170,154,129,188,41,242,232,149,99,10,76,191,172,229,167,181,51,138,187,240,12,163,0,24,21,230,223,212,249,237,162,122,207,108,217,96,210,31,53,254,147,74,230,193,242,198,43,178,226,115,9,225,102, -224,61,165,0,170,140,39,25,65,242,12,142,19,64,44,154,146,21,251,210,21,154,198,166,8,74,106,194,80,183,64,86,114,205,129,103,209,215,186,255,215,87,225,244,226,89,70,1,144,86,38,95,220,116,86,203,162,138,171,227,195,198,194,87,49,37,202,198,250,94,56, -230,203,192,103,73,207,125,206,226,4,75,237,140,145,94,0,8,130,228,13,106,156,120,255,77,32,4,186,179,102,151,230,84,156,8,75,106,206,54,92,30,72,199,172,187,130,182,142,133,183,118,255,183,96,69,147,134,2,32,77,212,76,13,143,153,122,105,211,79,228,152, -108,40,87,142,214,250,135,236,37,240,185,246,91,89,217,95,54,97,105,59,22,120,103,32,57,12,8,65,144,188,64,83,37,176,86,47,39,79,252,236,106,167,127,74,253,165,48,181,228,24,195,34,32,17,145,161,122,74,232,220,105,159,111,190,2,207,54,10,0,211,113,248, -172,246,121,55,118,252,134,227,192,111,164,211,31,45,247,179,240,54,184,164,237,171,16,114,148,103,223,5,225,46,6,91,247,114,208,164,40,158,116,4,201,7,227,47,71,88,232,95,44,61,38,235,246,141,227,120,56,111,204,13,172,244,217,104,121,32,237,20,56,241, -220,134,239,54,206,45,29,143,103,29,5,128,169,204,187,169,227,174,96,141,123,178,28,215,223,233,143,174,117,209,102,63,103,53,95,13,77,254,236,205,89,177,118,156,8,150,186,233,160,37,134,241,196,35,72,46,163,38,88,230,191,173,245,186,172,29,239,77,163, -160,151,182,221,10,126,91,136,60,31,245,47,63,106,228,209,172,170,154,131,58,106,238,176,221,131,39,31,5,128,41,140,61,163,110,217,152,37,21,215,210,178,19,35,208,48,23,205,246,159,81,182,52,187,63,48,121,80,56,102,95,11,98,113,11,70,2,16,36,103,141, -191,196,66,254,246,206,175,2,239,172,202,234,93,45,113,86,194,69,173,95,102,17,1,218,23,69,47,52,31,192,93,108,239,88,112,115,231,247,104,231,67,4,5,128,33,194,77,222,138,105,159,111,254,169,20,53,150,25,79,141,255,216,240,76,56,185,225,115,57,241,185, -57,187,23,28,199,124,21,132,162,122,20,1,8,146,147,198,223,66,140,255,109,32,4,39,229,196,46,183,145,253,60,181,225,50,214,23,197,72,146,85,98,88,134,134,185,165,151,78,190,176,225,12,188,16,80,0,232,134,102,148,30,243,213,174,159,217,220,162,161,122, -255,132,26,135,82,87,53,92,48,230,6,16,184,220,233,92,201,187,195,224,90,244,31,40,2,16,36,23,141,127,215,109,32,134,167,231,212,174,31,83,117,26,204,42,59,206,112,82,160,20,145,105,197,214,143,75,90,125,181,120,65,160,0,208,197,140,43,199,92,85,214, -17,56,78,138,234,207,136,167,45,126,173,188,21,46,106,189,25,124,214,162,156,59,6,28,17,1,206,17,17,0,40,2,16,36,103,60,127,49,52,61,39,63,194,153,205,87,65,189,175,99,36,41,80,231,97,80,52,16,173,124,104,254,151,59,127,110,117,137,184,22,128,2,32,53, -106,166,134,59,198,159,89,127,23,45,47,209,143,198,122,94,159,214,120,5,171,249,207,217,139,100,36,18,192,99,36,0,65,114,195,248,135,167,231,236,199,160,131,131,104,62,128,219,226,3,89,211,255,252,165,142,91,121,87,112,225,244,203,91,174,197,139,3,5, -192,81,99,243,88,196,185,215,183,255,92,211,52,151,166,234,15,253,71,228,97,22,206,154,91,177,44,231,143,9,139,4,44,190,13,151,3,16,4,141,127,218,41,119,213,194,217,205,215,130,162,202,134,58,5,210,65,109,221,167,213,222,89,61,57,212,137,23,9,10,128, -163,130,40,198,175,20,213,123,166,201,113,253,161,127,234,249,215,122,91,224,140,230,47,230,207,197,226,10,97,78,0,130,160,241,31,21,104,155,244,99,170,78,53,148,15,144,156,109,166,57,169,67,103,115,91,44,120,177,124,20,156,252,242,49,106,167,134,39, -116,157,90,115,107,194,64,171,95,58,224,194,198,59,224,130,49,55,130,67,72,83,167,63,162,140,19,187,214,129,180,125,53,200,7,182,129,26,237,103,87,59,103,119,131,24,172,0,75,101,27,88,171,218,129,179,153,251,254,135,115,2,34,127,251,79,80,14,109,6,206, -226,192,139,6,65,242,214,248,107,160,36,54,130,28,95,3,138,180,13,52,181,47,89,112,207,59,129,23,75,65,180,182,128,104,107,3,142,79,79,217,253,41,13,159,135,173,3,239,195,198,254,85,96,211,57,197,144,246,110,9,53,122,167,78,251,124,243,77,207,127,239, -189,175,227,69,131,2,224,19,177,123,45,214,57,95,106,255,41,185,230,173,6,74,81,153,247,127,78,203,151,160,198,211,98,254,237,40,197,32,242,207,191,146,215,95,64,222,183,25,180,196,72,247,44,158,251,64,242,210,151,96,97,66,192,222,49,15,92,83,78,5,129, -124,111,90,36,96,36,39,96,24,69,0,130,100,222,248,119,165,33,225,79,75,64,124,248,41,136,15,61,193,4,128,166,142,68,252,56,254,67,174,181,198,122,134,240,98,9,88,157,51,193,238,57,133,124,95,97,234,110,88,120,43,156,63,230,6,248,214,91,87,177,164,64, -129,211,103,178,168,67,215,189,188,246,107,155,95,222,247,232,246,21,7,87,226,197,51,242,44,199,67,240,1,211,46,107,185,161,168,193,51,209,72,232,159,134,171,38,23,47,128,121,21,39,153,190,127,241,141,43,224,224,79,46,134,254,63,125,3,164,221,235,217, -205,72,61,126,206,238,2,206,234,76,190,136,199,207,126,102,177,129,210,183,7,134,158,253,21,28,248,201,133,48,244,226,253,73,229,110,114,36,0,171,3,16,36,195,158,191,201,198,95,138,189,1,3,123,175,132,225,131,119,19,239,121,45,115,48,56,222,149,124,113, -142,228,139,119,142,252,222,14,154,124,8,98,253,15,193,192,158,43,32,54,240,144,233,31,181,204,85,3,167,55,94,105,104,114,224,200,163,207,54,247,250,246,159,216,220,22,116,124,81,0,124,148,154,105,225,14,22,250,31,50,144,117,74,46,80,218,209,234,204, -230,171,77,223,191,225,127,60,0,61,247,93,3,210,222,13,71,12,252,103,118,186,18,44,192,57,60,160,69,135,96,224,175,223,133,158,255,185,30,212,225,94,115,35,1,139,147,213,1,40,2,16,36,3,198,223,228,176,127,172,255,127,96,104,223,205,32,19,175,63,105,224, -109,240,153,253,249,137,87,206,241,110,208,180,8,68,122,126,4,195,7,238,32,6,55,98,234,126,77,47,91,66,94,75,33,38,235,223,46,117,236,66,141,222,233,211,46,107,190,6,47,34,20,0,71,176,185,69,126,238,117,237,63,34,226,210,161,105,58,21,230,136,50,61,155, -92,91,94,107,192,212,253,27,122,238,62,232,255,203,221,204,224,115,22,123,234,27,16,68,38,4,98,171,159,131,67,191,186,10,148,190,189,230,69,2,92,88,29,128,32,249,96,252,35,189,63,38,175,159,177,176,62,245,236,83,39,41,4,226,195,127,131,161,3,255,65,4, -129,185,207,131,211,27,175,96,209,0,201,192,188,0,218,37,176,251,180,218,219,202,187,2,77,120,49,161,0,96,76,56,167,254,243,161,6,207,92,163,161,255,5,85,167,66,71,209,20,83,247,45,250,246,227,48,240,212,127,3,103,115,146,179,101,172,139,32,21,1,210, -206,53,208,243,155,235,76,21,1,180,58,192,137,213,1,8,146,211,198,63,214,255,32,51,224,70,205,2,77,8,148,162,175,66,228,208,247,76,221,71,218,23,224,236,150,107,128,35,251,167,129,190,229,76,90,214,77,252,40,207,236,107,218,126,32,88,208,252,21,252,17, -40,105,245,87,78,56,183,241,206,248,176,254,208,63,109,245,91,231,109,133,101,117,23,153,186,111,210,174,181,196,243,255,22,17,228,150,15,146,111,140,122,236,54,23,203,31,48,91,4,124,56,39,0,69,0,130,228,162,241,167,21,67,230,52,205,163,34,128,38,16, -198,6,30,52,117,95,219,2,19,89,187,224,168,129,165,0,41,166,64,197,216,224,210,73,23,52,158,131,2,160,144,63,188,192,193,140,47,180,124,75,180,241,69,122,27,254,208,201,85,34,39,178,208,191,222,50,149,79,220,110,164,31,250,254,112,59,168,241,8,11,225, -155,9,141,38,164,67,4,240,40,2,16,36,125,198,191,43,93,198,255,33,83,141,255,7,34,192,1,209,222,95,128,28,251,167,169,219,61,161,238,66,226,112,141,129,132,18,211,239,180,69,100,24,127,118,221,55,131,53,238,162,66,190,180,10,90,0,140,89,92,177,168,102, -106,248,108,35,237,126,227,74,4,22,215,156,5,13,190,118,83,247,173,255,145,187,153,145,214,181,230,159,37,34,0,19,3,17,196,68,207,223,228,108,255,72,207,97,207,223,105,186,241,79,66,151,44,85,86,77,160,42,251,77,219,170,77,176,195,89,205,87,131,200,91, -65,211,89,217,68,103,5,216,60,150,202,233,87,182,220,129,2,160,0,113,248,172,182,169,151,53,127,151,206,143,214,173,34,137,2,173,39,134,255,216,26,115,35,73,195,47,255,14,162,111,61,206,178,253,211,73,186,150,3,62,92,29,128,145,0,4,49,193,248,135,211, -96,252,7,30,76,139,231,255,209,135,140,21,20,101,15,68,14,125,151,252,70,49,109,179,141,190,78,88,88,181,28,162,138,254,165,0,234,248,53,205,43,187,188,97,78,233,100,20,0,5,198,228,139,27,175,241,87,186,58,244,10,0,170,60,69,114,115,158,217,116,21,107, -86,97,22,137,237,171,96,224,169,159,144,251,102,52,154,235,104,35,34,224,253,17,17,176,207,188,251,158,85,7,224,114,0,130,100,157,241,239,29,37,227,127,248,89,192,185,136,177,253,7,196,250,127,107,234,118,143,173,61,151,229,94,37,244,86,5,104,44,18,32, -204,184,162,229,123,22,135,80,144,182,176,32,63,116,73,171,175,186,235,148,154,175,36,12,36,254,81,229,73,179,254,205,12,253,171,209,65,232,123,248,191,64,147,227,134,51,254,83,19,1,238,17,17,112,173,201,213,1,97,156,29,128,32,217,102,252,251,71,207, -248,31,17,1,188,19,162,125,255,99,106,62,0,93,10,56,163,233,11,196,136,241,186,27,4,177,222,0,77,222,25,19,206,109,56,31,5,64,1,192,241,52,241,175,245,78,193,38,248,245,38,254,209,58,212,106,79,35,28,87,123,158,169,251,54,240,216,61,32,239,73,223,186, -255,103,71,2,176,58,0,65,50,138,150,127,198,255,3,83,163,193,240,161,239,131,166,244,153,182,213,102,127,55,204,173,92,102,104,96,16,29,27,60,246,244,218,59,189,165,142,64,161,93,110,5,39,0,26,231,150,206,172,153,26,58,71,210,153,248,167,141,104,205, -211,26,175,96,115,171,205,34,250,246,19,16,121,227,207,105,95,247,255,183,198,58,141,137,129,24,9,64,144,163,240,252,185,220,203,246,63,250,7,140,21,20,121,59,217,151,31,153,186,217,19,106,47,132,50,103,53,235,196,170,235,176,203,42,56,252,214,138,233, -87,180,220,140,2,32,143,161,235,60,228,36,127,83,77,168,186,63,55,109,69,57,189,116,49,116,4,205,203,27,81,14,237,132,254,199,190,7,156,104,201,220,205,153,102,17,128,179,3,16,228,51,140,127,206,102,251,167,240,28,224,92,16,31,250,59,36,134,30,55,109, -155,46,139,135,77,13,164,83,88,65,231,82,0,141,2,52,47,40,255,98,121,119,160,25,5,64,158,210,189,188,246,204,162,58,207,12,89,103,226,159,172,201,16,180,23,195,178,250,139,77,188,241,85,232,123,228,110,80,7,15,177,222,253,217,192,104,84,7,160,8,64,144, -79,48,254,185,154,237,159,202,243,133,183,178,150,195,170,188,211,180,109,78,40,158,3,227,195,179,33,166,232,123,174,208,229,96,222,202,59,103,92,57,166,160,198,5,23,140,0,240,20,219,93,19,207,107,184,67,138,25,24,246,163,196,217,186,127,192,22,54,109, -191,134,95,121,8,226,107,95,98,70,55,123,248,120,78,0,86,7,32,8,26,127,179,16,137,223,211,11,195,61,63,160,7,192,180,173,158,210,240,57,112,137,222,145,72,128,158,40,128,12,149,227,138,78,109,61,182,114,54,10,128,60,99,236,25,117,87,56,131,182,70,85, -214,23,34,138,43,49,150,112,50,171,252,56,211,246,73,222,187,17,6,159,254,217,40,149,252,233,21,1,35,213,1,253,230,86,7,56,23,225,0,33,4,141,127,190,148,250,165,236,8,112,78,144,34,175,65,108,240,143,166,109,179,196,89,5,139,170,79,39,207,106,157,207, -20,141,229,3,112,147,47,106,252,186,197,33,114,133,112,9,22,132,0,8,55,121,139,59,79,169,185,73,26,214,159,248,39,242,34,83,152,2,103,82,91,94,85,129,254,71,190,205,74,255,70,175,228,207,64,36,224,215,102,231,4,224,0,33,4,141,127,254,101,251,167,240, -12,224,237,16,237,187,15,20,105,171,105,219,164,115,2,170,60,77,186,19,2,233,242,112,81,189,103,102,235,146,138,83,80,0,228,9,19,47,104,184,222,238,17,195,170,206,178,63,154,248,55,181,116,17,52,249,187,76,219,39,22,250,223,184,34,57,229,47,203,193,217, -1,8,146,6,227,159,175,217,254,71,141,0,154,58,8,209,158,31,131,89,75,1,116,30,203,178,186,139,117,47,3,48,17,16,83,96,194,249,245,183,59,131,54,107,190,95,138,121,47,0,138,91,124,53,141,115,74,175,212,219,239,95,33,23,146,223,86,4,39,212,154,215,39,66, -62,176,21,6,159,190,55,75,67,255,153,19,1,152,24,136,20,138,241,119,164,35,219,191,55,123,178,253,143,250,185,194,57,33,17,125,29,226,131,143,152,182,205,113,225,153,208,77,142,109,76,103,155,96,69,82,33,88,227,233,24,119,70,221,121,249,126,57,230,189, -0,152,112,94,253,205,162,93,112,235,156,25,193,214,147,142,169,90,14,65,123,137,57,59,164,105,172,225,143,26,237,207,226,208,255,167,137,0,156,29,128,32,134,61,127,98,252,133,112,186,74,253,114,193,243,255,216,115,133,183,177,165,0,85,222,99,218,54,79, -172,191,136,69,3,84,157,15,254,68,68,130,246,101,85,183,184,66,25,108,204,130,2,192,24,165,29,254,230,198,185,165,23,208,236,78,61,208,117,164,42,119,3,204,175,60,217,188,27,245,173,71,33,182,246,197,44,203,250,63,106,245,130,213,1,8,98,208,248,23,78, -182,255,209,34,130,170,244,176,210,64,179,168,118,55,193,204,178,99,217,180,86,93,167,75,214,192,29,182,215,143,61,189,230,226,124,190,44,243,86,0,208,150,191,179,190,216,122,139,96,21,28,122,189,127,69,149,89,217,31,85,146,166,60,3,6,15,193,224,223, -126,10,156,152,203,75,75,31,171,14,192,217,1,8,146,57,227,223,155,235,198,255,240,243,218,73,188,238,231,64,138,188,104,218,54,151,214,158,205,74,182,21,77,167,3,24,85,160,253,196,234,47,17,33,224,65,1,144,99,212,78,15,183,85,140,15,158,165,215,251,167, -101,127,45,129,177,48,177,120,158,105,251,68,75,254,148,222,221,89,211,240,199,188,72,0,206,14,64,144,140,24,255,254,220,55,254,35,119,62,249,37,64,164,239,94,208,212,33,83,182,232,183,134,96,65,213,105,108,108,187,190,40,128,74,163,0,53,221,167,213, -92,142,2,32,151,62,20,241,254,39,158,219,240,101,98,167,172,122,58,67,210,178,63,158,227,224,248,218,243,201,87,115,14,81,98,203,91,16,249,231,35,57,26,250,255,148,91,22,103,7,32,200,103,27,255,130,207,246,63,218,7,138,21,148,196,22,136,13,252,206,180, -77,206,173,88,6,229,174,90,144,232,185,208,21,5,144,161,99,89,245,181,238,144,221,139,2,32,71,168,156,80,52,134,120,255,103,208,16,142,94,239,191,43,52,29,90,131,19,204,217,33,69,134,129,39,127,12,154,162,208,180,215,188,58,214,56,59,0,65,62,221,248, -99,182,127,138,247,61,249,76,177,129,63,130,34,109,50,101,123,14,209,5,139,170,207,0,89,247,160,32,13,92,97,123,121,247,233,53,23,162,0,200,17,218,79,172,186,142,227,56,155,158,127,171,129,10,86,222,10,199,214,156,107,218,254,12,191,241,103,72,108,121, -155,8,92,123,62,30,110,172,14,64,144,79,242,252,49,219,95,151,73,210,180,8,68,123,127,97,218,22,167,149,46,130,90,111,11,27,227,174,43,10,16,145,161,131,230,2,228,97,69,64,222,9,128,226,22,95,125,227,220,178,243,164,136,94,239,63,202,6,75,212,121,199, -152,243,44,24,234,129,161,231,238,3,206,98,131,252,229,99,57,1,253,88,29,128,160,241,199,108,127,157,247,60,235,13,240,10,36,76,74,8,20,137,67,183,184,250,44,80,84,125,54,65,85,88,20,160,166,123,121,237,57,40,0,178,156,9,231,214,95,101,177,243,14,77, -75,125,241,95,211,84,176,11,46,114,177,156,105,218,254,12,61,255,107,80,122,119,229,65,226,223,209,138,128,247,161,231,215,105,168,14,64,17,128,228,140,241,255,15,204,246,55,42,2,64,128,88,223,125,228,153,28,51,101,123,19,137,83,215,224,239,128,132,129, -40,0,141,44,187,66,246,188,242,228,242,74,0,148,140,241,149,53,206,45,189,80,111,215,191,152,26,133,201,37,243,161,210,221,96,202,254,208,97,63,195,43,254,148,87,137,127,41,69,2,204,204,9,112,97,117,0,146,205,151,254,135,61,255,25,230,27,255,254,194, -49,254,201,27,222,10,114,98,3,196,7,255,98,142,161,227,4,54,40,72,111,99,32,26,5,112,23,219,91,154,230,149,230,213,140,128,188,18,0,109,199,87,93,106,113,138,126,77,87,230,191,10,78,193,13,11,171,150,155,182,63,131,207,220,11,90,124,152,102,182,20,212, -179,16,103,7,32,5,231,249,115,233,44,245,123,168,176,140,255,225,231,8,111,135,216,192,239,65,83,14,154,178,189,113,161,153,208,232,107,215,29,5,144,227,10,116,157,86,123,157,197,33,228,205,3,61,111,62,136,167,212,225,105,94,88,246,121,73,175,247,47, -71,97,82,201,60,40,115,213,154,178,63,241,77,43,32,186,250,57,34,100,157,80,136,224,236,0,164,96,140,255,225,108,255,48,102,251,155,139,8,170,188,143,136,128,135,76,139,2,44,172,210,31,5,80,18,42,132,26,60,147,90,151,86,30,131,2,32,203,232,58,165,230, -44,87,200,94,73,67,53,169,123,255,26,216,69,39,204,175,52,41,186,67,46,176,193,103,126,193,190,230,91,217,95,106,34,192,149,214,62,1,60,138,0,36,11,140,63,102,251,167,51,10,224,132,216,224,99,160,72,219,77,217,222,216,176,177,40,128,34,171,208,122,92, -229,181,180,211,44,10,128,44,193,230,22,197,166,5,101,95,160,99,28,117,121,235,114,4,198,135,103,155,182,246,31,91,253,44,36,54,189,153,83,211,254,210,67,26,171,3,104,36,96,241,109,184,28,128,100,220,248,155,237,249,71,123,10,43,225,239,179,76,20,29, -25,28,27,248,95,83,182,38,112,2,235,14,168,119,92,176,18,87,160,172,195,191,176,110,70,113,55,10,128,44,161,97,110,233,194,96,173,187,139,142,113,212,227,253,91,5,59,185,40,78,53,199,228,201,9,24,124,254,55,57,55,233,47,253,34,224,112,117,128,121,34, -128,119,133,176,68,16,201,43,227,79,61,255,40,26,255,143,69,1,28,144,24,126,22,148,196,251,166,108,143,230,2,212,120,154,217,176,183,148,159,102,26,155,51,35,118,44,171,186,18,5,64,54,124,0,145,167,77,26,190,168,199,248,83,104,159,232,142,162,201,80, -235,105,49,71,189,175,124,10,164,29,239,229,121,221,191,145,72,192,181,88,29,128,228,240,165,140,131,125,50,19,5,136,67,180,255,183,166,108,77,36,231,111,94,197,73,32,235,109,15,28,81,160,122,114,248,140,112,179,183,20,5,64,134,169,158,84,212,81,62,46, -184,72,79,248,63,217,243,95,48,109,237,95,75,68,97,232,69,114,145,138,22,188,103,63,201,88,99,117,0,146,235,158,63,102,251,103,44,10,32,69,95,1,57,254,158,41,219,155,84,50,31,202,92,53,32,107,169,139,0,218,99,198,234,18,124,173,199,86,158,143,2,32,195, -180,29,87,117,9,167,129,168,75,201,17,85,217,228,235,132,150,192,56,115,188,255,183,31,7,121,207,250,28,31,247,155,251,34,0,19,3,145,180,24,127,204,246,207,228,147,131,24,94,217,180,92,0,58,226,125,86,217,177,32,41,122,27,3,41,48,102,113,197,37,206,128, -45,167,67,189,57,45,0,188,101,142,64,205,212,240,217,180,62,83,215,61,173,169,48,167,98,25,27,68,105,138,247,255,202,67,104,252,143,74,4,96,117,0,146,123,198,31,179,253,51,252,220,224,236,196,240,190,6,114,124,181,41,219,155,86,182,24,2,246,98,80,116, -36,4,178,198,64,97,91,115,227,252,210,69,40,0,50,68,243,194,242,83,156,1,107,177,158,210,63,58,29,170,210,93,15,99,77,186,161,233,218,191,188,103,3,0,10,128,163,145,75,31,36,6,178,234,0,147,167,8,98,117,0,146,6,227,143,189,253,179,32,10,0,178,105,125, -1,188,214,32,76,42,158,199,242,192,244,160,200,26,180,46,169,184,44,151,75,2,115,86,0,88,157,34,215,113,98,245,231,36,157,165,127,116,62,244,244,210,165,96,225,141,71,112,52,57,14,195,175,254,30,215,254,83,22,1,238,100,36,224,215,215,97,117,0,146,181, -198,223,129,9,127,89,20,5,112,128,20,121,21,228,248,26,83,182,55,171,252,120,54,50,152,118,130,77,217,137,140,43,80,210,30,56,166,172,35,208,132,2,96,148,41,31,27,156,228,175,118,77,214,147,253,79,107,64,3,182,16,76,41,53,167,161,19,173,251,151,118,173, -3,78,196,204,255,212,69,128,51,125,213,1,40,2,16,19,60,127,1,141,127,150,69,1,18,16,31,252,63,115,236,136,171,22,218,139,38,65,92,79,46,128,70,3,190,188,173,245,184,138,243,80,0,140,50,109,199,85,94,192,233,188,123,226,106,12,198,23,207,6,159,53,104, -194,131,66,129,225,87,254,128,117,255,70,110,233,116,37,6,162,8,64,12,26,255,180,101,251,115,104,252,245,71,1,236,144,136,188,2,138,180,217,156,40,64,217,113,196,16,234,59,23,82,84,134,250,89,37,231,56,131,182,156,236,250,150,147,2,192,87,238,244,87, -79,9,157,42,233,44,253,179,241,118,152,81,182,212,148,125,137,175,127,5,18,219,223,5,206,98,199,59,51,75,69,128,11,171,3,144,20,141,63,102,251,103,183,217,210,212,97,136,15,254,217,148,173,141,9,78,128,106,79,147,174,198,64,52,255,204,83,236,168,111, -154,95,186,0,5,192,40,209,188,176,252,56,103,192,86,162,169,169,39,255,209,178,143,38,127,23,212,152,212,248,103,248,213,63,224,253,104,154,8,72,211,40,97,172,14,64,82,244,252,49,219,63,203,159,21,196,137,75,12,63,79,12,176,241,220,33,145,19,97,106,233, -34,150,24,174,235,178,81,84,104,156,91,118,65,46,158,214,156,19,0,180,243,95,243,49,101,23,40,9,157,165,127,228,215,244,178,37,166,236,139,180,99,53,196,55,190,129,222,191,105,124,124,118,128,217,213,1,73,17,128,203,1,200,167,26,255,46,204,246,207,13, -4,98,120,123,32,62,248,184,41,91,155,88,60,15,252,182,176,174,25,1,82,92,129,242,238,192,226,226,102,95,5,10,128,52,19,110,242,54,6,235,61,179,229,68,234,201,127,138,38,67,177,163,2,186,138,166,153,227,253,191,254,48,171,0,40,228,137,127,105,21,1,191, -78,223,114,0,138,0,228,227,198,159,133,253,67,104,252,115,43,10,240,55,208,212,33,195,219,242,219,138,160,43,52,77,95,73,32,49,69,22,135,232,105,152,83,114,50,10,128,52,211,118,92,197,105,162,77,176,65,234,209,127,114,114,227,108,234,31,45,251,48,138, -210,187,27,98,107,94,64,239,63,109,34,192,153,182,229,0,108,27,140,252,139,231,143,217,254,57,136,8,138,180,19,18,145,231,77,217,218,212,210,133,32,240,22,246,252,73,21,57,161,208,165,233,179,45,14,33,167,78,116,78,9,0,139,83,224,107,166,21,159,174,196, -117,38,255,137,14,152,108,82,174,70,228,205,71,65,29,234,197,236,255,116,42,252,116,182,13,198,234,0,36,237,217,254,104,252,211,254,140,224,68,136,15,209,101,0,197,240,182,104,91,248,100,50,160,164,227,82,82,33,80,229,154,92,218,17,232,64,1,144,38,202, -58,2,227,253,149,206,110,85,78,61,252,79,147,255,26,188,237,80,237,54,222,179,65,75,68,32,250,206,83,56,241,47,151,69,128,11,103,7,160,241,79,119,182,63,26,255,244,63,32,172,160,196,215,130,28,91,105,252,153,192,9,48,177,120,174,174,100,64,58,38,152, -23,121,161,97,78,201,105,40,0,210,68,203,226,138,229,28,207,241,154,142,240,63,237,247,76,39,64,153,65,108,237,203,32,31,216,2,32,96,231,191,209,17,1,31,106,27,140,179,3,16,19,61,127,204,246,207,249,167,3,49,190,202,72,20,192,56,19,138,231,128,219,234, -103,115,98,82,118,50,99,10,237,9,112,138,221,103,21,115,229,232,229,140,0,112,6,108,150,186,233,197,39,233,25,251,75,51,59,253,182,16,116,135,204,73,254,139,188,249,87,154,129,130,247,222,168,241,161,182,193,105,154,29,128,213,1,133,103,252,205,246,252, -163,152,240,151,25,9,192,219,136,126,127,29,84,217,248,115,33,100,47,131,22,255,88,54,41,54,229,75,75,86,193,87,225,236,168,158,84,52,1,5,128,201,84,77,42,154,228,10,217,154,245,12,254,73,144,147,217,26,156,0,62,107,145,225,253,160,70,40,177,229,45,76, -254,203,136,8,72,87,117,64,8,171,3,10,200,248,59,210,52,216,39,138,198,63,67,208,146,192,62,72,68,158,53,101,107,180,36,80,211,147,101,206,174,49,128,134,57,165,57,83,13,144,51,2,160,97,46,57,168,58,207,9,29,247,75,215,118,76,81,249,239,60,1,90,60,130, -165,127,25,19,1,88,29,128,232,185,116,48,219,63,175,163,0,156,5,18,195,207,38,207,179,65,58,138,38,65,145,189,148,149,141,167,10,173,6,168,28,95,116,162,195,103,205,137,245,225,156,16,0,206,160,205,90,49,54,120,130,172,35,251,159,158,196,176,163,2,198, -4,198,25,127,134,196,135,33,250,222,115,152,252,151,233,155,29,171,3,144,84,61,127,14,179,253,243,251,161,96,37,198,119,19,72,241,119,140,219,27,209,3,109,193,137,250,90,3,203,26,184,139,237,173,85,147,67,227,81,0,152,68,121,87,96,130,59,108,111,209, -27,254,239,40,154,12,118,193,105,120,63,226,235,95,3,229,224,14,76,254,203,10,17,224,194,217,1,200,209,25,127,44,245,43,16,20,72,12,61,109,202,150,38,132,103,179,170,0,125,209,8,128,234,137,161,147,80,0,152,68,245,164,208,9,122,35,238,2,39,194,184,208, -12,115,110,248,119,158,196,251,60,107,208,62,90,29,208,143,179,3,16,52,254,5,237,20,112,54,144,98,111,128,166,244,24,222,22,157,23,19,118,148,235,91,6,136,171,80,49,46,120,172,197,46,100,125,147,152,172,23,0,22,135,40,84,79,13,31,75,15,106,202,39,66, -147,160,196,81,1,13,62,227,189,25,148,222,61,144,216,242,38,112,34,134,255,179,75,4,184,147,34,128,37,6,238,51,239,97,50,82,29,128,203,1,104,252,63,78,20,75,253,178,20,1,84,249,0,36,162,175,24,222,146,77,112,64,107,96,2,235,30,155,178,173,144,84,240, -87,187,218,203,58,3,237,40,0,12,82,49,54,216,230,175,116,117,208,131,154,42,146,146,128,214,224,68,176,10,198,51,246,99,107,158,199,206,127,89,45,2,232,114,192,181,166,87,7,124,52,49,16,31,246,185,100,252,49,219,191,16,195,0,2,155,18,104,6,99,195,51, -64,224,245,149,244,11,34,47,212,207,41,93,154,237,135,43,235,5,64,213,164,162,69,188,160,111,49,70,36,39,111,108,104,166,41,70,38,186,250,89,122,86,241,6,203,90,17,224,76,75,179,32,238,35,137,129,17,60,212,57,228,249,11,56,213,175,240,236,63,77,6,140, -191,71,188,240,237,134,183,69,91,3,211,101,0,89,213,87,13,80,222,21,56,150,207,242,209,0,89,45,0,232,232,223,202,241,69,75,21,41,245,236,127,26,254,15,179,240,127,155,225,253,144,246,110,4,105,231,90,224,68,43,222,97,217,124,243,167,49,49,16,171,3,114, -203,248,139,88,234,87,160,240,108,58,160,20,125,217,240,150,232,50,0,173,30,147,53,29,213,0,146,10,69,117,238,137,225,102,111,21,10,0,157,248,43,157,101,193,90,247,100,61,225,127,153,60,12,104,71,39,122,18,141,18,95,243,34,104,241,33,236,254,87,224,34, -192,133,34,32,235,141,191,163,11,19,254,48,10,32,130,20,161,121,0,154,225,109,209,209,241,156,142,115,78,219,213,91,156,162,179,122,114,104,46,10,0,157,84,77,10,205,180,185,45,30,29,109,153,217,73,235,44,154,98,194,131,69,129,216,218,23,1,4,244,254,115, -3,45,109,34,128,195,18,193,236,246,252,137,241,23,66,104,252,81,1,208,158,0,27,64,73,108,50,188,169,70,95,7,4,236,197,108,150,76,202,151,165,172,66,213,132,208,98,46,139,155,198,101,183,0,24,95,180,88,83,83,87,113,201,222,255,97,104,244,119,26,222,7, -105,207,122,242,218,128,225,255,156,20,1,135,115,2,176,58,32,239,141,63,13,251,135,48,219,31,73,186,127,154,58,76,52,186,241,106,0,151,197,11,13,190,118,93,77,129,228,132,10,225,22,239,44,103,145,205,153,173,71,42,107,5,128,221,107,181,148,118,6,102, -209,100,138,148,141,54,57,89,245,222,86,112,91,124,134,247,35,254,254,43,160,37,162,216,250,55,39,69,192,72,137,32,171,14,48,79,4,252,107,117,0,146,113,227,143,217,254,200,135,37,0,109,13,28,93,1,102,44,3,180,7,39,147,205,164,30,134,166,206,171,195,111, -173,14,55,123,187,81,0,164,72,81,131,167,205,85,100,109,212,211,253,143,142,114,164,173,28,141,219,16,21,98,239,255,3,64,196,206,127,185,29,9,48,191,68,144,195,182,193,121,109,252,49,225,47,215,21,128,21,148,196,70,80,164,173,134,55,213,226,239,6,151, -213,11,42,164,40,2,52,90,149,200,67,221,140,226,249,217,122,152,178,86,0,212,78,13,205,17,44,228,232,105,169,30,115,21,156,22,55,52,251,141,139,46,121,255,150,100,248,31,91,255,230,246,179,32,93,179,3,92,56,64,40,239,140,63,203,246,127,8,141,127,238, -223,245,35,203,0,43,12,111,41,228,40,131,10,87,61,75,44,79,253,82,85,161,180,221,63,143,23,179,243,90,202,74,1,64,147,237,203,199,6,231,41,178,158,236,127,25,202,156,53,80,226,50,94,125,17,223,176,2,180,24,102,255,231,135,8,112,165,109,128,208,225,234, -0,76,12,204,3,227,207,214,252,157,104,252,243,225,158,231,4,83,4,0,77,40,167,21,101,138,142,126,0,106,178,43,224,120,111,137,163,40,27,143,81,86,90,54,87,145,221,21,172,117,79,84,117,150,255,209,228,63,222,132,143,22,219,240,10,118,254,203,27,210,95, -29,128,179,3,70,201,248,99,169,31,114,84,55,38,93,6,216,0,170,98,60,255,135,246,3,16,121,11,164,154,83,160,170,26,216,61,150,64,73,155,127,98,54,30,162,172,20,0,197,45,222,46,71,192,86,169,103,253,159,78,112,106,13,24,159,196,168,14,236,7,105,231,58, -204,254,207,75,17,144,190,234,0,30,151,3,210,111,252,49,219,31,57,74,243,166,42,125,32,199,86,26,222,82,181,167,9,2,182,176,174,114,64,26,65,40,31,27,156,141,2,224,40,33,7,107,58,207,167,126,35,210,242,63,159,53,8,53,158,102,195,251,16,223,186,18,212, -161,30,140,0,228,165,8,248,208,236,128,126,115,171,3,176,89,80,250,140,191,35,13,165,126,152,237,159,255,72,209,55,12,111,195,33,186,153,93,145,116,228,1,208,78,182,165,237,254,153,217,216,22,56,235,4,0,173,182,43,235,12,204,212,53,252,71,147,160,210, -93,15,94,34,2,140,146,216,104,78,9,9,146,205,145,0,34,2,126,125,173,233,203,1,88,29,96,230,169,250,80,147,31,204,246,71,82,189,31,249,228,108,0,77,51,126,47,54,5,186,200,118,82,183,75,138,172,65,160,218,213,233,41,115,134,80,0,124,6,174,34,187,35,88, -235,30,175,103,253,95,85,21,168,247,25,159,192,168,201,113,136,111,91,137,221,255,242,94,4,96,117,64,214,123,254,92,122,154,252,96,182,127,161,64,71,4,239,99,185,0,70,105,244,117,130,77,176,147,39,71,106,142,33,237,7,96,243,88,2,165,109,190,172,235,7, -144,117,2,192,95,237,106,177,123,45,149,122,218,255,210,233,127,180,117,163,81,228,125,155,65,233,217,9,28,78,255,203,127,15,33,93,34,192,141,34,192,176,241,199,108,127,196,248,29,78,188,246,4,200,177,119,12,111,169,220,89,3,65,123,9,168,154,172,103, -55,104,100,123,42,10,128,207,58,200,221,129,137,188,149,231,83,85,89,116,253,159,134,254,171,220,141,134,247,33,177,229,109,208,226,216,253,175,112,68,128,43,45,163,132,89,137,32,206,14,200,82,227,143,158,127,225,220,224,2,72,38,36,2,90,137,247,95,229, -110,208,53,30,88,149,53,218,220,14,5,192,103,17,110,242,77,213,145,104,201,198,255,150,187,106,193,99,245,27,222,135,248,230,183,200,145,193,218,255,194,225,195,109,131,175,51,53,49,240,112,199,64,172,14,64,227,143,100,200,254,115,22,80,164,205,160,41, -135,12,111,139,206,5,80,117,132,167,217,120,224,122,79,151,51,104,115,100,211,177,201,42,43,103,177,139,92,168,201,51,94,79,2,160,162,42,80,235,29,99,220,20,196,134,216,0,32,14,215,255,11,87,4,252,218,236,234,0,28,37,156,138,241,119,164,171,189,47,26, -255,2,69,0,85,233,5,57,177,209,240,150,106,189,173,96,101,182,33,245,126,0,14,175,165,50,80,237,106,66,1,240,41,120,203,29,101,158,98,123,147,166,163,254,95,224,4,54,0,200,40,210,222,141,172,7,0,8,88,254,87,152,34,32,141,213,1,152,19,240,111,14,61,102, -251,35,233,188,190,20,144,227,171,12,111,166,204,85,3,94,107,81,234,253,0,136,73,19,108,60,95,222,21,28,139,2,224,83,40,170,247,180,91,156,162,59,213,17,192,52,36,227,180,120,160,210,221,96,120,31,18,219,87,145,103,81,28,31,20,5,12,38,6,102,192,243,199, -108,127,36,173,55,181,192,202,1,141,226,18,61,80,230,172,214,151,7,160,2,132,154,188,89,213,17,48,171,4,64,184,217,59,78,207,61,170,104,50,132,236,165,172,83,147,25,2,0,123,255,35,40,2,70,209,248,167,189,189,47,102,251,23,252,253,204,242,0,182,129,166, -244,26,222,86,181,167,153,37,157,167,126,169,107,16,172,115,143,203,166,193,64,89,101,233,66,141,222,241,122,194,255,84,0,84,184,235,89,27,96,35,104,137,40,200,123,55,0,135,227,127,17,72,115,117,192,71,6,8,21,168,113,74,99,123,95,76,248,67,62,138,64, -140,127,31,75,6,52,74,173,183,133,216,154,212,77,167,42,171,224,45,177,183,184,195,14,127,182,28,149,172,17,0,22,135,40,4,170,93,109,84,37,165,108,184,53,13,106,60,198,115,43,228,131,219,65,233,223,79,142,10,214,255,35,236,202,250,88,117,128,217,29,3, -15,207,14,136,20,174,241,239,68,227,143,140,210,221,172,73,32,199,215,26,222,78,185,171,14,28,162,139,141,158,79,233,253,85,13,172,94,107,40,80,227,170,71,1,240,49,124,229,206,18,87,216,86,167,103,0,144,69,176,66,149,219,184,0,144,118,175,99,81,0,172, -255,71,254,85,4,208,196,64,115,69,64,193,206,14,192,108,127,36,19,16,175,93,78,188,111,120,51,69,246,18,240,219,66,186,6,3,9,2,199,133,155,189,29,217,114,72,178,71,0,84,58,27,89,2,160,150,122,3,32,183,197,7,197,206,74,227,2,96,231,90,188,73,144,79,17, -1,174,15,68,0,86,7,24,56,148,152,237,143,100,200,254,131,8,138,180,149,214,122,27,218,142,133,183,66,169,179,26,20,29,137,128,212,190,249,43,93,89,211,18,56,107,4,64,176,222,221,206,235,240,188,169,10,11,218,74,192,99,49,186,172,162,177,250,127,12,255, -35,159,46,2,48,49,208,176,231,159,174,108,255,30,204,246,71,62,75,1,136,160,202,7,64,145,247,24,222,20,29,58,167,171,33,144,172,65,168,193,211,158,45,147,1,179,70,0,20,55,123,59,85,85,95,2,96,153,171,90,87,82,198,71,78,204,96,15,40,61,187,176,255,63, -242,239,159,33,163,32,2,242,178,109,112,186,179,253,7,48,219,31,249,236,24,128,166,69,64,73,24,79,4,76,38,157,235,75,4,244,148,58,26,109,30,139,13,5,192,225,157,16,121,240,150,58,199,168,74,234,138,138,134,84,104,82,134,81,104,2,160,58,220,135,45,128, -145,163,16,1,31,174,14,48,177,99,224,200,236,0,62,223,68,64,58,179,253,113,205,31,73,205,96,152,50,25,144,46,1,216,4,135,222,201,128,21,222,50,71,25,10,128,17,236,30,139,195,83,98,175,211,100,29,29,0,121,129,8,128,26,227,2,96,223,70,208,228,4,62,68,144, -163,185,141,63,36,2,174,53,183,58,32,223,102,7,28,78,248,75,87,169,31,174,249,35,41,221,96,66,50,15,192,32,65,91,49,120,172,129,148,251,1,208,20,55,209,46,216,189,229,206,172,168,4,200,10,1,224,173,112,148,217,188,150,178,84,59,0,210,50,12,187,224,132, -98,71,133,225,125,144,246,108,196,236,127,36,197,72,192,135,171,3,112,118,192,167,26,255,206,219,64,192,82,63,36,27,238,89,160,2,96,39,49,196,198,18,1,105,25,32,173,6,208,83,9,192,243,28,109,8,212,130,2,96,4,103,192,86,43,88,4,91,138,5,0,44,9,195,75, -84,24,45,201,48,44,0,14,108,33,71,3,251,255,35,122,34,1,233,153,29,224,202,229,196,192,116,103,251,163,241,71,116,70,0,52,181,7,52,249,128,225,77,81,199,83,85,83,23,0,212,209,45,170,243,160,0,56,76,81,189,167,81,79,86,36,157,0,24,176,21,179,181,24,67, -207,170,216,32,40,189,123,201,3,5,19,0,17,61,34,32,61,137,129,92,174,86,7,96,182,63,146,181,240,196,104,71,64,145,119,26,222,18,77,62,79,53,7,224,176,0,32,78,111,19,199,115,89,112,52,178,128,96,173,187,89,211,81,1,160,130,98,74,248,95,38,15,109,117,184, -23,35,0,136,126,99,141,213,1,31,24,255,195,29,254,48,219,31,201,74,205,174,176,185,0,198,35,0,149,108,10,109,202,142,43,109,9,92,225,168,177,56,50,63,114,54,43,4,128,43,100,111,72,181,1,16,59,143,228,223,148,152,208,0,72,57,180,19,59,0,34,38,136,128, -52,206,14,200,133,234,128,81,25,236,131,158,63,98,244,70,229,76,17,0,33,71,41,88,5,123,234,149,0,228,175,91,157,98,153,35,96,11,20,180,0,96,109,127,45,192,249,42,156,213,84,21,165,188,243,28,15,97,71,185,241,8,192,193,237,116,103,240,198,64,140,186,22, -31,21,1,38,38,6,102,125,117,0,14,246,65,114,6,1,84,121,183,225,173,248,172,69,224,178,120,82,175,4,160,165,128,110,209,239,10,217,202,51,125,36,50,27,1,208,232,51,131,115,139,54,190,44,213,165,20,170,186,44,188,13,130,246,18,227,2,224,192,118,244,254, -17,19,35,1,238,15,37,6,154,91,29,64,7,8,101,93,78,0,14,246,65,114,233,254,100,2,224,0,107,10,100,4,151,197,11,94,107,48,245,142,128,26,235,125,195,23,213,186,43,51,125,44,50,27,1,32,94,191,175,194,81,108,247,91,131,169,14,1,210,200,65,119,90,220,224, -183,21,25,222,15,165,119,23,174,255,35,105,136,4,172,79,246,9,232,51,121,128,80,54,37,6,166,115,205,31,179,253,145,180,40,0,158,120,225,253,160,201,61,6,133,4,7,1,91,56,229,8,0,251,183,196,225,180,121,44,181,5,31,1,160,107,33,60,207,165,220,22,81,37, -191,220,68,129,185,68,175,177,93,72,68,65,25,56,128,2,0,73,131,8,200,243,234,128,116,27,127,108,242,131,164,41,6,160,169,81,80,149,253,134,183,68,123,1,232,201,95,83,201,191,41,106,240,212,100,250,72,100,84,0,40,10,29,140,224,174,20,44,60,164,186,4,64, -235,47,233,26,140,72,30,64,134,158,97,195,189,236,197,113,40,0,144,52,60,106,142,68,2,242,108,128,208,168,100,251,163,241,71,210,36,0,52,25,20,217,248,253,88,100,47,213,85,10,72,255,137,205,37,86,23,180,0,160,203,238,54,183,69,215,58,8,141,0,208,240, -139,97,17,50,112,16,180,120,148,102,20,226,125,129,164,41,18,144,198,234,128,197,25,40,17,196,176,63,146,243,168,166,36,2,210,62,52,122,135,2,249,171,93,44,9,80,79,9,124,206,11,0,26,53,161,205,127,138,26,61,149,122,166,0,210,176,75,192,94,108,92,0,244, -239,3,77,193,25,0,72,186,69,128,59,61,213,1,174,207,168,14,208,49,178,244,35,110,202,199,189,27,244,252,145,188,8,2,240,196,8,27,95,2,240,219,67,44,10,173,165,158,197,78,19,1,75,129,214,193,21,106,4,96,228,64,232,238,228,19,48,161,5,48,243,200,84,21, -111,8,100,148,68,64,122,170,3,92,135,171,3,18,31,202,108,150,19,192,123,74,245,63,35,29,149,44,99,26,14,39,57,169,137,35,189,253,177,206,31,201,109,136,0,80,140,183,3,246,90,252,96,163,189,0,82,204,3,208,20,218,13,208,26,180,20,129,71,149,11,50,2,64, -199,34,90,193,95,229,42,81,83,238,1,160,129,192,139,44,7,192,120,4,96,63,150,0,34,163,40,2,210,83,29,192,141,84,7,136,101,29,201,72,0,121,137,85,19,193,218,113,162,238,109,10,254,54,176,212,158,149,20,0,242,48,112,86,31,246,246,71,242,35,0,64,132,173, -166,244,209,44,112,67,219,161,125,0,232,96,32,58,152,46,85,251,39,216,120,15,103,129,160,158,36,66,179,200,92,243,123,141,206,101,224,4,209,46,132,116,68,79,64,224,68,86,131,105,120,55,162,3,248,208,65,70,89,4,124,80,29,16,188,224,251,196,208,150,154, -178,101,90,29,224,58,246,235,32,239,89,197,68,173,88,218,65,110,20,35,17,70,14,108,77,151,131,165,100,30,168,177,125,32,248,218,200,190,135,76,61,26,81,204,246,71,50,36,1,52,45,78,94,18,185,85,172,186,183,66,167,209,58,69,15,244,196,14,64,170,227,108, -104,245,27,141,2,104,25,12,64,103,46,2,160,106,96,247,138,46,139,67,8,164,60,6,152,40,38,171,96,99,101,128,8,146,147,143,159,52,149,8,82,131,47,86,142,7,177,98,156,65,227,255,161,135,132,183,5,196,226,217,166,27,127,26,246,143,162,241,71,114,24,158,19, -192,101,241,233,106,7,44,88,5,26,1,47,214,148,2,92,2,160,141,127,220,97,187,207,225,183,186,83,22,0,228,151,93,112,128,67,116,26,127,16,59,168,136,192,28,0,36,19,34,32,61,213,1,185,0,174,249,35,153,69,35,158,191,205,144,247,127,24,15,17,0,122,154,1,81, -205,160,72,106,56,147,71,33,179,125,0,36,213,71,140,127,202,86,156,118,1,164,161,23,155,224,50,188,15,98,168,10,64,195,219,1,201,208,67,40,77,213,1,104,252,17,228,223,221,121,10,240,98,152,141,173,54,44,0,172,126,0,157,189,0,124,101,142,112,38,199,2, -103,116,9,192,87,238,244,11,34,207,167,126,220,52,112,90,60,134,155,0,81,44,21,173,228,26,176,3,170,0,36,179,34,192,252,234,128,172,52,254,152,240,135,100,197,109,167,128,96,29,99,202,166,220,116,9,64,143,253,39,255,200,87,225,12,101,242,54,200,168,0, -240,148,56,130,188,133,75,249,224,209,225,11,14,209,109,202,113,179,150,183,128,24,174,1,144,37,188,41,144,12,138,128,244,84,7,100,157,241,199,53,127,36,27,238,55,222,10,22,199,20,147,4,128,254,92,52,69,82,139,50,233,123,102,122,9,32,160,47,114,162,130, -139,8,0,83,16,173,224,24,187,24,52,41,142,247,5,146,97,17,144,166,196,192,44,0,179,253,145,172,185,211,180,56,121,236,183,129,104,51,39,2,224,20,189,186,186,1,82,39,216,225,183,6,5,107,230,204,112,70,5,128,213,37,250,117,31,116,139,199,180,253,112,78, -58,9,132,162,10,162,72,18,120,119,32,25,37,31,69,0,245,252,49,219,31,201,22,161,77,95,118,223,25,228,171,57,243,95,92,22,247,136,0,72,205,155,165,137,240,222,114,151,215,234,204,220,28,154,140,9,0,154,248,16,106,242,250,245,212,64,210,181,19,167,224, -54,239,32,184,2,224,57,230,50,208,164,4,96,46,0,146,121,17,144,63,213,1,216,222,23,201,42,243,175,14,131,213,57,15,44,142,153,166,109,147,46,71,211,114,64,77,215,254,104,30,173,80,151,0,8,58,23,79,136,130,51,161,4,240,35,81,128,137,39,130,115,242,201, -160,70,7,241,46,65,50,238,165,164,107,138,224,104,126,134,40,102,251,35,217,35,171,137,227,24,5,193,82,7,174,224,85,166,110,153,182,2,166,141,233,244,56,143,196,248,187,105,83,192,66,21,0,250,226,248,28,199,218,47,154,141,111,217,151,193,209,185,16,212, -200,0,128,134,145,0,36,11,34,1,187,214,65,239,131,183,130,150,136,230,212,190,71,251,239,39,175,223,161,241,71,178,198,243,23,196,82,112,23,255,39,112,66,145,169,219,166,77,233,216,64,160,84,59,218,146,191,111,113,8,46,171,83,176,102,234,184,100,78,0, -104,201,240,135,190,157,230,137,234,114,154,190,75,156,197,6,129,179,190,14,174,105,167,177,161,42,154,140,57,1,72,134,35,1,118,55,36,182,188,5,137,109,239,228,208,110,199,32,49,244,4,209,233,14,52,254,72,134,81,137,157,25,4,209,214,66,140,255,221,44, -2,96,54,22,142,8,0,78,76,189,27,160,162,129,171,200,106,245,20,59,108,5,39,0,44,78,1,188,101,14,151,170,163,13,34,71,123,148,11,233,57,102,84,4,248,79,253,26,4,206,184,19,196,64,25,121,150,13,38,43,4,52,236,22,136,100,44,22,192,198,151,230,142,108,249, -215,239,16,100,116,189,75,137,60,178,135,128,142,187,113,248,206,5,79,201,61,196,248,215,164,199,150,17,91,36,232,236,73,67,103,226,105,154,102,207,212,145,202,216,48,32,209,198,131,51,96,179,15,12,105,41,202,16,218,194,145,7,171,144,222,99,230,24,127, -44,216,90,103,66,244,237,199,33,250,206,147,32,237,221,4,90,124,56,25,183,97,211,3,209,179,65,70,225,81,38,199,193,222,50,29,172,53,221,185,35,87,56,59,216,220,75,33,210,251,19,250,1,112,218,38,50,74,70,95,27,185,254,172,192,139,101,196,201,156,70,174, -195,99,211,226,245,127,196,150,113,22,22,1,208,41,120,173,35,175,194,18,0,90,114,9,192,161,239,1,195,129,133,79,127,212,132,119,120,193,53,253,76,112,77,59,3,228,125,155,32,177,123,29,200,251,183,130,58,116,136,60,215,254,63,123,231,1,47,71,89,245,255, -179,51,179,237,246,126,211,147,155,222,72,2,161,6,233,72,145,162,2,214,191,149,87,254,250,250,250,170,20,11,254,241,125,21,21,21,20,17,20,72,40,210,91,66,73,40,161,164,87,82,110,239,189,238,189,119,123,239,51,187,255,231,121,54,137,160,160,185,179,51, -91,207,55,159,225,134,36,187,59,59,237,252,206,121,78,17,81,3,32,234,18,139,129,80,49,19,10,63,241,229,99,221,42,179,7,67,233,87,217,90,171,24,106,252,123,20,3,65,212,50,254,196,139,212,240,37,204,240,11,186,69,192,147,45,177,4,165,62,188,134,7,45,175, -99,213,105,50,46,115,33,47,5,192,241,99,39,231,84,211,37,0,65,163,77,221,94,178,209,170,11,217,134,32,200,73,221,52,196,251,186,138,109,8,146,211,87,58,177,15,84,4,36,97,131,243,48,9,48,241,217,178,82,249,105,205,165,192,9,120,229,33,8,130,32,105,37, -97,143,244,172,67,173,28,39,56,30,139,167,205,152,165,59,179,72,70,92,48,206,170,0,18,107,46,8,130,32,8,146,165,226,129,215,128,177,52,125,189,128,185,108,61,112,113,204,48,70,16,4,65,210,238,197,106,64,199,233,166,94,6,24,143,131,96,224,161,108,78,81, -81,186,246,61,157,2,128,186,240,83,95,2,160,69,3,26,14,120,92,2,64,16,4,65,50,65,4,208,50,93,89,189,128,19,67,129,242,81,0,208,240,191,172,36,64,186,230,194,167,50,9,16,65,16,4,65,114,140,116,47,1,196,211,242,82,4,65,16,4,65,1,128,32,8,130,32,8,10,0, -4,65,16,4,65,80,0,100,34,52,219,50,142,189,249,17,4,65,16,36,43,5,128,72,182,192,84,95,68,219,138,75,49,17,162,49,156,212,135,32,8,130,100,49,26,214,11,32,109,125,178,211,41,0,104,22,159,132,87,0,130,32,8,146,173,208,136,116,68,10,179,150,192,83,118, -102,163,49,240,89,67,193,124,20,0,199,244,143,188,3,142,141,128,16,4,65,144,76,17,1,114,204,159,20,142,129,103,60,16,206,215,8,128,95,214,65,139,139,16,149,162,120,213,33,8,130,32,233,53,254,241,56,196,226,146,60,127,86,3,113,13,159,190,73,153,233,108, -167,151,212,18,128,20,79,253,234,129,100,182,129,52,97,134,152,211,13,241,96,16,175,124,68,237,39,11,8,179,103,130,118,213,178,172,220,125,79,32,2,102,103,128,60,28,227,56,12,24,81,213,144,240,28,7,6,29,15,69,6,45,20,23,232,200,255,167,238,138,163,198, -95,140,69,88,75,96,25,80,79,54,148,127,2,64,195,198,40,6,101,188,140,28,240,24,68,98,169,49,192,226,192,8,132,182,237,133,240,251,13,32,142,154,32,230,245,147,83,134,209,7,36,53,2,0,200,131,173,232,107,55,64,241,247,255,35,171,118,125,216,236,133,109, -77,228,222,137,72,104,252,145,212,152,20,141,6,116,2,7,133,70,45,76,47,47,132,5,51,74,97,86,149,250,109,246,99,228,151,24,139,78,57,7,224,184,95,9,137,132,248,252,18,0,113,49,14,209,144,20,158,250,49,211,176,7,163,218,85,0,212,211,247,61,250,60,4,223, -219,3,113,143,15,200,149,5,26,65,75,54,30,64,139,115,8,144,20,33,73,224,123,246,85,48,92,118,1,104,151,46,204,138,93,142,197,226,112,184,103,18,194,196,248,211,7,50,130,164,236,118,33,215,158,203,23,6,187,39,4,29,163,14,152,81,81,8,107,23,214,192,172, -234,34,21,63,83,100,2,64,38,212,144,165,45,7,32,109,150,44,236,19,193,49,236,11,112,117,220,148,23,2,168,226,138,72,234,69,77,168,199,239,249,195,195,32,77,90,65,83,104,4,77,113,33,222,89,72,122,224,137,224,12,133,137,32,181,100,141,0,16,165,24,4,194, -98,74,195,176,8,146,136,2,144,91,134,252,231,248,181,103,178,251,96,194,225,135,85,117,85,112,246,178,105,192,169,80,113,71,157,81,49,46,130,156,28,0,13,167,9,211,45,93,199,43,221,242,220,39,43,122,64,4,64,72,82,103,9,192,255,236,43,224,188,253,183,32, -57,221,9,195,207,161,7,131,164,143,120,56,2,124,117,37,232,86,44,206,154,125,214,106,121,168,45,43,128,168,132,205,186,144,52,95,139,60,199,140,126,67,159,5,222,173,31,97,226,84,121,1,16,78,44,1,76,81,0,16,195,15,33,79,52,18,116,69,210,150,3,144,110, -235,230,145,245,80,140,199,33,44,6,20,223,153,192,150,119,192,243,199,13,160,209,10,160,209,225,180,65,36,205,198,63,74,30,42,122,29,148,222,241,67,224,106,170,178,199,11,35,219,39,86,204,128,26,42,2,68,20,1,72,250,163,2,122,34,74,251,198,93,176,179, -121,140,165,214,40,9,141,70,211,101,128,169,6,23,232,4,225,16,49,254,1,71,56,109,93,237,210,42,0,56,94,227,145,121,74,33,40,249,21,221,151,104,103,47,120,239,121,152,60,112,181,137,176,43,130,164,19,106,252,181,90,40,191,235,167,160,63,239,204,172,219, -253,34,163,22,62,117,198,60,168,42,53,160,8,64,50,2,42,2,186,199,156,208,216,111,85,244,125,195,82,24,196,120,20,100,46,1,120,201,150,182,36,192,244,9,0,162,194,156,35,126,183,220,37,153,128,168,160,0,16,37,240,222,187,1,98,129,32,128,128,9,126,72,250, -141,63,156,48,254,103,101,237,215,72,136,128,58,34,2,140,40,2,144,140,64,43,240,208,208,107,6,135,87,185,168,123,136,56,163,180,44,93,142,41,99,2,64,147,190,174,118,105,19,0,52,140,239,183,132,220,178,122,39,144,35,22,136,122,149,59,129,59,247,67,184, -190,5,52,5,70,188,67,144,12,242,252,207,202,250,175,243,247,72,128,17,115,2,144,180,67,115,3,195,68,140,54,244,41,23,5,8,136,190,99,195,233,166,158,3,16,116,134,189,98,36,125,247,69,122,151,0,180,156,67,206,235,104,178,5,61,232,10,41,17,8,188,178,21, -147,253,144,140,241,252,203,114,196,248,255,147,8,40,193,72,0,146,1,81,0,158,131,97,139,135,53,170,82,2,191,232,133,152,140,158,118,28,175,1,207,68,192,25,13,164,111,36,78,218,172,30,245,226,195,222,168,51,30,139,203,120,45,167,152,0,144,70,199,33,218, -209,195,146,173,16,36,221,198,191,60,199,140,255,71,70,2,80,4,32,105,132,46,59,135,194,34,17,1,202,68,145,253,17,183,236,196,66,34,2,236,233,236,148,149,62,1,64,212,143,125,208,227,20,35,177,248,84,243,0,56,22,1,240,42,210,14,56,210,218,5,49,175,15,35, -0,72,218,136,231,184,241,71,17,128,100,158,8,208,192,132,93,25,39,210,23,245,200,126,173,20,141,217,210,121,28,210,92,5,192,121,104,32,64,78,4,32,40,250,33,162,64,47,0,113,104,4,20,175,11,65,144,41,120,254,154,60,48,254,255,44,2,176,58,0,73,163,237,225, -52,224,14,68,88,46,90,178,120,163,46,89,109,128,105,14,128,185,203,99,139,75,233,179,63,233,139,0,112,108,9,192,21,9,74,126,205,20,59,134,209,28,128,48,49,254,74,84,2,196,236,46,244,254,145,180,25,127,200,35,227,255,97,17,128,213,1,72,26,35,0,100,139, -68,37,69,18,83,189,17,34,0,228,152,210,132,217,179,228,101,4,128,38,64,120,205,33,111,208,21,117,77,89,0,104,184,99,2,32,249,16,78,92,20,241,110,64,114,202,248,139,225,40,217,148,187,174,105,154,142,39,172,236,125,130,213,1,72,46,64,35,8,190,168,27,56, -205,212,77,105,140,136,95,191,61,108,213,164,209,255,76,107,209,187,134,215,68,136,16,160,107,32,11,166,42,156,162,49,145,40,47,103,242,66,196,104,196,37,0,36,103,140,127,203,198,195,208,183,179,147,37,58,45,184,112,25,156,114,253,25,160,73,162,39,255, -246,126,59,220,187,119,16,108,129,8,172,153,94,2,191,252,228,34,152,86,164,87,84,4,188,117,100,8,108,238,32,104,113,112,16,146,74,39,148,220,36,154,36,103,3,68,98,33,86,5,48,85,1,64,63,86,138,198,36,247,88,192,78,243,225,242,46,2,64,31,74,17,111,20,220, -99,126,171,70,152,234,1,208,128,20,23,193,29,177,39,127,0,170,42,80,0,32,105,48,254,183,43,110,252,143,252,109,15,52,60,115,0,2,54,47,248,173,94,168,127,106,31,244,19,49,32,151,17,87,8,126,248,122,39,52,79,122,193,30,136,194,150,78,11,124,125,99,11,140, -123,148,155,93,130,37,130,72,58,160,81,45,189,78,96,37,129,201,224,143,122,89,62,154,70,70,42,127,60,30,247,145,87,57,210,121,28,210,42,185,165,72,12,162,1,113,92,142,10,163,161,23,103,56,249,4,74,126,90,53,128,6,167,150,33,234,243,225,108,127,101,219, -251,82,227,223,190,185,1,116,133,122,224,180,252,137,109,162,117,84,246,123,54,78,120,192,17,140,64,145,142,7,129,8,246,50,131,0,237,102,31,124,115,19,17,1,94,133,69,192,153,243,160,18,115,2,144,84,221,139,228,87,161,33,249,0,56,173,0,8,75,1,182,44,61, -37,195,43,112,224,183,69,92,17,43,184,120,109,250,204,112,26,251,0,80,21,22,7,247,120,208,36,43,131,146,188,198,25,74,62,127,130,9,0,173,0,128,65,0,68,101,207,95,173,108,255,19,198,191,64,247,225,102,100,52,196,153,68,145,177,72,220,164,15,142,79,165, -183,8,21,3,237,22,34,2,88,36,64,185,118,170,84,4,92,133,213,1,72,170,4,0,177,61,244,154,75,22,26,133,142,178,73,128,50,246,33,22,55,199,99,16,74,231,113,72,107,4,128,118,79,244,219,66,163,26,89,9,148,156,34,17,0,174,186,10,52,6,67,98,103,16,68,37,227, -15,170,25,255,189,208,190,165,145,24,127,253,71,71,178,146,8,110,125,220,75,139,143,139,128,151,91,85,88,14,192,234,0,36,37,46,40,148,24,147,111,254,230,12,91,217,36,192,169,222,104,52,2,224,26,241,79,178,61,225,242,48,7,32,241,197,1,2,206,200,104,76, -70,29,36,77,186,112,19,1,16,135,228,30,20,92,69,25,112,37,197,137,69,33,4,201,42,227,191,7,58,182,212,131,206,168,131,84,118,19,139,31,19,1,29,116,57,224,101,117,114,2,42,177,58,0,81,211,246,144,251,165,184,32,121,1,96,15,77,202,86,215,209,160,56,146, -238,227,144,222,70,64,180,25,131,41,48,17,151,98,83,30,165,68,5,128,39,234,2,127,52,185,82,64,174,184,16,248,170,114,136,75,18,222,21,72,118,121,254,155,27,64,107,212,67,58,90,137,158,88,14,80,73,4,92,133,137,129,136,138,215,46,77,254,43,86,32,2,96,15, -78,202,170,36,160,182,207,214,231,25,206,107,1,192,166,33,185,162,230,72,64,154,242,88,96,142,205,3,240,130,55,154,100,41,32,249,96,126,122,45,0,10,0,68,201,135,140,202,158,127,59,245,252,11,210,99,252,255,49,18,208,174,98,36,0,151,3,16,197,175,219,120, -28,116,90,94,145,36,64,71,216,2,188,134,151,245,218,136,95,204,115,1,192,107,32,64,51,33,253,162,121,234,221,0,57,136,72,97,112,40,145,8,56,107,58,46,1,32,138,26,127,213,19,254,140,233,53,254,31,41,2,212,168,14,56,3,171,3,16,165,5,0,16,227,175,5,189, -54,57,1,16,146,130,224,14,219,137,51,58,69,1,64,123,0,144,235,217,214,239,195,37,0,144,64,244,140,7,70,57,25,77,64,196,88,20,108,193,137,164,247,67,152,59,43,35,30,166,72,14,144,142,108,255,12,16,1,234,87,7,160,8,64,148,33,70,156,189,18,114,15,37,91, -253,237,137,56,192,39,122,100,53,1,138,134,36,127,192,25,49,229,181,0,96,15,49,242,244,8,58,35,253,114,219,33,154,131,163,73,239,134,48,103,102,98,28,48,54,4,66,146,52,254,106,133,253,143,50,227,255,47,178,253,51,0,117,171,3,80,4,32,202,9,214,178,194, -228,187,89,58,66,102,8,139,129,41,155,209,99,77,240,38,189,230,160,53,191,5,192,49,236,131,222,62,78,198,64,30,26,122,177,4,146,23,81,252,244,26,208,176,74,0,124,184,32,153,103,252,19,165,126,153,231,249,127,212,131,245,131,213,1,38,172,14,64,50,16,122, -11,149,43,208,206,218,18,52,177,40,244,84,111,73,54,7,199,18,26,147,194,82,56,221,199,34,35,4,0,57,24,189,114,198,50,210,228,11,90,134,65,79,66,82,7,161,162,12,248,218,106,172,4,64,50,208,248,239,73,107,182,191,28,17,112,188,58,224,70,172,14,64,50,16, -129,231,160,76,1,1,48,225,31,145,213,63,142,230,190,5,29,145,62,41,154,254,107,56,35,4,128,115,216,55,40,137,177,41,91,95,26,1,112,71,28,224,73,182,18,128,227,216,50,0,136,40,0,144,12,51,254,172,201,143,46,171,114,84,254,185,58,64,217,156,0,92,14,64, -228,66,187,207,26,245,2,203,1,72,22,186,252,204,201,168,0,160,209,110,251,160,183,59,19,142,71,70,8,0,183,41,48,22,241,68,237,220,20,167,34,209,54,165,129,168,79,153,68,192,5,115,177,18,0,153,154,161,75,129,231,159,234,38,63,170,136,128,77,152,19,128, -100,136,0,136,209,6,64,180,2,128,79,234,125,162,177,8,235,1,32,167,4,144,205,177,25,241,161,0,56,78,200,29,117,251,109,225,145,169,143,69,212,64,52,30,129,201,64,242,213,20,218,69,117,0,60,143,119,8,114,210,158,127,190,101,251,203,17,1,39,170,3,54,97, -159,0,36,51,34,0,229,133,134,228,157,214,136,29,220,97,135,172,8,0,29,3,236,26,245,247,163,0,56,134,24,150,226,30,115,176,139,147,49,23,89,67,158,50,227,190,193,228,35,0,117,179,129,43,41,196,68,64,228,164,140,191,250,97,127,125,206,76,169,252,123,117, -0,77,12,84,97,57,160,196,8,17,20,1,200,73,66,69,99,178,152,3,99,16,148,124,83,46,1,164,54,46,236,137,90,220,166,224,72,38,28,11,46,83,78,138,99,200,215,206,201,152,205,204,113,2,140,7,146,111,168,68,147,0,89,34,32,230,1,32,105,52,254,29,91,178,55,236, -255,175,34,1,199,171,3,110,84,163,68,240,204,99,145,0,172,14,64,254,157,163,71,12,112,101,73,242,17,0,147,127,16,68,54,4,104,138,14,43,249,124,191,53,52,24,242,68,188,40,0,62,44,0,218,228,172,192,211,53,24,107,112,28,130,162,63,201,43,67,0,97,254,28, -0,81,196,187,4,73,143,231,191,185,49,107,178,253,229,136,128,34,21,19,3,177,58,0,249,119,176,4,64,157,160,72,5,128,201,55,32,111,6,0,113,114,61,230,96,135,20,201,140,235,52,99,4,128,173,215,219,45,6,197,232,212,135,2,241,224,9,59,192,26,26,79,122,31, -180,203,22,225,18,0,146,30,227,191,37,251,215,252,79,54,18,144,16,1,152,24,136,164,88,0,196,226,204,248,27,146,76,0,164,19,104,39,252,195,196,249,156,122,43,97,186,4,96,237,245,182,100,202,49,201,24,1,224,53,7,71,195,62,113,108,234,51,1,52,16,142,133, -136,34,75,62,15,128,9,0,157,22,59,2,34,31,190,225,213,14,251,103,80,111,255,212,138,0,117,102,7,160,8,64,62,46,2,160,196,250,191,43,108,7,91,72,94,5,0,221,7,107,143,7,5,192,63,18,116,134,67,158,137,96,23,47,99,38,0,53,216,35,222,158,164,247,65,152,63, -23,248,138,114,0,92,75,68,62,224,249,171,157,237,175,205,113,207,255,163,68,192,137,229,128,141,88,29,128,164,6,26,178,175,45,43,72,250,125,104,213,153,63,234,158,114,5,0,253,252,168,79,244,57,6,189,189,40,0,254,217,134,131,99,192,219,200,9,114,102,43, -11,48,234,235,75,254,96,148,151,130,48,111,22,196,49,15,0,57,102,252,213,15,251,231,78,182,255,84,249,96,117,0,54,11,66,212,22,157,180,246,191,74,129,4,192,17,98,191,229,36,0,82,219,230,179,134,6,60,147,193,73,20,0,31,129,165,199,211,32,231,89,40,104, -4,54,19,192,27,117,37,189,15,218,21,75,48,17,16,73,81,182,191,62,175,167,80,126,120,118,128,90,57,1,6,172,14,64,78,76,0,84,162,3,224,144,167,123,202,229,127,9,1,192,129,115,196,223,34,134,50,231,130,204,40,1,96,235,243,180,73,209,184,140,68,64,14,60, -17,39,75,204,72,22,221,234,229,216,16,8,141,63,102,251,167,80,4,20,169,218,54,184,14,171,3,16,38,0,170,75,141,178,50,247,63,244,104,136,69,192,228,31,0,158,155,122,2,32,93,49,176,245,122,142,102,210,113,201,44,1,208,235,25,242,89,67,35,156,156,142,128, -228,196,12,121,186,146,143,0,44,89,192,150,2,48,15,0,141,63,118,248,75,109,36,0,171,3,16,53,175,177,233,21,133,73,191,143,53,104,2,71,200,34,171,2,128,238,4,141,114,163,0,248,24,66,222,104,216,61,30,104,230,4,57,163,129,57,24,244,116,38,127,64,106,170, -64,168,155,147,200,252,70,242,235,33,145,18,227,143,158,255,191,21,1,216,54,24,81,242,218,138,39,214,255,107,203,147,79,0,28,242,244,64,72,10,176,234,179,41,185,168,156,6,66,158,168,131,56,185,157,153,116,108,184,76,59,89,147,173,206,195,114,18,1,121, -78,11,163,190,126,8,75,201,135,16,217,50,0,118,4,204,59,207,31,123,251,167,95,4,224,236,0,68,105,104,233,93,89,161,30,74,11,146,111,0,52,224,105,151,103,104,137,77,243,76,4,59,137,131,107,67,1,240,47,176,244,184,15,201,25,178,76,107,50,29,97,139,34,131, -129,116,107,87,17,79,16,243,0,242,201,248,99,182,127,230,80,252,1,17,96,82,169,58,0,103,7,228,15,82,44,206,188,255,100,111,191,88,92,98,9,128,114,194,255,180,188,221,222,239,61,28,207,176,137,179,25,39,0,172,221,158,214,176,55,234,144,213,16,72,12,194, -160,167,35,233,125,160,13,129,248,234,74,140,2,160,241,79,138,163,152,237,47,59,18,192,170,3,44,42,205,14,32,34,160,26,171,3,242,6,106,248,103,86,21,37,111,155,130,19,96,9,154,100,37,0,82,75,107,106,178,31,200,180,99,147,113,2,192,109,10,216,93,99,129, -86,94,198,50,128,70,195,65,175,171,53,249,131,82,90,12,218,165,139,48,15,32,231,141,191,168,162,231,191,23,218,48,219,63,41,17,80,164,106,78,0,86,7,228,197,117,68,46,164,2,189,22,166,41,177,254,239,237,130,128,232,37,70,115,106,102,147,86,30,136,33,41, -108,238,112,215,163,0,248,55,196,164,56,76,182,59,15,242,50,66,240,2,167,37,39,169,27,194,82,48,233,253,208,159,185,6,64,194,8,64,110,123,254,130,138,107,254,245,184,230,175,80,36,224,239,205,130,48,39,0,153,26,82,44,198,162,61,5,122,33,233,247,234,113, -53,201,139,64,208,9,128,246,112,55,113,110,71,50,237,248,112,153,120,210,198,155,156,123,227,50,18,1,88,30,64,208,204,234,52,147,69,119,250,42,208,20,21,210,133,31,188,139,114,205,176,164,160,206,31,179,253,21,22,1,102,20,1,136,12,135,50,30,135,153,149, -201,135,255,197,184,8,3,238,78,214,116,110,202,118,73,203,209,254,255,7,195,190,104,198,121,148,25,41,0,204,29,174,6,114,176,60,156,140,60,128,72,44,76,148,90,115,210,251,32,204,155,147,40,7,20,113,25,32,215,60,127,13,78,245,67,17,128,34,32,47,208,242, -60,204,170,78,94,0,76,250,135,143,173,255,107,167,110,100,121,13,140,55,59,118,103,226,241,201,72,1,224,158,8,76,186,70,3,205,156,118,234,187,71,163,0,93,206,166,228,119,130,231,64,127,198,106,128,8,10,128,92,50,254,170,103,251,227,154,191,250,34,96, -147,122,179,3,176,58,32,119,160,217,255,229,197,122,168,40,78,190,255,127,143,171,5,66,162,140,250,127,242,207,165,168,20,158,104,113,30,70,1,112,146,196,196,56,152,219,93,187,228,8,0,129,245,3,232,3,79,196,145,244,126,232,215,157,14,26,28,15,140,198, -255,36,140,63,102,251,167,78,4,116,88,212,235,24,136,213,1,185,37,0,102,85,21,1,167,64,249,109,151,179,65,118,255,127,151,41,208,97,235,247,14,102,226,49,226,50,245,228,153,154,29,187,228,24,94,58,162,209,19,118,64,159,187,61,233,125,160,131,129,248, -217,51,176,28,48,235,141,191,186,217,254,108,164,47,26,255,148,137,128,34,85,151,3,176,58,32,87,224,57,13,204,169,41,73,250,125,124,81,15,171,255,23,184,169,15,18,226,117,28,76,182,185,246,68,252,153,121,65,101,172,0,152,108,119,53,132,188,81,139,12, -209,5,177,120,12,58,28,71,146,222,7,141,65,15,186,211,87,67,60,18,193,187,41,171,61,127,181,179,253,209,248,167,35,18,160,110,78,128,1,69,64,150,123,255,37,133,58,168,45,51,38,253,94,180,251,159,51,108,101,203,203,83,182,33,26,13,76,180,56,183,103,234, -113,202,88,1,224,30,243,187,108,189,222,131,188,110,234,7,93,203,235,216,154,13,29,16,148,44,6,98,52,52,56,29,48,59,13,5,102,251,231,135,8,80,171,79,0,38,6,102,181,0,152,85,89,4,2,159,188,137,107,183,31,97,93,0,167,108,252,201,71,135,60,17,215,200,17, -219,33,20,0,83,189,193,201,29,62,214,96,223,198,203,24,12,68,75,53,44,193,49,24,246,246,36,189,31,186,83,87,2,63,115,90,34,140,140,100,149,231,143,189,253,243,68,4,96,159,0,228,31,13,27,241,188,235,166,37,31,254,23,227,81,232,118,53,129,86,78,248,95, -203,129,99,200,127,196,51,17,176,160,0,144,193,200,17,235,118,73,140,201,176,188,26,136,74,17,162,220,146,79,188,212,20,24,65,119,230,169,184,12,144,101,198,31,167,250,229,107,36,0,171,3,242,157,24,241,254,75,11,117,48,77,129,241,191,35,222,94,48,7,70, -101,181,255,165,205,236,70,143,218,222,165,73,237,40,0,100,96,237,246,116,187,77,254,118,94,86,53,128,0,29,206,163,44,31,32,89,140,151,156,75,206,38,143,213,0,104,252,19,217,254,104,252,51,82,4,168,94,29,128,34,32,43,16,137,0,152,83,83,12,90,5,194,255, -109,246,67,16,145,194,83,46,255,163,72,209,88,140,8,128,247,50,58,82,146,201,59,71,51,39,205,157,238,247,104,38,229,212,5,128,14,198,124,3,48,238,79,190,250,66,187,122,5,8,115,103,65,92,196,101,128,204,54,254,152,237,159,207,34,224,131,213,1,38,204,9, -200,91,104,246,255,252,105,165,201,71,18,136,243,216,102,63,194,156,201,41,27,86,65,3,126,107,168,139,216,175,246,76,62,86,92,166,159,204,129,61,150,183,228,60,113,169,98,163,141,27,218,28,10,44,3,24,244,96,56,239,76,128,48,46,3,100,182,231,47,168,104, -252,49,219,63,91,34,1,84,4,220,168,70,78,192,153,88,29,144,233,208,228,63,218,248,71,137,225,63,212,121,164,109,229,229,148,255,9,122,158,150,178,191,23,246,102,118,242,88,198,11,128,209,35,182,195,62,75,112,140,182,83,156,186,18,20,160,197,118,16,228, -204,21,248,71,12,151,158,71,132,128,1,151,1,50,214,248,171,24,246,199,53,255,172,20,1,44,39,192,171,160,8,48,96,36,32,27,4,0,77,254,155,106,27,249,143,162,197,126,80,86,247,191,227,23,98,223,174,201,55,50,253,120,101,188,0,8,56,195,126,91,159,119,155, -156,101,0,154,185,73,147,56,38,252,67,73,239,135,118,217,34,208,46,93,136,201,128,121,102,252,105,123,95,45,102,251,103,167,8,176,168,85,34,136,213,1,153,122,222,117,2,7,11,166,39,31,254,143,199,99,204,121,148,19,254,215,16,241,17,116,69,76,227,205,206, -247,81,0,40,192,224,126,203,102,186,166,50,229,19,65,126,5,69,63,52,89,247,43,112,164,56,22,5,192,114,192,204,50,254,170,151,250,225,154,127,86,139,128,14,172,14,200,31,239,95,138,65,109,121,161,34,189,255,71,125,253,196,121,236,147,25,254,231,192,220, -233,222,230,183,133,124,40,0,20,17,0,230,93,33,119,212,170,145,17,214,161,179,1,154,108,7,20,169,6,48,92,114,46,112,21,101,52,206,132,119,91,134,120,254,101,152,237,143,252,11,17,80,132,213,1,121,3,157,220,190,104,102,169,34,239,213,100,219,7,97,41,40, -43,252,79,157,213,254,61,147,175,102,195,49,203,10,1,224,54,5,92,147,237,174,93,130,78,222,112,160,49,95,31,81,115,201,55,5,226,167,213,128,254,172,211,32,30,14,227,221,150,86,227,175,118,182,127,35,102,251,231,152,8,80,179,99,96,37,46,7,100,128,241, -143,67,49,57,31,117,181,201,11,0,218,122,166,153,56,141,90,25,163,127,19,225,255,168,109,232,128,117,15,10,0,5,25,216,107,222,164,209,202,91,6,8,75,33,168,183,42,51,142,217,120,213,37,180,205,20,222,113,105,245,252,213,206,246,199,53,255,92,19,1,106, -118,12,188,10,103,7,164,29,81,138,195,188,218,18,48,232,146,111,219,62,232,233,32,78,227,32,240,50,4,0,13,255,79,182,185,182,121,38,2,78,20,0,10,50,184,223,242,158,220,101,0,58,27,128,42,186,72,44,249,27,95,127,198,26,16,22,214,97,50,96,58,30,228,152, -237,143,36,43,2,84,157,29,128,34,32,93,8,196,46,44,153,85,174,204,179,192,178,19,196,88,68,86,248,95,147,8,255,191,152,45,199,45,107,4,128,219,20,112,154,219,93,239,81,133,53,229,139,67,163,133,73,255,8,116,59,155,146,223,17,157,22,10,46,191,16,32,18, -197,187,46,197,198,95,131,217,254,136,82,145,0,28,32,148,67,222,63,77,254,43,128,26,5,106,255,105,210,120,171,253,125,208,241,250,169,27,127,34,66,66,174,168,121,232,128,117,7,10,0,21,232,223,99,126,145,19,228,237,114,140,252,58,108,222,166,200,126,24, -174,184,16,184,138,114,76,6,76,21,152,237,143,40,44,2,58,44,88,29,144,43,208,228,191,165,179,43,20,185,125,105,235,95,107,112,28,120,205,212,203,255,104,243,159,201,118,215,155,158,137,128,7,5,128,10,244,237,152,216,225,179,4,77,114,74,2,117,156,30,218, -29,71,193,21,182,37,189,31,44,25,144,24,162,120,40,132,119,95,10,140,63,246,246,71,148,22,1,88,29,144,43,198,63,49,248,71,137,214,191,148,67,230,237,242,26,255,64,98,252,111,215,214,177,23,178,233,248,101,149,0,240,219,195,62,83,163,99,11,85,90,83,254, -162,26,30,220,97,59,52,40,148,156,89,240,153,203,65,163,211,98,103,64,85,141,191,168,242,84,63,204,246,207,119,17,160,110,78,0,46,7,168,13,77,254,91,52,163,12,116,218,228,77,25,157,250,215,195,70,255,78,61,252,79,157,82,175,37,52,48,120,192,178,23,5, -128,138,244,108,159,120,142,217,92,25,15,109,218,26,248,176,121,135,34,61,1,116,171,151,131,110,205,74,136,227,124,0,21,61,127,65,213,193,62,152,237,143,34,64,205,234,0,236,24,168,242,249,35,39,208,160,229,97,233,108,101,146,255,14,19,239,223,31,245, -16,103,81,70,158,25,237,253,95,111,127,37,228,142,102,85,88,56,235,4,192,208,1,235,251,238,49,127,27,47,99,25,128,182,6,30,242,116,65,191,187,45,249,29,209,104,160,224,186,79,97,30,128,26,55,182,218,237,125,49,219,31,249,71,17,96,70,17,144,117,62,2,121, -246,206,173,45,129,210,66,125,210,239,69,43,196,142,88,118,201,242,254,233,115,36,38,197,165,246,55,70,159,203,182,99,152,117,2,32,26,20,197,193,125,150,231,229,44,3,208,181,157,104,44,2,7,38,222,86,100,95,12,23,156,13,194,162,58,114,245,96,20,64,73, -227,175,118,182,63,122,254,200,199,138,0,156,29,144,53,208,177,191,43,231,85,42,242,94,237,246,35,108,102,140,32,163,246,159,215,114,224,26,241,31,153,104,85,162,204,12,5,192,191,165,115,235,216,139,98,36,22,210,200,120,136,235,121,3,52,219,15,42,146, -12,8,122,29,20,124,246,10,136,99,73,160,66,234,14,179,253,145,244,138,0,172,14,200,14,104,233,223,172,170,34,69,198,254,82,246,79,188,37,251,181,212,25,237,126,111,252,153,104,80,202,186,132,176,172,20,0,214,94,111,191,185,211,189,157,215,201,75,6,116, -133,237,44,219,83,9,140,159,186,24,248,89,211,201,21,137,67,130,146,53,254,152,237,143,164,91,4,124,184,58,64,121,17,128,213,1,202,157,171,149,243,170,20,121,47,147,127,16,186,156,141,160,227,167,62,68,136,58,161,17,191,232,238,223,51,185,41,27,143,99, -86,10,128,24,185,129,186,182,154,30,231,101,102,126,210,30,207,7,39,223,97,203,1,73,31,192,146,98,40,184,230,50,136,135,112,62,128,124,227,127,60,219,255,118,204,246,71,50,66,4,36,114,2,90,177,58,32,19,189,255,88,156,120,254,133,48,167,166,88,33,239, -127,43,107,0,36,167,252,79,48,240,96,106,118,188,110,237,246,152,81,0,164,144,222,29,19,111,251,172,161,33,142,151,151,12,104,242,13,176,166,15,74,64,151,1,184,234,74,58,143,18,239,78,89,158,255,241,108,255,51,85,48,254,184,230,143,76,93,4,96,78,64,6, -159,31,34,0,78,153,87,169,200,72,22,95,212,13,71,205,59,101,117,254,99,17,0,158,131,206,55,199,30,203,214,99,153,181,2,32,224,8,7,6,246,154,159,211,26,229,15,127,216,109,122,93,153,131,72,140,127,193,85,151,64,60,136,141,129,166,116,35,171,26,246,223, -139,189,253,145,228,69,192,241,156,0,47,138,128,76,241,254,171,201,113,91,48,93,153,198,63,180,244,207,30,154,148,213,249,143,23,56,112,143,249,91,6,247,89,246,161,0,72,3,29,111,142,61,41,69,99,97,57,15,120,186,222,211,237,106,132,65,79,167,50,81,128, -47,92,11,92,101,57,70,1,166,224,249,171,155,237,95,15,90,52,254,136,82,34,96,163,58,145,0,28,37,60,53,98,212,251,175,171,2,78,1,247,159,14,252,217,55,254,22,8,156,78,214,235,5,3,7,61,219,198,31,11,251,162,89,155,0,150,213,2,96,178,205,217,51,209,234, -122,71,118,73,160,20,134,93,166,205,138,236,11,109,15,92,112,245,39,49,10,144,9,198,31,179,253,17,133,69,64,199,137,102,65,202,38,6,94,133,213,1,39,141,68,140,127,85,137,1,22,206,80,198,251,111,182,29,132,17,95,31,91,18,158,178,253,32,2,36,236,19,157, -109,175,141,190,144,205,199,52,171,5,64,76,138,67,235,107,35,15,201,153,13,144,136,2,24,161,209,186,15,44,193,49,101,162,0,95,196,40,192,201,24,127,26,246,47,195,108,127,36,139,68,0,171,14,56,150,24,104,194,234,128,52,9,128,24,172,158,95,13,2,207,41, -112,78,227,204,249,147,219,247,95,107,224,97,228,176,109,163,107,204,111,65,1,144,70,6,246,154,183,123,198,131,109,188,140,41,129,180,229,163,63,234,38,23,194,22,229,162,0,215,94,134,81,128,143,53,254,216,219,31,201,110,17,64,19,3,111,196,234,128,148, -67,215,254,107,202,10,96,209,204,50,69,222,175,199,217,4,61,174,102,217,201,127,177,88,92,106,223,50,250,112,182,31,215,172,23,0,97,111,52,218,179,109,124,61,45,199,144,3,109,12,116,104,114,27,184,34,118,69,246,167,240,203,159,5,190,166,138,118,170,192, -187,246,159,60,127,65,229,246,190,152,237,143,168,43,2,212,175,14,192,72,192,71,30,123,34,0,214,16,239,159,231,148,185,193,183,143,189,2,82,92,146,87,250,167,231,193,214,231,221,53,116,208,210,136,2,32,3,104,122,105,232,217,160,59,98,145,83,18,200,105, -4,112,133,173,176,87,169,138,128,170,10,40,184,225,42,140,2,124,240,230,197,222,254,72,174,137,128,227,57,1,94,21,34,1,37,24,9,248,144,247,47,197,96,90,69,33,44,80,104,237,127,200,219,5,173,246,247,153,243,39,235,25,47,104,160,245,213,225,251,99,82,246, -79,130,205,9,1,224,157,12,58,135,14,88,158,148,27,5,160,21,1,251,38,222,98,53,161,74,80,240,249,107,129,159,51,35,225,245,162,241,79,65,111,127,52,254,72,14,69,2,206,196,18,193,127,100,237,162,26,226,172,41,115,147,191,55,178,145,53,129,147,227,253,211, -230,115,158,137,96,123,215,86,211,214,92,56,174,92,174,92,32,13,207,13,60,44,134,99,65,57,223,136,214,128,218,130,147,176,119,252,77,101,14,106,105,49,20,125,245,122,28,21,140,217,254,72,62,136,0,21,167,8,230,123,117,0,157,248,71,59,254,205,85,168,235, -223,152,175,31,154,108,251,137,247,111,148,245,122,234,100,118,189,109,122,48,18,16,115,194,187,203,25,1,96,233,242,12,76,180,58,55,105,245,242,162,0,90,94,15,187,77,91,192,47,122,20,217,31,227,181,151,129,118,217,162,252,21,1,216,219,31,201,51,17,128, -213,1,202,67,215,252,79,95,92,171,216,251,189,55,186,17,194,98,64,150,247,79,67,255,62,75,104,188,121,227,208,179,185,114,124,115,70,0,196,227,113,104,120,118,224,62,208,104,100,101,223,9,26,1,172,65,19,236,49,189,161,200,254,104,244,122,40,250,214,151, -243,179,36,16,179,253,145,60,20,1,88,29,160,44,52,250,177,104,102,57,212,150,41,51,241,207,228,31,128,122,203,110,208,11,242,188,127,173,65,128,193,125,150,13,62,107,200,157,43,199,152,203,165,11,102,240,128,165,97,172,222,254,182,214,32,55,10,96,72, -68,1,162,202,68,1,12,23,173,3,253,186,211,33,30,8,230,207,3,17,179,253,145,124,142,4,168,84,29,80,153,103,137,129,49,114,80,141,228,152,158,190,168,70,177,247,124,123,248,5,8,73,212,251,159,186,217,163,141,127,34,1,209,213,244,210,224,250,92,58,206,57, -37,0,104,169,72,203,166,225,123,56,65,222,215,58,30,5,216,105,122,77,153,29,210,104,160,248,59,95,3,141,94,151,184,162,243,192,248,171,185,230,143,189,253,145,140,23,1,22,117,68,192,85,52,49,48,143,68,0,93,251,95,85,87,5,37,5,58,69,222,111,216,219,67, -188,255,93,178,51,255,117,70,129,14,160,251,155,181,215,51,137,2,32,131,25,58,104,217,109,31,240,238,226,117,242,190,154,238,88,20,192,29,113,40,178,63,218,21,139,193,120,237,229,16,15,4,114,252,142,85,63,219,31,123,251,35,249,44,2,242,165,58,128,182, -252,173,44,54,192,170,249,213,138,189,231,214,225,103,33,194,198,198,200,240,254,53,204,251,247,55,60,51,240,64,174,29,235,156,19,0,228,68,65,227,11,131,119,11,50,147,1,105,69,128,35,100,134,109,163,155,20,219,167,226,111,125,137,117,9,132,236,157,25, -241,111,141,191,154,83,253,48,219,31,201,86,17,96,194,234,128,41,19,139,199,225,204,197,181,160,19,148,49,79,189,174,22,104,178,202,207,252,167,19,103,199,26,237,207,90,251,60,131,40,0,178,128,206,183,198,222,182,247,123,247,9,50,163,0,244,66,217,59, -254,6,88,131,227,202,28,228,170,10,40,186,241,139,185,89,17,160,246,72,223,45,245,24,246,71,178,82,4,208,1,66,55,170,48,64,40,151,171,3,168,176,153,87,91,162,88,211,31,122,54,222,28,122,26,164,184,40,175,239,191,134,37,152,135,154,94,28,252,99,46,94, -171,57,41,0,162,33,41,222,248,194,224,93,188,94,222,215,227,52,60,120,35,46,216,58,252,156,98,251,84,240,217,43,65,183,246,148,220,234,16,168,122,182,127,3,102,251,35,89,43,2,138,78,148,8,170,83,29,144,107,163,132,137,227,15,122,45,15,103,45,157,166, -216,123,54,217,14,64,187,227,136,124,239,223,192,195,232,81,251,179,67,7,173,61,40,0,178,41,10,176,213,244,182,173,223,183,79,174,8,48,8,70,120,127,242,61,150,60,162,8,2,15,37,223,255,15,182,78,14,177,28,184,105,49,219,31,65,78,42,18,160,86,179,160,227, -163,132,115,69,4,68,164,24,172,174,171,98,235,255,74,32,198,163,204,251,215,104,100,154,57,13,243,6,67,71,159,238,191,59,87,175,209,156,21,0,209,160,24,111,122,97,240,46,65,199,203,60,247,28,68,98,33,120,125,240,9,197,246,73,187,106,89,98,78,128,63,187, -203,2,213,238,237,143,217,254,72,78,138,128,77,106,204,14,200,13,17,32,74,113,168,46,49,192,154,133,202,37,254,237,31,223,10,3,238,14,208,113,242,38,254,209,204,255,129,221,147,79,142,28,178,245,228,234,245,201,229,242,205,215,185,117,108,171,125,192, -187,83,110,66,32,13,27,53,219,14,66,139,253,160,114,55,237,77,95,6,161,110,54,196,35,217,153,15,16,199,108,127,4,145,39,2,104,98,224,70,245,218,6,103,179,8,160,183,251,186,229,211,65,203,43,99,146,104,47,151,183,135,159,39,239,39,175,140,144,214,253, -71,195,146,255,192,67,221,191,163,77,230,80,0,100,101,20,64,130,163,79,245,223,73,91,56,202,187,40,53,172,4,100,203,192,223,216,240,8,69,14,120,73,49,91,10,0,41,150,88,244,202,170,3,170,158,241,63,138,189,253,145,124,17,1,155,80,4,124,144,136,40,193, -210,57,21,48,187,186,88,177,247,124,103,228,5,176,4,199,64,208,104,101,189,94,91,32,64,239,246,137,13,182,126,239,80,46,95,151,92,174,223,120,29,111,140,237,26,171,183,191,65,75,57,228,64,195,71,131,158,78,216,99,218,162,216,62,233,47,90,7,198,79,93, -12,113,127,22,245,6,80,123,164,47,246,246,71,242,73,4,168,84,29,144,109,34,128,214,252,151,146,251,254,172,37,202,245,251,31,247,15,193,46,211,102,208,243,242,90,8,211,148,129,104,64,116,214,63,51,112,79,174,95,147,57,47,0,104,248,134,156,200,95,16,79, -94,118,17,62,109,14,180,117,248,121,112,134,173,138,237,23,141,2,240,51,167,101,199,200,96,149,179,253,59,176,183,63,146,111,34,64,181,234,128,121,89,85,29,64,107,254,105,232,223,168,23,20,123,207,205,3,143,65,64,244,1,39,51,249,79,87,192,186,254,221, -103,235,243,76,160,0,200,1,6,15,88,234,71,142,216,158,211,26,229,93,100,180,57,16,53,254,175,15,62,169,220,129,175,170,128,146,31,124,11,226,162,152,217,75,1,41,200,246,215,98,182,63,146,183,34,32,127,171,3,104,205,255,210,89,229,48,127,122,169,98,239, -73,71,253,54,88,247,129,65,102,217,31,199,107,192,111,11,143,29,92,223,115,127,62,92,139,121,33,0,232,140,128,189,15,116,222,41,69,99,126,154,220,33,7,131,80,0,7,38,222,134,30,87,139,98,251,101,248,228,249,96,188,242,146,140,93,10,192,108,127,4,73,129, -8,200,195,234,128,68,232,95,7,103,47,155,174,216,123,134,165,32,188,54,240,232,49,207,95,222,67,69,87,168,133,182,205,163,191,241,76,4,92,40,0,114,8,75,151,187,191,111,231,196,3,186,2,185,101,129,26,136,197,37,120,165,127,61,171,47,85,138,146,31,126, -11,132,217,51,32,30,201,172,165,0,204,246,71,144,20,137,0,21,171,3,50,117,57,128,6,61,207,93,57,3,10,20,12,253,191,59,242,34,140,120,251,64,203,201,203,252,167,243,99,236,131,222,214,250,231,6,30,207,151,107,144,203,167,27,110,255,131,93,247,4,156,145, -113,26,230,145,165,14,121,3,244,186,90,97,215,216,107,202,157,128,202,114,40,249,209,127,38,154,3,101,202,82,64,74,178,253,49,236,143,32,255,156,24,152,251,203,1,225,168,4,43,230,86,64,93,109,137,98,239,57,238,31,132,119,71,55,202,14,253,83,104,215,191, -134,103,7,110,15,185,35,145,124,185,254,242,74,0,120,38,130,142,230,77,195,191,20,100,86,4,36,68,128,30,222,28,122,70,177,57,1,20,106,100,11,191,112,45,196,125,25,176,20,144,178,108,127,180,254,8,242,33,17,112,44,39,192,148,195,213,1,172,225,15,217,151, -179,151,77,83,244,8,110,234,123,24,130,162,159,181,113,151,131,64,140,255,120,179,115,107,231,91,99,111,230,211,181,199,229,219,205,86,255,116,255,227,174,17,127,189,220,113,193,52,33,208,27,117,193,203,253,235,21,221,175,226,239,126,29,180,167,44,73, -239,172,0,236,237,143,32,105,23,1,55,170,84,29,144,110,17,64,3,156,60,167,129,11,86,205,2,157,192,43,246,190,251,39,222,97,205,218,146,241,254,53,188,38,242,254,163,61,63,137,134,164,188,186,238,242,78,0,68,2,162,248,254,35,61,63,230,181,242,191,186, -129,47,128,122,203,110,56,98,217,169,216,126,105,10,140,80,250,179,239,179,159,32,165,225,34,76,73,111,127,52,254,8,114,178,145,128,92,19,1,81,242,92,59,99,73,45,76,43,47,80,236,61,157,97,27,75,252,147,187,238,79,209,23,105,161,111,219,196,131,131,7, -44,173,249,118,205,113,249,120,163,117,189,109,218,49,124,208,250,60,173,247,148,11,141,4,208,40,128,39,226,84,108,191,180,203,22,65,201,247,190,9,241,96,56,165,199,3,179,253,17,36,3,69,64,14,85,7,208,146,191,186,105,165,176,102,65,181,162,239,75,147, -178,29,33,11,121,30,203,235,248,71,187,196,6,221,145,241,253,15,119,255,26,226,249,119,189,229,165,0,160,161,168,125,15,118,221,30,13,73,110,185,101,129,2,167,5,107,96,156,92,128,27,20,221,183,130,207,95,147,232,18,232,243,167,196,96,98,182,63,130,100, -166,8,232,200,145,217,1,180,228,175,164,64,7,23,156,50,83,209,199,0,141,194,190,63,185,141,149,104,203,118,186,140,2,52,60,55,112,135,115,216,103,207,199,107,141,203,215,155,204,210,229,30,110,121,101,248,215,186,66,249,81,0,122,225,237,159,120,27,26, -172,123,21,221,183,146,31,255,39,8,11,235,212,143,4,168,109,252,177,183,63,130,200,22,1,133,42,86,7,164,74,4,28,47,108,186,112,213,44,40,52,104,21,123,95,119,196,1,27,251,30,34,158,63,207,74,180,101,57,113,122,14,172,61,238,61,13,207,41,216,225,13,5, -64,246,112,248,241,222,251,93,163,254,38,185,249,0,244,194,227,53,28,108,236,125,144,37,6,42,118,82,74,75,160,236,127,111,1,141,65,79,211,102,85,51,254,234,133,253,247,66,7,246,246,71,144,164,249,112,78,64,246,85,7,68,201,243,235,140,197,181,48,187,186, -72,209,247,125,185,111,61,171,196,162,145,88,153,15,111,224,4,46,122,224,161,238,155,163,193,44,159,165,140,2,64,30,33,79,52,114,240,225,238,155,5,61,47,123,245,71,224,116,96,9,154,152,26,85,18,237,202,37,80,114,243,255,133,120,56,172,124,127,0,85,179, -253,137,241,223,92,143,217,254,8,162,80,36,64,237,217,1,85,37,234,136,0,186,238,191,112,70,25,172,93,84,163,236,51,198,178,19,14,78,190,3,198,36,66,255,250,2,1,58,223,26,187,191,127,143,185,33,159,175,47,46,223,111,176,174,119,199,119,13,238,183,60,154, -204,82,0,189,16,15,78,188,3,135,205,219,21,221,183,130,235,174,132,130,207,95,11,113,175,95,97,207,95,205,108,255,122,92,243,71,16,213,68,128,10,203,1,103,38,34,1,17,5,69,64,84,138,65,101,177,1,46,88,53,83,209,99,65,19,254,94,234,253,43,240,156,0,114, -31,50,196,243,135,128,51,50,176,255,161,238,59,243,253,218,202,123,1,64,231,4,236,250,99,219,207,130,174,136,73,110,135,64,122,33,210,11,242,165,222,7,193,30,154,84,116,255,74,110,185,9,244,23,156,77,68,128,47,249,239,26,142,96,182,63,130,100,187,8,80, -169,58,160,154,137,128,228,151,28,69,98,252,11,244,90,248,228,105,115,192,160,19,20,61,14,47,244,62,0,142,176,5,4,141,252,124,2,173,129,131,3,15,119,255,208,59,25,244,160,0,64,192,57,226,183,29,125,170,255,182,100,162,0,244,130,116,69,108,240,108,207, -125,228,102,85,46,100,175,209,233,152,193,54,92,124,46,196,61,222,68,203,96,57,15,16,127,0,184,242,82,40,191,231,231,152,237,143,32,217,44,2,44,199,68,128,194,145,128,171,207,170,131,89,85,197,172,85,175,220,85,71,42,32,78,204,33,40,49,40,250,253,119, -140,189,202,50,255,141,124,161,124,227,111,228,97,172,193,241,124,235,107,195,175,227,21,133,2,224,4,77,47,14,189,96,106,116,188,170,77,162,77,48,109,16,212,108,61,192,134,82,40,137,166,168,16,202,239,190,3,138,190,245,101,58,64,27,226,129,224,73,231, -5,80,175,159,182,24,214,159,125,26,84,109,184,155,253,84,220,248,99,111,127,4,73,125,36,64,225,229,0,58,152,231,42,34,2,78,91,88,195,62,135,46,9,156,172,16,160,165,126,244,223,207,169,41,129,79,159,179,0,106,202,140,138,126,239,17,111,47,188,218,255, -40,155,199,34,219,216,241,26,136,134,36,203,174,123,219,111,141,199,240,90,66,1,240,1,196,136,4,59,255,208,254,3,49,28,179,201,95,10,0,208,243,70,216,50,248,4,12,120,58,148,221,65,65,128,226,255,190,17,42,30,188,11,244,231,158,145,16,2,62,63,107,29,204, -26,249,208,208,29,221,162,34,196,67,225,196,223,145,159,218,69,117,80,118,231,109,80,241,215,187,128,159,59,75,97,227,255,193,108,127,180,254,8,146,30,17,160,92,117,128,192,105,96,221,242,233,112,237,217,243,97,254,180,18,118,91,71,162,18,91,211,167, -70,62,22,63,182,145,223,211,80,63,53,250,244,239,202,139,12,112,241,234,217,112,245,153,117,172,230,95,73,232,152,223,167,187,255,0,33,41,192,202,254,228,66,27,191,29,121,162,255,86,75,151,123,2,175,162,99,231,27,15,193,223,49,119,186,70,143,60,217,255, -147,115,191,187,228,177,176,87,222,120,94,58,139,58,34,133,225,169,174,123,224,199,167,221,15,5,66,177,162,251,168,59,117,37,84,144,45,218,209,11,225,125,135,32,210,218,5,210,132,133,24,251,196,67,128,214,245,115,213,149,160,93,186,0,244,231,156,14,250, -211,87,179,164,63,165,57,145,237,143,97,127,4,73,179,8,104,133,191,93,191,10,102,148,232,21,123,255,233,21,5,100,155,7,118,34,46,134,45,94,152,116,248,193,19,136,48,99,79,195,2,28,17,10,116,157,191,178,212,0,115,170,139,97,54,217,120,78,157,7,193,43, -253,143,64,191,187,131,60,75,229,151,18,210,134,63,99,13,142,205,245,207,244,63,131,87,15,10,128,143,165,254,233,190,199,235,206,173,190,118,218,138,178,79,71,131,242,18,98,232,196,192,81,111,31,188,216,251,87,248,230,178,159,170,178,159,218,229,139, -216,198,30,6,212,227,103,229,130,84,0,8,160,41,44,80,245,24,97,111,127,4,201,188,72,128,210,34,128,66,215,241,19,107,249,213,44,2,112,188,92,144,227,64,209,129,62,31,7,173,172,218,49,246,10,24,5,249,235,254,26,94,3,98,72,180,236,252,67,219,247,164,40, -198,254,63,228,176,226,33,248,48,98,36,70,151,2,190,151,236,82,0,189,96,247,143,111,133,221,227,91,84,223,103,218,48,136,54,15,226,202,74,82,96,252,247,98,182,63,130,100,168,8,80,178,58,224,31,161,30,190,129,124,22,221,82,97,252,39,2,35,240,124,207,253, -228,115,181,178,187,253,49,135,172,64,128,195,79,244,221,98,233,118,143,225,21,131,2,224,223,98,238,112,141,29,121,178,239,7,218,130,100,2,36,26,208,242,122,216,216,251,144,242,249,0,105,34,145,237,143,97,127,4,201,88,17,160,112,117,64,186,8,75,33,120, -162,243,247,224,139,186,65,208,200,127,14,83,227,111,106,114,188,80,255,204,192,179,120,165,160,0,56,105,14,63,222,251,220,224,62,243,179,201,148,6,210,132,149,72,44,124,226,66,206,122,227,143,189,253,17,36,59,34,1,89,46,2,54,246,61,8,189,174,22,150, -84,45,219,184,9,28,157,244,55,186,237,174,150,31,96,232,31,5,192,212,110,40,114,71,237,250,99,251,15,66,158,232,16,29,25,41,91,129,114,122,48,249,6,225,233,238,123,21,237,15,144,90,227,191,151,213,249,99,216,31,65,178,41,18,16,202,202,239,177,119,252, -13,216,101,218,156,212,186,63,133,150,116,31,120,168,235,59,246,126,175,5,175,14,20,0,83,198,57,226,183,239,190,183,253,38,65,199,199,146,49,124,244,66,62,98,222,1,111,14,61,149,149,198,159,102,251,163,231,143,32,89,36,2,88,179,160,86,48,101,89,36,160, -207,221,198,146,167,169,227,148,204,186,191,190,88,11,29,111,142,221,215,242,202,200,91,120,85,160,0,144,13,185,136,182,117,189,99,250,189,190,40,185,81,150,116,94,192,235,131,79,66,131,117,79,118,121,254,88,234,135,32,89,43,2,254,227,229,86,176,248, -35,89,177,223,174,176,13,254,214,241,91,136,198,194,192,37,81,239,47,232,121,234,188,213,239,189,191,243,103,120,53,160,0,72,154,157,247,180,253,175,173,207,187,95,48,200,191,40,53,228,80,107,52,28,60,221,245,71,24,243,245,103,252,119,110,125,249,8,51, -254,186,2,236,240,135,32,217,40,2,138,136,8,104,157,244,192,247,183,116,64,40,195,39,222,70,99,17,120,188,243,183,96,14,140,129,150,147,95,202,168,225,52,180,121,145,111,251,111,91,190,225,183,133,130,120,37,160,0,72,154,144,39,26,125,239,215,205,223, -136,137,49,135,38,137,210,64,58,47,192,39,122,224,209,142,95,131,55,234,202,216,239,59,209,58,10,77,47,30,2,45,107,239,139,214,31,65,178,149,98,189,0,187,7,29,240,199,189,131,25,189,159,47,245,61,8,109,246,195,96,16,146,43,99,214,23,9,112,228,169,254, -91,70,14,219,218,240,236,163,0,80,208,40,58,251,14,61,214,251,93,93,65,114,189,147,244,156,1,70,125,253,240,183,142,223,129,20,23,51,238,123,74,17,17,234,159,218,199,166,36,106,56,52,254,8,146,11,34,224,241,250,49,104,24,207,204,225,119,219,70,55,178, -65,63,201,38,253,209,138,173,161,131,214,167,223,127,164,231,17,60,235,40,0,20,231,200,147,125,47,246,238,152,120,32,153,210,64,10,157,102,213,100,219,207,198,7,103,26,131,123,187,193,222,103,6,65,143,77,34,17,36,39,30,242,68,199,135,197,24,252,245,253, -225,140,219,183,102,242,28,220,212,191,158,56,70,201,37,253,241,90,14,124,214,80,251,123,119,181,96,183,63,20,0,234,64,39,72,189,123,103,243,143,236,3,190,131,201,228,3,48,17,64,212,238,182,177,77,240,222,232,75,153,243,253,164,24,244,110,107,7,142,231, -241,100,35,72,14,81,160,229,97,239,160,19,186,172,254,140,217,39,58,225,239,111,157,191,103,9,11,201,36,253,209,72,37,39,112,254,237,191,107,253,170,199,20,240,224,217,70,1,160,26,97,111,52,252,222,175,155,191,34,69,98,214,100,90,5,83,181,75,151,3,54, -245,173,135,122,235,238,140,248,110,206,17,59,56,134,108,192,235,208,251,71,144,92,139,2,248,34,34,108,235,179,101,196,254,56,66,22,88,223,254,75,8,136,94,16,184,228,42,172,104,68,246,224,134,238,239,13,236,49,55,226,153,70,1,160,58,19,173,206,129,125, -127,233,252,166,96,224,227,201,228,200,81,213,75,43,3,158,236,188,27,122,221,173,105,255,94,214,158,73,16,67,81,204,250,71,144,28,132,142,250,61,58,150,254,142,164,65,209,15,27,218,239,4,115,96,20,116,156,252,78,127,52,114,64,235,253,123,119,76,60,120, -232,241,222,39,240,12,163,0,72,25,77,47,13,189,217,242,202,240,255,232,146,236,15,64,251,92,211,190,215,27,218,126,201,134,95,164,19,247,152,3,79,44,130,228,176,0,24,243,132,210,90,18,72,19,159,105,185,31,109,243,107,224,11,18,86,92,38,218,2,30,108,253, -222,125,59,126,223,118,75,150,54,89,69,1,144,205,236,190,183,227,215,163,71,237,155,244,73,38,5,210,186,87,218,4,227,225,214,255,97,63,211,69,216,19,196,204,127,4,201,213,135,189,70,3,254,136,4,193,168,148,182,125,120,182,251,62,168,183,236,78,58,227, -159,23,56,136,248,37,211,187,191,108,250,178,223,22,10,227,217,69,1,144,114,196,176,4,239,252,162,233,91,238,137,96,179,160,79,230,80,198,217,208,11,147,127,16,30,110,251,5,4,68,95,90,190,79,28,147,103,17,36,167,137,39,229,115,39,199,171,3,143,192,110, -211,102,40,16,138,146,122,31,186,236,202,235,184,200,206,63,180,253,159,201,118,215,40,158,85,20,0,105,195,51,17,112,191,251,171,230,47,74,209,184,45,153,161,65,20,26,18,163,161,177,71,219,127,197,166,8,166,26,193,40,64,60,142,177,52,4,201,73,227,31, -167,209,70,13,232,210,16,229,123,103,228,69,120,115,232,25,48,36,233,249,179,231,100,137,142,54,251,249,126,231,91,99,187,241,172,162,0,72,59,163,71,108,93,251,254,210,249,53,94,203,75,201,54,206,163,161,177,38,219,1,54,66,56,22,79,109,168,174,168,166, -20,112,45,13,65,114,19,137,40,128,234,66,29,20,166,184,199,199,158,241,55,224,229,190,135,137,240,48,36,85,235,207,140,63,29,242,179,117,236,190,131,235,187,215,227,25,69,1,144,49,52,189,52,180,181,225,249,129,155,13,165,186,164,223,139,134,200,222,159, -124,15,158,233,254,19,164,210,34,87,45,172,5,13,143,151,4,130,228,34,81,41,6,43,107,139,83,90,228,115,216,188,13,158,35,207,49,158,211,2,167,73,238,217,66,199,251,78,116,184,222,216,241,251,214,219,176,217,15,10,128,140,99,223,95,187,30,104,127,125,244, -207,180,31,181,18,34,128,206,196,166,163,49,83,69,245,226,90,40,170,46,134,152,136,55,23,130,228,26,60,199,193,69,11,42,83,246,121,116,242,233,19,93,247,176,82,103,94,147,92,115,49,58,225,47,232,138,180,188,249,211,250,175,134,220,105,204,98,68,1,128, -124,28,49,162,74,183,255,182,245,150,201,118,215,230,100,103,6,80,232,114,192,187,35,47,178,65,25,169,128,142,253,157,123,206,66,16,195,81,60,153,8,146,67,208,210,191,101,213,133,112,206,156,178,148,124,30,29,236,243,88,199,93,16,139,199,136,241,79,238, -89,72,219,252,70,2,226,196,27,63,173,191,222,109,10,184,240,108,162,0,200,88,200,133,26,219,114,219,209,175,186,70,253,135,105,200,42,25,232,122,25,77,154,121,103,248,5,216,60,240,120,74,246,127,233,149,171,193,88,94,8,49,9,163,0,8,146,51,207,37,114, -63,127,235,204,217,228,121,162,254,35,191,205,113,24,214,183,255,2,164,152,200,250,156,36,245,12,228,52,52,227,63,176,231,190,142,207,155,26,29,125,120,38,81,0,100,60,62,107,200,251,206,157,205,55,132,189,209,1,170,94,147,23,1,5,176,101,240,137,148,136, -128,194,234,98,88,245,185,51,18,29,1,17,4,201,122,188,97,9,46,93,88,5,215,173,168,77,137,231,191,190,245,23,16,149,34,73,183,248,165,9,213,196,137,138,239,188,167,237,27,237,175,143,238,195,51,137,2,32,107,24,111,118,140,190,241,211,250,235,136,253,182, -39,51,51,224,67,34,96,40,53,34,96,217,149,171,97,193,249,75,33,226,199,254,26,8,146,173,208,167,78,32,42,193,156,50,3,220,117,217,98,224,53,234,166,255,29,247,252,163,177,228,141,63,133,182,249,109,121,121,248,135,77,47,13,109,196,179,137,2,32,235,24, -61,106,111,222,125,111,251,231,121,29,31,212,40,33,2,248,2,120,125,232,73,216,212,247,176,202,79,14,13,156,253,159,151,192,172,181,117,40,2,16,36,75,241,19,227,95,83,168,131,245,159,89,9,179,74,13,42,123,254,135,96,125,219,47,21,241,252,41,116,192,15, -49,254,119,237,184,187,237,126,60,147,40,0,178,150,230,77,195,59,118,254,161,237,27,188,150,139,37,219,102,151,77,16,228,141,176,117,248,89,213,171,3,180,70,45,92,248,163,79,193,194,139,150,65,36,16,134,120,12,27,4,32,72,182,64,195,254,75,170,10,225, -169,207,175,134,85,211,139,85,253,44,154,237,255,80,219,255,18,207,63,172,152,231,63,124,200,246,200,182,187,90,254,31,62,119,80,0,100,191,8,216,56,244,82,253,51,3,223,165,77,44,146,45,194,61,158,24,248,238,200,11,240,116,247,31,33,14,234,37,235,9,6, -45,124,226,7,151,195,25,95,63,143,117,8,148,34,88,125,131,32,153,76,140,220,167,158,176,8,87,47,173,134,23,190,116,42,44,175,41,82,245,243,14,153,183,193,163,29,191,97,67,126,4,141,50,158,255,120,179,99,211,219,255,211,248,159,216,148,20,5,64,206,176, -255,161,174,245,205,155,134,126,202,68,64,146,28,23,1,187,198,94,131,199,59,126,11,98,44,162,234,190,175,248,204,90,184,248,167,215,64,65,101,17,68,131,17,60,153,8,146,97,80,191,34,44,198,128,22,239,220,126,193,2,88,255,217,149,80,89,160,85,245,51,247, -140,191,14,127,235,248,29,113,14,98,202,24,255,2,129,142,90,127,119,243,173,71,190,22,112,132,209,219,64,1,144,59,196,165,56,108,187,171,245,247,45,47,15,255,198,80,162,76,36,192,40,20,193,254,137,183,217,218,91,72,10,168,186,255,51,214,204,129,203,127, -117,253,137,188,0,12,205,33,72,230,224,33,246,114,122,137,30,30,189,254,20,248,239,117,115,85,255,188,119,70,94,128,103,186,238,101,221,253,146,173,243,63,110,252,29,67,190,3,91,110,61,250,185,160,51,18,196,51,138,2,32,247,68,64,156,137,128,59,90,94, -25,254,179,18,141,130,40,180,99,96,131,117,47,252,165,229,103,224,137,56,84,221,127,218,37,240,226,219,175,129,83,191,116,14,19,0,82,68,196,147,138,32,105,68,138,197,153,241,191,124,113,21,108,250,242,169,112,209,252,10,213,63,243,149,129,71,96,99,223, -67,32,112,58,34,0,248,164,223,143,118,249,11,56,195,245,239,252,162,233,51,228,167,7,207,42,10,128,220,22,1,191,105,249,225,240,251,214,13,74,44,7,80,104,199,192,46,103,35,252,169,249,199,96,14,142,169,186,255,52,145,113,245,23,206,34,66,224,106,40,174, -45,133,72,0,151,4,16,36,29,4,163,49,208,104,52,240,255,46,156,15,143,17,207,127,70,137,186,153,254,116,157,255,169,174,63,192,27,131,79,177,100,228,100,123,251,31,55,254,33,79,164,117,243,173,71,62,61,217,225,178,226,89,69,1,144,7,34,0,224,237,255,109, -250,142,169,217,241,152,174,72,153,72,0,45,17,28,245,246,193,125,141,183,193,160,167,83,245,239,48,99,205,92,184,252,215,55,192,130,243,151,64,52,24,197,249,1,8,146,194,231,7,77,244,91,82,93,8,207,124,97,53,252,215,57,115,85,31,240,19,20,125,240,112, -219,47,216,124,18,26,117,212,40,240,137,204,248,187,35,237,196,248,127,106,178,205,101,194,51,139,2,32,111,8,56,194,113,114,225,127,107,162,197,249,24,205,124,85,74,4,216,195,22,248,115,243,79,160,217,118,64,245,239,96,44,43,128,243,110,190,2,214,125, -247,18,208,21,234,48,65,16,65,84,38,44,197,32,68,182,111,172,157,197,66,254,103,206,42,85,253,51,237,33,51,121,166,252,20,26,44,187,153,241,87,130,99,158,127,223,230,219,142,92,75,140,255,24,158,89,20,0,121,71,208,25,1,34,2,110,154,104,117,62,166,47, -82,98,57,32,14,58,78,15,33,49,192,212,250,110,211,150,148,124,143,69,151,174,128,203,127,117,3,204,60,117,30,68,3,17,156,35,128,32,74,123,253,64,107,251,69,152,81,108,128,245,159,89,193,58,251,149,24,4,213,63,119,216,219,13,127,106,186,21,250,220,173, -44,233,88,17,227,111,96,158,127,31,121,246,93,73,140,255,0,158,93,20,0,249,44,2,226,91,110,61,122,211,120,139,67,33,17,0,172,25,7,13,208,61,211,125,47,188,220,191,158,60,60,212,207,216,47,157,89,14,151,222,241,105,56,227,155,231,131,160,19,216,178,0, -130,32,201,67,7,249,208,245,254,207,175,154,14,175,126,229,52,184,98,113,117,74,62,183,201,182,15,238,107,250,17,88,130,38,48,240,133,202,121,254,238,72,219,230,219,142,94,65,140,63,14,247,65,1,128,4,156,97,34,2,142,220,52,214,104,87,44,39,128,102,231, -234,120,3,188,53,244,12,108,104,187,19,2,162,79,253,47,66,84,199,242,107,79,133,203,239,188,30,102,174,153,131,209,0,4,73,198,235,143,39,188,254,233,197,122,248,235,181,203,225,79,87,45,131,154,34,93,74,62,251,189,209,151,224,225,182,95,66,80,12,128, -142,51,28,139,65,40,96,252,19,9,127,196,243,119,246,227,25,70,1,128,156,16,1,145,248,43,223,123,255,91,109,175,141,254,89,169,234,128,227,189,2,14,155,183,49,37,111,14,140,166,228,187,148,207,171,130,75,127,254,105,56,235,166,11,65,87,160,99,66,0,176, -109,0,130,156,52,33,49,198,214,251,255,207,154,153,240,234,87,215,194,53,203,106,82,242,185,98,44,10,207,246,252,137,181,26,231,200,243,67,137,214,190,20,109,129,64,141,255,209,99,9,127,184,230,143,2,0,249,167,155,47,28,131,109,191,105,254,97,203,43, -195,191,99,205,130,20,130,138,0,90,25,240,135,198,91,216,208,142,148,160,209,192,210,79,173,134,43,126,243,57,152,119,238,98,16,35,81,144,162,216,220,11,65,254,21,137,186,126,17,22,87,21,178,210,190,187,175,92,194,6,250,164,2,71,216,10,247,55,255,20, -182,143,190,114,172,204,143,87,228,125,89,147,159,65,239,62,52,254,40,0,144,127,3,13,251,189,119,87,203,237,68,4,252,92,137,217,1,199,161,55,52,109,20,244,215,214,59,88,120,47,85,148,76,47,131,11,110,187,18,46,184,229,74,40,158,86,138,93,4,17,228,163, -238,123,178,249,35,18,104,121,14,110,62,183,14,94,249,202,105,112,201,130,202,148,125,126,175,171,5,254,216,120,51,116,56,143,42,86,230,199,140,127,161,0,19,109,206,119,55,126,231,224,213,196,248,99,157,127,134,33,224,33,200,204,167,193,182,223,180,252, -154,136,1,247,170,235,230,222,31,241,139,138,24,77,45,167,131,88,92,130,23,122,255,2,38,223,32,124,113,209,247,216,76,129,84,48,119,221,34,152,182,106,54,180,191,90,15,93,239,180,178,101,1,58,113,16,65,242,29,218,195,95,36,55,251,165,11,171,224,182,243, -234,96,69,109,81,74,63,159,86,11,209,206,126,116,154,31,45,37,86,10,58,213,143,14,246,161,189,253,177,189,47,10,0,100,138,145,0,34,2,30,112,12,120,29,231,255,112,249,99,98,36,166,167,243,4,146,133,134,245,140,124,33,236,25,127,3,76,254,65,248,198,178, -31,195,204,194,249,41,249,78,250,34,3,156,246,213,115,97,238,185,139,160,249,133,67,48,86,63,200,58,11,242,58,188,12,145,252,67,36,162,62,16,149,88,67,159,31,174,171,131,79,47,175,73,233,231,135,165,32,188,212,247,32,19,0,90,78,207,54,69,208,36,194,254, -195,7,45,27,182,254,188,233,187,196,248,227,218,95,134,130,75,0,25,78,195,243,131,207,238,252,67,251,117,130,158,119,241,130,114,167,139,134,249,134,60,93,240,199,134,155,225,176,121,123,74,191,83,229,252,26,184,248,103,215,192,249,183,94,9,101,179,43, -33,26,8,99,39,65,36,111,136,29,203,238,47,212,241,240,163,243,231,195,230,175,174,77,185,241,31,39,226,255,222,166,219,96,231,216,107,108,121,144,87,104,189,95,67,140,63,93,186,108,123,109,228,174,87,126,112,248,219,1,39,78,245,195,8,0,146,20,205,27, -135,222,242,154,131,87,92,118,199,234,141,250,18,237,108,49,164,204,61,69,111,252,160,228,135,71,219,127,13,3,158,78,184,126,193,77,202,121,1,39,193,188,117,139,96,214,105,243,160,251,237,22,232,120,179,9,2,54,47,8,6,29,139,10,32,72,174,65,227,119,1, -226,12,235,137,144,255,194,170,25,108,106,95,93,185,49,229,251,241,190,249,61,120,177,231,175,224,139,186,20,235,236,199,140,63,185,111,181,70,62,222,180,113,248,230,29,191,107,249,115,28,83,125,80,0,32,202,48,176,199,124,232,245,159,28,189,232,83,191, -62,109,83,97,165,126,77,84,33,17,192,107,180,192,241,2,188,59,242,34,235,250,245,149,197,55,195,204,162,249,169,187,0,13,90,88,241,153,181,48,239,19,139,161,227,245,70,232,219,209,1,17,95,24,4,163,150,13,58,65,144,92,128,54,242,161,92,180,160,18,254, -251,156,185,112,70,10,90,248,254,35,52,228,255,114,255,6,230,245,243,156,192,28,0,165,224,181,28,221,252,59,239,105,187,177,233,165,161,151,240,140,103,7,184,4,144,69,152,26,29,253,47,126,107,255,165,214,94,207,219,74,150,9,210,140,95,234,9,244,185,90, -225,15,141,55,195,190,137,183,82,254,221,10,171,138,89,23,193,43,127,243,57,88,120,209,50,230,46,177,110,130,232,70,32,89,12,173,231,167,217,253,167,205,44,129,71,174,91,9,79,125,110,85,90,140,255,144,183,139,221,219,219,70,55,129,142,215,131,160,81, -206,247,163,13,126,196,144,100,122,239,55,205,87,162,241,71,1,128,168,136,103,34,104,223,124,203,145,79,15,236,53,111,160,173,131,149,116,146,169,71,16,146,2,240,68,231,221,240,120,231,111,193,27,117,165,252,251,149,205,169,132,115,191,127,25,92,246, -203,235,96,238,217,11,32,38,197,201,195,37,138,141,132,144,172,130,102,246,123,195,18,44,175,41,130,63,95,179,140,13,238,185,108,81,85,90,246,133,26,253,123,27,111,133,33,79,183,162,37,126,20,173,129,117,247,107,220,114,219,145,139,219,54,143,238,197, -51,159,93,224,18,64,22,226,179,134,34,175,221,114,228,219,151,252,244,148,193,149,215,206,249,173,68,60,140,152,164,140,133,228,137,103,192,243,60,236,31,223,10,3,238,14,248,226,162,255,134,149,149,103,166,252,59,86,47,158,6,23,254,248,42,48,119,152, -160,125,115,3,152,26,135,89,91,97,173,94,0,192,165,1,36,131,61,126,154,221,79,13,255,55,215,206,130,235,86,214,18,97,157,30,63,203,30,154,132,23,123,255,2,245,214,61,172,157,175,158,55,40,250,254,180,204,207,220,238,218,242,214,29,13,223,112,142,248, -157,120,246,81,0,32,41,130,150,4,110,251,77,203,239,156,195,190,254,79,252,215,178,71,52,92,188,84,138,42,149,73,79,91,8,23,130,53,56,14,127,105,253,25,92,50,235,122,184,182,238,27,138,174,25,158,44,181,203,103,178,109,178,109,12,58,223,106,6,83,195, -16,72,145,40,8,122,45,38,11,34,25,101,248,105,23,191,149,211,138,225,171,167,206,128,207,46,159,6,70,109,250,2,172,135,204,219,96,83,223,122,112,134,45,172,236,87,73,88,166,127,137,14,58,182,142,221,183,235,158,182,219,2,88,230,135,2,0,73,15,245,207, -12,108,116,12,250,6,47,251,249,234,103,140,101,186,37,74,37,7,82,104,227,160,56,196,224,237,225,231,160,203,217,0,95,88,244,61,88,92,182,58,45,223,115,218,202,89,108,51,119,142,67,247,214,102,24,171,31,98,205,132,4,131,64,132,0,174,100,33,105,16,225, -113,128,160,152,184,223,78,155,81,202,12,63,237,217,175,227,211,119,61,186,194,54,120,165,127,3,28,156,124,143,149,246,41,217,216,135,194,9,28,240,58,46,124,232,241,222,31,238,251,107,215,195,216,213,19,5,0,146,102,6,247,91,142,190,120,211,129,11,174, -249,253,218,191,85,47,41,189,50,236,83,110,205,92,3,28,155,37,48,234,235,131,63,55,255,24,46,153,117,3,92,53,239,43,105,137,6,176,136,192,178,25,108,115,12,88,161,251,221,86,24,121,191,31,130,110,63,8,58,45,123,56,33,136,218,72,196,242,211,172,126,26, -218,63,191,174,2,190,186,102,38,92,186,176,18,248,52,71,164,14,91,118,192,43,125,27,88,228,206,32,20,40,186,214,207,28,2,35,15,17,191,56,178,253,119,45,223,232,120,99,108,39,94,9,40,0,144,12,193,53,234,55,111,250,238,251,215,92,120,219,138,223,45,189, -124,230,109,180,87,128,82,121,1,20,186,134,24,139,199,224,141,161,167,160,221,113,4,110,88,248,29,88,86,126,90,218,190,111,197,252,106,56,231,59,23,195,202,207,172,133,254,157,157,48,176,183,27,188,19,174,132,135,162,21,0,112,117,0,81,152,40,185,159, -66,196,227,47,51,106,225,138,197,213,240,21,98,248,207,154,93,154,246,253,114,132,204,196,235,127,4,14,89,182,3,79,126,25,85,104,239,77,215,251,109,253,222,221,219,126,221,252,245,241,22,231,48,94,13,40,0,144,12,35,232,138,72,91,239,104,252,145,189,207, -219,124,246,77,139,255,194,243,154,82,41,162,92,135,61,78,195,177,44,226,68,52,224,39,112,193,204,107,224,154,121,95,131,34,109,89,218,190,51,29,48,180,230,75,103,195,242,107,214,192,208,129,94,38,6,108,125,22,34,126,36,204,19,64,146,134,134,249,143, -175,239,207,45,55,192,213,75,107,224,115,167,76,135,133,149,5,25,177,127,123,199,223,132,45,131,79,48,17,160,134,215,79,239,31,218,214,183,111,231,228,95,119,220,221,122,171,207,18,10,227,85,129,2,0,201,96,14,63,209,247,140,109,192,219,126,233,237,171, -254,86,88,165,95,77,135,9,41,137,142,211,179,220,128,109,35,155,160,221,126,24,62,61,255,70,56,163,230,226,180,126,103,93,145,1,22,95,118,10,44,186,116,37,76,180,140,66,255,174,78,24,111,26,134,144,59,8,156,150,248,69,90,62,63,47,6,77,90,94,154,245,208, -76,254,96,84,34,70,149,103,117,251,55,172,156,198,188,254,50,99,102,60,50,169,8,127,149,120,253,45,246,247,65,224,116,170,120,253,188,142,3,142,215,120,15,172,239,254,225,161,199,122,30,143,99,183,110,20,0,72,118,48,176,199,220,184,113,232,192,5,151, -220,190,234,254,57,103,86,125,77,169,137,130,127,55,14,28,123,232,216,130,19,176,161,237,78,56,90,189,11,62,51,255,63,96,122,225,220,244,218,59,226,177,204,88,51,135,109,222,73,55,139,10,12,147,205,57,108,99,101,132,130,78,0,13,159,39,185,2,196,125,165, -3,152,228,82,162,23,242,170,226,146,222,30,97,81,2,186,114,54,163,88,15,151,18,79,255,51,43,106,225,204,89,165,25,179,143,180,79,199,59,35,47,192,246,209,151,33,32,250,20,79,242,59,33,168,11,5,32,222,126,203,206,63,180,221,72,188,255,122,124,162,162, -0,64,178,12,231,136,223,253,234,15,14,125,125,221,119,150,28,90,251,229,249,247,196,98,241,2,37,151,4,216,5,68,188,15,1,226,80,111,221,13,93,174,70,184,116,246,13,240,201,217,159,83,237,193,52,21,232,242,192,41,215,157,14,43,174,61,149,69,5,134,246,245, -194,120,243,48,4,28,126,34,2,52,44,87,32,167,151,8,136,33,43,154,38,223,120,213,18,35,104,16,56,22,6,207,85,33,64,37,113,68,140,65,132,136,195,34,34,120,214,205,45,135,107,151,213,178,164,190,234,66,93,70,237,107,3,185,199,104,184,127,212,219,199,146, -112,213,184,199,232,253,160,47,18,96,232,160,245,201,237,191,107,253,129,107,212,239,198,39,41,10,0,36,75,161,6,127,239,253,157,15,78,182,187,234,47,188,121,197,250,162,90,131,226,75,2,52,30,64,31,70,81,41,12,175,245,63,10,245,150,221,112,205,188,175, -195,218,154,11,50,226,24,112,2,15,51,79,155,199,182,128,221,199,74,8,135,15,246,129,173,119,18,34,254,48,75,28,164,203,4,185,54,123,128,126,167,202,186,106,217,175,159,87,110,132,154,34,61,76,120,195,160,205,161,99,67,141,62,77,232,163,222,190,142,156, -251,197,213,133,240,201,133,85,112,229,146,106,88,81,83,148,113,251,59,234,235,135,215,137,225,111,178,238,35,215,104,162,42,71,13,88,200,159,211,120,15,61,222,123,219,193,13,61,27,148,118,22,16,20,0,72,154,232,221,62,113,104,178,205,121,254,197,63,57, -229,158,5,23,76,251,191,209,128,168,104,149,0,51,56,26,158,61,156,38,252,195,240,112,251,47,96,213,228,57,44,73,112,94,201,210,140,57,14,5,149,69,176,248,178,149,108,115,141,218,97,244,200,32,17,4,131,172,172,48,26,140,228,140,24,160,227,149,139,170, -139,161,124,158,124,1,80,164,227,225,212,233,37,48,228,52,131,86,151,221,57,20,39,140,62,237,38,73,188,220,185,101,70,184,96,126,5,92,177,168,10,78,159,85,154,214,218,253,143,195,19,113,194,123,163,47,193,110,211,150,99,225,126,35,168,149,153,65,179, -252,157,35,190,195,59,239,110,251,54,241,254,155,240,137,137,2,0,201,49,188,230,144,103,243,45,71,190,125,214,127,44,218,117,198,215,23,222,167,53,242,53,209,160,242,77,188,104,3,33,250,200,109,182,237,135,110,103,3,172,155,126,37,92,62,231,139,80,105, -168,205,168,227,81,54,187,146,109,116,153,192,222,111,97,93,6,105,203,97,154,47,64,155,12,209,92,1,154,60,152,141,203,4,98,88,132,89,107,235,64,107,76,110,104,20,157,83,255,90,135,57,59,141,62,177,250,52,180,79,55,106,224,231,150,27,97,221,156,114,214, -147,159,26,253,162,12,21,53,98,44,10,123,39,222,100,19,58,45,1,147,106,225,126,38,218,137,224,165,253,252,59,223,28,187,119,239,3,157,63,247,89,67,1,124,82,162,0,64,114,152,67,143,245,62,63,114,216,118,248,194,91,87,60,48,99,85,249,149,97,175,72,30,150, -74,119,244,74,44,11,208,222,1,52,97,169,193,178,7,46,158,245,89,184,112,214,103,20,157,65,174,20,149,11,106,216,182,234,115,103,130,99,200,6,19,45,35,48,78,196,128,99,208,10,33,79,144,125,31,42,6,56,234,41,102,184,30,160,201,158,250,34,61,44,190,252, -148,164,223,235,130,186,10,56,117,70,9,52,79,120,192,152,5,149,20,180,92,143,122,249,244,103,161,78,128,165,53,69,112,238,220,114,184,136,120,251,107,166,151,144,63,203,236,239,208,96,221,3,91,135,159,99,115,56,180,42,101,247,31,135,150,247,5,221,145, -161,189,127,238,248,126,211,198,161,215,241,201,152,127,104,226,105,26,183,26,137,68,96,201,146,37,48,52,52,132,103,33,77,208,100,159,117,223,89,114,203,170,235,230,253,138,78,4,22,195,234,181,244,150,226,34,241,196,194,48,163,112,46,92,58,251,115,176, -110,250,229,228,1,167,207,130,168,137,27,44,29,227,48,78,4,129,173,199,12,126,155,7,232,240,37,22,29,32,222,83,38,86,20,68,124,97,88,249,217,181,112,250,55,206,83,228,253,118,15,58,224,107,27,91,88,231,187,76,11,134,196,200,243,139,134,246,169,151,79, -59,241,85,21,232,96,101,109,17,75,230,163,134,159,10,0,109,22,68,112,104,171,109,106,248,59,28,245,108,249,73,167,226,189,193,241,26,208,18,227,111,106,180,63,183,243,158,182,91,45,221,158,73,124,26,166,143,13,27,54,192,77,55,221,132,2,0,73,15,243,214, -213,156,122,254,15,150,61,80,181,176,228,220,136,79,141,104,192,223,161,225,205,104,60,2,243,138,151,194,101,115,62,199,250,7,208,220,129,108,128,46,11,56,134,172,108,48,17,157,73,224,26,177,179,62,3,113,98,124,50,69,16,68,67,81,150,248,119,217,157,215, -17,15,79,57,35,242,203,237,125,240,208,161,17,40,51,164,55,104,120,220,224,71,143,149,180,210,82,197,186,10,35,235,197,127,206,156,50,22,173,152,94,172,207,154,123,143,122,250,239,142,190,8,77,214,253,76,36,39,38,246,169,39,88,104,59,223,104,72,154,60, -250,84,255,79,142,60,217,255,20,205,21,65,80,0,160,0,200,247,104,64,177,86,183,238,255,46,254,241,170,235,231,254,140,184,32,70,53,163,1,204,80,197,194,108,121,96,126,233,10,184,116,246,245,176,182,250,66,214,105,48,155,160,21,5,116,137,128,138,1,123, -159,25,220,99,78,8,121,2,32,145,135,42,71,188,78,238,152,32,72,85,66,161,72,140,127,97,117,49,92,122,199,167,161,116,86,133,178,247,43,17,57,255,181,185,3,222,232,178,64,105,138,68,0,125,52,73,199,12,190,24,35,199,148,28,71,250,217,115,202,140,112,202, -180,98,214,160,135,134,245,235,202,141,105,239,195,63,85,70,188,61,196,240,191,196,150,198,34,228,94,160,235,252,26,21,13,255,9,175,191,193,254,202,238,251,58,110,157,108,119,225,131,23,5,0,10,0,228,159,162,1,167,159,255,253,101,127,172,90,84,114,190, -210,205,131,62,242,58,32,15,191,248,9,33,112,3,17,2,231,103,77,68,224,159,4,129,195,207,162,2,54,34,6,236,3,22,112,143,58,200,159,249,152,87,78,187,204,208,222,3,52,135,128,78,47,84,52,177,144,38,187,5,195,80,54,171,18,46,184,237,83,80,62,183,82,149, -239,71,59,227,221,250,86,23,188,218,110,102,9,116,74,26,221,227,198,158,118,224,163,27,253,127,131,150,131,170,2,45,204,43,47,96,97,125,234,221,175,168,45,134,57,165,134,172,51,248,31,52,252,219,198,18,57,49,180,169,143,218,134,63,225,245,11,228,26,20, -39,234,159,238,255,201,225,39,250,159,70,175,31,5,0,10,0,228,95,69,3,248,117,223,94,124,243,170,235,230,222,65,172,113,169,24,82,127,220,247,7,133,0,77,22,92,91,125,1,8,156,54,171,143,35,245,200,125,22,15,56,137,40,160,101,134,180,236,144,118,39,12,186, -252,16,13,70,217,210,1,125,246,127,80,20,76,73,24,144,91,87,140,136,204,122,206,57,123,33,156,245,173,11,192,88,94,168,234,119,162,79,139,251,15,12,195,67,135,134,193,75,174,139,2,29,7,252,20,34,28,84,79,210,48,190,116,204,208,211,223,83,207,222,72,140, -125,185,81,203,188,251,69,149,133,176,172,166,136,108,133,196,187,47,128,202,2,109,214,223,83,253,158,118,150,12,219,98,59,64,12,127,16,244,156,129,213,244,171,9,39,104,64,208,243,96,106,114,60,179,231,79,29,183,79,118,184,198,240,233,134,2,0,5,0,114, -82,204,60,181,114,217,39,190,183,244,247,51,215,84,92,163,70,223,128,143,19,2,177,184,4,115,139,23,195,5,51,175,101,57,2,106,102,66,167,26,26,13,8,218,125,224,153,116,129,107,196,1,158,113,39,75,52,164,203,9,33,111,8,196,96,132,181,44,102,150,86,147, -16,4,116,57,225,120,43,62,122,191,198,99,177,19,109,141,171,22,77,131,101,87,175,129,185,68,0,164,146,118,179,15,30,62,60,2,59,251,137,184,33,98,134,138,0,129,238,43,221,79,77,66,41,80,143,254,184,177,167,80,175,157,86,18,148,234,5,214,101,112,22,241, -228,23,84,20,16,131,95,0,117,228,231,172,18,3,84,228,128,177,255,32,29,142,163,176,211,244,26,155,153,145,8,245,27,88,27,109,117,159,234,199,50,252,157,145,158,131,143,244,252,164,245,149,225,215,82,113,239,34,40,0,80,0,228,24,212,131,56,253,107,11,190, -118,218,151,234,238,212,23,107,231,70,2,98,194,56,169,109,40,99,17,98,64,162,48,173,96,46,156,59,253,74,56,103,218,101,80,166,175,202,217,227,28,9,132,33,228,10,130,223,230,5,159,213,3,126,139,135,252,244,38,132,129,39,200,234,250,169,93,229,137,241, -44,172,44,130,202,133,181,48,99,205,92,168,89,58,61,173,251,61,224,8,176,42,129,35,99,110,24,38,251,239,9,137,236,242,160,98,128,122,244,53,133,58,152,73,12,253,76,98,220,231,150,25,96,6,249,89,91,164,135,10,242,119,185,218,94,152,94,187,180,107,223, -238,241,215,161,215,213,66,174,99,233,152,225,215,164,228,126,229,120,77,164,115,171,233,254,131,27,186,239,114,155,2,78,124,138,161,0,64,1,128,36,69,213,130,226,234,115,190,189,248,127,23,92,56,253,59,113,41,198,139,225,212,172,35,178,170,1,242,64,45, -55,84,195,233,53,23,50,49,48,187,104,97,94,29,123,41,34,130,36,74,204,124,112,90,33,99,39,27,82,143,63,16,137,17,1,16,103,17,129,66,93,126,77,96,244,68,28,112,200,188,29,14,78,190,195,250,245,83,131,175,229,245,41,49,252,199,147,252,172,61,158,157,196, -240,255,180,111,231,228,97,124,106,161,0,64,1,128,40,202,162,139,167,175,35,66,224,174,170,5,37,23,68,137,183,23,19,83,115,253,80,47,42,34,133,216,114,192,242,138,51,224,19,68,8,172,168,60,131,24,26,236,101,133,164,23,58,154,247,224,196,59,112,212,178, -27,236,161,73,150,187,146,232,134,153,138,39,120,34,220,31,114,71,71,27,95,28,252,101,195,115,3,143,71,252,34,198,251,81,0,156,20,248,244,68,166,68,239,142,137,3,195,135,172,23,157,254,149,5,223,92,117,195,220,255,49,150,233,230,210,118,194,106,87,11, -240,108,206,64,33,241,45,99,208,104,221,3,77,182,125,48,167,104,17,156,53,237,18,86,66,88,97,168,193,147,131,164,206,129,33,98,180,213,126,136,121,251,93,206,70,8,138,126,208,17,111,63,149,249,42,130,129,167,249,33,225,222,237,19,15,30,220,208,243,59, -251,128,215,130,103,6,65,1,128,168,251,240,35,30,198,129,245,221,143,183,191,62,186,101,221,119,150,220,182,240,226,105,223,19,244,124,161,26,115,5,254,217,225,225,88,233,212,113,207,107,176,167,19,222,30,126,1,78,169,60,155,136,129,75,97,113,217,106, -38,22,16,68,13,198,253,67,112,196,178,19,26,136,183,63,238,31,6,154,16,147,106,195,79,167,246,209,181,254,137,22,199,235,71,158,232,255,69,223,238,201,6,60,51,136,172,231,41,46,1,32,201,50,235,180,202,229,68,8,252,124,198,234,138,47,210,210,54,49,197, -99,68,105,213,0,205,176,22,52,2,204,46,94,8,107,107,46,132,211,170,206,131,154,130,89,120,114,144,164,241,139,94,104,35,222,254,17,243,14,232,113,53,131,63,234,101,33,254,84,151,169,210,178,62,26,238,183,15,250,26,27,95,24,252,69,251,150,145,45,169,202, -197,65,212,3,115,0,144,156,96,197,53,179,47,62,253,107,11,126,94,89,87,124,33,237,36,40,69,83,251,112,162,201,103,52,105,144,110,197,186,82,88,84,182,10,78,175,185,8,150,87,156,14,197,218,50,60,65,200,73,35,198,69,232,119,181,194,81,235,110,102,252,173, -193,9,150,202,71,123,244,107,82,220,177,146,150,130,234,10,120,240,217,194,67,29,111,140,221,93,255,108,255,99,65,39,121,128,34,40,0,146,4,151,0,16,197,104,127,125,116,71,239,246,137,29,203,175,154,245,185,83,191,84,119,123,197,188,162,83,105,217,96, -170,18,5,89,214,53,241,204,232,22,145,34,172,191,122,163,117,31,27,67,76,69,192,169,213,231,193,162,210,85,57,213,87,0,81,86,64,14,123,186,161,201,182,31,90,236,239,195,184,111,144,85,160,208,16,191,225,216,178,83,170,13,63,235,221,31,148,108,29,111, -154,30,56,248,72,207,95,220,99,126,7,158,41,4,5,0,146,145,80,131,223,180,113,104,99,207,246,137,45,167,125,185,238,235,203,175,158,125,107,81,181,97,113,52,152,58,33,64,161,115,5,142,231,10,120,34,78,216,59,254,38,236,159,120,27,170,13,51,136,24,88,11, -171,170,214,193,162,178,83,84,155,179,142,100,7,116,30,133,201,63,0,45,182,131,208,74,140,254,136,183,15,194,82,144,133,247,143,111,169,183,252,0,58,214,190,87,242,118,110,29,219,208,248,252,224,159,205,157,238,81,60,91,136,226,151,26,46,1,32,106,82, -60,205,88,188,250,250,185,55,18,33,240,125,34,4,230,167,178,116,240,163,160,161,93,81,138,0,199,241,80,99,156,1,139,203,214,192,41,149,103,193,66,34,6,112,153,32,63,160,94,253,136,183,151,133,246,219,29,71,136,0,24,132,144,24,32,198,94,32,155,46,37,117, -251,31,103,248,181,6,158,118,125,12,14,236,49,63,121,232,177,158,123,137,225,239,197,51,150,219,96,14,0,146,15,66,160,116,245,13,243,190,189,226,234,89,223,45,172,50,204,77,183,16,56,33,6,136,49,160,149,5,21,134,106,168,43,89,14,43,42,78,103,162,160, -22,19,8,115,10,111,196,5,3,158,14,98,240,15,179,68,62,115,96,12,34,82,248,132,151,159,54,163,15,137,80,63,45,233,131,88,60,56,86,111,127,166,254,249,193,251,6,247,153,59,240,172,161,0,64,1,128,228,154,16,40,95,125,253,220,175,46,191,102,246,127,23,85, -27,22,166,122,105,224,227,160,141,134,168,24,160,235,192,133,66,49,204,44,170,99,66,96,73,249,26,214,111,160,80,91,130,39,47,139,160,137,160,180,100,175,215,221,2,93,142,70,24,246,118,131,43,108,99,21,35,212,203,231,137,183,159,78,163,127,220,240,211, -53,254,72,64,244,142,55,57,158,109,222,56,252,192,0,26,126,20,0,40,0,144,60,16,2,37,171,111,152,251,229,229,87,207,254,175,162,42,195,74,49,34,129,20,201,140,146,38,186,46,44,198,163,32,197,68,230,29,150,235,171,97,78,241,34,86,85,176,176,116,37,204, -40,156,119,34,191,0,129,140,57,103,150,160,137,24,250,46,232,118,54,195,160,167,147,253,63,13,237,211,124,16,102,244,51,164,63,4,107,219,203,12,191,100,239,219,57,249,100,195,243,3,15,89,186,220,125,120,22,81,0,160,0,64,242,75,8,212,26,13,11,47,154,118, -253,170,207,206,249,110,229,130,146,117,146,72,140,111,88,74,201,192,161,147,35,126,44,58,16,101,70,134,14,117,169,48,212,194,172,162,5,176,160,116,5,212,149,44,133,105,5,115,160,72,91,138,39,51,149,207,143,88,24,44,1,106,240,123,136,177,239,128,33,79, -55,51,248,196,153,102,127,47,104,180,25,225,229,127,200,240,11,28,51,252,62,75,112,116,232,128,245,177,166,141,67,143,17,195,143,35,122,81,0,96,25,32,146,159,120,205,193,80,227,11,131,207,182,111,25,125,118,249,85,179,174,88,122,197,204,255,154,182,162, -236,83,26,226,182,69,67,234,183,24,62,9,141,204,230,13,240,188,112,76,14,196,193,22,156,0,115,96,148,53,134,209,242,58,40,213,85,194,116,34,2,102,23,47,130,121,197,75,88,132,128,150,30,234,136,88,64,148,144,96,113,112,134,173,48,233,31,129,17,95,47,43, -213,163,137,123,142,144,5,66,82,128,253,27,122,142,104,35,168,140,171,234,32,250,67,208,113,204,248,123,38,130,205,221,239,152,30,109,222,52,252,28,185,238,177,156,15,73,59,40,0,144,204,240,232,18,229,131,111,55,109,26,122,123,193,249,211,78,95,113,237, -236,155,230,156,81,121,131,190,72,91,193,242,4,50,100,158,57,245,40,89,226,24,104,79,24,39,58,5,206,73,140,17,237,13,79,195,205,180,207,0,29,93,92,107,156,77,68,193,2,152,89,56,159,37,21,210,121,5,5,66,49,158,236,127,227,217,187,195,118,230,205,155,124, -3,48,70,182,201,192,8,216,66,19,172,3,31,141,196,208,99,204,68,25,39,100,108,25,39,91,223,55,240,16,139,197,99,246,126,239,123,173,175,141,172,39,198,255,141,144,39,26,197,179,140,160,0,64,144,143,118,247,160,127,247,228,81,186,77,91,81,246,171,37,151, -207,252,210,146,79,206,248,122,97,181,126,5,77,22,204,172,229,129,132,32,248,96,132,128,66,115,7,104,120,122,194,63,12,13,214,61,39,122,18,20,235,202,88,100,160,198,56,11,166,21,204,102,173,138,171,13,211,161,68,95,193,150,16,50,41,92,173,54,116,109, -222,19,117,130,61,56,9,214,208,56,57,86,35,44,170,66,167,233,185,35,118,54,92,71,36,199,81,163,57,118,124,53,252,137,38,79,153,12,175,229,88,175,254,176,79,180,145,107,248,229,246,55,198,30,27,220,111,57,18,19,177,101,47,130,2,0,65,78,154,201,118,215, -24,217,238,57,250,84,223,253,139,46,158,254,169,37,151,205,252,70,237,242,210,203,4,29,103,160,131,135,50,37,42,240,79,162,128,38,157,209,13,180,31,208,53,113,150,133,110,15,153,217,244,56,154,123,67,141,26,93,38,40,212,22,67,137,174,130,37,27,82,129, -64,55,250,123,186,21,17,209,80,164,45,33,2,162,32,107,134,28,209,137,141,180,196,206,23,245,128,95,244,144,239,109,103,223,157,46,157,56,194,102,22,186,167,94,62,253,123,26,194,167,94,61,133,35,223,143,126,71,142,25,123,61,219,178,1,42,82,4,3,199,188, -126,183,41,208,208,187,115,226,201,246,45,163,27,29,131,190,9,188,139,17,20,0,8,146,4,126,91,56,220,244,210,208,171,205,155,134,95,157,177,186,98,233,178,43,102,126,121,254,121,53,95,44,170,49,46,138,209,225,67,52,87,32,195,39,160,159,136,20,104,132, -127,48,150,116,9,193,197,140,228,144,167,139,9,3,250,43,145,185,174,101,73,135,6,190,16,10,180,69,172,81,17,141,20,208,173,88,151,248,61,93,82,40,20,138,192,72,54,42,38,244,124,194,112,106,201,79,186,38,206,49,131,202,177,159,199,247,227,223,27,112,242, -43,30,99,73,143,180,108,142,38,65,70,99,97,136,196,34,108,12,46,13,211,135,136,135,30,16,125,224,167,70,62,234,5,111,212,77,54,39,248,34,110,98,216,221,108,128,14,245,226,195,196,211,143,30,171,168,56,110,44,143,27,122,218,127,65,75,190,99,166,123,245, -31,115,66,129,23,18,83,249,34,1,209,49,114,196,246,70,231,155,99,79,15,236,179,236,12,123,163,18,222,181,8,10,0,4,81,210,179,140,197,193,212,104,239,34,219,255,20,62,98,248,237,162,139,166,125,114,193,133,211,190,50,99,85,249,101,58,163,80,202,6,16,209, -80,107,60,123,190,83,66,24,240,31,233,221,83,67,76,103,26,132,137,209,117,133,173,9,131,12,137,80,242,241,234,157,132,113,39,222,39,121,61,53,248,44,63,225,88,6,60,21,27,58,98,92,57,46,241,147,190,130,14,179,161,255,62,254,15,7,137,238,71,226,243,194, -240,247,202,135,8,49,252,137,225,74,18,107,154,36,178,242,200,68,69,132,116,66,36,28,127,47,106,220,169,81,63,177,79,244,23,249,169,211,16,79,62,75,188,249,127,7,157,200,71,141,126,92,138,199,157,35,254,3,61,219,39,94,24,216,61,249,170,185,203,109,194, -59,20,65,1,128,32,41,137,10,132,130,77,27,135,182,208,173,118,121,217,156,249,231,213,126,122,241,165,211,63,95,54,187,240,28,242,144,230,197,16,49,78,89,190,238,154,48,160,212,99,231,224,95,59,238,9,19,124,220,128,71,32,116,194,40,31,143,40,36,84,81, -194,200,255,171,112,73,226,243,78,124,58,253,131,99,31,173,57,254,39,199,146,240,56,128,60,201,89,96,157,250,244,28,59,54,62,107,168,119,172,97,242,53,226,237,191,100,106,118,28,165,75,81,8,130,2,0,65,210,132,185,195,53,66,182,7,142,62,213,247,192,140, -213,21,107,136,24,184,110,254,39,106,62,93,50,163,96,21,181,119,180,201,80,38,116,27,84,87,42,252,163,1,63,241,87,72,18,70,159,227,57,8,186,34,227,227,205,142,173,93,239,140,111,28,58,104,217,19,176,135,131,120,132,16,20,0,8,146,65,80,111,108,248,125, -107,19,221,222,127,84,119,231,156,51,170,206,92,112,193,180,107,103,174,169,184,170,168,218,176,146,26,67,218,109,48,219,150,9,144,20,25,125,94,147,168,217,39,63,131,238,168,217,212,228,216,62,184,215,188,105,232,160,117,151,107,204,239,196,35,132,160, -0,64,144,44,32,232,140,136,221,239,142,31,160,91,65,185,238,231,179,207,168,58,131,8,130,171,103,172,174,184,162,108,78,225,26,242,144,215,72,209,24,196,200,22,71,49,144,167,22,63,209,150,87,208,241,76,15,134,92,145,81,83,3,49,250,251,204,155,135,222, -183,238,117,141,250,237,120,144,16,20,0,8,146,197,4,156,145,232,113,49,160,53,242,119,204,88,85,177,122,193,5,181,159,156,190,170,252,138,138,185,69,103,234,10,132,66,42,4,152,32,144,80,13,228,180,205,231,52,137,90,125,178,145,243,29,247,89,67,29,19, -45,206,247,250,247,76,190,57,222,236,60,228,53,7,189,120,148,16,20,0,8,146,131,68,131,82,108,248,144,181,145,110,196,251,187,187,122,113,233,188,185,103,85,157,63,107,109,229,39,171,23,151,156,107,44,211,213,81,35,193,4,129,24,207,128,86,196,72,178,94, -62,45,215,163,205,121,104,126,68,200,19,113,216,7,188,71,71,143,218,223,29,61,106,219,110,238,112,181,133,60,81,17,15,20,130,2,0,65,242,8,234,237,155,59,93,67,116,59,252,68,223,83,197,53,134,130,234,37,165,107,230,173,171,190,104,218,242,178,11,203,102, -23,158,170,47,214,86,178,127,43,210,8,1,10,130,140,183,247,180,112,129,167,30,190,134,37,240,17,47,63,228,54,249,59,38,219,93,251,198,91,156,59,136,225,63,228,26,245,79,226,121,68,16,20,0,8,114,2,175,37,20,32,219,129,129,189,230,3,26,78,243,155,178,89, -5,181,181,203,203,78,155,177,186,226,188,218,229,165,231,150,207,42,92,161,47,33,130,64,3,172,170,128,70,9,98,212,144,160,45,73,159,193,231,52,172,54,159,122,249,244,188,136,97,41,24,176,135,186,173,189,222,131,19,45,142,61,227,173,174,163,214,30,119, -95,196,143,78,62,130,160,0,64,144,147,128,122,136,206,17,191,153,108,91,187,222,54,109,165,225,227,210,89,5,53,181,203,74,87,17,65,112,118,229,252,162,179,43,235,138,79,33,130,96,182,160,227,53,244,223,211,234,130,24,46,27,168,107,236,249,132,193,167, -63,227,49,128,144,55,98,115,141,132,58,109,3,222,195,227,77,142,131,230,78,87,163,219,20,24,12,121,162,120,18,16,4,5,0,130,40,32,8,226,113,112,141,250,45,100,219,214,253,238,248,54,250,103,69,53,134,162,178,217,133,11,103,172,42,95,93,181,176,120,109, -249,220,226,53,197,181,134,197,134,98,109,45,53,82,180,186,128,69,10,136,48,160,162,0,171,13,78,214,210,3,112,196,216,211,178,60,142,255,187,177,39,94,188,199,109,14,14,146,115,208,102,235,243,28,181,116,121,26,172,189,158,78,207,120,192,138,201,155, -8,130,2,0,65,82,134,207,18,242,145,173,105,172,222,222,68,254,247,73,106,244,139,170,141,21,21,117,133,117,53,139,75,87,150,204,44,56,165,106,126,241,138,226,233,198,133,250,98,237,76,157,158,55,82,163,70,141,21,21,4,9,97,0,121,27,49,160,30,61,109,40, -72,215,234,143,255,164,66,75,138,198,164,176,55,106,38,199,118,208,103,13,117,90,123,60,45,150,110,119,171,99,200,215,235,157,12,142,71,131,104,237,17,4,5,0,130,100,16,212,219,247,76,4,28,116,27,58,96,173,63,254,231,5,21,122,67,201,116,227,180,226,105, -198,186,202,249,197,75,43,235,138,150,24,203,117,139,74,103,22,206,209,26,249,25,250,34,109,57,17,15,26,106,16,227,82,252,88,228,32,209,159,32,17,57,56,102,239,178,105,198,193,177,14,132,52,33,143,254,158,138,35,250,27,234,217,179,89,3,116,180,115,72, -242,134,60,81,139,215,28,26,11,185,34,189,182,126,111,47,241,238,187,220,166,192,128,115,196,63,26,116,133,221,185,221,193,17,65,80,0,32,72,78,19,112,132,67,100,27,154,108,119,13,245,110,159,216,121,252,207,245,197,90,222,88,170,171,40,172,54,204,168, -152,91,56,147,252,127,93,213,130,226,217,186,66,97,94,217,156,194,105,188,150,155,110,44,211,149,11,122,190,152,136,3,3,45,101,75,180,242,255,123,226,33,253,253,7,141,36,251,43,137,206,64,248,168,30,192,39,177,12,161,249,184,137,129,241,99,30,187,230, -67,30,60,13,207,159,120,29,75,193,63,81,49,33,17,241,226,241,91,67,110,242,211,236,28,245,155,137,231,62,108,235,245,140,68,2,226,144,173,207,75,12,124,196,228,179,4,109,33,111,52,132,137,148,8,146,103,2,192,235,197,158,27,72,254,66,199,198,146,205,234, -26,243,91,77,141,246,230,143,248,39,58,190,2,138,180,70,168,48,148,232,42,202,231,20,86,199,164,120,109,113,141,161,178,100,102,65,53,49,177,85,134,18,109,25,249,125,105,92,130,98,242,239,139,5,3,103,44,252,255,236,221,75,106,194,64,0,128,225,104,226, -139,90,104,233,190,208,131,120,75,47,215,19,20,173,90,84,218,196,81,155,206,152,62,20,234,174,208,133,223,7,1,5,31,193,133,243,79,72,50,119,189,126,28,232,211,26,187,157,163,173,125,184,235,93,63,63,123,36,33,141,223,233,102,72,187,240,189,136,82,136, -91,90,237,38,196,193,61,196,125,173,226,140,61,45,23,184,110,229,217,186,92,132,213,122,82,46,227,27,103,241,125,207,211,199,229,60,126,196,244,117,182,153,174,158,222,94,222,247,217,60,76,178,101,124,189,123,231,195,25,33,132,203,11,128,162,40,178,241, -120,44,2,224,183,249,118,115,121,97,136,3,254,34,62,94,52,51,251,250,103,182,253,57,19,79,119,180,235,118,138,172,46,234,230,105,63,239,12,175,6,131,56,213,79,235,239,118,143,182,162,119,221,105,223,222,15,135,231,206,57,72,231,39,196,25,123,21,7,245, -144,53,153,80,197,45,93,63,183,137,223,183,41,119,161,42,55,135,127,171,109,154,237,239,110,246,217,182,191,255,58,64,144,213,15,205,145,137,195,145,130,188,217,209,188,104,157,236,47,112,106,52,26,253,219,119,183,106,167,38,3,192,197,105,251,9,0,64, -0,0,0,2,0,0,16,0,0,128,0,0,0,4,0,0,32,0,0,0,1,0,0,8,0,0,64,0,0,0,2,0,0,16,0,0,128,0,0,0,4,0,0,32,0,0,0,1,0,0,8,0,0,64,0,0,128,0,0,0,4,0,0,32,0,0,0,1,0,0,8,0,0,64,0,0,0,2,0,0,16,0,0,128,0,0,0,4,0,0,32,0,0,128,191,246,33,192,0,100,235,173,153,70,62,64, -37,0,0,0,0,73,69,78,68,174,66,96,130,0,0 }; +{ 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,2,0,0,0,2,0,8,6,0,0,0,244,120,212,250,0,0,0,9,112,72,89,115,0,0,14,195,0,0,14,195,1,199,111,168,100,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101, +46,111,114,103,155,238,60,26,0,0,0,20,116,69,88,116,84,105,116,108,101,0,74,85,67,69,32,83,76,73,67,69,32,82,71,66,103,97,100,162,0,0,32,0,73,68,65,84,120,156,236,221,119,120,21,85,250,7,240,239,153,185,53,189,19,122,8,189,132,142,34,29,1,21,233,37,1, +68,20,221,93,123,69,93,138,174,230,231,170,16,96,81,177,187,174,74,177,16,138,5,36,148,20,154,10,10,136,66,2,2,161,183,36,164,39,183,223,57,191,63,98,20,148,114,203,153,153,91,206,231,121,124,220,135,205,188,231,53,36,247,125,103,230,20,2,142,227,124, +90,122,222,32,141,86,140,137,215,217,72,188,4,161,129,68,104,20,8,137,38,160,81,20,66,20,1,141,34,160,81,18,72,40,1,66,8,65,40,165,208,1,136,4,32,2,136,250,83,200,48,0,218,63,253,153,29,64,205,159,254,172,2,20,14,16,84,17,2,27,165,168,165,128,73,0,173, +165,32,21,20,164,130,64,170,160,32,21,160,180,92,160,164,66,128,84,100,211,209,146,214,23,196,226,180,180,149,78,121,190,35,28,199,177,64,212,78,128,227,130,217,162,13,169,49,78,141,212,132,138,164,153,36,145,166,148,144,166,0,109,66,128,198,4,72,160, +64,2,128,120,248,223,239,42,5,80,66,128,98,10,20,81,224,28,1,61,13,74,206,8,2,61,77,156,244,148,232,16,206,204,184,109,101,153,218,137,114,92,176,242,183,15,21,142,243,43,148,130,188,188,109,114,19,173,93,106,69,9,90,129,160,21,64,91,2,104,245,219,63, +161,42,167,168,182,26,0,133,0,142,18,74,143,74,2,142,2,56,234,20,52,133,207,14,248,252,12,33,160,42,231,199,113,1,139,55,0,28,199,72,198,166,201,141,36,173,212,129,128,118,36,20,29,0,116,164,64,103,0,225,106,231,230,167,172,0,10,9,33,249,146,132,2,64, +202,39,132,22,88,182,165,28,76,79,79,151,212,78,142,227,252,29,111,0,56,206,77,233,121,131,52,6,26,219,22,32,61,40,208,131,128,116,0,208,29,64,140,218,185,5,137,26,2,252,12,32,159,18,20,0,216,99,65,232,238,244,193,31,91,212,78,140,227,252,9,111,0,56, +238,58,94,201,158,212,70,36,210,141,148,208,27,1,114,35,128,20,0,122,181,243,226,46,99,5,176,31,160,187,8,37,187,156,84,216,53,103,232,138,195,106,39,197,113,190,140,55,0,28,119,137,244,181,163,66,244,33,134,222,132,160,31,8,122,131,226,70,240,59,123, +127,85,74,128,93,20,216,69,36,178,93,27,66,119,206,232,179,210,172,118,82,28,231,43,120,3,192,5,181,5,27,167,133,58,116,214,155,32,161,31,33,180,47,128,126,0,12,106,231,197,201,194,1,224,103,66,105,54,133,240,173,94,176,109,127,114,240,151,21,106,39, +197,113,106,225,13,0,23,84,210,243,6,105,116,52,225,70,66,49,140,16,58,12,192,13,0,52,106,231,197,169,194,1,224,7,74,201,102,2,105,147,69,184,248,67,250,224,45,14,181,147,226,56,165,240,6,128,11,120,115,179,39,36,19,81,28,14,74,135,1,24,12,32,66,237, +156,56,159,84,9,138,60,66,232,102,73,162,27,102,15,93,125,76,237,132,56,78,78,188,1,224,2,78,102,102,170,88,24,135,174,160,100,20,33,116,36,128,30,106,231,196,249,165,99,20,116,29,136,176,54,38,60,106,235,253,61,223,183,171,157,16,199,177,196,27,0,46, +32,44,216,56,45,84,210,89,134,83,137,142,1,33,195,1,196,170,157,19,23,80,74,65,105,22,17,200,87,230,26,203,250,244,81,107,77,106,39,196,113,222,226,13,0,231,183,210,215,142,10,49,132,24,135,80,66,83,9,48,14,117,123,220,115,156,220,44,148,34,155,16,186, +18,78,242,213,172,97,43,43,213,78,136,227,60,193,27,0,206,175,100,236,24,29,78,109,186,113,0,73,3,48,20,124,61,62,167,46,43,165,216,44,0,153,208,91,191,156,217,239,235,106,181,19,226,56,87,241,6,128,243,121,153,153,169,98,97,60,25,12,74,239,226,119,250, +156,15,179,80,138,108,128,46,181,150,146,175,210,211,86,218,212,78,136,227,174,133,55,0,156,207,154,151,151,218,15,148,222,5,144,137,0,162,213,206,135,227,220,80,70,128,85,78,144,165,115,110,206,252,86,237,100,56,238,74,120,3,192,249,148,151,183,141, +111,40,58,197,52,72,248,27,8,82,212,206,135,227,24,56,76,41,249,76,11,199,71,79,15,89,115,82,237,100,56,174,30,111,0,56,213,165,103,166,234,140,241,24,13,138,123,40,112,43,0,81,237,156,124,145,86,212,195,168,13,135,81,27,142,16,109,4,140,218,8,24,181, +97,48,106,195,97,208,132,66,20,180,208,107,66,32,18,13,116,26,35,52,130,14,154,223,254,140,128,64,167,49,66,32,215,254,214,218,157,22,56,37,7,236,146,181,238,223,78,43,156,212,241,251,159,219,156,22,88,236,53,176,56,234,254,49,219,107,96,113,212,194, +98,175,255,223,53,176,58,248,4,249,171,112,2,216,64,65,62,138,137,136,250,154,47,43,228,212,198,27,0,78,53,243,54,167,54,163,2,238,35,4,127,3,144,168,118,62,106,33,132,32,84,23,133,8,125,28,194,245,49,8,55,196,253,241,191,245,177,136,48,196,194,168,13, +135,70,208,169,157,170,75,28,146,29,213,214,82,212,90,203,81,101,189,136,26,107,5,170,173,165,168,182,150,161,198,86,142,42,203,69,84,91,203,0,80,181,83,85,211,5,74,241,63,34,225,253,89,195,86,158,82,59,25,46,56,241,6,128,83,84,122,122,186,96,232,127, +224,86,8,228,65,80,220,142,32,186,219,143,208,199,34,58,164,17,98,66,26,34,54,164,49,98,66,26,33,218,152,136,8,67,220,117,239,204,3,141,67,178,163,194,124,1,229,230,11,40,55,253,246,111,243,5,148,155,207,163,218,90,10,74,131,166,57,112,82,224,27,16,188, +99,221,218,113,83,122,122,186,164,118,66,92,240,224,13,0,167,136,244,245,83,35,140,122,235,189,148,144,71,1,36,171,157,143,156,194,245,177,72,8,75,66,131,240,36,196,133,54,69,76,72,67,196,24,27,65,43,242,21,139,174,112,74,118,148,154,206,161,164,230, +36,74,106,79,161,184,230,36,138,107,78,162,214,22,240,231,246,20,18,138,215,4,135,225,163,103,110,93,86,171,118,50,92,224,227,13,0,39,171,249,57,147,90,74,144,30,5,193,61,8,176,61,248,9,17,16,27,210,8,9,97,73,191,21,252,22,104,16,150,4,163,54,92,237, +212,2,146,201,94,133,226,154,147,40,249,173,33,56,95,117,20,101,230,115,129,248,180,160,140,82,188,35,10,120,243,159,131,87,94,80,59,25,46,112,241,6,128,147,197,252,220,212,129,18,240,36,128,81,0,4,181,243,97,193,168,13,71,163,136,54,104,18,217,22,141, +35,219,34,49,60,153,223,213,171,204,234,48,225,92,213,17,156,175,58,138,115,85,71,112,174,234,8,204,246,128,217,139,199,10,96,185,36,97,209,156,161,43,11,212,78,134,11,60,188,1,224,152,73,79,79,23,12,3,14,140,2,200,44,0,189,213,206,199,59,4,177,33,141, +208,56,178,13,26,71,182,67,227,200,54,136,13,105,4,254,43,227,251,202,205,231,113,174,234,40,206,86,30,194,201,242,124,148,153,206,169,157,146,183,40,1,178,32,145,133,51,135,102,230,169,157,12,23,56,248,167,25,231,181,244,204,84,157,62,30,119,16,9,255, +4,65,123,181,243,241,84,164,33,30,73,209,157,209,60,38,5,205,163,59,33,68,27,80,111,44,130,86,141,181,28,39,43,14,224,100,249,1,156,42,63,128,74,75,137,218,41,121,99,47,165,100,161,85,40,94,153,62,120,139,67,237,100,56,255,198,27,0,206,99,233,153,169, +58,99,28,253,59,64,102,81,160,169,218,249,184,203,160,9,69,179,232,78,72,138,78,65,82,76,10,162,141,13,213,78,137,83,64,165,165,24,39,203,243,113,178,124,63,142,151,253,236,151,175,12,40,112,18,148,204,179,150,210,15,249,150,195,156,167,120,3,192,185, +45,61,111,144,198,136,248,187,37,138,127,17,160,185,218,249,184,163,65,88,11,180,138,235,137,150,177,221,144,24,158,12,66,2,98,122,2,231,33,74,37,156,173,58,130,194,210,189,40,44,221,139,146,26,191,219,168,239,4,161,244,69,179,112,113,25,127,34,192,185, +139,55,0,156,203,210,211,211,5,125,255,3,19,8,33,47,1,104,163,118,62,174,32,68,64,227,136,214,104,25,215,19,109,227,111,224,119,249,220,53,213,218,42,113,188,108,31,10,75,247,226,88,233,62,216,156,102,181,83,114,213,9,10,204,109,121,17,255,75,75,91,233, +84,59,25,206,63,240,6,128,187,174,186,201,125,5,19,65,105,186,63,188,227,215,107,140,72,142,233,134,86,113,189,208,50,182,43,244,154,80,181,83,226,252,144,221,105,197,241,178,125,56,84,252,61,142,150,238,129,221,105,85,59,37,87,20,80,74,211,103,221,188, +106,21,33,193,189,213,34,119,125,188,1,224,174,105,110,94,218,80,66,105,6,128,238,106,231,114,45,26,65,139,230,209,157,209,46,161,55,218,198,247,230,203,243,56,166,28,146,29,39,202,126,193,161,146,239,113,164,228,71,127,120,50,144,79,41,253,63,222,8, +112,215,194,27,0,238,138,230,229,76,28,14,66,94,4,208,83,237,92,174,70,32,34,146,98,58,163,67,66,95,180,142,239,5,157,104,84,59,37,46,8,216,157,86,20,150,238,197,161,226,239,81,88,186,23,14,201,135,231,224,17,252,72,129,231,103,15,94,185,65,237,84,56, +223,195,27,0,238,50,243,115,38,117,151,136,244,31,0,131,212,206,229,202,8,154,68,182,69,135,6,125,209,46,161,15,223,117,143,83,149,213,97,194,161,226,239,177,255,194,22,156,173,252,85,237,116,174,37,219,73,132,39,159,29,188,226,128,218,137,112,190,131, +55,0,28,0,224,165,156,212,198,90,130,231,41,240,55,248,224,1,61,161,186,40,164,36,14,68,231,70,67,16,109,12,218,131,3,57,31,86,102,58,143,130,162,29,56,112,97,43,42,45,197,106,167,115,37,18,5,62,209,216,29,79,63,115,235,23,62,153,32,167,44,222,0,4,185, +244,188,212,48,3,200,76,80,58,3,64,136,218,249,92,138,16,1,201,49,93,209,165,209,16,180,140,237,30,116,39,230,113,254,137,82,9,39,202,247,227,192,133,45,56,92,242,3,28,146,93,237,148,254,172,12,148,166,91,132,139,239,240,165,131,193,141,55,0,65,108,94, +78,218,40,16,250,38,128,102,106,231,114,169,112,125,12,58,54,232,143,174,141,111,65,164,33,94,237,116,56,206,99,86,135,9,251,47,108,193,158,51,89,168,48,23,169,157,206,159,29,6,48,99,214,205,43,191,81,59,17,78,29,188,1,8,66,243,114,39,117,161,68,122, +131,80,244,87,59,151,63,16,180,136,233,140,158,77,110,71,139,152,174,32,132,255,104,114,129,131,82,138,99,101,63,97,239,217,141,56,94,182,207,167,78,48,164,20,235,40,21,158,154,51,116,197,97,181,115,225,148,197,63,101,131,200,171,121,99,163,44,84,243, +127,4,228,33,0,26,181,243,1,234,150,239,181,77,184,9,189,155,141,65,92,168,223,237,38,204,113,110,171,48,23,225,231,115,217,248,249,124,174,47,109,67,108,167,160,239,16,39,121,126,214,176,149,149,106,39,195,41,131,55,0,65,128,82,144,249,185,169,119,82, +130,255,0,240,137,103,234,17,134,120,116,111,124,43,186,52,26,2,3,223,168,231,47,168,195,2,201,84,14,56,237,32,90,3,136,49,26,68,212,170,157,150,107,168,3,146,181,20,144,108,0,17,65,116,209,32,124,137,230,95,216,157,86,228,23,109,199,143,167,215,162, +204,116,94,237,116,234,21,81,130,199,103,15,94,185,66,237,68,56,249,241,6,32,192,205,223,58,161,181,228,20,222,5,112,179,218,185,0,64,147,200,182,232,217,116,4,90,199,245,10,238,73,125,212,9,169,182,20,206,234,34,56,107,138,32,85,23,193,89,83,252,219, +191,139,64,173,53,151,127,61,33,16,195,26,64,155,216,9,218,102,189,160,107,212,21,240,153,115,12,40,28,229,191,192,81,242,45,28,229,251,32,153,207,1,244,242,221,104,137,54,28,130,33,17,130,177,33,4,99,34,136,161,238,223,130,49,17,130,62,30,8,226,159, +5,74,41,142,92,252,1,187,78,125,141,115,85,71,212,78,7,64,221,107,1,65,112,62,56,115,240,154,51,106,231,194,201,135,55,0,1,234,189,221,247,105,203,170,43,102,16,74,211,1,24,212,206,167,73,100,91,244,107,145,134,230,209,41,106,167,162,44,74,225,172,41, +130,179,226,20,156,21,103,224,44,63,5,71,229,89,56,43,207,0,146,231,19,176,133,208,56,132,116,158,8,125,171,65,234,21,79,74,97,47,206,131,245,248,167,144,204,103,61,143,35,104,32,134,52,133,16,210,12,66,88,18,196,208,230,16,66,155,67,48,52,4,130,108, +46,200,153,202,67,216,121,242,43,20,150,238,5,212,223,192,207,68,9,121,177,101,9,93,200,207,23,8,76,193,245,219,21,36,94,201,77,235,43,128,126,0,160,157,186,153,16,180,142,235,137,62,73,227,145,24,222,82,221,84,148,32,57,225,168,56,9,199,197,66,56,74, +11,225,44,59,14,103,197,25,80,167,124,59,197,105,98,147,17,214,239,81,136,145,77,100,27,227,74,36,243,121,152,15,46,132,179,178,64,190,65,4,93,93,51,16,214,18,98,68,107,136,225,109,32,134,37,1,196,39,166,175,200,170,164,246,52,126,56,245,53,10,138,118, +64,162,234,214,94,2,124,11,81,248,199,204,129,43,14,170,154,8,199,28,111,0,2,200,162,239,82,141,118,51,125,129,18,242,52,84,220,204,135,16,130,228,152,238,232,223,34,13,13,194,91,168,149,134,204,40,156,149,231,224,40,57,12,71,233,111,5,191,252,36,168, +83,249,53,223,68,163,71,216,128,39,160,107,162,204,174,205,142,242,159,97,62,240,111,80,71,173,34,227,93,70,208,66,12,75,134,24,222,186,238,159,136,118,16,66,155,34,80,63,202,170,44,23,241,195,233,181,216,119,46,27,78,117,247,19,176,19,74,23,25,173,181, +47,60,118,123,150,95,156,138,196,93,95,96,254,214,4,161,249,185,169,3,37,224,127,0,84,187,213,22,136,136,78,137,3,208,187,249,216,192,59,118,151,74,112,148,159,132,163,232,32,236,69,5,112,20,31,132,100,169,82,59,171,63,16,1,225,131,158,130,174,233,13, +178,14,227,40,219,11,211,254,23,188,122,125,193,26,209,70,66,140,234,4,77,84,39,136,81,41,16,67,91,248,208,252,8,54,42,204,69,248,246,196,42,228,23,109,7,165,146,106,121,16,224,0,136,240,143,153,131,87,236,84,45,9,142,25,222,0,248,185,5,27,167,133,58, +181,230,12,212,45,237,83,233,239,147,160,125,194,77,232,159,60,41,128,10,63,133,163,236,36,236,231,126,134,163,184,0,246,226,67,160,54,147,218,73,93,19,17,117,136,188,253,21,136,209,205,101,137,47,153,206,160,118,207,227,160,14,31,255,62,104,66,33,70, +118,128,38,42,5,98,76,15,136,97,45,16,40,31,117,101,166,243,248,246,196,42,28,44,222,161,230,94,2,18,40,222,16,29,134,103,159,185,117,153,10,143,129,56,86,2,227,183,34,72,205,205,158,212,139,8,210,114,0,109,212,202,33,57,182,27,6,36,79,70,131,48,255, +127,212,47,89,170,96,63,255,11,236,231,246,193,126,238,103,72,230,10,181,83,114,155,24,213,20,81,35,231,3,2,227,247,228,212,137,218,61,79,192,89,125,148,109,92,5,16,93,52,52,49,221,161,137,233,1,77,76,119,16,109,164,218,41,121,173,212,116,22,223,30,95, +137,67,37,223,171,217,8,252,74,136,116,231,204,193,171,119,171,149,0,231,29,222,0,248,33,74,65,50,182,164,62,6,138,249,0,116,106,228,208,40,162,53,6,38,223,129,102,209,29,213,24,158,17,10,199,197,66,216,78,255,8,251,185,125,112,148,29,7,124,104,135,54, +79,133,244,152,6,99,199,209,76,99,218,206,124,13,203,145,119,152,198,84,5,33,16,195,90,213,53,3,113,189,33,70,180,129,63,127,12,22,85,31,71,110,225,82,156,42,207,87,43,5,7,165,228,229,150,165,244,223,124,165,128,255,241,223,159,252,32,53,111,115,106, +51,42,98,41,1,6,170,49,126,124,104,51,12,72,158,130,86,113,61,212,24,222,123,84,130,163,228,48,172,39,191,135,237,228,46,72,166,82,181,51,98,142,232,195,16,61,225,29,16,13,163,213,159,146,29,213,223,223,13,106,43,103,19,207,135,16,109,36,52,177,61,161, +141,239,15,77,76,15,246,79,78,20,82,88,186,7,91,10,63,193,197,90,213,150,237,111,113,136,226,93,207,13,252,252,180,90,9,112,238,227,13,128,31,153,155,155,54,129,128,190,15,32,70,233,177,141,218,112,244,73,154,128,30,141,111,3,241,179,9,86,212,105,131, +253,236,62,216,78,237,130,237,204,30,80,91,224,191,182,12,189,233,126,24,90,15,101,18,203,126,33,7,230,131,11,153,196,242,101,68,19,6,77,220,141,208,198,245,129,38,182,39,32,168,242,112,205,99,148,82,228,23,109,195,150,194,79,80,107,83,229,245,85,37, +33,244,225,153,131,87,125,162,198,224,156,251,120,3,224,7,50,118,140,14,135,77,191,144,2,247,41,61,182,64,68,116,107,124,11,250,183,152,4,189,198,167,78,11,190,54,42,193,126,225,0,172,199,182,195,118,106,23,168,221,172,118,70,138,210,54,76,65,196,176, +231,153,196,50,253,252,47,56,202,130,235,53,47,209,132,64,19,215,7,218,6,131,161,137,246,165,93,23,175,207,238,180,98,207,217,13,248,254,196,26,216,156,202,255,220,19,66,86,234,96,187,239,201,193,95,250,223,36,154,32,195,27,0,31,247,74,118,234,77,130, +128,229,0,146,149,30,187,101,108,55,220,220,234,110,196,132,52,82,122,104,143,57,43,78,195,122,108,27,172,133,91,33,153,3,239,145,181,203,4,13,98,38,127,12,162,209,123,23,71,178,163,106,251,196,186,125,253,131,20,209,70,64,27,223,23,218,196,33,16,35, +59,192,95,62,54,171,173,165,200,59,186,12,7,139,191,83,99,248,66,9,210,212,57,55,175,222,165,198,224,156,107,252,227,39,57,8,101,102,166,138,199,227,233,115,148,146,231,160,240,201,125,49,33,141,48,164,213,221,72,142,237,166,228,176,30,147,76,229,176, +22,230,193,90,184,5,206,42,159,57,84,69,117,145,195,95,134,38,222,187,5,34,206,170,95,81,187,231,9,70,25,249,63,193,216,8,218,196,161,208,53,188,5,68,31,171,118,58,46,57,89,190,31,155,15,127,136,82,147,23,219,53,123,198,65,64,94,108,113,145,190,194,39, +8,250,38,222,0,248,160,87,182,165,198,11,14,124,14,133,15,240,209,138,122,244,107,145,134,158,77,110,247,253,131,122,168,4,219,217,159,96,61,146,3,219,153,189,127,57,124,134,3,194,250,61,10,125,242,0,175,98,216,139,242,96,46,152,207,40,163,0,66,4,104, +98,123,65,215,240,54,104,98,123,249,252,97,70,78,201,129,31,79,175,195,119,39,87,195,238,84,124,35,191,108,13,209,76,121,122,240,103,23,149,30,152,187,54,222,0,248,152,249,57,147,186,75,68,90,13,32,73,201,113,91,198,118,199,45,109,254,134,8,131,79,156, +22,124,85,146,169,12,214,99,219,96,57,188,9,82,77,137,218,233,248,180,208,94,247,192,208,254,118,175,98,216,78,127,9,203,209,247,24,101,20,152,136,46,6,186,196,33,208,54,26,14,193,199,55,194,170,182,150,97,235,177,79,145,127,97,155,210,67,159,145,32, +77,228,175,4,124,11,111,0,124,200,188,156,180,127,128,208,55,0,120,249,226,214,117,97,186,104,12,109,115,15,218,198,247,86,106,72,15,80,216,207,239,135,229,224,122,216,206,238,13,136,181,250,74,8,233,126,39,140,157,198,120,21,195,118,106,37,44,133,31, +50,202,40,192,17,2,77,76,79,232,154,140,129,38,166,59,124,249,227,245,88,217,62,108,62,252,63,84,152,139,148,28,214,66,65,30,158,125,115,38,255,129,242,17,190,251,19,26,68,22,175,31,174,55,25,66,223,0,200,63,148,27,149,160,99,98,127,12,109,53,29,6,109, +152,114,195,186,129,58,237,176,157,248,14,230,130,175,225,44,63,165,118,58,126,39,164,251,84,24,59,141,245,42,134,245,100,38,172,199,62,98,148,81,240,16,140,141,161,107,50,18,218,134,183,129,136,170,159,198,125,69,14,201,134,111,143,175,196,174,211,107, +21,61,95,128,2,203,244,6,220,63,163,207,202,224,90,154,227,131,120,3,160,178,140,188,241,77,40,21,87,1,184,81,169,49,227,67,155,225,214,182,247,161,113,164,106,59,8,95,147,100,42,135,229,200,102,88,14,109,0,181,86,171,157,142,223,226,13,128,250,136,38, +4,218,196,97,208,53,29,7,193,208,64,237,116,174,232,92,213,17,100,29,122,71,233,77,132,246,82,34,78,152,61,248,243,19,74,14,202,93,142,55,0,42,202,200,157,56,132,130,124,6,64,145,23,239,2,17,113,83,243,241,232,147,52,222,39,39,249,57,203,79,193,124,224, +11,88,79,124,207,39,245,49,192,27,0,31,66,4,104,19,6,64,215,44,237,183,195,137,124,139,83,178,227,219,19,171,176,235,212,215,144,148,251,221,43,38,18,153,60,115,104,102,158,82,3,114,151,227,13,128,10,46,217,203,127,1,0,173,18,99,198,133,54,193,136,246, +15,35,49,92,181,211,130,175,202,81,118,12,230,253,95,194,118,114,39,0,254,126,159,21,222,0,248,38,49,178,3,244,45,166,213,109,48,228,99,74,106,78,98,253,161,119,112,161,250,152,82,67,58,41,33,207,206,26,148,57,159,16,254,203,175,52,222,0,40,44,125,237, +168,16,67,136,97,9,8,38,42,49,30,33,4,189,154,142,68,255,22,147,161,17,20,233,53,92,230,40,62,4,243,129,47,97,59,179,71,237,84,2,18,111,0,124,155,24,217,1,250,102,105,208,196,221,0,95,250,40,150,168,19,59,79,126,137,111,79,172,82,240,105,0,205,212,25, +200,116,62,47,64,89,190,243,83,23,4,22,230,77,137,115,82,199,151,20,232,171,196,120,145,134,120,220,222,254,33,52,139,242,173,19,251,108,103,247,194,188,47,19,142,210,66,181,83,9,104,188,1,240,15,98,120,107,232,91,220,9,77,236,13,106,167,114,153,243, +85,133,88,119,112,49,202,76,138,109,174,245,131,83,210,140,126,118,232,103,138,46,77,8,102,188,1,80,200,252,173,19,90,75,14,225,27,16,180,150,127,52,130,174,141,134,96,112,171,187,160,243,161,25,200,142,226,67,48,237,251,28,246,11,170,29,93,26,84,120, +3,224,95,196,136,118,208,55,159,12,77,156,98,243,129,175,203,33,217,176,165,240,19,236,57,147,165,212,144,199,137,40,140,152,57,112,197,65,165,6,12,102,188,1,80,64,70,118,218,96,42,208,53,0,162,228,30,203,168,13,199,136,246,15,163,101,108,119,185,135, +114,153,227,226,17,152,127,89,205,31,245,43,140,55,0,254,73,140,236,0,67,242,116,136,81,41,106,167,242,187,195,37,187,176,225,215,247,97,182,43,178,42,167,76,0,198,255,243,230,149,91,149,24,44,152,249,222,84,240,0,51,47,119,226,93,32,200,4,16,42,247, +88,77,163,58,96,82,215,127,33,49,92,241,115,131,174,200,81,126,2,181,223,191,11,211,158,229,124,143,126,21,104,27,118,134,54,161,157,87,49,156,149,249,112,150,239,99,148,17,231,10,106,45,129,253,194,102,56,171,143,64,8,109,14,65,23,173,118,74,136,13, +109,130,78,137,131,112,209,116,6,229,230,11,114,15,103,164,192,29,67,167,119,58,145,189,36,255,23,185,7,11,102,188,1,144,9,165,32,33,131,38,190,0,144,215,32,243,97,62,132,8,232,155,52,17,183,183,123,208,39,142,236,149,204,229,48,237,89,138,218,157,255, +133,179,234,156,218,233,4,45,222,0,248,55,201,124,22,246,115,89,144,76,39,33,70,180,5,209,200,126,15,113,77,58,209,128,142,13,250,65,167,49,226,116,69,129,220,155,7,137,0,198,13,189,171,131,51,123,105,129,226,251,22,7,11,254,10,64,6,233,153,169,58,67, +28,249,47,64,239,146,123,172,80,93,36,70,180,127,4,45,98,186,200,61,212,117,81,167,13,150,131,235,97,222,191,6,212,206,39,243,170,141,191,2,8,28,68,212,67,215,120,52,116,73,83,64,68,163,218,233,224,66,117,33,190,60,176,8,149,22,5,206,227,160,248,56,58, +50,250,190,251,123,190,111,151,127,176,224,194,159,0,48,246,106,222,216,40,18,42,174,5,224,221,39,175,11,146,162,83,48,169,235,115,72,8,75,146,123,168,235,160,176,157,220,137,234,188,249,117,107,249,37,135,202,249,112,0,127,2,16,80,168,19,206,202,2,216, +47,100,131,136,70,136,97,45,1,162,222,253,91,152,62,6,29,19,7,160,164,230,148,252,175,4,8,186,90,172,150,62,35,166,183,249,122,227,146,67,22,121,7,11,46,188,1,96,104,222,230,212,102,78,34,230,2,144,117,61,15,33,2,6,181,188,3,183,182,253,7,116,42,223, +13,56,46,30,65,245,150,133,176,28,252,6,212,102,82,53,23,238,114,188,1,8,64,78,51,28,165,187,224,40,253,1,98,104,18,4,21,79,239,212,138,122,116,104,208,15,132,16,156,174,148,125,210,126,178,4,113,228,176,233,237,214,102,47,57,88,37,247,96,193,130,55, +0,140,204,205,155,156,68,8,205,5,32,235,6,251,6,109,24,198,119,122,26,157,18,7,66,205,55,56,212,86,11,211,222,79,80,187,243,125,72,166,82,213,242,224,174,142,55,0,129,139,218,202,96,63,191,25,146,229,60,52,81,29,85,59,112,136,16,130,102,81,29,209,52, +178,3,142,151,237,131,221,105,149,115,184,4,10,97,194,208,233,29,215,229,44,41,40,147,115,160,96,33,168,157,64,32,120,37,111,66,59,66,157,59,0,200,58,253,62,33,172,57,238,238,49,87,229,247,253,20,214,194,173,168,248,242,113,88,14,174,7,20,60,69,140,227, +184,75,81,216,47,228,160,102,231,223,97,59,243,165,170,191,139,205,162,59,226,238,158,243,208,56,178,173,172,227,16,160,57,161,216,254,114,222,164,78,178,14,20,36,248,19,0,47,205,221,58,161,155,32,9,185,0,18,229,28,167,67,131,126,24,159,242,79,132,234, +34,229,28,230,154,28,229,39,80,189,229,63,176,28,202,2,117,200,218,233,115,12,240,39,0,65,66,178,193,81,182,7,142,210,31,33,134,37,67,208,199,169,146,134,94,19,130,142,13,6,160,214,94,129,162,234,227,114,14,21,38,128,78,28,122,119,202,230,236,37,249, +124,215,64,47,240,6,192,11,115,179,39,245,34,192,38,0,178,253,198,17,34,96,96,203,59,48,164,213,221,16,5,89,87,19,94,21,117,88,235,30,247,127,247,46,164,90,5,102,253,114,76,240,6,32,184,80,91,25,236,23,54,129,58,106,32,70,166,128,168,240,121,33,16,1, +173,226,122,34,76,31,141,227,101,251,64,229,59,223,39,20,160,147,111,158,214,113,91,206,210,2,69,207,49,14,36,252,21,128,135,50,178,211,6,19,65,202,5,16,35,215,24,70,109,56,38,117,121,14,189,155,141,145,107,136,235,114,20,31,66,229,186,103,96,41,88,199, +143,232,229,56,95,71,37,216,78,127,137,218,31,30,128,67,197,198,173,107,163,161,152,216,121,22,244,242,238,93,16,37,8,216,56,63,55,117,160,156,131,4,50,222,0,120,96,94,206,196,225,84,160,223,0,8,147,107,140,104,99,34,238,236,254,111,52,143,86,231,85, +87,253,93,127,229,198,231,249,46,126,28,231,103,36,203,5,152,246,205,129,229,215,197,160,14,117,86,231,180,136,233,130,187,123,206,69,108,72,99,57,135,9,151,128,141,25,185,169,163,229,28,36,80,241,6,192,77,243,114,210,70,129,144,47,0,200,182,254,174, +73,100,91,76,235,241,50,98,66,26,201,53,196,53,217,207,253,140,138,175,158,132,249,192,151,0,229,71,116,115,156,127,162,176,157,203,66,205,174,127,192,113,113,167,42,25,68,27,19,49,173,199,43,114,159,77,162,167,192,202,140,188,84,69,142,88,15,36,124, +14,128,27,230,229,165,221,9,208,207,0,232,228,26,163,83,226,64,140,237,244,20,116,26,229,215,247,83,187,25,181,187,62,128,105,247,82,80,123,173,226,227,115,108,241,57,0,28,0,192,105,134,189,120,43,36,107,9,52,81,93,64,4,173,162,195,107,4,45,218,37,220, +4,139,163,22,231,171,142,202,53,140,8,96,252,176,233,29,142,101,47,41,216,47,215,32,129,134,63,1,112,81,70,78,234,52,80,186,4,178,237,235,79,208,191,197,36,140,104,255,176,42,147,253,28,23,143,162,242,155,153,176,30,205,5,228,155,184,195,113,156,74,236, +231,55,161,246,199,7,225,172,56,160,248,216,2,17,49,172,245,189,184,185,213,93,144,113,255,18,13,165,100,105,221,141,26,231,10,254,4,192,5,25,121,105,99,41,240,9,100,250,126,137,130,22,35,219,63,132,238,77,110,147,35,252,181,81,39,204,249,95,163,102, +199,98,80,11,223,96,43,144,240,39,0,220,159,81,71,45,236,69,57,128,211,10,77,84,10,64,148,189,7,108,28,217,6,241,97,205,112,244,226,110,72,242,236,91,64,0,140,25,122,119,167,67,217,75,242,243,229,24,32,144,240,39,0,215,49,47,103,226,112,74,233,10,200, +116,231,111,208,134,97,74,215,231,209,161,65,127,57,194,95,147,84,83,130,202,141,233,48,237,253,4,144,248,12,127,142,11,10,84,130,245,212,74,212,254,244,20,36,211,89,197,135,111,27,127,35,38,118,158,13,189,124,175,57,69,128,46,155,155,151,170,194,29, +149,127,225,13,192,53,188,146,155,214,23,132,172,132,76,239,252,67,117,81,152,210,245,5,217,119,207,186,18,235,209,60,84,172,125,10,142,226,67,138,143,205,113,156,250,156,85,135,81,187,251,81,216,207,111,84,124,236,230,209,157,48,181,251,75,8,215,199, +202,53,132,142,80,172,153,155,55,113,144,92,3,4,2,222,0,92,197,43,185,19,110,20,64,179,0,200,178,144,53,210,144,128,169,221,95,68,66,88,115,57,194,95,21,117,218,80,243,253,187,168,249,238,109,126,100,47,199,5,57,234,52,195,124,232,53,152,11,230,131,58, +149,253,60,136,15,109,138,59,187,191,40,231,50,65,35,161,100,221,188,188,212,126,114,13,224,239,120,3,112,5,115,183,78,232,38,64,216,0,32,92,142,248,9,97,73,152,214,227,101,68,27,101,221,61,248,47,156,85,231,80,185,126,54,172,71,114,20,29,151,227,56, +223,102,47,202,67,237,238,199,32,213,158,80,116,220,8,67,60,166,118,127,17,141,35,101,59,67,45,20,20,95,207,203,157,164,230,1,42,62,139,55,0,127,242,74,246,164,54,196,41,100,1,136,146,35,126,147,168,246,184,163,91,186,226,123,250,219,78,237,66,229,250, +217,112,150,159,82,116,92,142,227,252,131,100,58,131,154,221,143,195,126,126,131,162,227,214,237,120,250,47,36,197,116,150,107,136,104,64,218,252,74,118,106,7,185,6,240,87,188,1,184,196,252,156,73,45,5,65,202,3,208,64,142,248,45,99,123,96,82,151,103, +161,215,132,200,17,254,138,168,211,142,218,31,63,66,245,150,133,160,54,117,118,4,227,56,206,79,72,54,152,15,189,14,243,193,133,160,242,30,237,123,25,173,168,199,196,148,153,104,29,215,75,174,33,226,5,1,155,230,102,79,144,245,196,86,127,195,27,128,223, +188,180,117,114,83,39,145,114,0,200,178,253,94,135,6,125,49,62,229,105,104,4,217,246,16,250,11,201,84,134,170,13,255,170,59,182,151,227,56,206,69,246,11,57,48,237,157,1,201,170,220,225,95,162,160,197,152,142,79,162,77,252,13,114,13,209,152,8,66,118,70, +222,248,38,114,13,224,111,120,3,0,32,125,253,212,8,141,195,249,13,1,100,153,145,215,62,161,15,70,180,127,4,2,81,110,219,5,103,229,89,84,102,205,129,163,180,80,177,49,57,142,11,28,206,154,99,168,221,243,36,164,90,229,94,27,138,130,6,99,59,206,64,167,68, +217,206,247,105,65,169,184,241,213,188,177,178,188,226,245,55,65,223,0,188,183,251,62,173,193,96,91,13,130,20,57,226,183,79,232,139,145,29,30,85,180,248,75,166,82,84,101,191,4,169,182,84,177,49,57,142,11,60,212,90,10,211,207,207,66,178,20,43,54,38,33, +2,110,111,247,32,58,55,28,44,215,16,29,172,84,251,69,122,102,170,114,143,99,125,84,80,55,0,148,130,148,85,149,253,23,192,80,57,226,215,21,127,101,239,252,65,157,168,222,246,26,164,218,139,202,141,201,113,92,192,146,172,23,97,206,127,25,160,14,197,198, +36,68,192,240,118,15,160,71,147,225,114,13,49,200,16,71,222,149,43,184,191,8,234,6,96,254,150,137,207,19,144,187,229,136,157,146,56,8,163,58,60,166,108,241,7,96,206,95,199,55,247,225,56,142,41,103,213,97,88,79,173,82,120,84,130,161,173,167,163,91,227, +91,101,138,79,239,201,200,75,125,86,166,224,126,33,104,27,128,121,121,19,39,83,74,94,144,35,118,231,134,131,49,188,221,131,32,68,182,67,47,174,72,178,84,193,124,96,141,162,99,114,28,23,28,108,39,51,65,109,229,10,143,74,112,75,155,123,209,181,145,44,15, +105,65,41,254,157,145,147,58,77,150,224,126,32,40,27,128,140,236,180,193,160,100,9,100,56,150,42,165,225,96,220,214,246,1,197,139,63,0,88,15,111,226,75,253,56,142,147,5,117,154,97,59,251,141,10,35,19,220,210,230,239,232,208,160,175,44,193,41,193,127, +231,229,164,13,144,35,184,175,11,186,6,32,99,235,164,246,84,160,171,33,195,254,254,173,227,122,225,182,182,247,169,82,252,1,10,203,145,108,21,198,229,56,46,88,216,206,111,128,26,199,133,19,34,96,100,251,71,209,46,225,38,57,194,235,65,232,23,25,185,169, +202,31,202,162,178,160,106,0,22,230,77,137,163,78,233,107,0,209,172,99,39,69,167,96,76,199,39,20,127,231,95,207,81,118,156,207,250,231,56,78,86,212,90,10,103,245,81,85,198,174,111,2,90,198,246,144,35,124,12,5,178,94,206,158,34,203,38,112,190,42,104,26, +128,69,223,165,26,29,212,177,22,64,43,214,177,27,69,180,198,184,148,103,32,10,90,214,161,93,230,40,226,19,255,56,142,147,159,179,34,95,181,177,69,65,131,113,157,102,32,57,166,171,28,225,91,136,162,99,109,250,218,81,202,109,213,170,178,160,104,0,40,5, +177,153,177,20,64,111,214,177,19,194,146,144,214,101,14,116,162,129,117,104,183,56,43,79,171,58,62,199,113,193,193,169,240,129,65,127,38,10,90,140,237,244,148,60,199,168,83,244,50,134,26,62,100,31,216,55,5,69,3,48,111,75,218,63,65,48,145,117,220,104, +99,34,210,186,204,129,94,35,203,137,193,110,145,204,21,106,167,192,113,92,16,160,54,245,63,107,234,207,14,144,227,40,97,10,76,154,151,155,58,131,121,96,31,20,240,13,64,70,238,196,33,132,210,151,89,199,141,208,199,98,114,215,231,17,170,243,141,29,37,169, +195,166,118,10,28,199,5,1,234,244,141,149,70,6,109,24,210,186,204,65,152,158,249,148,46,0,200,152,155,55,113,144,28,129,125,73,64,55,207,250,105,202,0,0,32,0,73,68,65,84,0,47,109,157,220,148,130,124,6,128,233,204,60,189,198,136,137,157,103,33,194,16, +199,50,172,87,136,24,244,187,90,114,28,167,0,34,26,213,78,225,119,17,134,120,164,117,121,78,142,167,176,26,66,201,138,64,63,56,40,96,27,128,197,235,135,235,53,146,115,53,128,120,150,113,5,34,98,108,199,167,16,31,38,203,185,65,30,19,140,190,241,36,130, +227,184,192,70,116,178,220,113,123,44,62,180,41,198,167,60,45,199,36,236,4,74,197,85,139,215,15,215,179,14,236,43,2,182,1,48,235,195,223,4,5,227,195,165,9,134,183,123,0,73,49,157,217,134,101,64,140,100,255,46,140,227,56,238,207,196,208,166,106,167,240, +23,205,162,58,98,68,251,135,229,216,131,229,70,179,49,244,53,214,65,125,69,64,54,0,115,115,83,239,163,132,254,157,117,220,126,45,82,229,60,166,210,43,154,132,118,106,167,192,113,92,16,16,35,59,169,157,194,21,181,79,232,131,97,173,239,101,30,151,82,242, +64,70,94,234,223,152,7,246,1,1,215,0,100,228,164,222,64,128,197,172,227,166,36,14,66,223,164,9,172,195,50,163,137,77,134,96,136,84,59,13,142,227,2,24,209,69,65,12,111,173,118,26,87,213,173,241,173,178,156,32,72,41,222,156,155,155,42,203,14,68,106,10, +168,6,224,149,236,113,177,148,96,5,0,166,239,108,154,69,117,196,173,109,239,131,12,71,7,176,67,4,232,146,251,171,157,5,199,113,1,76,155,48,8,32,190,93,54,134,180,186,27,45,99,187,177,14,107,32,192,154,133,121,83,124,103,230,55,3,190,253,55,233,134,244, +188,65,26,65,208,100,2,72,98,25,55,46,180,9,198,167,60,3,81,208,176,12,43,11,99,251,17,128,31,228,201,113,156,31,34,2,116,77,70,170,157,197,117,17,34,96,100,135,199,16,19,210,144,117,232,102,14,56,62,205,204,76,85,103,191,119,25,4,76,3,160,151,18,158, +3,112,51,203,152,6,77,40,198,167,60,3,189,198,63,118,134,20,66,227,96,104,61,68,237,52,56,142,11,64,186,134,183,65,48,250,199,100,99,131,38,20,19,82,102,194,192,122,121,32,197,176,227,241,152,197,54,168,122,2,162,1,152,155,61,169,23,33,116,14,203,152, +132,16,140,236,240,24,162,141,204,187,72,89,133,116,155,2,33,196,183,150,233,112,28,231,223,136,46,26,250,228,233,106,167,225,150,152,144,70,24,211,241,73,230,7,180,81,138,244,140,188,73,204,183,149,87,131,223,55,0,233,121,169,97,132,72,159,0,96,186, +8,116,96,242,29,114,188,71,146,29,209,133,34,172,255,19,128,74,167,18,114,28,23,96,136,0,99,135,153,32,218,112,181,51,113,91,82,76,103,12,110,53,141,117,88,13,165,210,242,140,29,163,253,239,27,242,39,126,255,194,216,64,201,91,32,148,233,180,212,182,241, +55,226,198,102,163,89,134,84,148,182,65,7,132,245,125,8,53,223,190,9,80,229,207,238,230,56,37,153,173,78,236,253,181,18,59,247,87,224,208,201,26,28,63,103,194,153,34,51,204,54,9,85,53,14,104,68,130,16,163,136,136,80,13,154,39,26,145,220,56,4,41,45,35, +208,167,115,52,218,183,8,131,192,126,237,120,0,33,48,180,121,4,154,232,46,106,39,226,177,158,77,110,71,105,237,89,236,59,183,153,101,216,150,212,166,123,13,128,95,47,15,244,235,6,96,110,94,234,36,80,122,23,203,152,9,97,73,24,209,254,17,248,244,140,127, +23,232,147,7,128,218,45,168,221,245,1,0,222,4,112,129,197,108,117,98,195,247,37,88,149,123,30,217,63,148,192,98,147,174,250,181,54,7,133,173,90,66,69,181,29,167,46,152,177,125,95,217,239,255,95,92,148,14,99,7,38,34,117,72,67,244,238,196,95,157,253,153, +161,213,223,161,107,196,126,89,157,210,134,181,185,23,37,181,39,113,182,242,48,195,168,228,222,140,188,212,172,153,131,87,174,98,24,84,81,126,91,229,50,242,198,55,161,84,252,25,64,12,171,152,70,109,56,238,234,241,10,162,140,13,88,133,84,157,245,72,14, +106,118,190,199,159,4,4,161,144,238,83,97,236,52,214,171,24,214,147,153,176,30,251,136,81,70,222,171,54,57,176,60,235,44,94,251,252,24,46,148,90,153,198,238,152,28,142,71,211,146,144,58,164,17,52,162,223,126,52,50,163,79,190,7,250,230,105,106,167,193, +76,181,181,20,31,255,56,19,38,123,21,203,176,21,112,162,203,172,97,43,79,177,12,170,20,191,124,81,156,153,153,42,150,133,8,95,17,160,61,171,152,132,16,76,72,249,39,18,195,147,89,133,244,9,154,216,100,136,33,49,176,157,221,163,118,42,156,194,180,13,59, +67,235,229,14,145,206,202,124,56,203,247,49,202,200,115,18,165,248,124,243,57,164,206,222,139,181,219,139,80,99,118,50,31,163,164,220,134,117,59,138,177,254,187,98,116,76,14,71,147,4,223,57,244,70,105,129,86,252,1,64,175,9,65,131,176,36,20,20,111,103, +25,214,0,17,93,251,181,72,91,182,101,203,22,191,187,203,242,203,73,128,199,226,200,76,2,48,221,147,183,79,243,137,104,30,157,194,50,164,207,208,183,30,130,176,222,247,3,252,93,39,231,135,126,61,89,131,129,15,124,143,7,230,237,71,105,165,252,199,94,31, +40,172,198,109,143,239,194,140,215,10,96,182,178,111,52,124,93,32,22,255,122,73,49,157,209,55,105,34,219,160,20,131,13,3,14,60,205,54,168,50,252,174,1,168,219,142,145,190,192,50,102,211,168,14,62,189,205,47,11,188,9,224,252,209,178,172,51,24,248,192, +247,248,229,8,211,199,182,215,69,41,240,191,175,79,97,232,35,59,113,244,76,173,162,99,171,41,144,139,127,189,62,205,39,34,153,249,10,47,242,82,70,78,234,13,140,131,202,206,175,26,128,5,27,167,133,18,224,83,0,58,86,49,67,117,145,24,211,241,9,16,31,223, +222,146,5,222,4,112,254,130,82,96,238,146,163,120,100,193,1,85,239,194,15,20,86,99,200,195,59,177,43,191,66,181,28,148,18,12,197,31,248,109,143,151,246,143,32,66,31,203,50,172,150,18,44,93,176,113,26,227,157,135,228,229,87,85,207,161,181,206,7,208,134, +85,188,186,31,132,71,17,170,139,98,21,210,231,241,38,128,243,117,78,137,226,193,140,253,152,183,228,168,218,169,0,0,42,170,237,24,251,204,143,216,178,167,84,237,84,100,19,44,197,191,158,81,27,142,177,157,158,98,189,197,123,91,167,206,250,18,203,128,114, +243,155,42,48,63,55,117,160,4,228,130,97,211,210,55,105,34,250,181,80,232,135,158,82,216,46,28,129,245,228,47,176,21,31,131,84,91,14,201,102,1,209,26,32,134,69,67,27,159,4,125,179,20,232,27,182,5,4,249,251,50,190,58,32,240,249,227,42,128,250,226,191, +98,243,57,197,198,116,149,81,47,226,203,5,61,3,110,185,160,98,197,159,58,97,179,30,134,205,156,15,135,237,20,156,142,50,128,58,64,136,22,130,38,6,90,93,18,116,33,41,208,234,91,66,169,210,244,227,233,117,200,61,186,148,101,72,167,4,169,239,156,155,87, +239,98,25,84,46,126,177,15,64,250,218,81,33,18,240,1,24,22,255,186,247,254,140,39,131,92,129,179,182,28,213,63,124,129,154,189,235,224,172,42,185,238,215,139,161,209,8,237,60,12,225,55,78,132,38,90,190,109,136,245,191,157,25,192,155,0,206,87,56,37,138, +251,231,254,130,149,57,231,213,78,229,138,204,86,39,166,60,183,23,57,111,221,132,228,198,254,113,62,200,245,40,81,252,157,246,243,168,169,248,10,230,170,92,72,206,202,235,126,189,168,137,71,72,228,112,132,70,141,132,32,202,123,196,121,175,166,35,112, +162,124,63,142,149,254,196,42,164,40,80,225,191,233,153,169,61,211,211,86,202,63,99,213,75,126,177,12,240,182,191,119,89,0,130,219,89,197,51,106,195,49,185,235,243,242,30,242,35,57,81,185,227,19,92,204,124,30,150,194,31,65,173,38,151,46,163,118,11,172, +103,242,81,253,195,26,72,53,165,208,55,77,1,209,50,61,221,248,119,124,137,96,96,243,167,101,128,78,137,226,161,140,253,200,204,246,205,226,95,207,108,149,176,227,231,50,220,113,107,99,104,53,126,245,6,245,47,228,46,254,146,179,26,149,37,239,161,162,104, +17,236,230,2,80,234,218,190,13,84,50,193,102,254,25,181,149,223,128,64,128,206,208,78,198,35,136,9,154,71,117,194,129,11,91,225,144,24,213,107,130,6,218,16,98,207,94,146,191,141,77,64,249,248,252,43,128,87,178,83,111,18,4,108,7,195,102,101,76,199,39, +209,46,225,38,86,225,254,194,81,89,132,139,153,47,192,122,38,223,235,88,98,88,12,226,38,190,0,67,139,238,12,50,187,50,254,58,32,48,249,203,43,0,167,68,241,192,188,253,200,204,246,254,177,127,114,114,50,6,12,24,128,78,157,58,161,73,147,38,8,11,11,131, +195,225,64,77,77,13,142,31,63,142,61,123,246,96,219,182,109,40,43,43,187,126,176,107,184,127,92,115,204,127,148,217,54,36,138,147,187,248,91,77,251,80,126,97,30,36,71,185,215,177,116,198,142,136,110,56,7,162,38,142,65,102,87,118,228,226,143,88,179,127, +1,203,144,86,73,66,247,57,67,87,22,176,12,202,154,79,55,0,139,215,15,215,155,12,97,251,0,120,119,27,115,137,142,13,250,99,100,135,71,89,133,251,11,123,241,113,20,45,123,202,165,199,253,46,19,4,196,142,122,6,97,221,229,59,139,155,55,1,129,199,31,26,0, +22,239,252,245,122,61,238,188,243,78,60,244,208,67,232,222,253,250,141,178,205,102,67,86,86,22,22,45,90,132,109,219,60,187,73,19,8,65,206,219,189,209,189,173,188,143,168,229,32,119,241,55,85,102,161,162,104,49,128,171,111,207,236,46,81,147,128,216,38, +47,67,163,107,198,44,230,159,109,56,244,30,126,62,159,195,50,228,14,203,182,142,3,211,211,211,217,125,35,24,243,233,103,88,102,99,232,44,48,44,254,225,250,24,12,109,115,47,171,112,127,225,168,44,70,209,210,25,108,139,63,0,72,18,74,191,158,143,234,93, +171,217,198,189,4,95,29,192,41,141,69,241,191,245,214,91,145,159,159,143,15,62,248,192,165,226,15,0,58,157,14,99,198,140,193,214,173,91,241,197,23,95,160,81,163,70,110,143,43,81,138,167,94,43,240,187,126,89,238,226,95,91,241,21,42,138,94,7,203,226,15, +0,78,71,49,74,207,204,134,211,193,248,179,245,18,67,90,79,71,76,136,251,63,11,215,208,207,208,63,255,126,150,1,89,243,217,6,96,254,214,9,173,41,37,179,88,197,35,132,96,68,251,71,96,208,200,179,76,147,58,108,40,249,116,22,156,213,23,101,137,15,74,81,150, +245,58,111,2,184,128,80,255,206,223,211,226,47,8,2,230,207,159,143,172,172,44,180,108,217,210,227,60,198,142,29,139,125,251,246,97,224,64,247,55,22,221,251,107,37,214,127,87,236,241,216,74,83,162,248,87,22,191,3,185,14,31,115,58,46,162,236,236,11,160, +84,158,185,117,90,81,143,81,29,30,131,192,242,40,117,130,121,47,109,157,220,148,93,64,182,124,178,1,160,20,68,114,10,239,2,48,176,138,217,163,201,237,104,30,221,137,85,184,191,40,91,255,42,108,23,142,200,22,31,192,31,77,192,78,249,14,159,226,77,0,39, +183,250,226,255,185,135,197,95,167,211,225,243,207,63,199,51,207,60,3,194,224,231,52,62,62,30,27,55,110,196,232,209,238,31,1,254,234,103,199,188,30,95,9,178,23,255,202,111,100,45,254,245,236,214,66,84,22,191,45,91,252,196,240,100,214,171,195,34,52,146, +243,45,150,1,89,242,201,6,32,35,111,226,52,0,55,179,138,23,27,210,24,3,147,167,176,10,247,23,181,251,179,81,179,103,157,108,241,47,67,41,202,54,44,230,77,0,231,151,156,18,197,195,243,15,120,85,252,87,172,88,129,212,212,84,166,121,233,245,122,172,88,177, +2,3,6,12,112,235,186,31,11,42,240,211,175,215,95,218,166,38,69,138,127,209,27,80,234,216,113,83,101,22,76,85,155,101,139,223,187,249,88,182,135,194,81,140,154,151,155,230,147,187,44,249,92,3,48,119,251,29,209,0,89,200,42,158,64,68,140,236,240,8,52,2, +179,221,131,47,99,47,62,142,210,175,51,100,137,125,85,191,55,1,43,101,27,130,55,1,28,107,18,173,43,254,159,109,58,235,209,245,90,173,22,43,86,172,192,216,177,222,77,108,188,26,131,193,128,204,204,76,36,38,38,186,117,221,170,92,223,93,186,24,104,197,191, +94,101,209,27,176,91,229,121,250,34,16,17,183,181,187,159,237,171,0,208,197,175,230,141,245,185,45,103,125,174,1,32,118,219,191,1,196,179,138,215,171,233,8,36,134,123,254,142,240,90,168,205,140,146,204,231,65,109,22,89,226,95,123,112,138,178,13,111,240, +38,128,243,11,190,94,252,235,53,104,208,0,175,191,254,186,91,215,172,217,114,65,166,108,188,19,168,197,31,0,40,181,162,252,252,203,160,146,107,251,171,184,171,65,88,11,220,216,204,253,87,66,215,10,105,133,142,233,33,118,44,248,84,3,240,114,222,164,78, +0,97,54,107,50,210,144,128,190,73,108,31,21,94,170,116,221,127,96,47,57,33,91,252,235,226,77,0,231,7,36,74,241,200,130,3,248,116,163,119,197,127,220,184,113,140,51,187,178,180,180,52,220,120,227,141,46,127,253,185,18,11,10,207,200,83,136,60,21,200,197, +191,158,195,118,6,21,69,175,201,22,191,111,210,68,196,133,50,156,191,71,233,35,11,178,39,116,102,23,208,123,62,211,0,80,10,34,80,233,77,48,219,158,152,224,182,118,247,67,43,202,179,139,94,205,158,117,168,253,121,163,44,177,221,242,123,19,192,231,4,112, +190,167,190,248,127,178,193,243,226,255,249,231,159,43,86,252,235,205,152,49,195,173,175,255,110,191,119,27,11,177,164,200,108,127,149,139,127,61,115,245,86,152,42,179,100,137,45,10,90,12,111,247,0,203,147,98,53,14,81,120,147,82,223,217,127,199,103,26, +128,140,45,105,83,9,224,254,90,156,171,232,220,112,48,146,162,83,88,133,187,140,163,236,44,202,55,190,33,75,108,143,240,57,1,156,15,146,40,197,163,12,138,255,248,241,227,25,103,118,125,163,70,141,66,88,88,152,203,95,255,203,145,42,25,179,113,93,160,204, +246,119,71,101,201,187,112,216,206,200,18,187,81,68,107,244,108,194,108,23,122,16,138,254,25,121,105,242,61,150,118,147,79,52,0,25,59,70,135,131,82,102,51,233,194,116,209,24,220,106,26,171,112,151,147,156,184,184,250,69,72,46,238,237,175,24,254,58,128, +243,33,148,2,51,94,43,192,114,15,139,191,40,138,88,186,116,169,42,197,31,0,140,70,35,250,246,237,235,242,215,159,56,111,150,49,27,215,4,195,99,255,43,161,146,5,229,23,230,129,82,135,44,241,251,183,152,132,40,99,3,102,241,8,232,194,244,181,163,124,226, +52,41,159,104,0,36,171,126,38,0,102,91,48,13,109,115,175,108,27,254,84,228,125,8,235,25,31,221,222,153,55,1,156,15,144,40,197,163,11,15,224,163,181,167,61,186,190,254,157,255,228,201,147,25,103,230,158,30,61,122,184,252,181,39,206,171,123,67,32,255,246, +190,235,125,178,248,215,179,91,142,160,166,244,19,89,98,107,69,61,110,105,243,119,102,241,40,208,212,24,166,127,134,89,64,47,168,222,0,100,228,141,111,66,8,158,100,21,175,117,92,47,180,141,119,125,2,143,59,172,167,246,163,114,199,114,89,98,51,195,155, +0,78,69,18,165,120,108,97,62,150,101,121,246,72,86,171,213,226,211,79,63,197,132,9,19,24,103,230,190,22,45,90,184,252,181,85,181,242,220,125,186,66,137,226,95,183,183,191,111,22,255,122,213,101,159,193,102,254,69,150,216,45,98,186,160,13,195,186,66,41, +121,38,99,211,100,166,251,14,123,66,245,6,64,162,226,43,0,152,60,14,209,8,58,12,105,125,55,139,80,127,65,109,102,92,252,226,21,64,242,217,115,29,254,192,155,0,78,5,148,2,79,189,86,224,113,241,23,69,17,75,150,44,193,196,137,76,119,98,243,88,68,68,132, +203,95,91,107,118,202,152,201,213,241,226,127,41,138,242,243,243,33,57,107,100,137,62,164,245,116,232,68,102,155,211,134,82,141,227,223,172,130,121,74,213,6,96,126,94,106,87,2,76,101,21,175,119,243,177,136,52,36,176,10,119,153,178,245,175,194,81,38,207, +68,19,89,240,38,128,83,144,68,41,30,251,207,1,124,232,225,99,127,141,70,131,207,62,251,12,83,166,200,183,99,167,187,52,26,215,23,36,57,156,202,23,72,101,14,246,241,151,226,95,199,233,40,65,85,201,187,178,196,142,208,199,226,166,230,44,87,163,144,233, +115,115,83,93,127,207,36,3,85,27,0,137,98,33,171,28,34,12,113,184,161,233,40,22,161,254,194,124,100,39,106,126,146,103,169,137,172,40,69,89,214,98,84,237,144,231,221,24,192,155,0,174,174,248,63,177,40,31,75,215,123,214,32,107,52,26,124,250,233,167,204, +183,247,245,86,109,109,173,203,95,27,106,100,185,107,220,245,41,242,206,223,199,102,251,187,202,84,181,25,150,154,239,101,137,221,171,233,40,196,134,52,102,21,78,32,4,11,88,5,243,40,1,181,6,158,151,51,113,56,128,33,172,226,13,109,125,143,44,107,254,37, +107,45,202,214,170,250,119,228,181,242,205,239,242,38,128,147,69,125,241,95,242,141,231,197,255,147,79,62,241,185,226,15,0,103,206,184,254,223,164,100,3,192,31,251,95,95,101,241,27,144,36,246,175,2,68,65,195,246,72,121,138,193,115,243,82,111,99,23,208, +61,234,61,1,32,36,157,85,168,164,152,206,104,29,215,139,85,184,203,148,111,122,27,142,74,255,57,242,243,106,120,19,192,177,70,41,240,196,162,2,175,139,127,154,111,158,147,130,130,2,215,87,251,52,142,99,246,110,248,154,120,241,119,141,211,81,138,170,146, +255,201,18,59,41,58,5,237,18,110,98,23,144,34,35,61,61,93,149,90,172,202,160,25,121,105,99,1,220,192,34,150,40,104,48,172,53,195,142,236,18,150,227,123,81,179,103,173,44,177,213,192,155,0,142,21,74,129,39,94,205,199,146,111,60,127,231,191,124,249,114, +159,45,254,0,176,125,251,118,151,191,182,69,99,249,151,117,243,226,239,30,83,101,22,172,166,61,178,196,190,185,213,93,204,158,56,19,160,179,97,64,129,42,51,95,21,111,0,40,5,161,148,166,179,138,215,171,201,8,196,132,176,95,77,65,237,22,148,126,61,191, +238,147,46,128,240,38,128,243,86,125,241,255,120,157,119,197,127,210,164,73,140,51,99,103,247,238,221,56,121,242,164,203,95,223,166,153,235,187,6,122,130,23,127,79,80,84,20,189,14,42,177,223,164,41,92,31,139,94,77,71,178,11,72,233,75,233,121,131,24,109, +131,239,58,197,27,128,121,91,82,211,0,116,97,17,43,68,27,129,222,205,229,217,41,172,60,251,61,56,202,60,219,197,204,215,149,103,191,199,87,7,112,30,161,20,120,122,113,129,199,197,95,20,69,124,252,241,199,62,93,252,1,224,237,183,223,118,235,235,111,74, +137,150,41,19,37,102,251,127,29,128,197,191,142,211,94,132,170,139,31,203,18,251,198,102,99,16,166,99,244,247,78,208,90,143,184,233,108,130,185,78,209,6,32,51,51,85,36,18,152,29,137,216,55,105,34,244,26,35,171,112,191,179,157,63,140,234,31,214,48,143, +235,51,248,234,0,206,3,148,2,79,190,150,143,15,190,58,229,209,245,162,40,98,249,242,229,152,58,149,217,202,95,89,28,62,124,24,203,151,187,190,225,151,81,47,162,91,91,215,247,12,112,135,50,179,253,223,70,32,22,255,122,181,21,95,193,102,249,149,121,92, +157,104,64,223,22,236,158,220,11,148,60,191,120,253,112,121,78,175,187,218,152,74,14,118,60,22,119,128,160,61,139,88,81,198,6,232,210,104,40,139,80,151,163,18,202,214,45,242,143,13,127,188,196,95,7,112,174,170,219,219,63,223,227,237,125,69,81,196,178, +101,203,84,223,222,247,122,36,73,194,131,15,62,8,187,221,238,242,53,67,111,136,131,78,195,254,163,148,63,246,103,133,162,178,248,77,0,236,63,211,187,52,28,130,120,70,71,6,83,160,169,217,16,250,55,38,193,92,164,88,3,144,153,153,42,82,130,103,89,197,27, +212,114,42,68,129,253,43,147,234,61,107,97,61,147,207,60,174,175,42,223,252,46,42,183,203,183,189,49,111,2,252,31,165,192,83,175,23,120,188,201,79,125,241,247,165,77,126,174,230,229,151,95,70,110,110,174,91,215,164,222,220,144,121,30,188,248,179,101, +183,28,70,109,5,251,189,92,8,17,48,176,37,203,39,90,100,150,146,79,1,20,107,0,10,227,233,61,0,218,178,136,213,48,162,149,44,251,253,75,166,74,84,228,252,151,121,92,95,87,145,253,30,111,2,184,43,162,148,226,169,215,11,240,191,175,61,127,236,191,116,233, +82,191,40,254,75,151,46,197,11,47,184,247,134,50,62,74,135,91,111,98,187,251,40,47,254,242,168,46,253,16,146,179,130,121,220,150,177,221,145,20,211,153,73,44,10,52,53,233,195,228,89,214,118,5,138,52,0,239,237,190,79,75,40,153,195,42,222,160,228,169,0, +216,23,147,242,205,239,64,50,85,50,143,235,15,120,19,192,253,25,165,20,51,210,63,246,170,248,127,252,241,199,184,227,142,59,24,103,198,222,202,149,43,241,183,191,253,13,212,205,85,63,15,78,72,130,65,199,238,99,148,23,127,249,72,206,26,217,246,6,24,220, +114,26,8,163,207,54,66,48,91,169,167,0,138,52,0,21,85,101,255,0,224,250,209,90,215,208,42,174,39,154,69,119,100,17,234,50,214,179,7,253,115,187,95,134,120,19,192,213,163,148,226,145,71,30,193,59,75,54,120,116,125,253,193,62,119,222,121,39,227,204,216, +251,252,243,207,49,101,202,20,56,28,238,157,232,23,21,174,197,223,199,176,121,255,11,240,226,175,4,83,213,102,88,77,236,79,12,76,8,107,142,118,241,125,152,196,162,64,211,90,125,248,61,76,130,93,135,236,13,64,122,102,170,14,32,179,88,196,34,68,192,192, +100,25,238,38,168,132,178,181,11,1,26,248,19,255,174,167,34,231,125,84,125,159,41,91,124,222,4,248,62,74,41,30,123,236,49,183,151,194,213,19,69,17,31,125,244,145,207,207,246,7,234,238,252,167,77,155,6,167,211,253,211,252,158,255,91,107,68,134,105,153, +228,193,151,250,41,133,162,170,228,29,200,49,33,176,111,139,137,32,132,81,73,37,116,214,123,187,239,99,243,195,117,13,178,55,0,198,88,58,149,2,76,218,228,246,9,125,16,23,218,132,69,168,203,212,236,219,0,219,249,195,204,227,250,37,74,81,190,225,13,254, +36,32,72,81,74,241,232,163,143,226,205,55,223,244,232,250,250,199,254,211,166,77,99,156,25,123,43,86,172,192,29,119,220,225,246,157,63,0,116,107,27,137,233,35,217,220,253,243,165,126,202,178,91,143,193,84,185,137,121,220,216,144,198,232,144,208,151,73, +44,2,52,47,175,174,144,125,179,12,89,27,0,74,65,40,33,79,177,136,69,8,65,111,166,71,49,214,161,118,43,42,243,228,121,47,228,207,248,235,128,224,67,41,197,227,143,63,142,183,222,122,203,163,235,69,81,196,135,31,126,232,23,143,253,87,173,90,133,59,239, +188,211,163,226,31,106,20,241,254,236,206,16,5,239,127,118,249,99,127,117,84,93,252,24,84,50,49,143,219,183,69,42,4,194,232,96,40,137,206,145,251,140,0,89,131,207,223,146,54,6,0,147,23,246,237,19,250,48,91,111,121,169,202,29,159,4,196,97,63,114,224,77, +64,240,168,127,236,255,198,27,111,120,116,125,253,99,255,187,238,186,139,113,102,236,101,102,102,122,244,206,191,222,235,51,58,161,77,179,80,175,243,224,197,95,61,146,179,28,53,229,171,152,199,141,54,38,162,67,131,126,108,130,17,180,15,25,120,224,118, +54,193,174,76,230,39,0,244,25,22,113,234,238,254,217,111,249,235,172,42,65,213,119,159,49,143,27,72,120,19,16,248,234,239,252,61,125,236,47,8,2,62,252,240,67,191,120,236,191,106,213,42,76,157,58,213,227,226,63,103,122,43,164,14,241,126,221,63,47,254, +234,171,41,91,5,167,131,253,205,95,223,164,137,204,158,2,72,148,204,100,18,232,42,100,107,0,230,229,164,13,0,192,100,90,100,187,248,155,100,185,251,175,200,249,47,168,205,194,60,110,160,225,77,192,213,85,153,237,152,254,198,247,56,94,196,254,236,113, +37,80,74,241,196,19,79,120,124,231,47,8,130,223,220,249,175,92,185,210,171,59,255,191,143,105,134,153,119,181,242,58,15,94,252,125,3,165,86,89,206,9,136,50,54,64,167,196,129,172,194,245,123,37,55,141,205,196,130,43,144,239,9,0,161,51,152,132,33,4,125, +146,38,176,8,117,25,219,249,35,168,249,121,35,243,184,129,170,34,251,61,190,58,224,79,170,204,118,164,45,216,142,117,187,207,98,196,203,91,112,248,92,149,218,41,185,165,190,248,47,94,188,216,163,235,235,239,252,253,161,248,175,94,189,218,171,59,255,105, +195,155,96,193,99,222,239,98,206,103,251,251,22,115,85,46,236,22,246,19,192,251,36,77,96,246,20,64,0,155,90,122,229,216,50,88,176,53,181,5,0,38,103,37,182,141,239,141,56,89,238,254,223,231,203,254,220,196,87,7,252,161,190,248,239,46,44,3,0,20,87,90,48, +118,222,54,191,105,2,88,21,255,187,239,190,155,113,102,236,173,94,189,26,83,166,76,113,107,127,255,75,77,27,222,4,139,159,238,8,193,203,159,75,62,219,223,23,81,84,149,46,97,30,53,210,16,207,110,46,0,48,102,110,246,132,100,86,193,46,37,75,3,224,116,224, +113,0,12,218,31,130,62,50,188,251,183,158,62,0,243,145,157,204,227,6,3,254,58,224,175,197,191,158,63,53,1,179,103,207,230,197,223,5,254,84,252,249,157,191,103,172,181,187,101,217,28,232,134,102,163,193,104,199,90,145,8,194,195,44,2,253,25,243,6,32,99, +199,232,112,16,48,217,197,40,57,182,43,226,195,154,179,8,117,153,96,220,239,159,165,96,110,2,174,86,252,235,249,67,19,48,107,214,44,100,100,100,120,116,45,33,4,111,191,253,182,95,20,255,53,107,214,240,226,207,185,164,186,244,99,230,49,227,67,155,162, +101,108,55,86,225,254,145,190,126,42,243,51,167,153,55,0,212,166,255,7,0,38,137,222,208,116,20,139,48,151,177,28,219,13,203,241,189,204,227,6,155,96,108,2,174,87,252,235,249,114,19,224,109,241,127,231,157,119,112,255,253,247,51,206,138,189,53,107,214, +96,242,228,201,188,248,115,46,177,153,243,97,173,221,205,60,238,141,205,70,179,10,21,110,52,216,167,179,10,86,143,105,3,240,219,166,5,76,30,85,52,8,107,129,230,209,157,88,132,186,76,69,46,223,244,135,149,96,106,2,92,45,254,245,124,177,9,152,61,123,182, +215,119,254,193,80,252,239,188,173,49,47,254,65,168,170,244,99,176,254,94,54,141,234,128,70,17,173,153,196,162,160,143,178,222,24,136,105,48,221,128,130,219,0,48,153,172,112,67,51,246,119,255,230,195,223,193,122,250,0,243,184,193,44,24,154,0,119,139, +127,61,95,106,2,102,207,158,141,121,243,230,121,116,109,125,241,127,224,129,7,24,103,197,30,139,226,255,198,51,157,120,241,15,66,118,203,17,88,106,190,99,30,151,225,83,128,86,250,254,7,134,178,10,6,48,110,0,8,165,15,178,136,19,174,143,69,187,132,155, +88,132,186,12,191,251,151,71,32,47,17,244,180,248,215,43,174,180,96,194,252,237,170,238,19,240,212,83,79,121,92,252,5,65,192,7,31,124,224,23,197,255,139,47,190,8,138,226,207,151,250,201,167,186,116,25,88,127,95,91,199,221,128,216,144,198,76,98,17,16, +38,53,182,30,179,6,96,97,206,248,230,132,96,56,139,88,189,154,142,96,183,159,242,111,204,71,119,241,3,127,100,84,183,68,112,153,108,241,213,104,2,188,45,254,245,206,151,155,85,219,39,96,206,156,57,88,180,104,145,71,215,18,66,240,214,91,111,225,222,123, +239,101,156,21,123,223,124,243,141,87,19,254,166,250,73,241,231,75,253,228,101,183,30,135,165,118,23,211,152,132,16,244,108,58,130,81,48,140,204,200,27,207,236,68,60,102,13,128,131,8,247,129,193,210,63,189,198,136,206,13,111,102,144,209,229,170,182,201, +87,156,184,58,21,217,239,7,76,19,192,170,248,215,83,227,117,192,11,175,47,199,220,185,115,61,186,182,190,248,251,195,157,255,250,245,235,49,97,194,4,88,173,86,143,174,159,122,91,99,188,233,39,197,159,223,249,203,175,166,148,253,246,240,157,18,7,192,160, +13,99,17,74,35,73,154,191,179,8,4,48,106,0,210,51,83,117,0,97,114,155,208,165,209,80,232,53,33,44,66,253,206,122,38,31,150,147,63,51,141,201,93,89,32,52,1,172,139,127,61,37,155,128,151,86,30,192,130,15,86,123,116,109,125,241,127,240,65,166,79,27,101, +177,126,253,122,140,31,63,222,227,226,63,225,230,134,120,227,105,94,252,185,63,216,44,135,152,239,11,160,17,116,72,73,28,196,36,22,33,244,31,233,121,131,52,44,98,49,105,0,244,177,116,12,128,68,239,35,17,116,109,52,204,251,48,127,82,185,149,253,78,79, +220,213,249,115,19,32,87,241,175,167,68,19,240,242,170,3,120,109,221,33,143,174,13,182,226,255,223,57,222,31,235,203,139,127,224,169,41,251,156,121,204,110,141,111,1,97,243,153,213,200,136,4,38,59,237,50,105,0,136,64,152,108,252,211,34,166,51,162,141, +12,250,136,75,216,138,10,249,174,127,42,240,199,38,64,238,226,95,79,206,38,224,229,85,7,240,234,90,207,139,255,155,111,190,233,23,197,63,43,43,139,23,127,78,54,86,211,30,230,103,4,68,27,19,209,34,186,11,147,88,18,165,76,106,174,215,13,192,75,57,169,141, +65,113,11,139,100,186,53,102,18,230,50,85,219,151,1,148,255,242,168,193,159,154,128,106,133,138,127,61,57,154,0,22,197,255,161,135,30,98,150,143,92,178,178,178,48,110,220,56,175,138,255,251,179,121,241,231,174,173,186,108,5,243,152,221,155,220,202,36, +14,1,110,127,121,219,120,175,207,165,246,186,1,208,16,114,55,24,76,254,11,211,71,163,101,108,119,111,195,92,198,81,113,1,181,249,121,76,99,114,238,169,200,126,31,85,223,177,255,69,170,199,162,9,168,50,219,145,170,96,241,175,199,114,137,224,139,153,251, +189,42,254,239,190,251,174,95,20,255,181,107,215,98,236,216,177,30,23,255,201,195,26,225,191,115,58,67,35,250,118,241,231,75,253,212,103,169,249,22,14,219,89,166,49,147,99,186,35,202,216,128,69,40,141,104,215,76,245,54,8,131,87,0,116,154,247,49,128,174, +141,134,49,95,250,87,189,107,53,32,241,19,255,212,86,190,241,77,159,125,18,224,237,157,127,116,116,52,214,175,95,143,148,148,20,143,174,103,177,68,240,149,213,249,88,252,205,175,30,93,91,127,231,127,223,125,247,121,60,190,82,178,178,178,144,154,154,10, +155,205,230,209,245,227,7,55,196,91,255,76,241,139,59,127,190,212,207,23,80,212,86,124,197,52,34,33,12,231,185,17,234,245,106,0,175,26,128,121,121,169,253,0,180,243,58,9,34,162,75,195,33,222,134,185,12,181,91,80,243,211,122,166,49,57,207,249,226,235, +128,106,47,239,252,163,163,163,177,105,211,38,12,31,62,28,57,57,57,30,55,1,222,188,14,120,101,117,62,22,125,125,208,163,113,253,233,177,255,134,13,27,188,122,231,63,126,112,67,191,184,243,231,143,253,125,139,169,106,19,36,169,150,105,204,206,13,7,67, +35,104,89,132,106,155,145,55,169,183,55,1,188,123,2,64,233,93,94,93,255,155,214,113,61,17,166,143,102,17,234,119,53,63,101,65,50,171,191,5,43,247,7,95,106,2,88,21,255,158,61,123,2,0,226,227,227,21,111,2,230,122,89,252,223,120,227,13,191,41,254,227,198, +141,131,197,98,241,232,250,113,131,18,121,241,231,60,66,37,51,204,149,155,152,198,52,106,195,209,58,238,6,38,177,36,234,221,19,120,143,27,128,223,214,254,79,244,102,240,122,93,26,49,221,222,24,160,20,213,63,120,182,6,154,147,151,47,52,1,172,139,127,61, +37,155,128,185,171,243,241,31,47,139,255,195,15,203,114,196,56,83,44,138,255,7,207,118,225,197,159,243,88,77,197,23,0,216,190,74,78,105,56,136,73,28,2,154,246,222,238,251,60,126,156,224,113,3,96,140,39,183,3,240,250,182,61,92,31,131,164,104,207,62,48, +175,198,92,248,35,236,37,39,153,198,228,216,81,179,9,144,171,248,215,83,162,9,224,197,223,53,254,83,252,179,120,241,247,97,78,123,17,44,53,108,183,7,78,138,238,140,8,125,44,139,80,113,165,85,21,30,79,42,240,230,21,192,29,94,92,251,187,142,137,3,64,8, +211,51,137,80,189,115,21,211,120,28,123,106,52,1,114,23,255,122,114,54,1,222,22,255,197,139,23,243,226,239,6,101,138,255,235,224,197,223,183,213,86,124,193,52,30,33,4,29,18,7,176,137,229,69,45,246,168,242,102,236,24,29,78,41,101,178,19,81,135,6,253,89, +132,249,157,163,252,60,204,71,217,118,107,156,60,148,108,2,148,42,254,245,228,104,2,230,173,241,190,248,63,242,200,35,30,93,175,164,141,27,55,242,226,207,249,20,171,233,103,56,108,167,152,198,172,219,26,216,251,61,76,8,232,216,244,188,84,143,14,26,240, +108,63,97,187,97,60,64,141,30,93,123,137,196,240,100,196,135,54,245,54,204,101,106,246,174,3,40,95,250,231,47,42,178,223,7,0,68,246,103,178,154,244,47,244,173,135,160,170,198,132,212,180,123,60,46,254,177,177,177,200,206,206,70,215,174,93,221,186,46, +62,62,30,217,217,217,184,249,230,155,145,159,159,239,246,184,245,251,4,124,61,123,32,62,223,113,50,40,30,251,179,216,228,199,63,118,248,147,167,248,59,28,20,191,28,168,194,143,123,203,113,248,104,45,78,158,54,225,220,5,43,170,170,236,176,90,37,136,26, +2,189,78,64,68,184,6,77,155,24,209,188,105,8,58,182,15,199,141,61,163,209,186,101,40,211,92,2,141,169,114,3,34,226,217,45,151,141,9,105,136,198,145,109,112,182,210,179,37,188,151,8,53,80,140,6,240,169,187,23,122,212,0,80,208,73,158,92,247,103,157,18, +7,178,8,243,7,201,137,154,125,89,108,99,114,178,147,179,9,168,170,170,194,232,135,94,193,238,163,165,30,93,239,105,241,175,151,144,144,128,220,220,92,143,155,128,243,229,102,12,126,62,27,53,22,135,71,227,251,83,241,247,118,169,159,255,236,240,199,182, +248,219,237,18,182,108,47,197,23,235,206,99,115,110,9,76,102,231,53,191,190,26,192,197,82,27,142,157,48,1,248,227,247,34,33,94,143,81,195,27,96,220,200,134,232,214,37,146,73,110,129,196,84,181,25,225,113,247,128,16,38,75,248,0,212,213,64,6,13,0,0,164, +193,131,6,192,237,223,148,121,155,83,35,33,162,8,242,17,191,124,0,0,32,0,73,68,65,84,128,222,221,107,47,37,16,17,15,247,125,15,33,218,8,111,194,92,198,252,235,14,20,127,58,155,89,60,78,89,81,67,239,99,218,4,84,85,85,225,214,91,111,197,206,157,158,157, +5,17,21,21,133,205,155,55,187,252,216,255,90,74,74,74,48,100,200,16,236,223,191,223,235,88,174,34,132,224,245,215,95,199,163,143,62,170,216,152,158,218,180,105,19,198,140,25,227,241,99,255,177,3,19,241,191,231,130,235,177,127,173,201,137,207,86,157,197, +123,31,158,192,185,243,158,125,223,174,166,99,251,112,220,55,189,57,198,141,106,8,209,203,239,105,32,137,110,248,44,140,225,108,222,221,3,128,213,97,194,91,223,221,15,187,211,179,166,247,18,22,11,65,124,250,224,149,110,109,43,234,254,28,0,13,25,5,47, +139,63,0,180,140,237,206,180,248,3,64,245,238,181,76,227,113,202,170,200,126,31,149,219,216,204,9,240,165,226,15,120,63,39,192,93,193,84,252,199,4,89,241,167,20,88,245,229,57,244,25,186,29,47,188,124,136,121,241,7,128,252,131,213,120,124,230,1,12,159, +176,19,187,127,170,96,30,223,95,153,42,217,110,46,167,215,132,176,218,2,223,160,7,70,184,123,145,7,147,0,233,120,247,175,249,171,142,137,108,39,255,57,171,75,249,228,191,0,80,145,227,125,19,224,109,241,143,141,141,69,94,94,30,179,226,95,175,126,78,64, +199,142,29,153,198,253,51,127,42,254,27,55,110,244,170,248,143,27,148,136,15,131,168,248,159,60,109,198,152,41,63,224,241,153,7,112,177,212,179,45,145,221,145,127,176,26,227,238,248,17,207,190,120,16,86,43,159,91,101,53,237,131,195,126,158,105,204,182, +241,94,109,230,247,59,1,100,130,251,215,184,33,125,237,168,16,80,120,125,156,145,86,212,35,57,166,155,183,97,46,83,179,119,29,32,93,251,221,23,231,31,188,105,2,88,20,127,111,222,249,95,79,253,156,0,185,154,0,66,8,94,123,237,53,191,41,254,99,199,142,229, +179,253,93,244,245,250,11,184,117,236,247,216,163,240,29,185,36,81,124,252,201,105,140,154,180,11,199,79,154,20,29,219,247,80,152,43,55,50,141,216,50,182,59,116,162,193,235,56,148,210,17,11,54,78,115,107,38,167,91,13,128,49,204,112,59,128,16,183,178, +186,130,228,152,110,208,138,94,191,69,184,76,237,207,108,255,82,56,117,121,210,4,248,122,241,175,39,87,19,80,95,252,31,123,236,49,166,113,229,176,105,211,38,175,138,255,216,129,193,85,252,95,123,251,24,30,154,241,11,170,107,60,155,12,202,66,254,193,106, +140,74,219,133,189,251,42,85,203,193,23,152,170,54,131,229,234,13,173,168,71,114,44,147,27,226,16,135,198,114,139,59,23,184,213,0,72,148,140,117,47,159,43,107,155,192,230,145,71,61,235,153,2,216,75,79,51,141,201,169,207,157,38,160,182,182,22,183,223, +126,187,207,23,255,122,172,155,0,66,8,94,125,245,85,191,40,254,155,55,111,246,186,248,7,203,59,127,73,162,152,243,127,7,177,224,245,163,160,62,176,93,64,121,133,29,147,166,239,198,246,239,60,91,85,19,8,156,142,139,176,153,217,78,230,109,151,208,135,77, +32,66,199,184,243,229,46,55,0,153,153,169,34,1,189,205,253,140,46,167,17,180,104,201,166,219,249,93,237,254,205,76,227,113,190,195,149,38,192,108,54,99,244,232,209,248,246,219,111,61,26,35,42,42,10,27,54,108,80,172,248,215,75,72,72,64,94,94,30,147,137, +129,115,231,206,197,227,143,63,206,32,43,121,109,222,188,25,99,198,140,129,217,108,246,232,250,209,3,26,4,205,157,63,165,192,115,255,62,132,37,159,250,214,205,141,201,236,196,61,15,237,195,143,123,131,119,114,160,169,42,151,105,188,186,215,0,94,111,173, +3,2,114,123,102,102,170,232,234,215,187,220,0,28,139,37,125,1,120,189,121,113,139,152,174,76,254,67,127,39,73,48,29,96,251,151,193,249,150,107,53,1,86,171,21,227,199,143,71,110,174,103,63,3,114,77,248,115,21,139,137,129,175,190,250,42,102,206,156,201, +48,43,121,176,40,254,31,62,215,21,90,77,224,23,127,73,162,248,231,191,242,125,174,248,215,51,155,157,184,231,193,159,130,118,78,128,165,102,59,40,181,51,139,87,119,99,204,100,53,64,252,209,24,184,124,212,160,203,13,0,33,108,182,254,101,253,248,223,124, +124,55,156,53,158,237,240,198,249,143,43,53,1,78,167,19,119,220,113,7,54,108,216,224,81,76,165,31,251,95,141,55,175,3,22,45,90,132,39,158,120,66,134,172,216,202,206,206,230,197,223,69,146,68,49,243,249,2,124,186,242,44,187,196,100,80,94,97,199,125,143, +253,28,148,171,3,36,103,13,172,181,187,153,198,108,199,168,54,18,226,250,114,64,151,119,2,164,20,35,189,221,182,88,20,52,104,197,166,203,249,157,233,151,108,166,241,56,223,85,145,243,219,142,129,3,234,54,11,122,252,241,199,177,102,205,26,143,98,249,74, +241,175,231,201,142,129,139,22,45,194,147,79,62,41,115,102,222,203,206,206,198,232,209,163,61,46,254,163,250,7,87,241,255,231,191,10,240,217,42,239,139,127,227,198,141,49,112,224,64,116,234,212,9,205,155,55,135,86,91,183,131,157,201,100,66,97,97,33,126, +250,233,39,108,223,190,29,149,149,158,79,234,43,56,84,141,244,185,191,98,110,122,123,175,243,245,55,230,234,92,24,194,110,98,22,47,57,182,110,114,188,215,155,2,17,140,2,240,156,107,95,234,130,249,57,147,90,74,68,58,234,85,82,168,251,15,76,237,204,110, +167,62,234,176,225,204,130,209,144,44,181,204,98,114,190,47,106,200,125,120,247,251,115,152,53,107,150,71,215,251,90,241,191,84,113,113,177,75,77,192,127,254,243,31,204,152,49,67,161,172,60,151,147,147,131,81,163,70,121,85,252,63,250,87,240,20,255,103, +158,43,192,231,171,61,47,254,26,141,6,105,105,105,120,232,161,135,208,167,79,31,144,43,28,137,125,41,171,213,138,111,190,249,6,139,22,45,242,120,14,141,32,16,124,249,105,47,244,232,22,229,209,245,254,138,16,29,26,180,252,28,130,192,238,12,133,85,191, +100,160,176,116,143,247,129,156,104,62,107,216,202,235,158,94,228,210,43,0,10,105,184,247,25,1,173,98,217,190,103,53,31,217,201,139,127,16,250,232,181,151,48,123,182,103,141,164,47,23,127,192,181,215,1,11,23,46,244,139,226,159,155,155,235,245,157,191, +63,20,255,218,138,181,62,81,252,251,247,239,143,125,251,246,225,147,79,62,65,223,190,125,175,91,252,1,64,175,215,99,252,248,241,216,177,99,7,86,175,94,141,134,13,27,186,61,174,36,81,204,121,241,32,36,201,7,150,41,40,136,82,27,172,53,158,173,58,186,26, +70,243,0,64,69,184,52,97,223,165,6,64,34,24,230,93,58,117,90,198,178,253,208,53,29,220,202,52,30,231,251,246,156,174,194,204,175,143,130,122,176,38,42,38,38,198,167,139,127,189,107,53,1,11,23,46,196,83,79,61,165,66,86,238,201,205,205,197,168,81,163,96, +50,121,54,73,108,84,63,255,40,254,166,202,44,84,22,191,5,111,139,255,211,94,20,127,66,8,158,127,254,121,228,229,229,121,53,153,116,252,248,241,216,183,111,31,6,14,116,255,144,182,3,5,213,200,218,92,236,241,216,254,202,92,227,217,83,147,171,105,25,215, +29,76,142,8,166,174,213,236,235,54,0,233,121,131,52,4,240,250,216,190,184,208,166,136,48,196,123,27,230,119,212,233,128,249,240,247,204,226,113,190,239,124,149,21,15,172,60,4,155,211,253,73,71,81,81,81,216,180,105,147,207,23,255,122,87,106,2,22,44,88, +16,20,197,127,100,191,6,248,232,121,255,40,254,44,238,252,159,126,174,0,43,60,44,254,162,40,226,195,15,63,196,255,253,223,255,65,20,93,94,253,117,85,9,9,9,216,176,97,3,70,143,30,237,246,181,111,188,119,220,235,241,253,141,181,118,55,40,245,250,32,159, +223,69,232,99,17,31,214,204,251,64,4,67,92,89,14,120,221,6,192,128,248,222,0,188,62,27,146,245,218,127,235,201,125,144,204,213,76,99,114,190,203,226,144,112,127,230,65,148,212,184,191,255,121,120,120,56,214,175,95,143,30,61,122,200,144,153,124,46,109, +2,22,44,88,128,167,159,126,90,237,148,174,43,47,47,207,235,226,255,113,16,21,255,167,158,205,247,170,248,47,91,182,12,211,167,79,247,56,135,43,49,24,12,88,177,98,133,219,79,2,246,231,87,5,221,222,0,148,90,97,173,221,203,52,38,163,137,242,209,199,99,113, +221,15,188,235,191,2,112,241,81,194,245,176,222,251,223,116,112,27,211,120,156,111,155,189,246,40,126,57,231,214,73,151,0,128,144,144,16,172,93,187,22,55,221,196,110,182,174,146,18,18,18,240,227,143,63,250,77,241,31,57,114,164,199,197,127,68,223,4,124, +244,124,151,160,41,254,51,230,228,35,115,205,57,143,174,215,104,52,88,190,124,57,166,76,153,226,113,14,215,98,48,24,144,153,153,137,70,141,26,185,117,221,151,235,216,30,148,227,15,44,172,95,3,176,154,7,0,122,221,109,129,175,219,0,16,6,239,255,117,162, +17,141,35,219,122,27,230,15,148,194,116,104,7,187,120,156,79,251,116,239,5,124,177,223,253,247,139,26,141,198,163,59,25,95,99,52,50,220,56,75,38,91,182,108,241,186,248,127,252,66,87,232,52,30,28,80,122,9,127,42,254,43,191,240,188,248,47,91,182,12,147, +39,79,246,56,7,87,36,36,36,224,205,55,223,116,235,154,111,54,22,249,196,150,197,74,178,212,238,4,40,187,131,232,26,69,180,65,136,206,235,135,238,0,33,215,173,221,215,252,109,203,216,49,58,156,82,244,242,54,143,164,152,20,136,130,203,91,14,92,151,245, +236,65,56,171,74,152,197,227,124,215,161,162,90,188,184,225,152,71,215,190,253,246,219,24,57,146,201,254,85,220,53,120,91,252,111,239,19,60,197,223,233,164,120,114,182,119,197,127,249,242,229,178,23,255,122,227,198,141,67,191,126,253,92,254,250,146,139, +54,28,62,234,254,147,58,127,38,57,171,97,101,120,54,0,33,4,73,209,157,89,132,234,157,190,118,212,53,15,239,187,230,111,156,100,215,247,133,27,155,5,93,13,235,199,255,230,95,217,62,114,225,124,83,173,205,249,255,236,157,119,120,21,229,242,199,191,187, +167,167,39,36,129,16,122,175,138,96,65,1,33,20,105,118,165,138,88,193,142,160,34,112,127,234,141,215,114,173,216,175,138,5,43,72,2,168,84,69,64,4,105,130,74,239,189,4,210,123,78,63,239,239,15,8,2,73,224,156,221,217,83,114,230,243,60,247,121,174,201,238, +119,135,36,103,103,222,121,103,230,197,195,179,119,193,230,242,189,232,239,185,231,158,195,152,49,99,52,176,138,57,155,74,231,95,94,174,172,29,119,208,53,201,248,50,61,248,157,63,69,171,159,219,125,106,229,63,251,7,229,206,255,219,111,191,197,176,97, +195,20,219,160,4,95,11,79,215,111,44,212,200,146,224,197,86,78,219,14,216,56,190,3,133,140,209,20,97,190,224,120,193,11,127,234,132,116,45,133,21,77,19,46,165,144,57,131,117,223,122,82,61,38,56,121,110,241,126,28,200,247,189,135,124,212,168,81,72,79, +79,167,55,136,57,135,223,126,251,45,44,156,63,69,171,159,219,45,240,196,20,245,206,127,232,80,237,254,157,53,49,104,208,32,196,199,199,123,125,253,246,157,225,87,156,77,61,22,152,40,0,128,36,93,184,131,239,130,159,60,9,66,245,230,105,156,165,46,98,204, +137,106,101,206,224,169,40,134,227,196,94,50,61,38,56,249,101,119,62,230,108,246,125,223,191,115,231,206,248,248,227,143,189,26,130,194,40,231,247,223,127,87,229,252,251,93,153,20,86,105,255,39,254,181,29,179,127,84,230,252,117,58,29,190,252,242,203, +128,56,127,0,48,26,141,232,209,163,135,215,215,31,58,18,126,7,4,185,28,71,225,118,158,36,211,139,53,39,33,214,156,76,33,117,193,69,124,141,159,190,169,107,134,88,0,168,30,221,215,48,174,157,90,137,115,176,238,91,15,136,240,59,124,34,156,200,47,119,98, +242,2,223,39,79,167,164,164,96,222,188,121,136,136,184,224,182,23,163,146,149,43,87,98,192,128,1,40,43,83,182,215,59,224,234,36,204,120,241,50,152,12,225,225,252,39,76,222,166,106,229,63,115,230,76,140,28,57,82,177,13,20,248,210,66,123,228,168,178,201, +143,161,142,173,130,96,132,239,89,52,142,87,62,212,233,44,186,166,255,122,183,185,166,111,214,248,9,180,91,113,53,0,163,218,167,55,34,15,0,254,32,213,99,130,143,41,11,247,33,191,220,183,163,54,141,70,35,230,206,157,139,212,212,84,141,172,98,0,96,213, +170,85,24,60,120,176,226,149,255,128,171,147,240,85,250,101,97,179,242,159,48,121,27,230,204,83,214,26,103,48,24,48,115,230,76,12,25,50,68,177,13,84,52,105,210,196,235,107,75,203,92,218,25,18,196,216,203,105,3,128,70,52,219,0,102,51,202,107,92,200,215, +248,41,148,36,120,95,250,121,1,72,51,0,66,192,118,128,118,175,133,9,46,230,109,203,197,146,93,249,62,223,247,202,43,175,160,107,87,218,163,166,153,115,89,181,106,21,6,13,26,164,120,229,223,191,235,41,231,31,46,43,255,241,147,212,57,255,25,51,102,224, +246,219,111,87,108,3,37,177,177,222,183,165,149,87,208,181,196,133,18,246,138,191,33,4,93,240,211,56,142,168,14,64,136,26,247,111,106,14,0,0,213,147,83,98,76,117,16,75,56,254,215,145,189,15,238,82,223,157,3,19,26,148,216,92,120,97,137,239,227,68,111, +188,241,70,140,31,63,94,3,139,152,74,40,156,255,215,207,135,143,243,127,124,210,54,204,157,175,110,229,31,44,206,31,128,79,99,134,61,238,48,27,4,112,26,225,169,128,211,182,139,76,47,202,20,143,132,8,223,6,49,85,135,7,82,141,43,163,106,63,141,66,64,18, +192,149,106,31,76,148,194,56,131,109,223,6,82,61,38,184,120,117,217,33,159,71,253,54,106,212,8,211,167,79,231,162,63,13,249,253,247,223,195,194,249,83,181,250,61,62,105,27,190,87,233,252,111,187,237,54,197,54,104,129,47,191,251,136,72,245,103,18,132, +42,193,216,13,32,1,190,5,0,175,253,58,164,21,128,4,181,15,166,46,0,180,29,218,68,170,199,4,15,127,29,43,197,204,191,124,171,162,149,101,25,95,126,249,37,18,18,84,255,169,50,53,160,214,249,95,119,85,104,56,127,170,86,191,113,79,111,85,229,252,191,251, +238,187,160,115,254,0,112,228,200,69,143,150,63,67,100,4,221,208,183,80,131,114,32,16,0,52,160,153,160,155,252,223,165,183,53,171,238,27,213,127,42,133,250,213,63,64,92,0,232,241,192,126,148,246,135,203,4,7,30,113,170,231,223,215,227,196,31,127,252,113, +244,234,213,75,19,155,24,96,245,234,213,24,52,104,16,74,75,149,245,117,247,187,50,9,223,252,39,52,156,63,197,202,127,220,211,91,241,195,2,101,173,96,149,206,255,214,91,111,85,108,131,150,108,223,190,221,235,107,83,83,106,44,58,175,245,56,109,187,73,79, +7,172,31,211,138,68,71,146,229,106,179,0,213,126,50,61,82,205,123,6,222,18,97,140,69,156,165,174,90,153,51,56,178,247,193,99,11,175,17,147,225,194,220,45,217,216,118,194,183,223,109,219,182,109,241,210,75,47,105,100,17,179,122,245,106,12,28,56,80,149, +243,255,246,133,240,112,254,46,183,192,99,19,213,57,255,89,179,102,5,173,243,7,78,13,125,242,150,38,141,194,183,13,87,8,39,156,182,221,100,122,113,150,186,136,164,56,23,160,134,58,128,106,63,157,18,132,234,12,64,74,116,115,181,18,231,192,233,255,218, +73,133,211,141,215,151,31,246,233,30,157,78,135,47,190,248,34,36,14,201,9,69,212,58,255,190,87,38,134,205,202,223,229,22,24,55,113,43,126,92,168,206,249,223,114,203,45,138,109,208,154,13,27,54,224,240,97,239,63,163,173,90,70,106,104,77,240,99,183,110, +35,213,171,23,221,130,64,69,92,85,221,87,171,124,66,211,51,134,24,1,116,84,251,184,148,24,10,163,255,193,126,120,11,169,30,19,28,124,188,250,56,178,75,125,43,252,123,248,225,135,113,229,149,36,187,84,204,121,172,89,179,70,85,218,191,247,229,137,248,246, +63,157,97,54,214,126,231,239,118,11,76,152,180,77,149,243,207,200,200,8,106,231,15,0,31,124,240,129,79,215,95,217,197,251,177,193,181,17,71,5,109,0,80,159,198,151,94,242,241,198,177,134,243,191,88,229,83,26,145,132,118,0,76,106,159,70,26,0,8,1,251,17, +14,0,106,27,249,229,78,124,178,246,184,79,247,164,166,166,226,197,23,95,212,200,162,240,102,237,218,181,24,56,112,32,74,74,74,20,221,223,247,202,68,204,124,49,60,156,191,203,45,240,232,83,91,21,183,250,25,141,70,100,100,100,224,230,155,111,86,108,131, +63,216,189,123,55,102,204,152,225,245,245,102,179,140,75,59,196,104,104,81,240,227,176,237,32,157,7,80,63,150,164,14,192,156,87,90,92,165,162,176,202,39,213,45,164,206,234,159,37,145,110,1,56,243,142,192,93,30,126,39,76,213,118,62,90,115,12,21,78,223, +134,134,188,253,246,219,136,137,9,239,23,140,22,172,93,187,22,3,6,12,80,236,252,251,92,17,26,43,255,242,162,5,52,206,255,201,173,152,183,72,217,202,63,84,156,191,199,227,193,35,143,60,2,167,211,251,169,156,125,122,38,193,168,242,111,32,212,17,30,43,156, +246,253,100,122,245,99,90,64,146,212,255,76,245,30,79,149,99,121,171,170,74,66,245,217,189,113,150,100,88,12,209,106,101,206,96,63,74,155,82,97,2,79,110,153,3,223,108,244,109,245,148,150,150,22,84,195,81,106,11,20,206,127,198,11,193,239,252,79,181,250, +189,15,10,231,63,127,177,58,231,127,211,77,55,41,182,193,95,188,242,202,43,88,182,108,153,79,247,220,52,184,158,70,214,132,22,78,219,78,50,45,163,206,130,196,8,245,35,206,69,53,190,189,202,39,86,18,232,164,246,65,212,5,128,142,19,116,85,149,76,112,240, +209,154,227,176,58,189,63,212,73,150,101,188,249,230,155,26,90,20,158,172,91,183,78,149,243,239,125,121,232,56,127,138,149,255,35,79,108,81,229,252,51,51,51,67,194,249,103,100,100,224,217,103,159,245,233,158,164,68,35,250,246,162,155,252,26,202,56,108, +123,72,245,104,182,212,165,11,7,0,233,233,233,50,160,62,0,168,23,67,27,0,216,143,211,141,87,100,2,79,65,133,19,223,250,184,250,31,61,122,52,46,187,76,117,114,138,57,11,181,206,63,173,75,29,204,120,225,178,176,114,254,11,126,202,86,116,191,209,104,196, +236,217,179,113,227,141,55,42,182,193,95,252,240,195,15,184,243,206,59,225,241,248,118,234,234,125,163,27,195,100,10,239,244,127,37,78,226,0,32,41,170,49,133,76,39,33,112,206,200,212,115,126,91,145,105,219,27,3,136,82,251,20,202,12,128,112,59,225,204, +246,253,104,88,38,120,249,106,195,9,216,92,222,191,92,44,22,11,23,254,105,192,147,79,62,137,226,226,98,69,247,234,100,9,47,61,212,6,22,147,186,177,175,33,225,252,93,2,15,79,80,239,252,111,184,225,6,197,54,248,139,31,126,248,1,195,134,13,131,195,225,91, +103,78,124,156,1,119,143,108,168,145,85,161,135,203,113,12,30,15,221,220,154,228,72,146,0,32,238,165,149,195,27,156,253,133,115,2,0,225,17,36,7,16,39,70,210,253,33,56,179,15,64,184,124,59,26,150,9,94,108,46,15,190,218,224,219,234,255,129,7,30,224,99, +126,53,224,135,31,126,64,199,142,202,58,126,221,30,129,91,158,222,136,221,135,149,191,228,66,193,249,159,154,237,191,21,11,127,86,238,252,51,50,50,66,194,249,47,92,184,16,195,135,15,247,217,249,3,192,164,241,45,16,29,29,190,35,128,171,34,224,180,209, +21,2,38,211,100,0,160,119,123,206,25,207,123,78,0,224,134,172,58,0,136,50,198,211,22,0,102,113,250,191,54,49,103,115,14,10,42,188,15,232,34,34,34,48,105,210,36,13,45,10,95,146,146,146,176,116,233,82,180,111,175,236,99,159,93,96,199,205,19,55,226,192, +241,10,159,239,13,5,231,239,114,9,60,52,97,139,226,9,127,38,147,9,115,230,204,9,137,61,255,239,191,255,30,183,220,114,11,236,118,223,199,216,94,210,62,6,35,135,54,184,248,133,97,6,229,68,64,179,33,10,209,38,245,103,158,8,160,230,0,0,194,211,86,237,3, +18,163,104,211,64,14,14,0,106,13,2,192,103,235,124,235,251,127,240,193,7,81,175,30,87,22,107,69,114,114,50,150,47,95,174,56,8,200,202,179,97,240,132,63,124,10,2,66,197,249,63,252,196,22,197,43,127,147,201,132,217,179,103,227,250,235,175,87,108,131,191, +152,59,119,46,134,13,27,230,83,187,95,37,145,17,58,188,247,70,71,232,116,124,26,231,249,56,237,123,73,245,146,34,27,169,214,144,112,110,150,95,62,247,155,146,234,12,0,101,250,31,0,28,39,104,127,136,76,224,88,119,168,24,7,242,173,94,95,111,50,153,240, +212,83,79,105,104,17,3,248,55,8,8,137,62,255,211,43,127,53,206,127,206,156,57,33,227,252,135,15,31,174,200,249,3,192,203,255,110,139,22,205,194,123,244,111,77,56,109,196,1,0,193,54,128,36,213,144,1,56,93,29,216,70,237,3,18,35,9,83,65,194,3,103,158,111, +115,226,153,224,101,198,159,190,165,82,239,188,243,78,164,164,164,104,100,13,115,54,201,201,201,248,245,215,95,21,215,4,100,229,217,48,224,241,245,23,172,9,8,137,62,127,151,192,131,227,55,99,209,18,117,123,254,131,7,15,86,108,131,191,152,51,103,142,42, +231,63,238,161,102,184,253,230,250,196,86,213,30,92,206,147,16,30,27,153,94,82,148,250,12,128,16,104,127,118,39,192,153,0,224,116,117,160,234,14,128,196,8,186,12,128,171,48,11,194,65,247,3,100,2,71,65,133,19,63,239,202,247,250,122,73,146,48,97,194,4, +13,45,98,206,71,203,154,128,80,73,251,63,56,126,51,22,255,146,163,232,126,147,201,132,239,191,255,62,36,90,253,230,204,153,131,17,35,70,40,118,254,67,110,169,143,167,31,167,61,239,165,246,33,224,114,28,37,83,75,38,216,2,0,16,243,218,47,195,207,172,170, +206,4,0,58,151,187,165,122,109,137,52,3,224,200,57,72,166,197,4,150,185,91,114,224,112,123,223,250,55,104,208,32,180,107,215,238,226,23,50,164,104,177,29,16,42,206,255,129,199,213,59,255,65,131,6,41,182,193,95,204,158,61,91,149,243,191,249,250,122,120, +243,165,246,144,120,219,255,162,56,29,135,200,180,18,34,234,147,140,4,150,100,215,153,62,253,127,212,36,168,14,231,98,76,9,48,233,233,206,130,118,114,0,80,107,152,187,197,183,23,235,35,143,60,162,145,37,204,197,160,220,14,8,37,231,255,211,82,101,206, +191,114,194,223,192,129,3,21,219,224,47,230,204,153,131,145,35,71,42,118,254,55,12,172,135,119,94,227,162,63,111,113,217,233,182,176,117,178,1,209,166,58,170,117,196,89,190,254,76,0,32,65,82,61,189,167,14,229,254,63,56,0,168,45,236,207,179,98,199,201, +114,175,175,111,216,176,33,174,187,238,58,13,45,98,46,70,82,82,18,150,45,91,166,56,8,200,46,176,227,134,167,183,225,64,133,234,147,197,107,36,88,156,127,168,12,249,81,187,242,191,97,96,61,188,255,102,71,232,217,249,123,141,203,65,91,195,150,96,81,223, +17,85,109,0,0,8,213,25,128,56,75,93,181,18,231,224,200,57,64,170,199,4,134,31,183,249,246,114,29,51,102,12,116,58,117,19,230,24,245,168,14,2,114,139,208,187,119,111,236,220,73,119,48,74,37,20,206,223,233,244,132,149,243,87,179,242,191,113,16,59,127,37, +56,237,135,72,245,226,35,212,7,0,103,47,246,255,233,2,128,250,45,128,88,115,178,90,137,127,240,184,225,202,167,43,160,96,2,199,188,109,121,94,95,171,211,233,112,239,189,247,106,104,13,227,11,106,11,3,79,158,60,137,126,253,250,97,223,62,186,113,222,20, +173,126,78,167,7,99,199,41,119,254,102,179,25,243,230,205,11,9,231,159,145,145,161,106,229,127,219,141,41,120,255,13,118,254,74,112,187,114,33,60,190,15,202,170,137,56,138,12,0,170,221,2,64,51,181,194,148,25,0,87,113,54,143,0,174,5,236,204,46,199,161, +2,239,123,255,211,210,210,120,236,111,144,161,182,38,224,248,241,227,232,209,163,7,73,38,128,162,213,239,212,202,127,11,150,44,207,85,116,191,201,100,66,102,102,38,250,247,239,175,216,6,127,49,123,246,108,220,113,199,29,112,185,92,138,238,191,113,80, +61,76,125,165,3,239,249,43,70,192,229,204,34,83,75,176,144,180,69,159,27,0,188,188,244,150,58,32,104,1,140,179,208,101,0,92,133,116,63,52,38,112,44,221,83,224,211,245,35,70,140,208,200,18,70,13,106,183,3,78,158,60,169,122,59,128,46,237,191,5,63,47,83, +94,237,31,42,19,254,50,51,51,49,98,196,8,197,206,255,166,193,245,240,30,175,252,85,227,114,248,118,246,201,133,160,200,0,0,136,77,95,116,71,12,112,58,0,208,235,244,36,205,251,113,132,91,0,174,2,14,0,106,3,190,4,0,38,147,9,183,222,122,171,134,214,48,106, +8,100,16,16,44,206,63,84,38,252,101,102,102,98,228,200,145,170,156,255,187,175,179,243,167,192,237,164,11,0,226,45,117,33,17,244,95,154,205,182,134,192,153,45,0,161,186,124,223,108,136,130,73,79,55,18,210,85,68,247,67,99,2,67,94,185,19,91,179,74,189, +190,190,127,255,254,136,139,139,211,208,34,70,45,129,168,9,160,112,254,14,135,7,247,63,182,89,177,243,183,88,44,152,55,111,94,72,76,248,251,238,187,239,84,57,255,219,111,174,143,247,216,249,147,225,114,42,59,76,170,58,168,90,1,33,164,70,192,233,0,64, +8,168,30,49,20,103,166,237,0,112,242,22,64,200,179,98,95,1,60,62,188,179,67,225,212,52,70,253,176,160,227,199,143,163,87,175,94,94,5,1,84,206,127,204,184,205,88,250,171,178,61,127,139,197,130,31,127,252,49,36,90,83,191,251,238,59,220,121,231,157,170, +156,255,212,151,219,243,158,63,33,110,194,26,0,0,68,179,0,164,127,50,0,149,255,161,6,202,253,127,128,183,0,106,3,171,15,20,123,125,173,44,203,33,49,69,141,57,133,63,10,3,41,91,253,212,56,255,121,243,230,161,95,191,126,138,109,240,23,25,25,25,170,156, +255,77,131,235,177,243,215,0,202,12,0,0,146,99,129,165,179,3,0,120,212,111,1,196,152,18,213,74,156,3,23,1,134,62,235,14,123,31,0,92,113,197,21,124,236,111,136,161,101,77,0,149,243,31,59,110,179,226,106,255,74,231,223,183,111,95,197,54,248,139,140,140, +12,85,213,254,55,95,95,15,239,189,206,19,254,180,192,237,204,134,16,202,126,47,213,17,69,16,0,224,116,214,255,84,0,32,73,170,143,116,138,52,209,237,221,10,135,21,30,107,9,153,30,227,127,14,230,91,113,162,196,238,245,245,188,250,15,77,180,168,9,40,47, +90,72,146,246,191,247,145,77,97,225,252,103,204,152,161,106,207,127,232,173,245,217,249,107,138,7,30,151,111,221,80,23,34,218,72,16,0,72,34,5,248,103,14,128,234,13,252,40,35,93,0,224,46,163,251,97,49,129,97,205,33,239,87,255,0,208,167,79,31,141,44,97, +180,134,178,38,160,188,104,33,138,115,222,131,90,231,127,223,163,155,176,252,55,239,7,80,157,77,68,68,4,230,207,159,31,50,206,127,244,232,209,112,187,221,138,238,31,122,107,125,188,249,82,123,200,50,59,127,45,241,184,139,200,180,40,50,0,66,156,242,249, +100,1,64,36,97,0,32,220,60,0,40,212,217,120,196,251,12,78,68,68,4,174,184,226,10,13,173,97,180,134,162,38,160,123,247,43,177,113,237,43,80,157,246,127,124,179,42,231,63,111,222,188,144,8,72,103,205,154,133,187,238,186,75,177,243,31,118,91,42,59,127,63, +33,160,236,119,84,29,36,53,0,64,50,0,200,233,191,246,210,3,80,173,24,65,24,0,72,6,51,153,22,19,24,54,249,208,254,215,163,71,15,24,141,70,13,173,97,252,129,234,179,3,178,11,49,116,244,6,236,221,239,253,193,81,103,227,116,158,170,246,255,69,97,218,63,212, +156,255,168,81,163,20,167,253,135,221,150,138,55,94,108,199,206,223,79,72,146,137,76,139,34,0,0,144,148,145,49,68,39,27,116,9,73,56,231,80,32,101,80,110,1,232,162,235,0,50,31,6,19,170,148,218,93,56,236,195,248,223,158,61,123,106,104,13,227,79,212,214, +4,228,228,217,49,252,158,141,56,116,216,183,249,233,118,187,7,247,60,180,73,149,243,159,63,127,126,72,56,255,111,190,249,70,85,193,223,112,118,254,126,71,103,160,235,146,59,181,5,160,250,119,167,219,87,15,9,178,193,173,83,157,254,151,37,29,204,122,213, +147,132,207,32,233,12,48,212,33,25,78,200,4,128,45,89,101,62,245,255,119,237,218,85,59,99,24,191,163,118,59,224,100,182,29,183,140,244,62,19,80,153,246,255,117,149,186,61,255,222,189,123,43,186,223,159,204,154,53,11,247,220,115,143,226,180,255,240,219, +82,241,58,59,127,191,162,211,39,66,150,233,252,163,94,54,192,164,143,80,173,35,220,114,93,89,184,145,164,86,40,210,24,75,50,158,240,108,204,77,59,147,234,49,254,99,75,86,153,215,215,202,178,140,46,93,186,104,104,13,19,8,252,149,9,176,219,61,184,251,193, +191,21,247,249,71,68,68,96,193,130,5,33,225,252,191,254,250,107,85,43,255,17,183,179,243,15,4,166,136,78,228,154,22,131,250,128,66,239,22,73,178,71,167,126,255,63,210,24,175,218,152,243,137,104,199,105,225,80,101,79,142,247,233,219,54,109,218,32,38,38, +70,67,107,152,64,161,117,38,192,225,56,181,242,95,241,123,190,34,253,202,149,127,90,90,154,162,251,253,201,119,223,125,135,123,239,189,87,213,202,255,181,23,216,249,7,2,115,84,55,122,77,138,140,187,236,137,151,37,8,213,155,247,20,209,200,249,152,155, +92,6,125,29,213,243,137,152,0,176,55,207,251,0,224,242,203,47,215,208,18,38,208,104,149,9,56,181,231,175,124,229,31,25,25,137,133,11,23,134,196,202,255,171,175,190,82,85,240,55,114,8,175,252,3,133,78,159,8,115,228,85,228,186,36,62,87,146,226,101,1,89, +117,0,64,177,31,81,5,73,66,92,207,123,232,117,25,77,241,8,224,64,158,247,5,128,29,58,116,208,208,26,38,24,160,206,4,84,206,246,87,179,242,159,55,111,30,122,245,234,165,232,126,127,162,118,229,63,226,246,84,188,250,31,118,254,129,34,42,97,36,32,209,23, +180,155,9,14,222,243,64,196,201,16,136,85,43,100,212,89,84,27,83,29,145,151,244,133,169,145,178,151,6,19,24,142,22,217,80,225,244,254,101,213,174,93,59,13,173,97,130,5,181,45,130,57,121,118,12,29,189,17,219,119,150,226,254,199,54,99,217,138,218,191,231, +63,115,230,76,140,26,53,74,149,243,231,180,127,224,48,152,90,32,34,182,191,38,218,102,130,12,128,4,57,142,100,11,64,147,12,0,0,72,50,18,111,125,6,178,153,238,152,97,70,91,124,89,253,3,28,0,132,19,20,219,1,3,110,93,167,216,249,71,70,70,98,241,226,197, +33,177,231,255,197,23,95,168,114,254,163,134,53,192,235,47,242,144,159,64,33,201,102,196,167,60,13,73,210,107,162,79,81,3,32,32,104,2,0,173,50,0,0,160,143,175,143,164,225,47,67,210,25,52,123,6,67,199,241,98,155,215,215,70,70,70,162,113,227,198,26,90, +195,4,27,106,199,6,123,124,233,47,61,139,168,168,40,44,90,180,8,215,94,123,173,162,251,253,201,23,95,124,129,251,238,187,15,30,143,71,209,253,163,134,55,192,43,207,183,3,113,99,22,227,53,50,226,83,166,64,111,212,238,221,70,82,3,32,164,120,89,72,146,106, +37,147,94,187,0,0,56,213,18,152,124,199,171,144,77,156,9,8,118,142,21,121,127,0,80,179,102,205,32,203,170,103,80,49,33,134,218,154,0,95,169,220,243,15,5,231,63,125,250,116,85,206,127,228,144,84,252,247,223,109,217,249,7,8,73,50,33,161,254,115,48,71,106, +59,219,132,162,6,64,130,136,146,33,160,58,127,175,217,22,192,89,152,155,95,129,122,99,167,193,152,210,74,243,103,49,202,57,230,67,6,128,87,255,225,139,218,154,0,111,137,140,140,196,130,5,11,66,34,237,63,125,250,116,220,127,255,253,170,156,63,23,252,5, +14,189,169,9,146,26,189,11,115,212,213,154,63,203,160,35,25,151,111,145,1,168,94,190,251,35,0,0,0,67,98,35,164,140,157,134,132,65,227,161,139,34,153,135,204,16,115,188,216,251,12,0,7,0,225,141,218,154,128,139,17,21,21,21,50,123,254,159,127,254,185,42, +231,127,231,240,134,120,237,5,222,243,15,4,178,46,22,49,73,99,145,212,232,3,232,77,77,252,242,76,189,172,254,236,20,33,193,162,135,128,69,237,88,97,45,107,0,170,32,235,16,125,213,109,136,234,114,3,202,183,46,67,197,182,165,176,29,218,4,225,114,248,207, +6,166,70,178,75,189,255,61,112,0,192,84,214,4,244,238,221,27,219,183,111,39,211,141,142,142,198,162,69,139,208,189,123,119,50,77,173,248,236,179,207,48,118,236,88,197,206,127,244,136,134,120,153,211,254,126,69,146,12,48,90,58,192,18,221,19,150,152,222, +164,135,253,120,131,94,167,62,0,144,4,34,244,144,212,111,1,24,8,162,17,95,145,244,70,68,93,54,16,81,151,13,132,112,57,225,200,222,7,87,254,49,120,42,138,33,92,222,175,66,25,90,10,94,89,239,245,181,13,26,240,160,39,134,62,8,8,39,231,127,255,189,215,97, +234,107,247,146,143,98,103,170,34,201,70,200,114,12,116,198,20,24,76,205,33,73,129,59,193,84,79,211,93,96,209,75,64,132,242,211,183,79,33,203,218,180,58,120,139,164,55,192,148,218,22,166,212,182,1,181,35,220,41,46,46,134,205,225,244,250,250,228,100,186, +19,178,152,208,166,178,48,176,79,159,62,216,186,117,171,98,157,200,200,72,204,155,55,47,36,156,255,231,159,127,174,202,249,143,25,51,6,31,127,252,49,59,255,48,132,34,3,0,32,66,22,128,234,106,2,89,226,74,110,6,200,205,245,173,63,59,41,73,245,57,84,76, +45,66,109,77,64,116,116,52,126,254,249,231,144,152,240,247,233,167,159,98,204,152,49,138,157,255,35,143,60,194,206,63,140,161,168,1,192,233,34,64,213,203,119,157,70,195,14,152,208,194,215,0,128,51,0,204,249,40,157,19,16,29,29,141,197,139,23,163,91,55, +250,131,87,168,249,228,147,79,240,192,3,15,168,114,254,239,189,247,30,59,255,48,134,40,0,208,147,4,0,146,6,179,142,153,208,163,164,164,196,167,235,19,19,19,53,178,85,83,108,32,0,0,32,0,73,68,65,84,132,9,101,124,13,2,98,98,98,240,211,79,63,133,133,243, +127,244,209,71,217,249,51,208,201,36,131,241,116,50,0,213,249,123,153,3,0,6,64,121,121,245,199,182,86,135,197,98,129,94,207,153,35,166,122,188,29,22,20,25,25,137,249,243,231,227,154,107,174,241,147,101,202,249,236,179,207,240,224,131,15,66,8,101,85,87, +99,199,142,197,187,239,190,203,206,159,129,158,38,0,160,201,0,232,2,92,4,200,4,7,190,4,0,145,145,60,213,145,185,48,23,27,22,20,25,25,25,50,227,125,63,253,244,83,85,5,127,15,60,240,0,62,250,232,35,118,254,12,37,58,25,128,234,229,59,103,0,24,0,40,43,43, +243,250,90,14,0,24,111,168,41,8,136,137,137,193,210,165,75,67,198,249,171,73,251,63,240,192,3,248,240,195,15,217,249,51,212,232,57,0,96,200,176,217,124,59,8,136,97,188,225,252,238,128,152,152,24,252,252,243,207,232,218,85,219,121,235,20,124,252,241,199, +170,86,254,227,198,141,99,231,207,84,65,64,109,243,62,128,211,25,0,213,240,159,38,3,192,167,163,75,121,255,159,241,133,202,154,128,110,221,186,133,140,243,255,228,147,79,240,240,195,15,43,222,243,127,240,193,7,241,246,219,111,179,243,103,170,162,240, +111,234,124,244,0,220,80,89,7,224,129,178,232,150,97,24,198,91,146,146,146,240,251,239,191,7,218,12,175,248,240,195,15,241,200,35,143,40,118,254,143,63,254,56,222,122,235,45,118,254,76,181,208,184,127,184,101,156,10,0,84,33,4,7,0,12,124,122,217,241,139, +141,169,173,124,242,201,39,120,244,209,71,21,59,255,241,227,199,243,202,159,185,8,36,33,128,139,3,0,38,32,240,203,141,169,141,252,239,127,255,83,85,240,55,97,194,4,188,245,214,91,196,86,49,76,181,208,100,0,60,28,0,48,240,109,95,223,110,231,3,155,152, +218,197,255,254,247,63,85,43,255,9,19,38,96,234,212,169,196,86,49,181,17,162,34,64,151,12,192,165,86,197,35,84,199,16,76,45,192,98,241,254,88,232,138,138,10,13,45,97,24,255,50,109,218,52,118,254,140,223,32,90,116,187,73,2,0,55,7,0,12,124,107,237,243, +101,104,16,195,4,51,211,166,77,83,53,225,143,157,63,227,43,46,55,73,6,213,37,75,128,247,205,219,218,26,195,132,56,28,0,48,225,6,59,127,38,16,56,61,36,62,215,170,23,128,234,92,44,145,49,138,17,118,7,28,251,14,194,117,252,36,220,69,37,128,75,117,82,131, +81,128,180,101,179,215,215,90,173,86,216,237,118,152,76,38,13,45,98,24,237,120,239,189,247,240,248,227,143,43,118,254,163,239,127,24,119,61,54,5,155,15,250,118,138,38,19,24,116,178,4,179,65,143,152,8,35,18,162,205,208,211,140,209,81,132,147,102,209,93, +161,7,96,85,171,226,116,59,8,108,241,13,97,179,163,124,233,42,148,47,251,29,246,173,59,33,156,236,244,3,141,174,180,208,167,235,243,242,242,144,154,154,170,145,53,12,163,29,31,127,252,177,42,231,223,239,214,209,232,113,251,67,216,176,39,155,216,50,198, +31,200,178,132,122,241,145,104,94,47,22,205,83,98,253,30,12,16,5,0,86,61,8,50,0,46,63,102,0,132,211,133,210,217,11,81,60,227,123,120,74,74,253,246,92,230,226,212,49,248,182,154,207,205,205,229,0,128,9,57,62,254,248,99,60,244,208,67,170,156,255,208,177, +19,137,173,98,252,137,199,35,144,149,95,134,172,252,50,108,216,123,18,151,54,77,66,251,70,117,32,203,254,105,111,118,121,212,47,186,133,68,150,1,240,79,0,224,216,127,24,121,47,188,5,231,193,163,126,121,30,227,27,117,140,190,7,0,12,19,74,124,244,209,71, +170,198,251,94,119,219,93,24,50,230,41,98,171,152,64,98,115,184,177,126,247,73,236,57,94,132,180,75,26,32,33,218,172,249,51,41,124,174,36,96,149,33,17,212,0,248,33,0,168,88,245,7,78,62,52,153,157,127,16,99,145,117,176,200,222,31,12,149,149,149,165,161, +53,12,67,203,59,239,188,163,202,249,15,24,114,47,59,255,90,76,97,153,13,243,214,31,192,225,156,18,205,159,69,85,4,40,75,66,120,127,134,107,13,216,93,218,86,116,91,87,111,64,238,115,175,67,216,253,95,107,192,248,70,146,209,251,232,247,208,161,67,218,25, +194,48,132,188,253,246,219,152,48,97,130,42,231,127,219,125,19,136,173,98,130,13,151,219,131,165,155,142,226,72,174,182,219,211,46,130,186,59,1,169,76,246,64,246,173,114,171,26,108,26,6,0,206,131,71,144,251,159,183,0,133,163,53,25,255,210,192,28,225, +245,181,28,0,48,161,128,90,231,223,255,246,187,217,249,135,17,66,8,44,223,124,20,133,101,170,59,236,107,132,194,231,74,64,129,44,193,83,20,12,198,84,135,112,185,145,247,210,187,16,54,158,51,16,42,52,52,123,63,11,224,224,193,131,26,90,194,48,234,169,116, +254,74,233,127,251,221,184,253,254,39,9,45,98,66,1,151,219,131,21,91,143,193,67,116,108,239,249,88,157,234,51,12,2,158,34,25,64,177,90,33,155,83,155,0,160,108,225,82,56,246,178,147,8,37,26,250,144,1,216,187,119,175,134,150,48,140,58,222,122,235,45,85, +206,127,224,176,251,216,249,135,49,249,37,54,236,62,166,58,193,94,45,20,1,128,4,169,72,22,144,84,103,0,52,169,1,240,120,80,252,245,28,122,93,70,83,124,201,0,100,101,101,33,63,63,95,67,107,24,70,25,83,167,78,197,19,79,60,161,248,254,65,195,238,199,173, +247,140,39,180,136,9,69,254,222,159,163,73,22,128,36,0,16,162,80,134,16,170,67,20,171,75,117,29,97,85,205,245,127,195,157,203,206,33,212,104,30,17,237,211,245,91,183,110,213,200,18,134,81,198,212,169,83,241,228,147,202,87,238,131,134,143,193,45,247,60, +78,104,17,19,170,84,216,93,56,170,65,65,160,213,73,224,115,37,20,203,178,80,159,1,168,112,208,183,61,84,172,90,79,174,201,104,79,203,136,104,232,36,239,135,97,108,219,182,77,67,107,24,198,55,212,58,255,254,183,223,131,91,238,30,71,104,17,19,234,28,202, +166,247,143,20,25,0,120,228,66,89,200,114,142,90,157,114,71,17,64,115,62,241,25,108,127,179,99,8,69,76,178,14,141,205,81,94,95,255,247,223,127,107,104,13,195,120,207,27,111,188,161,202,249,15,30,49,22,183,223,175,124,219,128,169,157,100,21,208,111,145, +91,157,234,131,10,33,187,115,100,89,242,168,30,70,237,17,110,210,66,64,97,119,192,117,82,117,92,194,4,136,214,145,49,94,95,187,118,237,90,13,45,97,24,239,152,58,117,42,38,78,84,62,158,119,192,144,123,113,243,93,143,17,90,196,212,22,202,109,78,56,92,110, +50,61,183,199,9,135,91,125,139,161,94,50,102,203,21,200,205,3,160,186,201,190,220,169,186,153,224,12,174,220,124,192,163,77,251,4,163,61,109,163,98,189,190,118,247,238,221,40,44,212,166,82,150,97,188,193,106,181,226,243,207,63,87,124,191,217,18,137,30, +3,111,35,180,136,169,109,148,89,157,100,90,36,251,255,128,171,236,183,214,5,114,122,218,10,23,0,213,213,118,21,14,186,0,0,14,158,248,23,202,92,22,157,224,245,181,30,143,7,235,215,115,189,7,19,56,44,22,11,126,253,245,87,116,236,216,81,209,253,54,107,57, +94,123,242,46,156,56,114,128,216,50,166,182,224,114,211,13,178,43,181,147,20,199,231,166,167,167,123,100,0,144,0,213,219,0,101,14,194,85,156,209,72,167,197,248,157,203,98,226,33,195,251,66,192,149,43,87,106,104,13,195,92,156,164,164,36,44,93,186,20,237, +219,183,87,116,127,113,97,30,166,78,25,131,156,172,35,196,150,49,181,1,202,83,2,137,2,128,28,0,144,1,64,16,4,0,37,54,186,150,61,93,66,28,153,22,227,127,162,116,6,180,140,244,190,29,112,217,178,101,26,90,195,48,222,145,156,156,172,42,19,80,148,159,195, +153,0,166,90,76,6,239,15,73,187,24,197,182,60,10,153,108,224,116,0,0,33,78,168,85,35,138,74,0,0,114,132,5,114,180,247,149,228,76,240,209,57,198,251,109,128,63,255,252,19,5,5,5,26,90,195,48,222,193,153,0,134,26,73,146,16,105,50,144,233,149,217,213,191, +43,5,78,249,252,83,25,0,73,86,125,198,110,9,77,84,114,6,125,253,186,164,122,140,127,185,58,54,201,235,107,221,110,55,150,47,95,174,161,53,12,227,61,201,201,201,88,190,124,185,226,32,160,40,63,7,175,79,188,135,131,0,6,0,16,101,54,144,110,1,20,219,114, +41,100,142,0,167,3,0,73,8,213,1,0,101,6,0,0,244,41,28,0,132,50,221,227,235,250,84,7,176,112,225,66,13,173,97,24,223,224,237,0,134,138,152,8,218,154,54,10,95,43,137,83,139,126,25,0,100,89,125,0,64,157,1,48,164,114,0,16,202,36,24,140,62,205,3,152,63,127, +62,92,46,151,134,22,49,140,111,36,37,37,97,217,178,101,138,131,128,226,194,60,188,57,233,62,14,2,194,156,104,11,109,0,80,98,39,240,181,210,89,25,0,143,208,169,14,0,42,156,165,112,186,233,142,237,229,12,64,232,211,35,62,217,235,107,243,243,243,177,106, +213,42,13,173,97,24,223,225,32,128,81,11,101,6,192,35,220,40,39,105,185,119,31,3,78,7,0,70,135,71,117,0,0,8,20,217,232,166,247,113,13,64,232,147,150,80,207,167,235,231,206,157,171,145,37,12,163,28,46,12,100,212,16,77,24,0,148,218,243,33,132,250,153,2, +54,155,249,159,45,128,39,6,100,22,0,80,61,94,168,200,122,82,173,196,25,56,3,16,250,92,25,155,136,4,131,247,127,252,25,25,25,112,58,233,38,102,49,12,21,92,19,192,40,37,134,112,11,160,160,66,117,195,30,0,20,165,15,250,182,4,168,108,3,60,197,126,181,170, +133,21,132,1,64,221,68,72,6,186,214,9,198,255,232,36,9,189,19,82,188,190,62,39,39,7,75,150,44,209,208,34,134,81,14,111,7,48,74,160,220,2,40,168,200,162,144,217,87,249,127,228,234,190,168,148,34,27,93,0,0,157,14,250,134,245,233,244,152,128,208,63,209, +183,223,225,87,95,125,165,145,37,12,163,30,14,2,24,95,136,50,27,96,208,203,23,191,208,75,72,2,0,33,85,13,0,36,33,84,7,0,148,25,0,0,48,54,109,72,170,199,248,159,30,241,201,136,210,233,189,190,126,222,188,121,60,20,136,9,106,184,38,128,241,150,248,40,51, +169,30,73,0,32,87,147,1,240,200,234,51,0,5,86,146,253,137,51,24,154,54,34,213,99,252,143,89,214,97,80,82,3,175,175,183,217,108,152,62,125,186,134,22,49,140,122,184,38,128,241,134,248,104,19,169,30,133,143,149,60,158,51,127,116,103,2,0,217,45,171,174, +1,40,177,229,195,225,182,170,149,57,131,161,9,103,0,106,3,183,213,245,45,144,251,240,195,15,225,241,208,157,158,197,48,90,192,219,1,204,197,160,204,0,56,221,118,162,33,64,213,213,0,232,92,123,85,43,67,32,175,252,152,122,153,211,24,155,113,6,160,54,112, +101,108,34,26,153,35,189,190,126,255,254,253,248,233,167,159,52,180,136,97,104,224,32,128,185,16,241,81,116,25,128,66,235,73,8,33,84,235,56,141,158,170,1,192,211,189,230,30,7,80,170,86,60,159,48,0,208,167,212,133,100,226,163,129,67,29,9,192,45,62,102, +1,222,121,231,29,109,140,97,24,98,184,38,128,169,14,73,2,226,34,233,2,0,162,14,128,226,127,245,152,123,166,88,239,159,34,64,9,2,18,118,169,85,167,204,0,64,150,120,27,160,150,48,50,165,41,244,146,247,213,176,75,150,44,193,159,127,254,169,161,69,12,67, +7,215,4,48,231,19,109,49,66,175,163,235,0,160,240,173,146,132,29,146,132,51,105,132,115,172,19,66,236,80,251,128,188,10,194,0,0,128,177,101,83,82,61,38,48,212,53,154,209,175,142,247,51,1,0,224,181,215,94,211,200,26,134,161,135,183,3,152,179,169,19,99, +33,213,203,46,35,248,187,240,72,219,207,254,207,243,194,147,115,191,169,132,220,50,218,52,150,177,117,115,82,61,38,112,220,89,191,153,79,215,207,153,51,7,123,246,236,209,200,26,134,161,135,183,3,152,74,146,136,3,128,156,178,195,170,53,60,18,206,89,228, +159,19,0,232,36,177,83,237,3,74,237,249,68,135,21,156,194,212,166,5,153,22,19,88,174,142,75,66,203,8,239,79,8,116,187,221,120,225,133,23,52,180,136,97,232,73,78,78,198,242,229,203,21,7,1,69,249,57,120,125,226,61,28,4,132,56,73,177,116,1,128,213,89,74, +115,226,174,240,212,156,1,144,100,245,25,0,0,200,41,59,68,33,3,0,48,52,107,12,201,200,35,129,107,3,18,128,251,27,248,22,208,205,152,49,3,155,55,111,214,198,32,134,209,8,174,9,96,234,196,208,181,0,102,19,249,84,55,46,176,5,80,254,107,251,195,32,232,4, +160,50,22,0,36,189,14,198,230,77,200,244,152,192,114,91,221,70,168,111,138,240,250,122,143,199,131,231,158,123,78,67,139,24,70,27,184,38,32,124,137,139,52,193,168,215,145,233,17,45,170,11,159,233,147,121,252,236,47,156,19,0,164,167,167,123,0,168,94,110, +229,148,30,84,43,113,14,92,7,80,123,208,75,50,238,243,49,11,48,111,222,60,172,94,189,90,35,139,24,70,59,146,146,146,240,198,27,111,40,190,191,184,48,15,63,124,249,30,161,69,140,63,72,36,76,255,3,64,118,233,33,10,153,191,207,255,66,149,30,5,1,241,151, +218,167,156,164,14,0,218,112,0,80,155,24,81,175,137,79,199,4,3,192,184,113,227,120,58,32,19,114,108,222,188,25,119,220,113,135,226,251,27,183,108,135,187,38,60,79,104,17,227,15,40,247,255,1,32,167,76,189,79,149,132,116,241,0,0,82,213,139,124,165,200, +118,18,54,87,185,90,153,51,152,218,181,34,211,98,2,79,132,78,143,49,13,90,250,116,207,95,127,253,133,47,190,248,66,27,131,24,70,3,54,111,222,140,190,125,251,34,47,79,89,241,86,227,150,237,240,196,127,63,65,68,148,247,133,179,76,112,144,28,235,253,54, +231,197,112,121,28,40,168,80,127,6,128,144,177,233,252,175,85,9,0,36,33,171,14,0,132,16,56,94,76,215,190,101,104,148,10,93,124,44,153,30,19,120,238,73,109,129,20,147,111,81,242,148,41,83,80,92,76,215,97,194,48,90,193,206,63,124,209,235,100,210,2,192, +19,37,251,225,17,110,213,58,30,119,213,236,126,149,0,192,38,101,111,7,96,83,251,176,227,197,170,135,10,254,131,36,193,212,177,45,157,30,19,112,204,178,14,15,55,108,237,211,61,57,57,57,120,246,217,103,53,178,136,97,104,216,180,105,19,250,244,233,163,216, +249,55,107,115,9,158,124,229,51,118,254,33,74,221,184,8,200,146,68,166,119,188,120,55,133,140,213,161,203,173,178,42,175,18,0,164,167,173,112,1,216,166,246,105,199,104,140,62,131,233,18,14,0,106,27,35,82,154,160,177,197,251,67,130,0,224,131,15,62,192, +202,149,43,53,178,136,97,212,177,121,243,102,244,235,215,15,249,249,202,78,109,107,220,178,29,30,127,241,67,88,34,163,136,45,99,252,69,189,120,186,244,63,0,28,47,33,201,166,111,57,237,219,207,161,134,65,197,98,189,218,167,157,40,217,7,183,167,202,243, +20,99,190,180,29,153,22,19,28,232,37,25,79,55,233,224,211,61,30,143,7,99,198,140,129,213,74,119,236,52,195,80,192,43,127,6,0,234,197,251,182,168,185,48,2,89,20,219,233,2,235,170,251,114,181,1,128,36,36,213,1,128,203,227,64,54,65,229,98,37,198,22,77,32, +71,81,254,96,153,96,96,112,82,42,174,142,75,242,233,158,61,123,246,240,108,0,38,168,224,149,63,3,0,58,89,34,237,0,40,168,56,129,10,103,137,106,29,129,234,125,122,245,1,128,222,83,109,180,224,43,68,123,23,167,144,101,152,58,248,182,103,204,132,6,207,183, +184,20,122,31,247,204,166,78,157,202,179,1,152,160,128,11,254,152,74,146,98,35,72,79,0,36,243,161,178,188,182,218,47,87,247,197,137,215,206,217,7,64,245,224,97,234,58,0,115,39,101,179,181,153,224,166,85,68,12,70,164,248,118,234,163,199,227,193,253,247, +223,15,155,77,117,189,42,195,40,102,211,166,77,236,252,153,51,144,239,255,211,116,211,229,76,73,251,238,80,117,223,168,62,3,32,65,72,192,31,106,159,74,218,9,0,192,124,249,165,164,122,76,112,224,129,64,185,219,247,122,145,93,187,118,225,197,23,95,212, +192,34,134,185,56,106,157,63,239,249,215,62,26,36,210,110,225,28,47,33,88,68,11,172,169,233,91,53,230,42,4,160,186,14,160,220,81,140,66,235,73,181,50,103,48,182,104,2,93,157,120,50,61,38,240,120,32,48,113,247,95,152,155,173,236,228,179,169,83,167,162, +176,176,144,216,42,134,185,48,149,206,95,233,158,127,179,54,151,96,252,75,31,243,158,127,45,194,160,151,145,28,71,151,1,176,58,75,145,95,113,252,226,23,94,156,26,125,121,141,1,128,228,145,86,81,60,153,180,14,64,146,96,238,114,9,157,30,19,80,42,157,255, +156,108,101,231,92,235,116,58,124,250,233,167,136,143,231,160,144,241,31,106,157,63,23,252,213,78,82,235,68,145,246,255,31,46,220,6,33,132,106,29,143,84,179,47,175,49,0,48,68,136,117,0,236,106,31,126,172,136,118,27,192,114,101,39,82,61,38,48,168,117, +254,122,189,30,51,103,206,196,200,145,35,137,45,99,152,154,161,88,249,115,218,191,118,210,160,14,109,64,119,184,112,43,133,140,53,202,86,186,177,166,111,214,24,0,60,113,77,166,85,2,106,188,209,91,14,22,84,25,63,172,10,203,149,157,0,153,46,202,98,252, +15,197,202,255,203,47,191,196,144,33,67,136,45,99,152,154,225,149,63,115,33,82,137,247,255,15,81,4,0,18,214,141,27,180,184,198,133,252,5,251,21,4,196,111,106,159,95,98,207,167,218,199,0,0,200,177,49,48,182,108,70,166,199,248,23,10,231,255,213,87,95,241, +202,159,241,43,20,206,159,171,253,107,47,113,145,38,68,91,124,59,225,244,66,20,89,179,81,100,205,86,173,35,60,210,5,199,166,94,164,97,81,38,153,185,122,32,95,245,249,66,231,192,219,0,161,9,59,127,38,20,97,231,207,92,12,234,234,255,131,5,91,72,116,100, +129,11,46,226,47,24,0,216,36,177,26,128,234,121,190,228,1,64,183,43,72,245,24,237,97,231,207,132,34,236,252,25,111,104,156,76,251,251,61,92,72,18,0,56,172,86,235,5,187,249,46,24,0,164,167,101,150,129,96,30,192,209,226,157,112,184,233,6,182,152,218,180, +128,62,57,145,76,143,209,22,118,254,76,40,194,206,159,241,6,147,65,135,186,132,3,128,132,240,224,112,209,118,10,169,53,233,55,204,175,184,208,5,23,157,89,40,132,244,139,90,43,220,30,23,142,20,146,252,131,78,33,73,156,5,8,17,216,249,51,161,8,59,127,198, +91,26,39,199,144,182,255,157,44,61,0,155,179,140,64,233,226,190,251,226,1,128,4,213,1,0,0,28,40,160,221,6,136,232,113,37,169,30,67,15,59,127,38,20,97,231,207,248,2,117,250,127,63,209,150,185,240,16,4,0,14,41,103,61,128,98,181,198,80,215,1,152,46,109, +15,57,134,219,105,130,21,118,254,76,40,194,206,159,241,5,189,78,70,106,29,218,83,106,247,229,169,238,190,7,128,194,230,5,158,191,46,118,209,69,3,128,244,180,21,46,0,43,212,90,83,108,203,37,109,7,148,244,58,88,186,118,33,211,99,232,224,33,63,76,40,178, +113,227,70,244,233,211,135,135,252,48,94,211,48,49,138,244,244,191,18,91,30,178,203,14,17,40,137,95,134,14,205,116,95,236,42,239,44,151,212,215,1,0,192,129,124,218,161,64,17,215,94,69,170,199,168,135,135,252,48,161,200,234,213,171,209,183,111,95,20,20, +20,40,186,159,135,252,132,39,212,233,255,83,171,127,245,227,127,189,221,186,247,42,0,208,201,98,145,58,115,78,65,93,7,96,185,170,51,228,72,218,227,23,25,229,112,218,159,9,69,126,251,237,55,12,28,56,16,197,197,202,118,58,187,116,233,130,140,239,231,243, +202,63,204,208,201,18,26,37,71,147,106,238,205,219,64,33,35,100,120,126,242,230,66,175,2,128,137,61,51,15,2,216,161,202,36,0,71,10,183,19,85,55,158,66,50,26,184,24,48,72,224,180,63,19,138,124,255,253,247,24,48,96,0,74,75,75,21,221,223,181,107,87,44,95, +190,28,87,182,111,134,238,237,235,19,91,199,4,51,141,146,99,96,212,235,200,244,236,174,10,28,45,222,169,94,72,96,211,164,180,185,199,188,185,212,235,205,11,73,136,249,202,45,58,133,71,184,169,34,156,51,68,246,187,150,84,143,241,29,10,231,63,99,198,12, +78,251,51,126,229,131,15,62,192,144,33,67,96,179,41,155,81,210,181,107,87,252,252,243,207,136,137,57,181,242,111,211,32,129,131,128,48,162,69,74,44,169,222,129,130,191,225,246,168,158,187,7,33,137,5,222,94,235,117,0,32,100,201,107,209,11,177,43,103,45, +133,204,25,204,157,47,129,46,49,129,84,147,241,30,222,243,103,66,13,33,4,210,211,211,241,232,163,143,194,237,190,104,157,84,181,116,233,210,5,139,22,45,58,227,252,43,225,32,32,60,48,25,116,104,144,72,156,254,207,37,169,254,135,128,88,232,237,181,94,7, +0,205,114,177,22,128,178,242,216,179,56,84,184,21,86,167,178,116,91,181,200,18,34,122,93,77,167,199,120,13,167,253,153,80,163,162,162,2,195,135,15,199,243,207,63,175,88,163,50,237,31,31,31,95,237,247,57,8,168,253,52,173,27,11,29,225,169,180,110,143,11, +7,104,78,206,205,113,172,236,232,117,154,221,235,0,96,232,208,76,55,132,88,172,204,166,127,240,8,55,246,228,170,158,46,124,14,81,188,13,224,119,120,229,207,132,26,199,142,29,67,207,158,61,145,145,145,161,88,163,166,149,255,249,112,16,80,187,105,174,65, +250,223,238,42,39,80,146,22,166,167,167,123,188,189,218,167,6,70,73,150,126,244,221,160,170,236,204,89,67,33,115,6,99,155,22,48,52,226,15,155,191,224,149,63,19,106,172,90,181,10,93,186,116,193,198,141,202,211,172,221,187,119,191,224,202,255,124,56,8, +168,157,68,154,13,168,23,79,59,252,103,103,54,141,79,148,36,204,243,229,122,159,2,0,107,153,109,17,0,213,97,202,145,162,237,40,119,168,30,46,120,14,145,215,245,34,213,99,170,135,87,254,76,40,33,132,192,59,239,188,131,62,125,250,32,39,39,71,177,78,207, +158,61,189,90,249,159,15,7,1,181,143,150,245,227,64,56,250,31,78,183,29,251,242,73,246,255,203,12,38,241,179,47,55,248,20,0,156,62,89,200,167,7,84,135,16,30,236,201,189,224,41,133,62,19,53,184,15,36,194,150,12,166,42,225,180,242,47,44,44,12,180,9,140, +74,242,242,242,112,253,245,215,99,252,248,241,112,58,157,138,117,174,191,254,122,252,244,211,79,136,142,86,86,244,197,65,64,237,162,85,170,119,25,32,111,217,147,247,7,156,110,187,122,33,33,45,120,226,154,76,171,47,183,40,153,97,56,71,193,61,85,160,222, +6,208,37,196,193,124,85,103,82,77,230,31,194,169,213,47,51,51,19,169,169,169,120,230,153,103,96,183,19,124,48,25,191,179,108,217,50,92,118,217,101,88,180,72,221,12,179,97,195,134,97,206,156,57,48,155,205,170,116,56,8,168,29,164,214,137,66,76,132,145, +84,115,103,246,239,36,58,146,44,124,246,205,62,7,0,146,209,62,31,128,178,198,217,179,56,86,188,19,101,118,218,85,86,244,245,125,73,245,152,83,132,83,218,127,246,236,217,184,227,142,59,96,181,90,241,210,75,47,161,115,231,206,88,191,158,54,91,197,104,135, +213,106,197,228,201,147,113,221,117,215,225,216,49,175,102,161,212,200,184,113,227,48,99,198,12,24,141,52,47,124,14,2,66,159,214,13,104,87,255,54,103,25,14,21,110,165,144,178,202,14,179,207,69,250,62,7,0,147,186,207,43,21,2,75,125,189,239,124,132,16, +216,157,187,78,173,204,57,88,186,118,134,190,110,34,169,102,184,19,78,105,255,204,204,76,140,24,49,226,156,116,241,142,29,59,208,173,91,55,76,156,56,17,86,171,79,217,53,198,207,172,94,189,26,151,94,122,41,94,125,245,85,120,60,94,23,66,87,65,146,101,188, +249,230,155,120,231,157,119,32,203,116,7,189,0,28,4,132,50,38,131,142,124,246,255,206,156,181,36,195,127,0,44,158,216,255,107,159,235,243,20,253,117,203,128,242,62,154,179,216,158,189,146,66,230,31,100,25,145,3,210,104,53,195,152,112,75,251,143,28,57, +18,46,87,213,15,163,219,237,198,27,111,188,129,75,47,189,20,171,86,173,10,128,117,204,133,40,44,44,196,3,15,60,128,107,175,189,22,123,247,238,85,165,37,233,141,168,63,234,57,196,92,59,148,200,186,170,112,16,16,154,180,74,141,39,237,253,7,128,157,57,171, +105,132,36,145,169,228,54,101,225,173,201,254,3,128,10,69,247,158,197,137,146,253,200,41,83,230,92,106,34,106,112,95,128,56,106,15,71,216,249,87,101,239,222,189,232,213,171,23,30,123,236,49,197,7,199,48,116,8,33,48,99,198,12,180,109,219,22,211,166,77, +83,181,234,7,0,125,108,18,26,63,246,62,98,46,235,141,169,191,31,196,167,27,213,109,33,92,8,14,2,66,143,214,196,197,127,197,182,28,28,163,152,253,15,148,217,202,236,62,181,255,85,162,200,83,78,234,62,175,84,2,84,159,13,0,0,155,179,84,239,38,156,131,190, +110,34,44,93,185,24,80,13,225,184,231,127,49,231,95,137,199,227,193,251,239,191,143,230,205,155,227,157,119,222,81,60,74,150,81,199,198,141,27,209,171,87,47,220,113,199,29,200,206,206,86,173,103,105,210,30,77,159,152,6,75,163,54,103,190,198,65,0,83,73, +253,132,72,196,69,153,72,53,183,156,248,21,66,16,28,253,11,124,127,186,67,207,103,20,47,149,5,196,76,165,247,158,205,246,236,85,52,45,16,103,17,115,219,32,82,189,112,34,220,247,252,189,37,63,63,31,227,199,143,71,215,174,93,177,122,53,81,26,143,185,40, +71,142,28,193,29,119,220,129,43,175,188,18,43,87,210,108,33,198,93,53,24,141,31,121,23,250,152,58,85,190,199,65,0,3,0,237,27,211,214,150,9,225,193,182,19,43,72,180,36,161,220,23,43,14,0,108,121,210,98,16,156,13,96,119,85,144,23,3,154,47,191,20,134,102, +141,73,53,195,1,78,251,251,206,198,141,27,209,189,123,119,220,120,227,141,216,186,149,164,154,151,169,134,172,172,44,60,246,216,99,104,213,170,21,102,204,152,65,178,114,146,141,102,212,31,49,5,41,195,39,65,210,27,106,188,142,131,128,240,38,218,98,68, +163,164,40,82,205,253,249,127,163,196,174,218,125,2,64,110,124,108,130,226,52,186,226,0,32,125,104,166,67,34,154,9,176,57,107,25,133,204,57,68,223,50,128,92,179,54,195,206,95,29,243,231,207,71,167,78,157,48,106,212,40,236,217,179,135,76,55,220,201,202, +202,194,132,9,19,208,188,121,115,188,255,254,251,100,115,25,76,245,154,160,201,132,143,17,123,229,64,175,174,231,32,32,124,105,223,184,14,36,202,209,127,0,182,156,88,78,164,36,50,30,184,124,154,226,41,87,170,170,229,132,132,175,213,220,95,201,177,226, +93,200,43,63,74,33,117,134,168,235,122,66,142,161,61,174,177,182,194,206,159,6,143,199,131,111,191,253,22,109,219,182,197,208,161,67,241,215,95,127,145,63,35,92,216,178,101,11,238,190,251,110,52,109,218,20,111,191,253,54,108,54,213,163,71,206,16,215, +117,48,154,76,152,6,83,189,166,62,221,199,65,64,248,97,208,203,104,149,26,71,170,89,238,40,194,254,124,154,119,131,36,164,175,212,220,175,42,0,152,156,150,249,59,128,93,106,52,42,161,139,136,78,33,153,77,136,26,220,135,84,179,54,194,206,159,30,143,199, +131,204,204,76,116,233,210,5,253,251,247,199,162,69,139,84,87,168,135,3,46,151,11,63,254,248,35,250,247,239,143,78,157,58,225,203,47,191,132,195,225,32,211,215,71,39,160,225,253,255,69,202,176,73,144,141,202,38,251,113,16,16,94,180,78,141,135,145,120, +196,252,214,19,191,194,35,72,138,135,183,79,234,147,169,234,104,93,213,253,114,18,132,170,8,164,146,109,39,87,194,229,81,62,175,187,58,162,111,25,8,232,248,124,128,154,96,231,175,61,75,150,44,193,224,193,131,209,170,85,43,188,249,230,155,40,40,40,240, +235,243,67,129,195,135,15,227,185,231,158,67,227,198,141,113,243,205,55,99,201,146,37,36,123,252,103,19,211,41,13,205,38,125,133,168,246,221,84,107,249,35,8,184,186,109,138,102,250,140,119,72,18,208,174,81,213,194,80,117,8,108,33,42,254,19,146,152,174, +86,67,125,195,188,75,255,37,0,213,225,140,213,89,138,61,185,170,130,153,42,232,235,38,34,50,237,26,82,205,218,2,59,127,255,178,127,255,126,60,245,212,83,72,77,77,197,208,161,67,177,96,193,130,128,218,19,104,242,242,242,240,225,135,31,162,103,207,158, +104,214,172,25,94,120,225,5,100,101,101,145,63,71,31,155,132,6,247,188,136,212,187,158,135,46,146,110,138,155,214,65,64,251,70,117,56,19,16,96,154,36,199,144,207,253,63,92,184,13,133,214,19,20,82,78,143,219,240,141,90,17,146,202,134,87,151,15,89,40,0, +213,189,119,141,227,59,96,120,167,231,40,76,58,131,243,208,49,100,221,51,30,240,208,174,40,66,25,118,254,193,65,114,114,50,134,14,29,138,91,110,185,5,215,94,123,45,244,122,125,160,77,210,148,99,199,142,97,193,130,5,248,241,199,31,177,108,217,50,85,39, +244,93,20,89,70,66,247,91,145,52,240,62,200,102,218,179,219,207,230,137,238,77,113,255,229,13,52,211,223,117,172,0,191,111,167,15,140,152,139,115,243,213,205,145,24,99,33,213,156,179,245,53,236,203,35,57,250,247,199,201,189,51,111,86,43,66,243,198,145, +48,29,66,125,0,112,184,112,59,114,203,143,34,41,178,33,133,85,0,0,67,147,6,176,116,237,2,235,26,146,31,122,200,195,206,223,123,186,53,189,18,22,131,5,191,238,93,5,183,160,223,195,207,201,201,193,251,239,191,143,247,223,127,31,117,234,212,193,245,215, +95,143,235,175,191,30,189,123,247,70,66,66,2,249,243,252,141,205,102,195,250,245,235,177,124,249,114,44,92,184,16,127,253,245,23,121,106,191,58,44,141,219,161,222,109,227,97,110,216,230,226,23,171,100,234,239,7,1,64,179,32,160,77,131,83,127,7,28,4,248, +151,6,137,81,228,206,191,208,122,18,251,243,255,36,209,146,128,207,137,116,212,243,241,198,177,134,194,146,194,67,0,84,231,172,58,166,164,97,80,155,135,212,27,117,22,246,29,123,113,242,161,201,164,154,161,8,59,127,239,233,222,172,43,238,191,106,20,36, +73,194,177,162,44,124,243,103,38,118,102,251,167,189,79,167,211,161,115,231,206,232,215,175,31,122,244,232,129,171,174,186,10,241,241,180,99,72,181,160,176,176,16,127,252,241,7,214,175,95,143,21,43,86,96,221,186,117,126,61,64,201,16,95,23,201,215,63, +128,152,203,250,156,218,192,245,35,156,9,168,93,12,190,162,41,82,18,104,51,71,75,247,78,199,159,199,124,62,176,175,58,178,226,99,226,155,168,105,255,171,132,236,83,242,223,101,67,94,148,36,252,159,90,29,89,210,225,193,171,223,71,180,137,182,248,34,251, +241,231,96,219,180,157,84,51,148,96,231,239,61,103,59,255,179,217,112,228,111,100,108,250,1,57,101,121,20,102,122,141,36,73,104,221,186,53,186,118,237,138,78,157,58,161,67,135,14,184,228,146,75,144,148,148,228,87,59,42,113,187,221,56,120,240,32,118,236, +216,129,29,59,118,96,235,214,173,216,176,97,131,234,131,120,148,34,155,35,81,167,207,72,212,233,57,20,146,129,118,92,171,47,112,16,80,59,72,142,181,224,198,174,205,73,53,29,110,43,254,183,230,65,216,93,234,3,98,73,18,233,147,210,102,63,79,96,22,209,22, +0,0,183,94,247,177,222,237,158,12,64,85,217,189,71,184,241,215,241,37,232,217,108,4,145,101,167,136,25,117,91,216,6,0,236,252,189,167,38,231,15,0,87,52,186,12,157,27,92,130,223,246,175,193,143,219,22,163,200,234,159,3,129,132,16,216,181,107,23,118,237, +58,183,227,54,57,57,25,45,91,182,68,179,102,205,208,164,73,19,52,109,218,20,245,234,213,67,221,186,117,145,156,156,140,196,196,68,152,205,190,181,187,57,28,14,228,229,229,33,47,47,15,217,217,217,200,205,205,197,241,227,199,113,232,208,161,51,255,59,112, +224,0,105,95,190,82,100,147,5,241,221,111,69,157,180,17,164,5,126,74,225,237,128,218,65,167,230,201,228,154,155,179,150,145,56,127,0,46,167,71,250,148,66,8,32,204,0,0,192,43,191,14,153,7,129,27,212,234,152,245,145,120,232,154,15,97,212,41,235,213,173, +137,19,15,76,130,99,215,62,82,205,96,135,157,191,247,92,200,249,159,143,195,229,192,47,123,126,195,226,157,75,81,106,47,83,244,60,127,96,50,153,16,17,17,129,232,232,104,24,141,70,196,198,198,158,249,94,121,121,57,28,14,7,156,78,39,202,202,202,80,90,90, +26,148,197,146,231,35,27,205,136,187,230,38,36,246,185,3,186,40,218,33,45,20,76,232,214,4,99,174,160,171,99,58,159,237,71,242,177,118,39,73,37,57,115,30,9,209,102,220,122,77,11,82,77,33,60,152,182,254,113,20,89,213,31,90,5,96,238,228,222,153,183,81,8, +1,132,25,0,0,240,8,233,35,25,66,117,0,96,115,149,99,203,137,229,184,188,1,237,161,62,113,247,14,67,206,211,47,145,106,6,51,124,170,159,247,116,109,220,5,247,93,117,135,215,35,63,141,122,35,6,183,235,135,254,109,210,240,251,129,117,248,113,219,79,40,168, +40,84,244,108,45,177,219,237,176,219,237,40,44,12,62,219,124,69,31,21,143,184,110,55,35,161,199,173,208,69,198,94,252,134,0,241,214,234,67,0,160,89,16,208,190,81,29,232,100,137,51,1,26,208,165,5,253,234,127,111,222,6,42,231,15,201,131,143,72,132,78,67, +58,37,167,71,211,33,251,245,141,115,239,4,160,186,98,169,160,34,11,93,26,12,32,157,193,108,104,144,2,251,223,219,224,202,206,37,211,12,86,168,78,245,27,62,124,56,177,101,244,80,172,252,199,94,125,23,100,201,247,177,24,178,36,163,73,66,35,244,109,117, +45,146,34,19,145,83,150,27,212,25,129,80,196,148,210,12,201,131,199,162,254,200,41,136,108,213,69,241,20,63,127,178,238,104,17,140,58,25,93,82,181,9,84,18,99,44,136,48,235,113,36,183,84,19,253,112,36,49,198,130,174,109,232,7,48,253,188,231,19,148,216, +8,234,134,4,246,78,234,147,249,196,243,36,191,106,233,49,0,0,32,0,73,68,65,84,187,255,167,32,13,0,86,172,88,33,250,142,110,39,32,73,222,157,176,113,1,236,174,114,36,70,54,68,34,97,75,32,0,24,82,83,80,182,152,118,236,112,176,65,177,242,255,234,171,175, +66,194,249,83,172,252,199,92,61,90,145,243,63,27,89,146,209,56,161,33,250,180,186,22,151,165,118,132,211,237,68,86,201,73,191,180,189,213,70,36,189,1,49,151,244,68,221,91,198,161,238,13,15,193,220,176,21,36,57,180,166,122,114,16,16,90,244,236,216,128, +124,240,79,86,201,94,172,58,56,139,68,75,2,210,187,55,219,65,58,45,143,252,19,213,125,72,243,109,122,163,254,65,0,17,106,181,138,109,185,232,84,191,47,129,85,255,160,175,155,4,251,214,93,112,157,160,73,201,4,27,188,242,247,30,53,43,255,11,17,103,137, +69,151,134,157,208,163,217,213,176,232,205,200,175,40,64,133,195,127,237,112,161,140,165,113,59,212,233,51,18,245,239,120,6,177,151,247,135,177,78,125,191,183,244,81,194,65,64,104,80,47,62,2,151,183,172,75,174,251,243,238,105,40,180,158,164,144,42,178, +201,184,107,197,151,59,232,14,199,128,6,1,192,138,153,123,156,125,239,106,23,11,72,61,212,106,149,57,10,209,56,190,3,98,205,180,237,78,198,198,13,80,182,144,254,8,226,64,195,5,127,222,227,75,193,159,82,44,6,51,218,214,109,133,126,173,123,161,93,221,214, +144,37,25,57,101,185,112,121,130,191,208,206,159,152,234,53,65,66,143,219,145,50,108,34,234,244,30,9,75,227,118,144,13,180,43,177,64,194,65,64,240,211,179,99,3,68,91,104,255,230,114,202,14,97,249,62,213,211,122,1,0,18,240,222,51,189,51,23,146,136,157, +133,38,179,71,221,122,207,251,58,151,238,73,0,170,155,114,215,31,153,135,134,113,109,9,172,250,7,99,155,22,176,92,93,187,166,3,114,193,159,247,248,90,240,167,22,9,18,90,39,183,64,235,228,22,184,243,242,161,216,147,187,31,127,31,223,138,63,14,255,133, +98,91,137,95,108,8,42,36,25,230,6,45,17,213,238,26,68,183,191,6,230,134,173,3,109,145,230,104,93,24,200,45,130,202,105,144,24,69,62,244,7,0,214,28,154,3,128,100,11,208,165,19,238,15,40,132,206,71,179,55,224,43,203,111,255,12,144,238,165,208,186,179,203, +75,168,31,211,146,66,234,12,142,253,135,113,226,254,167,128,90,112,76,43,175,252,189,199,31,43,127,111,241,8,15,118,231,236,195,150,172,237,216,118,114,23,142,22,30,135,160,121,97,4,29,134,132,122,136,108,209,25,17,45,59,35,170,237,85,65,93,197,175,37, +220,34,24,92,72,18,112,83,87,250,153,255,249,21,199,241,217,31,79,16,213,0,137,140,201,189,103,15,35,16,170,130,134,167,143,136,169,128,116,15,8,130,140,213,7,51,49,228,210,127,17,216,244,15,198,230,141,17,53,168,55,202,22,44,37,213,245,55,236,252,189, +39,152,156,63,112,170,112,176,109,221,86,104,91,183,21,134,1,40,177,149,98,71,246,110,236,204,222,131,125,121,7,145,85,124,18,30,13,206,32,208,28,89,134,169,110,99,88,26,181,131,165,105,7,68,182,232,12,67,29,62,222,22,224,22,193,96,163,69,74,28,185,243, +7,128,181,135,230,146,21,0,123,60,210,219,36,66,213,160,233,155,144,234,148,64,0,24,121,217,243,228,91,1,238,194,98,100,221,241,8,60,229,161,89,160,197,206,223,123,130,205,249,123,131,205,105,195,129,252,195,216,159,127,8,71,10,143,225,88,81,22,178,75, +115,52,57,152,72,41,178,41,2,166,186,141,96,172,215,20,230,148,102,48,55,108,3,115,131,86,144,77,244,47,213,218,132,214,153,0,30,27,124,113,244,58,25,183,119,111,137,40,179,129,84,183,200,154,141,79,214,143,135,71,184,41,228,86,76,238,157,153,70,33,84, +29,154,158,63,234,17,120,83,146,104,2,128,223,15,101,96,68,167,127,83,72,157,65,23,31,139,152,225,55,163,232,179,153,164,186,254,128,157,191,247,132,162,243,7,0,179,193,140,118,245,90,163,93,189,127,246,200,93,30,23,178,138,79,226,68,73,54,114,203,243, +145,91,150,143,188,178,60,228,150,23,160,200,90,4,187,139,180,72,24,70,147,25,194,18,3,125,92,18,12,9,41,48,36,212,131,49,161,30,12,9,41,48,38,55,132,33,190,30,233,243,194,5,174,9,8,60,151,52,73,36,119,254,0,176,238,200,15,84,206,31,16,226,53,26,161, +234,209,252,141,248,202,242,33,127,2,232,76,161,53,162,211,191,209,40,190,61,133,212,25,132,221,129,172,59,199,133,212,112,32,118,254,222,19,170,206,95,41,14,183,19,101,246,50,20,219,74,145,122,77,99,196,183,75,134,195,225,64,105,105,41,172,86,107,149, +25,254,70,163,17,145,145,145,136,137,137,129,217,108,70,84,84,20,162,163,163,145,156,156,140,228,228,100,100,236,42,196,235,171,14,6,232,95,83,251,225,76,64,96,176,24,245,24,218,163,21,12,122,218,22,224,98,91,14,62,89,63,30,110,130,78,31,1,108,153,156, +150,217,73,146,180,43,12,210,52,3,0,0,146,36,166,10,33,145,244,66,172,60,248,29,70,197,191,64,33,117,6,201,100,68,220,253,35,145,247,210,59,164,186,90,193,213,254,222,227,239,106,255,96,192,168,51,32,33,34,30,9,17,241,232,124,233,85,232,112,163,218,216, +59,244,71,8,7,51,156,9,8,12,87,180,170,75,238,252,1,96,229,129,153,36,206,31,0,32,164,87,180,116,254,0,64,255,19,56,143,184,232,132,12,0,71,40,180,142,23,239,198,129,130,77,20,82,231,16,217,175,7,140,109,104,15,128,208,2,170,9,127,35,71,142,36,182,140, +158,217,179,103,99,228,200,145,112,58,149,29,121,221,181,113,23,60,112,205,221,228,67,126,24,134,154,183,86,31,194,39,27,142,106,166,223,166,65,2,174,110,203,69,152,149,36,68,155,209,178,190,234,105,245,85,200,41,59,140,157,57,107,168,228,14,218,229, +156,76,42,177,154,208,252,237,248,192,229,211,156,18,196,171,84,122,171,14,124,7,162,222,202,127,144,36,212,153,48,6,144,131,119,165,72,53,225,47,20,156,127,102,102,38,70,140,24,161,216,249,119,111,214,21,15,94,115,15,59,127,38,100,208,58,8,104,223,168, +14,186,183,175,175,153,126,40,113,117,155,20,77,134,75,174,60,48,131,172,242,95,0,175,164,167,173,208,124,98,152,95,222,144,113,49,9,159,0,32,217,72,60,89,122,0,251,242,254,164,144,58,7,99,155,22,136,26,76,59,118,152,10,78,251,123,79,56,166,253,153,218, +129,63,50,1,225,30,4,180,74,141,215,100,232,207,177,226,93,216,159,255,55,149,220,17,123,30,190,160,18,187,16,126,9,0,30,184,124,154,83,64,122,145,74,111,213,193,89,154,28,178,18,63,118,20,116,113,49,228,186,106,224,180,191,247,112,218,159,9,117,56,8, +208,14,147,65,135,43,90,209,207,251,7,128,223,246,207,160,19,147,196,203,233,67,51,105,219,121,106,192,111,111,202,230,121,226,75,0,187,41,180,114,202,14,99,91,246,111,20,82,231,32,199,68,33,110,236,40,114,93,53,124,116,116,15,167,253,189,128,211,254, +76,109,129,131,0,109,184,162,101,93,88,140,244,117,239,251,242,254,196,177,226,93,36,90,18,112,212,150,43,77,39,17,243,2,191,189,45,135,14,205,116,67,162,203,2,172,220,63,19,14,55,253,0,159,168,65,189,97,238,68,219,106,168,134,91,146,27,33,86,175,172, +87,245,219,111,191,13,137,180,63,183,250,49,204,185,112,16,64,75,82,172,5,173,79,119,68,80,34,132,192,202,131,223,145,233,121,132,228,183,213,63,224,199,0,0,0,154,229,138,153,16,216,73,161,85,230,40,196,218,195,63,80,72,157,139,36,33,97,252,253,144,244, +193,113,246,120,138,201,130,87,91,117,81,116,239,241,227,199,137,173,161,135,247,252,25,166,122,56,8,160,65,146,36,116,111,151,170,73,225,223,150,147,203,145,91,166,44,67,91,13,71,34,237,165,126,91,253,3,126,14,0,78,103,1,210,169,244,54,28,157,143,66, +43,253,193,23,134,166,141,16,125,219,96,114,93,165,12,72,172,143,91,235,54,242,249,190,41,83,166,96,203,150,45,26,88,68,3,239,249,51,204,133,225,22,65,245,180,111,148,128,58,49,102,114,93,135,219,138,85,7,102,145,233,73,66,164,143,27,180,216,78,38,232, +5,126,127,115,78,74,203,200,4,176,153,66,203,237,113,97,5,101,241,197,89,196,221,55,2,250,6,193,243,193,120,190,249,165,104,96,142,240,233,30,187,221,142,145,35,71,86,153,254,22,12,176,243,103,24,239,224,22,65,229,68,91,140,232,210,82,155,194,191,213, +7,103,163,220,81,68,37,183,199,42,231,125,77,37,230,45,126,127,123,74,18,132,68,152,5,216,147,187,30,135,10,232,87,185,146,201,136,196,41,143,5,205,108,128,104,189,1,83,91,95,14,157,143,121,172,237,219,183,227,153,103,158,209,200,42,101,112,193,31,195, +248,6,111,7,40,163,123,251,250,48,232,232,223,19,69,214,108,252,121,252,39,50,61,1,233,95,254,232,251,63,159,128,188,65,39,165,101,252,0,224,15,42,189,101,251,190,164,59,124,225,44,76,29,90,35,250,166,1,228,186,74,185,50,54,17,99,27,180,242,249,190,183, +222,122,11,203,151,47,215,192,34,223,225,61,127,134,81,6,7,1,190,209,182,97,2,82,235,68,105,162,189,116,239,23,112,123,148,45,96,170,225,207,201,105,25,115,169,196,124,33,112,75,40,33,210,169,164,242,202,143,98,203,9,109,28,92,252,131,119,66,95,63,120, +78,60,123,178,73,91,92,26,237,219,24,75,143,199,131,209,163,71,163,160,160,64,35,171,188,131,211,254,12,163,14,14,2,188,35,210,108,208,172,231,255,96,193,102,236,207,167,27,70,39,132,248,151,214,51,255,107,34,96,111,210,201,125,102,47,6,176,132,74,111, +213,129,89,176,187,202,169,228,206,32,153,77,168,51,241,65,104,82,66,170,0,189,36,227,205,214,151,195,34,251,214,165,112,252,248,113,140,29,59,86,35,171,46,14,59,127,134,161,129,131,128,139,211,163,125,42,140,26,116,114,121,132,27,191,238,251,138,82, +114,233,148,62,179,201,252,160,175,4,244,109,234,150,228,39,1,144,236,123,84,56,75,176,250,208,28,10,169,42,152,59,119,68,212,224,62,154,104,43,161,69,68,52,38,55,235,224,243,125,115,230,204,193,55,223,144,28,204,232,19,236,252,25,134,22,238,14,168,153, +86,169,241,104,144,168,77,234,255,175,99,63,33,183,156,236,231,238,148,116,242,56,42,49,37,4,244,141,250,127,105,179,182,9,72,211,168,244,254,60,182,24,217,165,218,156,93,158,240,216,189,48,52,12,158,168,120,116,253,230,232,157,224,251,214,196,163,143, +62,138,195,135,201,250,86,47,10,59,127,134,209,6,238,14,168,74,180,197,136,171,219,104,19,184,148,216,243,177,234,96,6,157,160,36,125,48,169,231,44,146,185,56,74,9,248,91,213,228,16,207,2,200,167,208,242,8,55,22,237,250,159,38,5,129,146,217,132,196,103, +199,7,205,128,32,9,192,235,173,187,32,209,104,242,233,190,226,226,98,140,26,53,10,110,55,253,207,232,124,216,249,51,140,182,240,118,192,63,72,18,112,109,135,84,24,244,218,188,47,150,238,249,156,114,250,108,129,199,237,36,155,140,171,148,128,123,179,159, +191,217,97,237,119,87,7,27,128,129,20,122,229,142,98,152,116,17,72,141,109,77,33,119,14,186,196,4,64,8,216,54,109,39,215,86,66,132,78,143,198,230,40,44,200,61,230,211,125,71,142,28,65,68,68,4,186,119,239,174,145,101,52,227,125,199,94,125,23,59,127,21, +164,116,104,128,228,214,234,86,67,155,78,148,96,205,17,178,94,103,70,3,214,29,45,130,81,39,163,75,106,172,38,250,137,49,22,68,152,245,56,146,91,170,137,62,21,151,53,79,70,171,84,223,10,164,189,101,119,238,122,172,57,52,155,78,80,224,201,41,125,231,172, +164,19,84,70,80,188,93,173,82,206,255,36,96,27,149,222,239,135,50,80,100,205,166,146,59,135,216,59,111,131,169,61,125,112,161,148,254,137,245,49,172,94,19,159,239,251,191,255,251,63,252,251,223,255,214,36,19,192,179,253,25,198,191,132,123,38,32,49,198, +130,203,154,39,105,162,109,119,89,177,108,47,233,132,222,29,54,57,247,19,74,65,165,4,69,0,144,158,182,194,229,145,164,9,84,122,78,183,29,139,119,127,4,104,209,89,161,211,33,241,217,241,144,35,45,244,218,10,249,119,243,75,208,196,226,91,209,139,219,237, +198,127,254,243,31,244,238,221,155,244,204,0,238,243,103,152,192,16,174,65,128,94,39,35,237,146,6,144,53,122,103,252,118,96,6,74,237,116,45,212,66,136,9,129,24,250,83,29,65,17,0,0,192,148,180,140,165,0,22,82,233,29,41,220,142,173,39,86,80,201,157,131, +62,37,25,241,227,238,215,68,91,9,17,122,3,190,248,247,11,48,24,124,63,53,112,229,202,149,232,212,169,19,22,46,84,255,163,231,61,127,134,9,44,225,216,29,112,77,219,20,196,70,250,86,11,229,45,39,74,246,97,83,214,47,116,130,18,190,15,100,219,223,249,4,213, +155,86,2,158,4,64,118,20,226,242,253,95,163,220,81,76,37,119,14,81,3,122,33,106,96,154,38,218,62,33,73,72,120,236,30,244,156,52,30,83,166,76,81,36,145,151,151,135,27,110,184,1,19,39,78,84,236,188,121,188,47,195,4,7,225,212,29,208,188,94,172,102,251,254, +30,225,198,226,93,31,65,8,15,149,164,93,246,200,19,169,196,40,8,170,183,237,164,222,153,187,1,188,79,165,103,115,150,97,233,222,207,169,228,170,144,48,97,44,140,45,154,104,166,127,81,78,59,255,202,147,11,159,125,246,89,116,237,218,85,145,148,16,2,111, +188,241,6,174,185,230,26,236,223,191,223,167,123,57,237,207,48,193,69,56,108,7,196,70,154,208,189,125,170,102,250,107,14,205,69,110,249,17,58,65,9,111,61,221,103,150,111,47,87,141,9,170,0,0,0,76,146,243,5,0,57,84,122,187,114,214,98,95,222,70,42,185,115, +144,76,70,36,166,63,25,152,122,128,243,156,63,0,232,245,122,124,243,205,55,136,142,142,86,44,187,113,227,70,116,238,220,25,179,102,121,119,204,37,167,253,25,38,56,169,205,65,128,94,39,163,111,167,70,154,181,252,157,44,61,128,181,135,73,199,243,159,144, +12,246,151,41,5,41,8,186,183,238,132,180,31,138,32,137,199,41,53,151,236,249,76,147,49,193,0,96,104,88,31,9,79,61,164,137,118,141,84,227,252,43,105,222,188,57,222,120,227,13,85,242,37,37,37,24,62,124,56,70,143,30,141,138,138,138,26,175,99,231,207,48, +193,77,109,13,2,186,181,171,143,248,40,109,246,253,93,30,39,22,238,252,128,116,158,140,128,244,216,164,238,243,130,174,143,50,40,223,188,147,211,102,127,39,128,121,84,122,165,246,124,44,222,245,17,149,92,21,34,123,119,67,244,77,253,53,211,63,135,11,56, +255,74,198,142,29,139,27,110,184,65,245,163,190,254,250,107,116,235,214,13,123,246,236,169,242,61,222,243,103,152,208,160,182,5,1,109,26,36,160,101,253,56,205,244,87,29,252,14,121,116,227,126,33,4,22,76,233,157,161,205,156,122,149,4,237,219,87,118,233, +30,2,64,86,193,183,59,119,61,182,157,252,141,74,174,10,241,143,221,3,99,235,230,154,233,3,56,237,252,239,189,160,243,175,36,35,35,3,227,198,169,31,51,189,105,211,38,116,233,210,229,156,51,4,120,207,159,97,66,139,218,210,29,80,39,218,172,233,115,142,23, +239,198,134,163,100,205,104,0,80,34,203,110,63,167,136,189,39,224,147,0,107,98,233,215,219,74,251,141,110,95,6,9,131,168,52,15,23,110,69,155,228,174,176,24,148,239,145,215,132,164,211,33,226,234,46,168,88,177,22,158,242,154,211,230,202,31,80,233,252, +189,251,113,232,245,122,12,28,56,16,109,218,180,193,47,191,252,2,187,221,174,248,209,14,135,3,223,127,255,61,142,28,57,130,226,226,98,140,30,61,154,39,252,133,0,60,9,144,57,27,173,39,6,38,199,70,192,100,212,225,88,94,153,38,250,145,102,3,6,93,209,20, +38,131,54,110,203,233,182,35,99,243,203,176,58,233,50,245,2,24,55,185,247,156,95,201,4,137,9,234,183,176,117,85,251,255,1,248,157,74,207,225,182,97,254,142,119,53,57,43,0,56,53,42,56,249,205,231,160,175,155,72,44,172,67,157,167,31,246,218,249,159,205, +240,225,195,177,101,203,22,197,221,1,103,51,125,250,116,220,117,215,93,188,242,103,152,16,197,31,45,130,61,218,167,146,127,198,163,204,6,12,188,188,9,34,205,190,207,58,241,150,95,247,127,141,66,235,9,74,201,149,147,211,50,131,98,226,95,77,4,109,6,0,0, +86,172,88,33,122,223,217,126,189,36,225,126,0,122,10,205,50,123,33,36,200,104,20,223,158,66,174,10,186,216,24,68,166,117,131,125,231,94,184,115,242,212,235,213,137,71,242,203,147,17,209,227,42,197,26,113,113,113,184,251,238,187,225,112,56,176,102,205, +26,213,54,41,129,11,254,252,15,103,0,152,234,88,119,180,8,6,141,207,14,168,23,31,137,99,121,101,112,185,213,247,208,215,141,139,192,128,46,77,16,19,97,36,176,174,122,246,231,255,141,229,251,190,162,148,180,73,192,224,238,205,118,168,119,2,26,18,212,1, +0,0,44,251,106,71,110,191,187,219,233,0,169,23,149,230,241,226,221,104,18,223,17,49,102,226,149,250,105,228,8,11,162,250,247,130,108,49,195,177,115,47,132,211,247,21,179,164,215,33,250,198,254,72,122,97,34,12,141,27,168,183,73,150,209,183,111,95,116, +234,212,9,75,150,44,129,213,74,118,170,213,69,225,180,127,96,224,0,128,169,9,173,131,128,104,139,17,173,27,196,195,225,242,160,160,212,166,104,40,187,81,175,67,151,22,117,209,163,125,125,24,53,74,251,3,167,14,144,203,220,242,18,156,110,27,161,170,244, +239,201,189,51,127,32,20,212,132,160,15,0,0,160,251,224,246,107,245,17,184,21,64,50,133,158,128,192,225,194,237,232,152,146,6,189,172,81,74,73,150,97,234,216,6,81,131,251,66,142,176,192,117,252,164,87,181,1,186,248,88,68,223,208,15,137,207,140,71,100, +191,107,33,153,104,163,222,54,109,218,96,196,136,17,216,176,97,3,142,30,213,46,21,88,9,31,236,19,56,56,0,96,46,132,214,65,128,94,39,163,81,82,52,90,156,174,216,47,181,58,189,202,8,68,153,13,232,216,36,9,189,58,166,34,53,49,74,211,119,135,16,2,115,183, +189,78,59,240,71,96,107,124,108,252,93,11,166,253,73,54,66,80,43,66,230,173,252,242,242,219,174,146,33,175,6,97,208,210,161,94,79,12,110,251,8,149,220,133,17,2,142,189,7,97,223,178,19,142,131,71,224,46,40,130,176,59,32,25,244,208,37,38,192,208,40,21, +166,142,109,97,106,211,28,144,181,95,41,239,92,178,5,255,122,106,10,126,220,182,24,66,104,112,104,18,56,237,31,104,58,15,235,138,14,55,118,86,165,49,253,207,99,120,125,213,65,34,139,152,96,100,124,183,38,24,123,69,67,205,159,227,17,2,121,197,86,100,23, +85,160,168,220,142,10,187,11,30,143,128,78,150,16,97,210,35,62,202,140,122,241,145,168,19,99,214,220,150,74,86,31,202,196,239,7,51,41,37,61,30,15,186,255,171,111,230,90,74,81,173,32,217,87,247,7,255,234,61,103,253,127,151,223,254,129,4,73,125,111,219, +105,182,157,252,13,205,234,116,66,219,228,110,84,146,53,35,73,48,182,106,6,99,171,102,218,63,235,34,236,89,182,29,27,190,250,29,183,116,28,140,214,201,45,240,241,154,47,81,100,165,61,51,129,157,63,195,132,6,111,175,62,4,0,154,7,1,178,36,33,57,46,2,201, +113,17,154,62,199,91,142,22,237,192,234,67,228,237,249,111,135,138,243,7,130,188,11,224,124,244,78,203,191,0,84,157,74,163,130,159,118,77,67,126,5,221,113,184,193,206,158,101,219,177,110,250,111,103,78,74,110,87,183,53,94,24,56,5,29,83,218,146,61,131, +157,63,195,132,22,111,175,62,132,105,26,118,7,4,27,86,103,41,230,239,120,151,242,160,31,64,96,167,173,220,246,44,157,160,246,132,212,27,122,98,255,175,203,5,48,18,132,39,6,58,220,86,204,221,250,58,236,46,255,21,197,5,138,243,157,127,37,49,230,104,60, +217,235,17,220,122,201,245,170,157,54,79,248,99,152,208,36,124,130,0,129,69,187,62,68,169,189,128,82,212,41,132,124,87,250,13,243,53,24,2,163,29,33,247,150,158,210,59,243,79,9,34,157,82,179,160,34,11,139,119,253,15,85,60,99,45,162,38,231,95,137,36,73, +184,169,195,64,60,115,221,147,72,140,172,163,232,25,220,231,207,48,161,77,56,4,1,235,143,204,163,63,32,78,72,255,154,210,119,214,6,90,81,237,9,185,0,0,0,172,43,59,188,10,96,57,165,230,238,220,245,88,127,132,236,248,129,160,226,98,206,255,108,154,215, +105,130,244,1,79,163,83,106,7,159,158,193,105,127,134,169,29,212,230,32,224,112,225,86,252,118,96,38,169,166,0,126,179,173,106,55,149,84,212,79,132,68,27,224,249,172,88,177,66,244,187,187,205,114,64,190,27,0,217,89,188,135,139,182,161,126,76,43,196,91, +234,81,73,6,28,95,156,127,37,38,189,17,93,155,92,142,72,99,4,118,102,239,129,231,34,251,100,236,252,131,19,110,3,100,148,162,117,139,96,32,40,177,229,98,214,230,23,225,116,43,31,139,94,13,133,110,157,238,186,231,238,126,159,182,138,218,79,132,236,27, +123,82,218,220,99,2,210,88,74,77,33,4,230,237,120,7,197,182,28,74,217,128,177,235,231,173,62,59,255,74,36,72,184,174,117,26,158,185,238,73,36,71,213,60,48,137,157,63,195,212,78,222,94,125,8,95,252,85,59,10,164,93,30,39,190,223,246,38,233,156,255,83,72, +15,62,211,243,187,144,77,151,132,244,91,123,74,239,140,57,2,226,75,74,77,155,179,12,223,111,125,19,46,15,89,157,97,64,216,191,106,55,254,248,122,149,234,178,134,166,9,141,240,159,129,83,208,181,113,151,42,223,99,231,207,48,181,155,215,87,30,64,198,86, +210,249,248,1,97,201,158,79,113,178,244,0,177,170,248,100,114,239,140,12,98,81,191,18,242,111,110,187,36,61,10,129,189,148,154,217,101,7,177,116,239,116,74,73,191,114,98,251,49,172,153,182,156,172,166,209,98,48,227,161,110,247,98,236,213,163,97,212,159, +154,76,200,206,159,97,106,63,2,192,11,203,247,99,221,209,208,221,6,218,120,108,17,182,158,32,63,144,111,159,100,116,60,73,45,234,111,66,254,237,157,158,150,89,38,201,242,104,0,202,142,168,171,129,205,89,203,176,249,196,50,74,73,191,96,47,179,99,213,7, +75,33,60,244,29,13,221,154,94,133,103,251,61,137,235,219,93,199,173,126,12,19,38,184,133,192,196,197,187,80,108,35,125,197,250,133,163,69,59,241,235,190,175,169,101,29,146,228,25,49,169,251,60,234,253,4,191,83,43,222,224,147,210,102,173,147,32,253,135, +90,247,151,61,159,225,72,209,118,106,89,77,249,59,99,29,108,197,218,181,162,54,138,111,128,33,157,110,226,86,63,134,9,35,242,43,156,120,107,117,104,141,132,46,182,229,224,135,237,83,201,143,127,23,146,244,220,164,180,57,196,125,132,129,161,86,4,0,0,208, +52,79,188,12,128,116,201,238,246,184,240,253,214,55,66,102,82,96,105,78,9,246,174,216,25,104,51,24,134,169,133,204,217,150,141,195,69,161,49,48,205,238,42,71,230,230,255,162,194,65,92,156,47,97,177,253,183,118,175,211,138,6,142,90,19,0,12,29,154,233, +54,58,48,20,0,105,152,106,115,149,35,115,243,203,40,167,254,67,210,128,93,63,111,133,32,56,127,155,97,24,230,124,220,66,224,219,77,89,129,54,227,162,120,132,27,63,108,155,74,190,112,19,192,97,61,244,163,211,211,211,107,205,75,182,214,4,0,0,240,196,128, +204,2,89,194,173,0,72,195,212,98,91,46,102,111,121,133,186,127,148,20,225,246,224,224,26,210,99,18,24,134,97,206,97,209,238,92,184,53,168,47,162,228,151,61,159,227,80,225,86,106,89,155,78,200,183,62,149,54,51,143,90,56,144,212,170,0,0,0,158,78,203,220, +36,9,60,64,173,123,178,116,63,126,220,254,54,237,225,17,132,228,29,204,133,173,36,52,210,115,12,195,132,38,5,86,39,182,231,148,5,218,140,26,89,123,120,46,54,101,253,66,174,43,36,60,244,116,159,89,127,145,11,7,152,90,23,0,0,192,164,62,153,95,3,226,19, +106,221,253,249,127,226,215,253,223,80,203,146,144,187,231,100,160,77,96,24,38,12,248,243,120,112,110,135,238,202,89,139,85,7,103,145,235,10,9,239,79,73,203,252,130,92,56,8,168,149,1,0,0,68,216,202,31,3,240,7,181,238,134,163,11,240,215,177,159,168,101, +85,83,156,85,24,104,19,24,134,9,3,14,20,4,95,166,241,88,241,110,44,220,249,62,132,32,223,158,88,99,207,69,200,247,251,215,68,173,13,0,198,13,90,108,119,233,116,183,3,200,165,214,94,186,111,58,246,230,5,215,193,79,86,13,91,255,24,134,97,42,201,171,8,174, +41,169,121,229,71,49,103,235,171,112,121,156,212,210,217,46,129,161,233,67,51,131,235,31,76,72,173,13,0,0,224,153,158,223,29,21,2,195,65,60,36,72,8,129,249,59,222,197,137,146,253,148,178,170,112,59,66,111,72,7,195,48,161,135,213,73,219,87,175,134,98, +91,14,102,109,126,17,54,39,121,93,130,83,246,136,33,207,244,201,12,141,30,112,133,212,234,0,0,0,166,244,201,92,46,128,127,81,235,58,221,118,204,218,252,34,178,203,130,99,56,134,222,100,8,180,9,12,195,132,1,145,198,224,56,68,182,194,89,130,140,205,47, +163,204,78,191,253,41,65,122,234,233,190,179,87,145,11,7,25,181,62,0,0,128,201,105,153,111,64,96,54,181,174,253,244,140,128,130,138,192,31,150,97,137,37,59,21,153,97,24,166,70,18,35,140,129,54,1,118,87,5,102,109,122,17,5,21,244,115,9,4,164,111,39,245, +206,120,151,92,56,8,9,139,0,64,146,32,140,22,140,150,36,172,165,214,46,119,20,227,187,77,255,9,248,17,194,177,13,18,2,250,124,134,97,194,131,150,137,145,1,125,190,203,227,192,156,173,175,34,167,236,144,22,242,127,216,203,173,164,199,204,7,51,97,17,0, +0,192,19,215,100,90,117,208,223,8,96,31,181,118,169,61,31,223,109,122,65,147,84,148,183,212,109,157,18,176,103,51,12,19,62,92,158,26,27,176,103,11,225,193,252,29,239,225,104,145,38,35,207,15,232,156,174,27,210,111,152,31,54,21,213,97,19,0,0,192,83,105, +51,243,36,157,124,35,240,255,237,221,121,124,148,229,185,240,241,223,61,51,201,100,223,23,200,2,36,44,33,4,148,197,93,22,179,176,185,160,5,130,212,86,218,99,107,151,115,142,231,188,237,91,13,112,168,70,43,21,180,245,244,120,186,89,125,173,82,169,144, +0,238,184,177,136,90,197,202,38,251,146,4,8,9,89,39,123,50,51,153,153,231,126,255,64,44,85,246,228,153,103,150,251,251,249,240,177,254,115,95,215,199,14,243,92,115,63,247,125,93,244,251,147,186,205,222,192,170,93,143,208,227,234,232,239,165,47,74,194, +224,100,34,18,162,12,137,173,40,74,112,24,24,109,37,39,217,152,29,0,41,53,222,56,240,91,14,55,125,170,199,242,205,38,179,54,227,254,233,47,27,187,149,235,101,65,85,0,0,148,76,89,125,0,41,238,0,250,189,175,175,173,167,150,85,187,126,161,199,137,212,11, +19,48,252,166,92,239,199,85,20,37,104,20,143,25,128,17,115,64,165,212,120,243,224,239,217,223,240,145,30,203,247,10,77,204,123,96,202,218,35,122,44,238,203,130,174,0,0,88,88,88,246,1,66,126,23,232,247,174,17,77,93,199,41,223,253,24,189,30,239,55,203, +200,153,58,154,144,48,117,27,64,81,148,254,23,109,181,48,111,140,247,95,53,74,41,89,127,240,15,236,171,255,64,151,229,133,144,247,148,20,149,109,214,99,113,95,23,148,5,0,192,194,252,53,171,128,82,61,214,62,217,113,132,181,187,31,199,173,121,183,127,68, +88,76,56,99,110,159,224,213,152,138,162,4,135,31,94,147,73,66,184,119,127,96,156,122,248,255,158,189,245,91,116,10,192,226,146,252,53,43,245,89,220,247,5,109,1,0,80,146,95,254,11,36,207,235,177,118,117,219,62,202,62,95,138,211,237,221,157,128,188,91, +198,146,60,124,128,87,99,42,138,18,216,198,167,197,240,157,241,233,94,142,42,121,247,240,179,250,61,252,225,255,45,44,44,95,166,215,226,254,32,168,11,0,33,144,241,177,241,63,64,208,255,227,163,128,19,109,7,88,181,235,17,236,174,78,61,150,63,43,97,54, +49,249,190,105,234,64,160,162,40,253,98,96,180,149,95,223,156,139,89,120,243,237,191,228,157,67,207,234,50,217,239,11,239,56,68,211,143,244,90,220,95,4,117,1,0,240,195,171,254,228,178,226,154,7,236,211,99,253,250,206,74,86,237,250,133,87,111,7,68,38, +70,49,117,225,109,68,196,27,123,95,87,81,20,255,150,26,101,229,153,111,140,38,53,202,123,205,127,164,212,88,127,224,15,186,61,252,37,236,118,56,66,231,149,230,191,31,244,253,211,131,190,0,0,248,73,254,43,109,110,179,121,38,112,76,143,245,27,187,142,241, +215,29,15,121,181,79,64,108,122,60,51,31,158,67,194,144,36,175,197,84,20,37,112,228,166,68,241,210,252,43,201,78,136,240,90,76,143,230,230,213,125,191,97,79,253,251,122,133,168,52,185,205,51,75,111,94,105,204,125,109,31,163,10,128,47,44,153,178,234,132, +73,154,138,128,254,239,45,201,169,43,130,47,238,88,66,155,189,65,143,229,207,42,50,49,138,153,165,115,200,157,126,133,215,98,42,138,226,255,102,229,166,176,114,222,149,12,136,178,122,45,166,203,227,100,221,158,199,57,212,180,85,175,16,53,102,51,83,75, +166,173,210,229,59,222,31,169,2,224,12,15,20,174,174,212,52,83,62,160,203,83,186,221,209,196,202,29,15,210,220,125,66,143,229,207,202,28,98,230,234,5,19,153,248,227,34,53,48,72,81,148,243,10,179,152,248,197,212,225,44,155,158,67,152,197,123,143,7,167, +187,135,178,207,151,82,213,178,75,175,16,77,194,108,154,118,255,148,114,223,152,222,230,35,84,1,240,21,139,139,86,31,54,107,218,52,160,69,143,245,187,122,91,121,105,215,35,52,118,29,215,99,249,115,202,158,56,130,91,30,157,75,156,154,25,160,40,202,89, +100,197,135,179,106,254,88,230,228,121,247,22,81,79,111,59,47,237,124,152,154,246,131,122,133,104,147,102,109,122,201,148,213,186,244,15,246,103,170,0,56,139,251,139,214,238,22,194,116,11,160,75,75,191,158,222,118,94,218,245,48,117,29,149,122,44,127, +78,177,105,241,220,252,240,28,178,110,24,238,213,184,138,162,248,182,91,71,166,80,126,215,56,70,120,121,208,79,135,211,198,202,157,15,233,57,86,189,67,106,166,105,139,166,172,221,169,87,0,127,166,10,128,115,40,201,95,189,85,104,98,22,160,203,69,126,135, +171,139,151,118,149,82,209,188,77,143,229,207,201,18,22,194,164,127,155,202,13,247,230,99,81,93,3,21,37,168,69,134,154,89,58,117,4,143,207,200,33,34,196,236,213,216,205,221,53,172,220,241,115,93,70,250,126,161,7,41,110,91,84,180,250,51,189,2,248,59,85, +0,156,71,73,81,217,102,41,165,46,115,3,224,139,67,47,123,127,197,246,154,183,244,88,254,188,134,221,148,203,172,101,119,146,50,66,77,17,84,148,96,52,102,64,52,107,238,26,199,55,242,82,189,30,251,120,235,94,94,220,241,115,58,28,205,122,133,232,213,16, +197,11,11,203,116,233,31,28,40,84,1,112,1,139,10,215,188,43,132,152,15,232,114,103,84,74,141,13,71,254,204,134,35,127,70,74,77,143,16,231,20,149,28,195,244,37,183,51,126,254,245,152,204,234,163,160,40,193,192,44,4,223,191,42,131,149,243,174,100,112,92, +184,215,227,239,173,223,66,249,238,95,226,116,119,235,21,194,35,165,252,246,226,130,178,245,122,5,8,20,234,91,255,34,148,228,151,189,34,36,247,0,186,61,161,183,215,188,197,203,123,127,141,203,163,203,102,195,57,9,179,137,209,183,141,99,198,131,223,32, +58,213,184,57,223,138,162,232,47,45,198,202,243,115,199,240,211,137,89,88,76,222,158,235,39,249,219,177,53,188,121,224,247,120,52,221,122,240,104,66,200,239,44,42,92,83,174,87,128,64,162,10,128,139,84,82,88,254,23,41,197,183,209,105,39,0,224,72,243,103, +188,180,171,148,238,222,118,189,66,156,83,210,176,84,110,93,90,204,208,201,35,189,30,91,81,20,125,9,96,118,94,42,175,126,123,2,19,210,189,95,232,107,210,195,59,135,158,225,163,163,101,232,48,132,245,52,143,16,226,158,96,30,238,115,169,84,1,112,9,22,21, +150,189,132,20,179,1,135,94,49,234,58,42,249,203,246,197,216,122,106,245,10,113,78,33,225,161,220,248,195,2,138,74,110,37,50,81,205,18,80,148,64,144,18,25,202,111,103,141,226,209,169,35,136,12,245,238,65,63,128,94,143,157,181,123,30,103,215,201,13,186, +134,17,200,121,37,249,101,47,232,25,36,208,168,2,224,18,45,44,44,123,93,67,204,65,167,219,1,112,170,97,208,139,219,151,80,221,170,203,120,130,11,74,187,98,16,179,150,207,39,119,250,21,8,175,14,0,81,20,165,191,8,96,222,152,1,188,249,157,171,200,207,78, +52,36,135,150,158,58,86,108,91,76,149,77,215,91,120,61,32,102,149,20,172,89,167,103,144,64,164,10,128,203,176,184,160,108,189,208,132,110,125,2,0,28,238,110,202,118,47,229,243,147,27,245,10,113,94,33,225,161,92,189,96,34,211,127,126,7,49,3,227,12,201, +65,81,148,203,147,17,19,198,115,115,198,80,90,56,220,144,95,253,0,85,182,157,172,208,127,55,179,3,41,102,46,44,40,123,71,207,32,129,74,21,0,151,169,164,168,108,179,16,90,62,96,211,43,134,71,115,243,246,161,167,121,227,192,111,113,107,189,122,133,57,175, +148,156,129,220,186,180,248,212,110,128,215,15,13,41,138,114,41,204,66,240,157,241,233,188,182,96,2,215,102,26,87,184,111,171,89,207,154,61,203,245,60,233,15,208,42,132,105,186,186,234,119,249,84,1,208,7,37,249,107,183,153,4,69,64,147,158,113,246,213, +127,192,139,219,127,78,187,163,81,207,48,231,100,177,134,112,245,130,137,220,242,104,49,201,195,189,219,38,84,81,148,139,147,247,197,244,190,146,201,217,94,237,227,127,38,183,230,226,205,3,191,99,227,145,231,245,190,214,220,0,166,252,146,252,213,186, +77,14,10,6,170,0,232,163,7,242,203,119,105,66,155,12,212,232,25,167,161,235,40,47,108,91,196,209,150,233,133,193,178,0,0,23,211,73,68,65,84,207,245,12,115,94,9,131,147,152,249,208,108,110,252,81,33,214,232,48,195,242,80,20,229,31,98,172,22,22,77,201, +102,213,55,199,50,58,53,218,176,60,58,157,54,86,238,120,144,189,245,91,244,14,85,7,90,225,194,130,213,198,125,25,6,8,99,94,14,5,152,141,47,28,104,158,182,96,204,107,82,200,89,128,110,251,110,110,173,151,253,141,127,195,108,10,33,35,54,135,83,199,124, +188,76,156,42,4,134,223,52,10,205,229,193,86,101,204,174,132,114,97,3,71,103,144,146,211,183,78,143,187,234,58,248,184,186,173,159,50,82,250,147,224,212,216,222,223,207,202,227,186,65,113,152,12,60,176,123,188,117,15,171,119,61,74,171,189,94,239,80,149, +82,152,167,44,42,40,63,162,119,160,96,160,10,128,126,242,222,138,125,173,55,221,115,197,58,147,148,211,128,20,253,34,73,142,183,238,161,169,251,4,67,19,199,97,54,25,211,207,223,18,106,33,253,202,65,12,204,203,160,229,88,51,246,246,30,67,242,80,206,77, +21,0,129,43,55,37,138,255,190,37,151,187,199,165,19,238,229,30,254,103,146,82,227,111,199,214,240,246,161,167,113,121,116,187,29,125,218,231,194,109,46,90,88,180,202,123,243,212,3,156,42,0,250,209,166,231,247,118,76,189,119,216,95,208,44,99,1,93,71,238, +217,122,106,57,220,244,41,131,227,71,19,17,106,92,7,191,200,164,104,134,23,140,34,62,35,145,230,138,6,92,118,99,14,43,42,95,167,10,128,192,147,18,25,202,253,147,179,121,168,112,24,233,49,198,190,134,235,113,117,240,202,222,95,179,187,110,19,58,54,247, +57,69,240,30,30,110,94,56,173,76,183,225,1,193,72,21,0,253,108,195,115,135,122,139,239,155,88,230,112,56,50,17,140,213,51,150,221,213,197,190,250,15,137,13,75,33,57,106,144,158,161,206,75,8,65,92,70,2,35,10,243,8,9,15,165,185,162,1,205,237,221,185,6, +202,215,169,2,32,112,132,89,76,124,119,124,58,79,222,146,203,184,180,24,67,183,251,225,31,91,254,141,93,199,189,16,77,62,227,16,205,119,45,41,92,175,91,239,149,96,165,238,117,233,104,217,230,226,255,68,242,36,94,56,108,57,50,229,122,166,231,252,128,48, +139,119,231,121,159,77,79,107,55,187,215,125,198,145,247,15,32,53,157,127,25,40,231,52,254,206,235,24,61,107,124,159,214,248,243,246,26,158,248,80,183,89,237,202,5,8,96,218,240,36,238,159,148,77,90,140,213,232,116,0,201,214,234,215,248,160,234,37,111, +12,47,147,82,138,71,22,21,150,149,234,29,40,88,169,29,0,29,109,120,97,255,167,69,223,29,93,5,220,2,88,244,140,213,220,93,195,193,198,79,24,16,51,148,152,176,36,61,67,93,80,72,120,40,25,227,135,144,57,126,8,221,182,46,58,27,188,63,219,64,81,59,0,254,110, +210,144,120,158,188,57,151,111,143,75,39,218,170,235,215,199,69,233,234,109,101,221,158,39,190,104,78,166,123,97,239,144,130,187,23,21,148,255,78,239,64,193,76,21,0,58,219,240,194,190,221,69,11,70,109,66,136,219,129,8,61,99,57,221,221,236,173,223,130, +219,227,100,80,124,30,66,24,123,203,51,60,46,146,236,27,71,144,118,69,38,93,77,29,116,53,117,26,154,79,176,81,5,128,127,26,159,22,195,99,211,115,248,209,53,131,72,142,12,53,58,29,0,14,53,125,202,154,221,143,209,220,173,235,109,231,211,90,144,226,214, +69,5,229,106,156,175,206,212,43,0,47,121,108,115,241,48,161,177,30,161,239,225,192,211,6,198,12,227,182,81,247,17,31,222,183,7,64,127,106,60,84,199,142,213,91,105,60,84,103,116,42,65,65,189,2,240,47,99,6,68,243,163,107,6,145,159,157,96,116,42,95,114, +186,237,188,95,249,23,189,7,249,156,169,74,192,205,37,5,229,135,188,21,48,152,169,29,0,47,217,248,194,254,150,130,5,57,127,21,194,116,3,160,251,137,189,46,103,11,123,234,182,16,30,18,205,128,232,108,189,195,93,148,200,164,104,134,77,206,37,97,72,18,237, +181,109,56,212,213,65,93,169,29,0,255,48,50,57,146,135,139,134,115,255,164,108,178,226,195,141,78,231,75,181,237,135,41,219,189,148,99,173,123,188,21,114,171,217,229,46,122,96,234,218,106,111,5,12,118,170,0,240,162,141,43,14,218,39,206,29,186,218,18, +106,30,14,34,79,239,120,30,233,166,210,182,157,150,158,90,134,36,140,193,98,242,129,237,68,1,177,105,241,228,20,229,49,112,116,6,221,205,93,116,53,117,24,157,85,64,82,5,128,111,27,159,22,195,146,252,97,148,76,201,38,43,94,215,183,131,151,196,163,185, +248,160,234,37,222,62,244,71,28,46,221,230,157,125,213,95,29,34,114,246,127,21,173,82,7,134,188,72,189,2,48,128,148,136,229,155,230,253,95,132,124,12,157,15,7,158,22,109,77,96,234,136,239,49,60,233,106,111,132,187,36,141,135,234,216,251,250,78,106,118, +29,243,194,217,162,224,161,94,1,248,166,241,105,49,124,239,170,76,159,218,234,63,173,177,235,56,111,28,248,45,77,94,185,222,7,128,11,193,253,11,243,203,255,199,91,1,149,127,48,254,104,105,16,18,2,9,101,191,90,182,113,222,223,17,114,53,160,251,132,157, +78,103,11,235,246,60,193,208,196,9,76,207,185,151,104,171,239,124,249,164,228,12,164,32,103,32,45,199,154,217,243,234,118,170,63,171,66,74,85,9,40,129,195,36,96,218,240,100,238,189,42,131,220,148,40,163,211,249,26,183,230,98,235,241,87,216,90,253,50, +30,205,237,173,176,77,82,50,127,81,65,249,38,111,5,84,254,153,218,1,48,216,163,27,139,211,45,130,53,192,117,222,138,105,181,68,114,211,208,111,49,54,173,16,95,252,8,116,54,118,112,100,211,62,14,111,218,79,111,183,211,232,116,252,150,218,1,48,94,100,168, +153,91,114,146,89,48,46,157,236,4,223,217,230,63,83,77,251,65,222,62,248,52,182,158,90,111,134,221,134,135,57,11,167,150,171,247,253,6,82,103,0,12,182,105,197,254,206,89,119,14,126,177,215,18,18,35,16,215,122,35,166,71,115,81,105,219,206,241,182,125, +100,196,230,16,30,98,220,4,177,179,177,70,90,25,56,58,147,156,169,99,136,74,142,161,179,177,29,103,167,238,125,198,3,142,58,3,96,156,204,216,48,190,127,117,38,79,204,200,97,250,240,100,226,195,141,153,217,113,62,78,119,15,239,87,190,200,187,135,159,165, +199,229,189,115,56,2,254,228,104,102,238,146,89,229,45,94,11,170,156,149,239,253,252,11,98,203,55,22,223,45,5,127,68,231,126,1,103,178,152,66,185,118,208,237,92,63,248,27,152,77,190,249,70,72,74,73,237,206,227,28,120,103,55,117,251,106,212,57,129,139, +52,126,254,245,140,190,109,92,159,214,120,126,71,45,143,127,80,213,79,25,5,54,1,92,155,25,199,221,227,210,153,146,149,128,201,135,191,93,43,154,183,243,222,225,103,233,112,218,188,25,214,33,17,255,182,168,160,236,57,111,6,85,206,205,135,63,162,193,105, +249,230,57,87,73,105,90,139,23,174,10,158,41,53,42,139,153,35,127,68,106,116,150,55,195,94,178,142,186,54,42,182,28,160,98,203,65,28,29,170,53,248,249,92,189,96,34,185,211,175,232,211,26,43,63,63,201,210,205,149,253,148,81,96,138,177,90,152,49,34,137, +187,174,76,99,68,146,241,173,184,207,167,195,209,196,198,138,23,56,220,244,119,111,135,62,106,18,204,126,32,191,124,151,183,3,43,231,166,10,0,31,244,171,205,223,76,114,75,247,75,64,145,55,227,154,132,153,241,25,51,152,56,100,46,86,31,152,41,112,62,154, +91,227,196,142,163,28,217,180,159,186,189,53,234,208,224,89,76,252,113,17,217,19,71,244,105,141,55,15,53,113,255,91,7,251,41,163,192,97,18,112,195,160,120,230,142,30,64,126,118,34,33,102,223,254,42,117,107,46,254,94,253,26,91,171,95,193,229,241,238,185, +26,1,111,135,244,242,173,159,206,80,91,254,190,198,183,63,181,65,172,172,172,216,92,149,40,23,33,196,67,120,249,182,70,120,72,52,147,178,230,51,54,173,208,240,118,194,23,163,171,169,147,138,45,7,168,252,224,32,221,54,175,221,91,246,121,51,75,103,147, +60,188,111,23,76,246,212,119,114,231,42,245,163,237,180,180,24,43,183,231,166,50,59,47,213,240,113,188,23,171,162,121,27,27,43,94,160,205,222,224,237,208,46,36,15,58,62,204,123,188,180,180,84,141,7,245,65,170,0,240,113,143,109,184,243,106,33,180,149, +222,106,33,124,166,196,136,116,10,134,127,135,236,4,93,167,26,247,43,219,209,38,170,62,60,196,209,79,142,4,245,43,2,147,197,196,252,103,190,143,37,180,111,181,99,175,71,227,218,63,124,130,51,136,199,59,71,91,45,228,103,39,112,123,110,42,215,13,138,243, +155,47,205,86,123,61,27,143,60,79,165,109,135,17,225,143,106,26,223,90,92,84,254,137,17,193,149,139,227,47,159,229,160,182,252,163,89,209,210,105,125,10,193,119,141,136,63,34,249,26,242,135,222,77,92,120,170,17,225,47,139,230,214,168,221,93,205,209,191, +29,230,196,142,99,120,122,189,118,183,217,39,12,204,203,96,234,226,89,253,178,214,247,214,237,225,147,32,187,9,16,102,49,145,159,157,200,173,35,147,153,56,56,193,231,183,248,207,212,235,177,243,201,241,151,249,236,196,27,222,188,211,127,6,249,140,217, +21,254,147,251,167,255,165,219,128,224,202,37,240,159,79,181,194,242,77,115,103,75,196,51,128,215,187,248,152,132,153,113,233,211,152,148,53,31,171,197,119,250,149,95,12,151,195,69,205,142,99,84,127,86,69,237,238,106,220,14,151,209,41,233,238,250,239, +223,196,240,252,81,253,178,214,186,125,13,44,121,239,112,191,172,229,203,34,66,204,76,28,18,79,209,208,68,242,179,19,137,12,245,175,91,210,154,244,176,187,110,51,31,29,45,163,187,215,144,130,173,13,33,127,188,48,127,205,42,35,130,43,151,78,21,0,126,230, +209,45,243,51,45,30,207,10,224,38,35,226,135,135,68,115,195,144,57,76,72,159,225,23,231,3,190,202,227,242,208,120,168,142,154,29,199,56,246,105,5,246,182,192,27,72,100,141,178,50,231,169,5,88,172,253,115,247,220,233,214,40,122,238,239,216,122,2,175,112, +138,13,179,48,37,43,129,252,236,68,38,13,137,39,34,196,191,30,250,167,85,52,111,103,83,197,10,90,237,134,77,218,220,228,150,44,88,82,88,238,213,110,66,74,223,168,2,192,15,73,137,88,254,126,241,127,32,121,28,48,100,194,79,82,100,38,55,14,153,203,200,148, +235,240,215,143,145,212,36,13,135,78,82,179,227,24,181,159,87,211,94,219,106,116,74,253,98,194,93,55,144,119,75,255,158,219,8,164,142,128,67,19,34,152,52,36,158,155,178,19,153,144,30,131,89,248,231,231,23,224,100,199,17,54,87,190,72,77,219,1,163,82,112, +73,41,126,233,252,112,212,35,234,160,159,255,241,223,79,190,114,186,103,192,74,160,111,119,189,250,96,64,244,80,38,101,205,35,59,177,111,13,103,124,65,183,173,139,147,187,171,57,185,187,154,186,189,181,244,246,248,95,27,226,184,140,4,110,93,58,15,147, +165,127,119,103,92,30,201,220,191,238,228,136,205,255,94,235,70,91,45,92,159,25,199,141,67,226,153,56,56,158,129,209,86,163,83,234,179,230,238,26,182,84,173,164,162,121,187,145,105,28,148,102,237,174,69,83,214,238,52,50,9,229,242,169,2,192,207,61,241, +206,221,145,238,16,251,47,5,226,223,1,195,246,228,211,99,115,152,148,117,39,131,227,71,27,149,66,191,146,30,141,166,138,6,78,238,61,65,195,254,147,52,87,54,224,113,121,140,78,235,188,44,161,22,102,62,50,135,248,204,68,93,214,63,220,220,205,252,85,187, +112,248,248,141,0,171,197,196,232,212,104,174,201,136,229,198,193,241,92,57,32,26,179,47,183,229,187,4,182,158,90,62,62,182,150,3,141,31,35,165,97,255,63,120,64,62,229,232,118,46,41,189,237,245,192,123,135,22,68,2,227,111,133,194,99,91,230,140,19,30, +211,179,64,223,166,191,244,81,70,108,14,147,178,230,51,40,62,207,200,52,250,157,199,229,193,86,213,72,195,129,147,52,28,170,163,233,112,29,46,31,58,76,40,76,130,155,254,207,12,50,39,232,219,201,113,83,165,141,255,124,227,0,30,31,106,188,20,25,106,102, +220,192,24,38,164,199,114,85,122,12,99,6,68,19,106,246,191,243,41,231,99,235,169,229,147,227,47,179,191,225,35,35,31,252,32,217,163,9,237,222,197,5,107,63,53,46,9,165,191,168,2,32,128,60,189,237,7,33,45,157,109,63,21,82,62,12,24,186,207,57,36,126,12, +147,179,191,201,192,152,97,70,166,161,27,233,209,104,57,222,76,83,69,3,182,170,70,154,171,26,233,56,217,102,72,71,66,139,53,132,201,255,62,149,140,241,67,188,18,111,115,85,11,63,123,235,32,118,3,118,68,76,2,178,226,35,24,157,26,197,232,1,209,92,57,32, +154,220,228,168,128,249,133,255,85,62,243,224,7,135,148,98,185,211,38,127,89,58,175,188,215,200,68,148,254,19,152,127,107,130,220,242,45,119,230,226,209,158,145,112,163,177,153,8,134,38,142,231,218,65,179,200,140,203,53,54,21,47,112,57,92,180,28,109, +194,118,180,145,230,202,70,108,71,155,232,106,234,64,106,250,21,5,9,67,146,152,248,227,34,226,50,188,123,51,244,136,173,155,133,239,28,230,64,163,126,157,23,77,2,50,98,195,201,75,137,58,245,192,79,141,102,84,74,148,223,93,207,187,28,205,221,39,248,248, +216,58,14,54,125,236,11,109,174,63,208,52,211,189,139,139,86,7,254,93,208,32,163,10,128,0,37,37,98,217,230,226,123,5,60,1,196,24,157,79,106,84,22,87,101,222,204,168,212,137,152,68,224,127,129,159,230,233,117,211,126,178,149,214,19,45,180,213,156,250, +211,94,219,66,87,83,103,159,214,141,136,143,100,204,29,19,24,158,63,10,147,65,219,221,110,77,178,102,111,61,127,252,180,154,198,238,190,253,40,76,139,177,50,44,33,146,225,73,17,12,75,140,100,88,98,4,67,19,34,8,235,231,195,140,190,174,166,253,32,91,143, +191,250,69,247,62,195,31,252,237,8,30,114,108,201,251,95,117,194,63,48,169,2,32,192,45,253,96,246,64,179,219,252,91,96,182,209,185,0,196,134,37,51,54,125,26,227,210,166,98,181,120,109,234,177,207,113,57,92,116,214,183,211,217,216,78,103,99,7,93,141,29, +116,54,180,211,217,208,65,119,75,23,210,243,245,239,219,136,248,72,6,228,101,48,248,234,108,50,198,13,70,248,200,123,110,143,38,121,255,104,11,239,85,52,243,233,137,54,26,186,190,94,12,152,133,96,96,180,149,140,216,48,6,197,133,145,25,27,78,102,108,24, +153,177,97,12,138,11,15,138,95,245,231,34,165,164,210,182,131,79,142,175,227,100,199,17,163,211,1,64,74,222,240,88,204,255,186,100,202,170,19,70,231,162,232,71,21,0,65,98,217,230,185,243,145,226,55,128,79,244,243,13,179,68,50,54,125,26,19,50,102,16,21, +26,111,116,58,62,69,243,104,216,91,187,177,119,216,65,147,152,66,204,68,37,71,19,26,225,31,215,215,58,157,110,106,59,156,244,122,52,76,2,18,194,67,73,137,10,197,18,160,239,233,47,151,211,109,103,119,221,70,182,213,172,167,195,209,108,116,58,167,213,73, +196,125,139,10,202,214,26,157,136,162,63,245,55,50,136,252,247,230,59,226,28,210,242,176,64,252,43,94,158,48,120,46,102,83,8,121,169,19,185,58,243,86,146,34,51,141,78,71,81,116,215,106,175,99,87,237,6,62,175,219,136,211,237,51,183,232,156,66,202,223, +96,237,93,90,50,241,181,190,189,159,82,252,134,42,0,130,208,178,45,197,99,240,240,20,6,181,19,62,59,193,224,248,209,92,153,86,200,136,164,171,49,155,250,167,141,173,162,248,2,77,122,168,104,222,206,174,147,239,113,180,101,55,62,240,126,255,31,36,175, +152,48,253,236,129,194,213,149,70,167,162,120,151,42,0,130,216,178,141,243,110,147,66,254,175,128,193,70,231,114,38,171,37,146,220,148,235,25,159,62,157,228,40,159,74,77,81,46,73,119,111,27,123,234,183,176,179,246,93,58,28,77,70,167,243,85,7,145,242, +167,11,11,215,188,101,116,34,138,49,84,1,16,228,158,120,231,238,72,45,212,254,51,41,197,253,64,164,209,249,124,85,70,236,72,174,76,43,100,100,202,245,88,76,134,140,61,80,148,75,34,165,228,120,235,30,118,157,220,192,145,230,207,208,164,207,117,144,108, +70,242,96,182,141,63,205,155,87,238,115,201,41,222,163,10,0,5,128,229,239,206,79,195,226,121,72,194,247,0,159,59,146,109,181,132,147,155,114,35,99,211,166,146,26,173,111,183,59,69,185,28,182,158,90,14,52,124,204,222,250,45,180,59,26,141,78,231,108,220, +2,158,51,11,203,127,253,44,255,37,159,57,117,168,24,71,21,0,202,63,121,124,115,241,88,77,242,107,160,192,232,92,206,101,96,204,80,242,82,39,147,147,124,29,81,86,117,131,64,49,142,221,213,201,254,134,143,216,215,240,1,117,29,190,251,10,93,192,219,30,161, +253,100,113,254,218,131,70,231,162,248,14,85,0,40,103,181,108,227,220,153,32,150,34,240,217,49,127,66,8,50,98,115,201,77,185,129,156,228,107,137,8,141,53,58,37,37,8,184,181,94,170,108,59,217,91,255,1,85,45,59,241,104,110,163,83,58,159,109,66,99,113,73, +81,249,123,70,39,162,248,30,85,0,40,231,36,37,98,217,166,185,115,133,16,143,98,224,200,225,139,33,132,32,61,102,4,57,41,215,147,155,114,35,145,170,24,80,250,145,91,235,229,88,203,30,14,54,125,66,69,243,103,56,221,118,163,83,186,144,131,82,202,7,23,22, +172,89,35,132,47,93,57,80,124,137,42,0,148,11,42,221,124,147,37,76,75,249,23,132,124,16,200,48,58,159,11,49,9,51,67,226,199,48,50,245,6,70,36,93,141,213,226,115,103,27,21,63,224,116,219,169,180,237,224,80,211,86,142,182,236,194,229,113,26,157,210,5,73, +56,110,146,242,225,44,155,88,161,14,248,41,23,162,10,0,229,162,61,181,126,166,213,110,141,186,87,10,74,240,131,66,0,78,53,26,26,20,55,138,172,132,177,100,39,142,37,49,34,221,232,148,20,31,214,233,108,161,170,101,39,21,205,219,57,214,242,57,110,205,119, +70,62,95,64,181,148,226,49,167,77,62,167,166,245,41,23,75,21,0,202,37,43,45,43,14,13,75,146,243,65,60,4,100,27,157,207,165,136,13,75,38,43,225,74,6,199,143,33,43,97,44,86,75,184,209,41,41,6,146,82,163,161,235,24,21,205,219,169,180,109,167,190,243,40, +62,213,164,231,194,170,17,60,233,32,242,233,210,252,231,29,70,39,163,248,23,85,0,40,151,237,169,245,51,173,61,214,168,123,164,160,196,215,154,9,93,12,179,41,132,204,216,145,100,37,142,37,59,97,28,73,145,126,177,169,161,244,81,167,211,198,209,150,207, +169,178,237,228,88,235,30,95,106,199,123,41,170,144,98,153,195,38,95,80,191,248,149,203,165,10,0,165,207,158,222,246,131,144,182,246,214,249,8,30,144,48,218,232,124,46,87,76,88,50,89,241,87,144,17,55,146,244,216,28,226,195,7,24,157,146,210,15,58,156, +54,78,180,238,163,186,109,63,39,218,246,211,106,175,55,58,165,190,248,187,148,242,87,67,109,98,157,122,199,175,244,149,42,0,148,126,181,108,115,241,68,36,15,1,69,70,231,210,87,145,161,177,12,136,30,70,70,220,72,50,98,115,24,24,61,84,205,40,240,3,93,206, +86,106,218,15,114,188,117,15,53,237,7,105,238,174,49,58,165,190,210,164,100,61,38,241,63,139,242,203,54,24,157,140,18,56,84,1,160,232,226,139,66,224,39,192,237,248,96,103,193,203,17,98,182,50,32,122,40,153,113,185,164,199,140,32,61,54,7,171,37,194,232, +180,130,154,195,213,69,93,103,37,117,29,21,212,117,86,82,223,81,73,87,111,171,209,105,245,23,135,128,21,192,147,37,5,229,135,140,78,70,9,60,170,0,80,116,245,196,150,226,44,143,71,222,7,226,123,64,140,209,249,244,39,33,4,113,97,169,164,68,13,38,57,106, +16,201,145,131,73,137,26,76,92,120,10,234,175,86,255,115,184,187,105,234,170,166,190,179,146,186,142,74,234,58,43,104,179,55,24,157,150,30,154,129,223,155,93,238,223,221,63,253,101,159,236,41,172,4,6,245,45,165,120,197,242,143,102,69,75,151,245,30,36, +247,1,67,141,206,71,79,161,230,48,146,34,51,191,40,12,6,147,28,57,136,148,168,65,170,31,193,69,234,245,56,176,117,215,208,212,93,77,115,119,13,205,221,39,104,238,62,65,167,179,197,232,212,244,37,57,34,132,252,141,189,219,249,124,233,109,175,251,229,201, +68,197,191,168,2,64,241,170,210,210,82,83,216,228,253,83,65,254,24,184,149,0,121,61,112,49,98,194,146,136,15,31,72,124,248,0,226,195,7,16,23,158,74,124,196,169,255,29,108,147,14,157,110,59,237,142,70,218,236,13,95,254,179,205,209,136,173,187,150,118, +71,19,126,118,21,175,47,220,8,94,151,154,252,163,243,195,209,27,74,75,75,53,163,19,82,130,135,42,0,20,195,44,223,60,59,67,74,243,189,192,247,129,52,163,243,49,82,68,104,44,49,214,68,162,173,137,196,134,37,19,19,150,68,180,53,145,168,208,56,194,67,99, +136,10,141,243,155,29,4,187,171,147,238,222,118,186,123,219,232,238,109,165,187,183,131,174,222,22,58,29,54,218,190,120,216,219,93,157,70,167,105,180,90,41,197,179,30,228,51,75,10,203,107,141,78,70,9,78,170,0,80,12,247,244,182,31,132,180,117,182,221, +34,145,247,32,153,9,88,140,206,201,23,153,77,33,68,132,196,16,25,26,75,88,72,20,97,150,200,47,255,88,67,162,8,179,68,16,106,14,199,36,204,132,89,34,49,153,204,132,154,195,177,152,66,177,156,113,123,33,196,108,253,231,219,12,82,226,112,119,127,249,175, +46,205,249,229,128,27,77,122,232,245,56,112,186,123,232,117,247,224,244,216,233,117,219,233,245,216,113,186,123,112,184,187,233,117,219,113,184,187,233,116,182,208,227,106,247,245,225,56,70,114,75,88,47,144,207,57,68,243,155,165,249,239,171,255,80,138, +161,84,1,160,248,148,199,55,23,15,208,224,78,36,255,2,92,105,116,62,138,210,15,14,74,33,158,55,35,95,120,32,191,220,175,155,16,40,129,69,21,0,138,207,250,229,134,226,235,77,38,238,6,230,1,137,70,231,163,40,151,160,89,34,202,36,158,21,139,11,214,126,106, +116,50,138,114,54,170,0,80,124,94,89,89,177,185,50,89,228,35,229,2,1,119,0,209,70,231,164,40,103,97,151,146,141,32,87,36,196,38,188,242,195,171,254,228,55,147,132,148,224,164,10,0,197,175,60,241,206,221,145,90,168,253,14,77,138,121,2,166,1,97,70,231, +164,4,53,59,146,119,36,162,204,217,99,127,85,93,223,83,252,137,42,0,20,191,245,228,199,197,225,189,118,81,36,133,44,86,59,3,138,23,217,165,100,163,16,178,220,225,176,190,82,122,243,202,14,163,19,82,148,203,161,10,0,37,32,60,249,113,113,184,211,206,12, +132,188,93,32,110,6,146,141,206,73,9,40,77,18,185,30,41,94,181,134,243,246,79,111,40,183,27,157,144,162,244,149,42,0,148,128,83,90,90,106,178,78,222,55,14,41,110,19,66,222,10,140,71,125,214,149,75,183,95,72,249,186,102,50,109,112,210,248,190,186,182, +167,4,26,245,165,168,4,188,101,239,21,15,146,102,102,124,113,102,160,0,136,55,58,39,197,39,181,32,217,4,226,93,183,197,244,246,146,41,171,78,24,157,144,162,232,73,21,0,74,80,41,43,43,54,87,36,105,87,153,164,152,138,16,83,129,235,1,53,227,55,56,245,74, +248,196,36,120,15,141,247,178,108,108,159,55,175,220,99,116,82,138,226,45,170,0,80,130,90,233,235,183,69,132,69,133,141,151,136,27,133,148,69,192,141,64,184,209,121,41,186,112,1,187,133,148,27,36,166,191,57,156,33,91,212,1,62,37,152,169,2,64,81,206,240, +212,250,153,86,71,104,228,53,154,201,52,9,33,175,67,114,45,144,98,116,94,202,101,105,148,176,213,132,220,42,133,248,48,194,222,245,217,127,220,252,150,211,232,164,20,197,87,168,2,64,81,46,224,241,141,119,14,149,38,207,117,82,154,174,5,121,45,112,5,170, +255,128,175,113,0,187,65,124,10,114,171,212,180,173,139,138,214,86,25,157,148,162,248,50,85,0,40,202,37,42,221,124,147,37,76,38,230,72,41,70,129,41,15,228,4,33,184,22,117,245,208,91,58,4,236,209,144,219,65,236,19,130,253,234,215,189,162,92,58,85,0,40, +74,63,121,236,195,187,226,133,219,149,39,37,163,64,230,9,196,40,78,13,52,82,133,193,229,233,0,142,72,216,143,16,251,132,198,126,41,61,251,22,22,174,61,42,4,210,232,228,20,197,223,169,2,64,81,116,182,252,221,249,105,210,172,13,147,130,97,2,109,40,48,12, +196,48,96,40,16,107,112,122,70,107,3,42,65,86,2,21,66,158,250,227,10,213,42,254,107,242,186,58,163,147,83,148,64,166,10,0,69,49,80,233,250,111,197,132,133,57,50,53,204,131,5,50,67,8,145,137,100,16,200,1,72,6,34,72,230,212,14,130,217,232,92,47,145,7,104, +146,208,40,160,30,68,189,68,59,14,162,70,72,121,2,33,171,69,168,171,186,100,226,107,157,70,39,170,40,193,74,21,0,138,226,227,164,68,252,234,221,111,36,247,134,134,166,88,60,50,25,147,22,143,16,241,26,50,78,96,138,67,106,241,18,83,156,64,134,3,49,82,96, +21,146,8,32,18,8,229,212,46,131,233,140,37,195,248,250,85,71,59,167,14,210,157,166,1,237,64,47,208,45,5,61,66,226,4,58,36,194,142,144,173,2,209,38,209,218,144,166,86,19,90,27,154,169,85,154,60,141,102,151,214,244,179,105,47,55,169,109,122,69,241,109, +255,31,204,74,105,51,128,163,115,61,0,0,0,0,73,69,78,68,174,66,96,130,0,0 }; const char* JUCEAppIcon_png = (const char*) temp_binary_data_0; @@ -667,7 +692,7 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) switch (hash) { - case 0xdb43fd77: numBytes = 45854; return JUCEAppIcon_png; + case 0xdb43fd77: numBytes = 47266; return JUCEAppIcon_png; default: break; } diff --git a/extras/AudioPluginHost/JuceLibraryCode/BinaryData.h b/extras/AudioPluginHost/JuceLibraryCode/BinaryData.h index 10d01a63a1..cf2d32ac5a 100644 --- a/extras/AudioPluginHost/JuceLibraryCode/BinaryData.h +++ b/extras/AudioPluginHost/JuceLibraryCode/BinaryData.h @@ -9,7 +9,7 @@ namespace BinaryData { extern const char* JUCEAppIcon_png; - const int JUCEAppIcon_pngSize = 45854; + const int JUCEAppIcon_pngSize = 47266; // Number of elements in the namedResourceList and originalFileNames arrays. const int namedResourceListSize = 1; diff --git a/extras/AudioPluginHost/Source/HostStartup.cpp b/extras/AudioPluginHost/Source/HostStartup.cpp index e45009acaa..cce530eb45 100644 --- a/extras/AudioPluginHost/Source/HostStartup.cpp +++ b/extras/AudioPluginHost/Source/HostStartup.cpp @@ -24,7 +24,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +#include #include "UI/MainHostWindow.h" #include "Plugins/InternalPlugins.h" diff --git a/extras/AudioPluginHost/Source/JUCEAppIcon.png b/extras/AudioPluginHost/Source/JUCEAppIcon.png index 2564a24f78..19be2f2830 100644 Binary files a/extras/AudioPluginHost/Source/JUCEAppIcon.png and b/extras/AudioPluginHost/Source/JUCEAppIcon.png differ diff --git a/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp b/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp index 2a8ac4d089..03b3454141 100644 --- a/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp +++ b/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp @@ -24,7 +24,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +#include #include "../UI/GraphEditorPanel.h" #include "InternalPlugins.h" #include "../UI/MainHostWindow.h" diff --git a/extras/AudioPluginHost/Source/Plugins/InternalPlugins.cpp b/extras/AudioPluginHost/Source/Plugins/InternalPlugins.cpp index b4b4cf5555..eb10b98b98 100644 --- a/extras/AudioPluginHost/Source/Plugins/InternalPlugins.cpp +++ b/extras/AudioPluginHost/Source/Plugins/InternalPlugins.cpp @@ -24,7 +24,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +#include #include "InternalPlugins.h" #include "PluginGraph.h" diff --git a/extras/AudioPluginHost/Source/Plugins/PluginGraph.cpp b/extras/AudioPluginHost/Source/Plugins/PluginGraph.cpp index 416c9b4bb0..8d9b9261fb 100644 --- a/extras/AudioPluginHost/Source/Plugins/PluginGraph.cpp +++ b/extras/AudioPluginHost/Source/Plugins/PluginGraph.cpp @@ -24,7 +24,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +#include #include "../UI/MainHostWindow.h" #include "PluginGraph.h" #include "InternalPlugins.h" diff --git a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp index d6d2fa87a7..afa65bdbee 100644 --- a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp +++ b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp @@ -24,7 +24,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +#include #include "GraphEditorPanel.h" #include "../Plugins/InternalPlugins.h" #include "MainHostWindow.h" diff --git a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp index 28678c2c4c..104b8aaef8 100644 --- a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp +++ b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp @@ -24,7 +24,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +#include #include "MainHostWindow.h" #include "../Plugins/InternalPlugins.h" diff --git a/extras/AudioPluginHost/Source/UI/PluginWindow.h b/extras/AudioPluginHost/Source/UI/PluginWindow.h index ac1af990d0..a4e69d2ff7 100644 --- a/extras/AudioPluginHost/Source/UI/PluginWindow.h +++ b/extras/AudioPluginHost/Source/UI/PluginWindow.h @@ -111,8 +111,8 @@ private: list.scrollToEnsureRowIsOnscreen (log.size() - 1); } - JUCE_CONSTEXPR static const int maxLogSize = 300; - JUCE_CONSTEXPR static const int logSizeTrimThreshold = 400; + constexpr static const int maxLogSize = 300; + constexpr static const int logSizeTrimThreshold = 400; ListBox list { "Log", this }; @@ -227,6 +227,7 @@ private: case Type::programs: return "Programs"; case Type::audioIO: return "IO"; case Type::debug: return "Debug"; + case Type::numTypes: default: return {}; } } diff --git a/extras/BinaryBuilder/BinaryBuilder.jucer b/extras/BinaryBuilder/BinaryBuilder.jucer index 8c13340bb7..6624bc4f4d 100644 --- a/extras/BinaryBuilder/BinaryBuilder.jucer +++ b/extras/BinaryBuilder/BinaryBuilder.jucer @@ -1,7 +1,7 @@ @@ -17,9 +17,8 @@ - - + + diff --git a/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile b/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile index 64c5e96d80..2a976b5674 100644 --- a/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile +++ b/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile @@ -32,7 +32,7 @@ ifeq ($(CONFIG),Debug) JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) - TARGET_ARCH := -march=native + TARGET_ARCH := 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 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) @@ -41,7 +41,7 @@ ifeq ($(CONFIG),Debug) JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) JUCE_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 libcurl) -lrt -ldl -lpthread $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs libcurl) -fvisibility=hidden -lrt -ldl -lpthread $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -53,7 +53,7 @@ ifeq ($(CONFIG),Release) JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) - TARGET_ARCH := -march=native + TARGET_ARCH := 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 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) @@ -62,7 +62,7 @@ ifeq ($(CONFIG),Release) JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -Os $(CFLAGS) JUCE_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 libcurl) -fvisibility=hidden -lrt -ldl -lpthread $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs libcurl) -fvisibility=hidden -lrt -ldl -lpthread $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif diff --git a/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj b/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj index 6469db19f5..b0bf9aa68b 100644 --- a/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj +++ b/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj @@ -50,13 +50,6 @@ path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - 7871817598B12A73E708ABB7 = { - isa = PBXFileReference; - lastKnownFileType = text.plist.xml; - name = ConsoleApp.entitlements; - path = ConsoleApp.entitlements; - sourceTree = "SOURCE_ROOT"; - }; 799073185F72F5FAD05253C3 = { isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; @@ -239,7 +232,6 @@ "JucePlugin_Build_Standalone=0", "JucePlugin_Build_Unity=0", ); - GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( "../../JuceLibraryCode", @@ -280,11 +272,12 @@ CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; @@ -328,10 +321,12 @@ CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; diff --git a/extras/BinaryBuilder/Builds/MacOSX/ConsoleApp.entitlements b/extras/BinaryBuilder/Builds/MacOSX/ConsoleApp.entitlements deleted file mode 100644 index 6631ffa6f2..0000000000 --- a/extras/BinaryBuilder/Builds/MacOSX/ConsoleApp.entitlements +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj b/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj index 6800ae1fdd..7e82363995 100644 --- a/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj +++ b/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj @@ -226,9 +226,6 @@ true - - true - true @@ -502,7 +499,6 @@ - diff --git a/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj.filters b/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj.filters index 5fec93d685..98e8371458 100644 --- a/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj.filters +++ b/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj.filters @@ -166,9 +166,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -570,9 +567,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/extras/BinaryBuilder/Builds/VisualStudio2019/resources.rc b/extras/BinaryBuilder/Builds/VisualStudio2019/resources.rc index f1fe4e9e9c..321fab7763 100644 --- a/extras/BinaryBuilder/Builds/VisualStudio2019/resources.rc +++ b/extras/BinaryBuilder/Builds/VisualStudio2019/resources.rc @@ -1,3 +1,5 @@ +#pragma code_page(65001) + #ifdef JUCE_USER_DEFINED_RC_FILE #include JUCE_USER_DEFINED_RC_FILE #else diff --git a/extras/BinaryBuilder/JuceLibraryCode/AppConfig.h b/extras/BinaryBuilder/JuceLibraryCode/AppConfig.h index ee326c0319..88f91e288e 100644 --- a/extras/BinaryBuilder/JuceLibraryCode/AppConfig.h +++ b/extras/BinaryBuilder/JuceLibraryCode/AppConfig.h @@ -47,7 +47,7 @@ #define JUCE_USE_DARK_SPLASH_SCREEN 1 -#define JUCE_PROJUCER_VERSION 0x50405 +#define JUCE_PROJUCER_VERSION 0x50407 //============================================================================== #define JUCE_MODULE_AVAILABLE_juce_core 1 diff --git a/extras/BinaryBuilder/Source/Main.cpp b/extras/BinaryBuilder/Source/Main.cpp index e6c4aeaac5..9716d7c10f 100644 --- a/extras/BinaryBuilder/Source/Main.cpp +++ b/extras/BinaryBuilder/Source/Main.cpp @@ -35,7 +35,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +#include //============================================================================== diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt b/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt index a20f277811..a14940dbbb 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt @@ -123,6 +123,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.h" "../../../../../modules/juce_audio_devices/native/juce_android_Audio.cpp" + "../../../../../modules/juce_audio_devices/native/juce_android_HighPerformanceAudioHelpers.h" "../../../../../modules/juce_audio_devices/native/juce_android_Midi.cpp" "../../../../../modules/juce_audio_devices/native/juce_android_Oboe.cpp" "../../../../../modules/juce_audio_devices/native/juce_android_OpenSL.cpp" @@ -572,8 +573,6 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_core/misc/juce_Result.h" "../../../../../modules/juce_core/misc/juce_RuntimePermissions.cpp" "../../../../../modules/juce_core/misc/juce_RuntimePermissions.h" - "../../../../../modules/juce_core/misc/juce_StdFunctionCompat.cpp" - "../../../../../modules/juce_core/misc/juce_StdFunctionCompat.h" "../../../../../modules/juce_core/misc/juce_Uuid.cpp" "../../../../../modules/juce_core/misc/juce_Uuid.h" "../../../../../modules/juce_core/misc/juce_WindowsRegistry.h" @@ -1489,6 +1488,7 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/j set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Audio.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_HighPerformanceAudioHelpers.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Midi.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_Oboe.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_android_OpenSL.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1938,8 +1938,6 @@ set_source_files_properties("../../../../../modules/juce_core/misc/juce_Result.c set_source_files_properties("../../../../../modules/juce_core/misc/juce_Result.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_RuntimePermissions.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_RuntimePermissions.h" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_core/misc/juce_StdFunctionCompat.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_core/misc/juce_StdFunctionCompat.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_Uuid.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_Uuid.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_core/misc/juce_WindowsRegistry.h" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/build.gradle b/extras/NetworkGraphicsDemo/Builds/Android/app/build.gradle index 7ae8705b52..f5c929cd6f 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/build.gradle +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/build.gradle @@ -86,7 +86,6 @@ android { main.java.srcDirs += ["../../../../../modules/juce_core/native/javacore/init", "../../../../../modules/juce_core/native/javacore/app", - "../../../../../modules/juce_gui_basics/native/javacore/app", "../../../../../modules/juce_gui_basics/native/javaopt/app"] main.res.srcDirs += diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml b/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml index d3befd5e9f..f06d90aa51 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml @@ -2,7 +2,8 @@ - + diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java b/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java index 0bb31cb5d3..a40a251ebc 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/android/vending/billing/IInAppBillingService.java @@ -1,25 +1,3 @@ -/* - ============================================================================== - - 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. - - ============================================================================== -*/ - package com.android.vending.billing; /** * InAppBillingService is the service that provides in-app billing version 3 and beyond. diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo.java b/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo.java index 40223e011f..a57dad4cf9 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo.java +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/JUCENetworkGraphicsDemo.java @@ -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 diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/SharingContentProvider.java b/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/SharingContentProvider.java index 4112f21bb2..516c527b8d 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/SharingContentProvider.java +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/java/com/juce/networkgraphicsdemo/SharingContentProvider.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.juce.networkgraphicsdemo; import android.content.ContentProvider; diff --git a/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile b/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile index c457c92477..0213a92ed5 100644 --- a/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile +++ b/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile @@ -32,7 +32,7 @@ ifeq ($(CONFIG),Debug) JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) - TARGET_ARCH := -march=native + TARGET_ARCH := 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 x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) @@ -41,7 +41,7 @@ ifeq ($(CONFIG),Debug) JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) JUCE_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 x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -lrt -ldl -lpthread -lGL $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -53,7 +53,7 @@ ifeq ($(CONFIG),Release) JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) - TARGET_ARCH := -march=native + TARGET_ARCH := 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 x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) @@ -62,7 +62,7 @@ ifeq ($(CONFIG),Release) JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 $(CFLAGS) JUCE_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 x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif diff --git a/extras/NetworkGraphicsDemo/Builds/MacOSX/App.entitlements b/extras/NetworkGraphicsDemo/Builds/MacOSX/App.entitlements deleted file mode 100644 index 6631ffa6f2..0000000000 --- a/extras/NetworkGraphicsDemo/Builds/MacOSX/App.entitlements +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj b/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj index 1a92e53c30..c64f2a2335 100644 --- a/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj +++ b/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj @@ -395,13 +395,6 @@ path = "../../JuceLibraryCode/include_juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; }; - AF19F5DDEBA5587D0C92A662 = { - isa = PBXFileReference; - lastKnownFileType = text.plist.xml; - name = App.entitlements; - path = App.entitlements; - sourceTree = "SOURCE_ROOT"; - }; AF330F41D1A4865108690E3C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; @@ -701,7 +694,6 @@ "JucePlugin_Build_Standalone=0", "JucePlugin_Build_Unity=0", ); - GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( "../../JuceLibraryCode", @@ -744,11 +736,12 @@ CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; @@ -792,10 +785,12 @@ CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj index 84409054ff..158d4fb924 100644 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj +++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj @@ -751,9 +751,6 @@ true - - true - true @@ -1989,6 +1986,7 @@ + @@ -2253,7 +2251,6 @@ - diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj.filters b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj.filters index cc9c58839d..027b765c3a 100644 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj.filters +++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj.filters @@ -1063,9 +1063,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -2520,6 +2517,9 @@ JUCE Modules\juce_audio_devices\midi_io + + JUCE Modules\juce_audio_devices\native + JUCE Modules\juce_audio_devices\native @@ -3312,9 +3312,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/resources.rc b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/resources.rc index 1a2342ea84..8771c635b1 100644 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/resources.rc +++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/resources.rc @@ -1,3 +1,5 @@ +#pragma code_page(65001) + #ifdef JUCE_USER_DEFINED_RC_FILE #include JUCE_USER_DEFINED_RC_FILE #else diff --git a/extras/NetworkGraphicsDemo/Builds/iOS/App.entitlements b/extras/NetworkGraphicsDemo/Builds/iOS/App.entitlements deleted file mode 100644 index 6631ffa6f2..0000000000 --- a/extras/NetworkGraphicsDemo/Builds/iOS/App.entitlements +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj b/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj index a614291ac8..3bd8e1337a 100644 --- a/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj +++ b/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj @@ -428,13 +428,6 @@ path = "../../JuceLibraryCode/include_juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; }; - AF19F5DDEBA5587D0C92A662 = { - isa = PBXFileReference; - lastKnownFileType = text.plist.xml; - name = App.entitlements; - path = App.entitlements; - sourceTree = "SOURCE_ROOT"; - }; AF330F41D1A4865108690E3C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; @@ -738,7 +731,6 @@ "JucePlugin_Build_Standalone=0", "JucePlugin_Build_Unity=0", ); - GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( "../../JuceLibraryCode", @@ -780,11 +772,12 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; @@ -830,10 +823,12 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; diff --git a/extras/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h b/extras/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h index 70aa8086ce..8b0ed52b72 100644 --- a/extras/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h +++ b/extras/NetworkGraphicsDemo/JuceLibraryCode/AppConfig.h @@ -47,7 +47,7 @@ #define JUCE_USE_DARK_SPLASH_SCREEN 1 -#define JUCE_PROJUCER_VERSION 0x50405 +#define JUCE_PROJUCER_VERSION 0x50407 //============================================================================== #define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 diff --git a/extras/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer b/extras/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer index 79a87de7c5..e6891707ba 100644 --- a/extras/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer +++ b/extras/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer @@ -1,7 +1,7 @@ @@ -84,8 +84,8 @@ - - + + diff --git a/extras/NetworkGraphicsDemo/Source/Main.cpp b/extras/NetworkGraphicsDemo/Source/Main.cpp index 40c0597b3b..07298d41ae 100644 --- a/extras/NetworkGraphicsDemo/Source/Main.cpp +++ b/extras/NetworkGraphicsDemo/Source/Main.cpp @@ -24,7 +24,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +#include namespace { diff --git a/extras/Projucer/Builds/LinuxMakefile/Makefile b/extras/Projucer/Builds/LinuxMakefile/Makefile index 25b490460d..3e691f2b0c 100644 --- a/extras/Projucer/Builds/LinuxMakefile/Makefile +++ b/extras/Projucer/Builds/LinuxMakefile/Makefile @@ -32,16 +32,16 @@ ifeq ($(CONFIG),Debug) JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) - TARGET_ARCH := -march=native + TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.4.5 -DJUCE_APP_VERSION_HEX=0x50405 $(shell pkg-config --cflags x11 xinerama xext freetype2 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.4.7 -DJUCE_APP_VERSION_HEX=0x50407 $(shell pkg-config --cflags x11 xinerama xext freetype2 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 -DJucePlugin_Build_Unity=0 JUCE_TARGET_APP := Projucer JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++11 $(CXXFLAGS) - JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0) -lrt -ldl -lpthread $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0) -fvisibility=hidden -lrt -ldl -lpthread $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -53,10 +53,10 @@ ifeq ($(CONFIG),Release) JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) - TARGET_ARCH := -march=native + TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=5.4.5 -DJUCE_APP_VERSION_HEX=0x50405 $(shell pkg-config --cflags x11 xinerama xext freetype2 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.4.7 -DJUCE_APP_VERSION_HEX=0x50407 $(shell pkg-config --cflags x11 xinerama xext freetype2 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 -DJucePlugin_Build_Unity=0 JUCE_TARGET_APP := Projucer @@ -113,6 +113,7 @@ OBJECTS_APP := \ $(JUCE_OBJDIR)/jucer_CodeHelpers_1e797672.o \ $(JUCE_OBJDIR)/jucer_FileHelpers_54f12f83.o \ $(JUCE_OBJDIR)/jucer_MiscUtilities_31fc8dd8.o \ + $(JUCE_OBJDIR)/jucer_VersionInfo_46f3ed40.o \ $(JUCE_OBJDIR)/jucer_PIPGenerator_fd3402c7.o \ $(JUCE_OBJDIR)/jucer_Icons_d02d18f1.o \ $(JUCE_OBJDIR)/jucer_JucerTreeViewBase_9b9f2ff0.o \ @@ -368,6 +369,11 @@ $(JUCE_OBJDIR)/jucer_MiscUtilities_31fc8dd8.o: ../../Source/Utility/Helpers/juce @echo "Compiling jucer_MiscUtilities.cpp" $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" +$(JUCE_OBJDIR)/jucer_VersionInfo_46f3ed40.o: ../../Source/Utility/Helpers/jucer_VersionInfo.cpp + -$(V_AT)mkdir -p $(JUCE_OBJDIR) + @echo "Compiling jucer_VersionInfo.cpp" + $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" + $(JUCE_OBJDIR)/jucer_PIPGenerator_fd3402c7.o: ../../Source/Utility/PIPs/jucer_PIPGenerator.cpp -$(V_AT)mkdir -p $(JUCE_OBJDIR) @echo "Compiling jucer_PIPGenerator.cpp" diff --git a/extras/Projucer/Builds/MacOSX/App.entitlements b/extras/Projucer/Builds/MacOSX/App.entitlements deleted file mode 100644 index 6631ffa6f2..0000000000 --- a/extras/Projucer/Builds/MacOSX/App.entitlements +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/extras/Projucer/Builds/MacOSX/Info-App.plist b/extras/Projucer/Builds/MacOSX/Info-App.plist index c221483427..90b4233087 100644 --- a/extras/Projucer/Builds/MacOSX/Info-App.plist +++ b/extras/Projucer/Builds/MacOSX/Info-App.plist @@ -3,21 +3,6 @@ - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSExceptionDomains - - amazonaws.com - - NSExceptionAllowsInsecureHTTPLoads - - NSIncludesSubdomains - - - - NSMicrophoneUsageDescription This app requires audio input. If you do not have an audio interface connected it will use the built-in microphone. NSCameraUsageDescription @@ -37,9 +22,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 5.4.5 + 5.4.7 CFBundleVersion - 5.4.5 + 5.4.7 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 c446a592bd..eba583f020 100644 --- a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj +++ b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj @@ -257,6 +257,10 @@ isa = PBXBuildFile; fileRef = 486E8D02DAD2A0BF54A901C0; }; + 44AD0D81A65C5EAE3BE588FD = { + isa = PBXBuildFile; + fileRef = FF3A6A384D536E1AEF47CD54; + }; 638C7247B6DBA67EFE46E124 = { isa = PBXBuildFile; fileRef = 191330B20DAC08B890656EA0; @@ -1462,13 +1466,6 @@ path = "../../Source/BinaryData/Templates/jucer_NewComponentTemplate.cpp"; sourceTree = "SOURCE_ROOT"; }; - 834B0B0A61FE876871A9F311 = { - isa = PBXFileReference; - lastKnownFileType = text.plist.xml; - name = App.entitlements; - path = App.entitlements; - sourceTree = "SOURCE_ROOT"; - }; 842427CFE565F3FCE5B99174 = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; @@ -2099,6 +2096,13 @@ path = "../../Source/Wizards/jucer_TemplateThumbnailsComponent.h"; sourceTree = "SOURCE_ROOT"; }; + C16F9F479A3A5F6DAD7647A2 = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = "jucer_VersionInfo.h"; + path = "../../Source/Utility/Helpers/jucer_VersionInfo.h"; + sourceTree = "SOURCE_ROOT"; + }; C187718F7B9EBA88584B43F3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; @@ -2589,6 +2593,13 @@ path = "../../Source/Utility/UI/jucer_ProjucerLookAndFeel.h"; sourceTree = "SOURCE_ROOT"; }; + FF3A6A384D536E1AEF47CD54 = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = "jucer_VersionInfo.cpp"; + path = "../../Source/Utility/Helpers/jucer_VersionInfo.cpp"; + sourceTree = "SOURCE_ROOT"; + }; FF68231DE2B395461009116C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; @@ -3018,6 +3029,8 @@ A6C4AE13FB409DE414094CFA, 6FD8DBC0FF42C87D8BEE2452, 00515BA4EC5A7D4DC078ED37, + FF3A6A384D536E1AEF47CD54, + C16F9F479A3A5F6DAD7647A2, ); name = Helpers; sourceTree = ""; @@ -3215,8 +3228,8 @@ "_DEBUG=1", "DEBUG=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=5.4.5", - "JUCE_APP_VERSION_HEX=0x50405", + "JUCE_APP_VERSION=5.4.7", + "JUCE_APP_VERSION_HEX=0x50407", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -3236,7 +3249,7 @@ INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.theprojucer; PRODUCT_NAME = "Projucer"; USE_HEADERMAP = NO; @@ -3259,8 +3272,8 @@ "_NDEBUG=1", "NDEBUG=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=5.4.5", - "JUCE_APP_VERSION_HEX=0x50405", + "JUCE_APP_VERSION=5.4.7", + "JUCE_APP_VERSION_HEX=0x50407", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -3270,7 +3283,6 @@ "JucePlugin_Build_Standalone=0", "JucePlugin_Build_Unity=0", ); - GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( "../../JuceLibraryCode", @@ -3281,7 +3293,7 @@ INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum"; PRODUCT_BUNDLE_IDENTIFIER = com.juce.theprojucer; PRODUCT_NAME = "Projucer"; USE_HEADERMAP = NO; @@ -3313,11 +3325,12 @@ CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; @@ -3361,10 +3374,12 @@ CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; @@ -3462,6 +3477,7 @@ 8BE478303CDF061B72F219E2, BF913199032B4CE970E82AA3, 25EF9B3FECB4C9F0F522DCAA, + 44AD0D81A65C5EAE3BE588FD, 638C7247B6DBA67EFE46E124, D0E26EB54B0087C8BE3D541E, 468548FB21D264DC12321327, diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj index e768bb253c..35ce8e3c59 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.5;JUCE_APP_VERSION_HEX=0x50405;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.7;JUCE_APP_VERSION_HEX=0x50407;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.5;JUCE_APP_VERSION_HEX=0x50405;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=5.4.7;JUCE_APP_VERSION_HEX=0x50407;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreaded true @@ -233,6 +233,7 @@ + @@ -339,9 +340,6 @@ true - - true - true @@ -1624,6 +1622,7 @@ + @@ -1709,7 +1708,6 @@ - diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters index b0e8a75e26..16e2c05db3 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters @@ -496,6 +496,9 @@ Projucer\Utility\Helpers + + Projucer\Utility\Helpers + Projucer\Utility\PIPs @@ -616,9 +619,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -2325,6 +2325,9 @@ Projucer\Utility\Helpers + + Projucer\Utility\Helpers + Projucer\Utility\PIPs @@ -2580,9 +2583,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/extras/Projucer/Builds/VisualStudio2015/resources.rc b/extras/Projucer/Builds/VisualStudio2015/resources.rc index c41432352a..d5c8c37636 100644 --- a/extras/Projucer/Builds/VisualStudio2015/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2015/resources.rc @@ -1,3 +1,5 @@ +#pragma code_page(65001) + #ifdef JUCE_USER_DEFINED_RC_FILE #include JUCE_USER_DEFINED_RC_FILE #else @@ -7,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,4,5,0 +FILEVERSION 5,4,7,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +18,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "ROLI Ltd.\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "5.4.5\0" + VALUE "FileVersion", "5.4.7\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "5.4.5\0" + VALUE "ProductVersion", "5.4.7\0" END END diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj index acae1ecf21..1bfe1bf054 100644 --- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.5;JUCE_APP_VERSION_HEX=0x50405;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.7;JUCE_APP_VERSION_HEX=0x50407;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.5;JUCE_APP_VERSION_HEX=0x50405;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=5.4.7;JUCE_APP_VERSION_HEX=0x50407;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreaded true @@ -233,6 +233,7 @@ + @@ -339,9 +340,6 @@ true - - true - true @@ -1624,6 +1622,7 @@ + @@ -1709,7 +1708,6 @@ - diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters index ddb4d98f78..8148e932e2 100644 --- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters @@ -496,6 +496,9 @@ Projucer\Utility\Helpers + + Projucer\Utility\Helpers + Projucer\Utility\PIPs @@ -616,9 +619,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -2325,6 +2325,9 @@ Projucer\Utility\Helpers + + Projucer\Utility\Helpers + Projucer\Utility\PIPs @@ -2580,9 +2583,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/extras/Projucer/Builds/VisualStudio2017/resources.rc b/extras/Projucer/Builds/VisualStudio2017/resources.rc index c41432352a..d5c8c37636 100644 --- a/extras/Projucer/Builds/VisualStudio2017/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2017/resources.rc @@ -1,3 +1,5 @@ +#pragma code_page(65001) + #ifdef JUCE_USER_DEFINED_RC_FILE #include JUCE_USER_DEFINED_RC_FILE #else @@ -7,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,4,5,0 +FILEVERSION 5,4,7,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +18,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "ROLI Ltd.\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "5.4.5\0" + VALUE "FileVersion", "5.4.7\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "5.4.5\0" + VALUE "ProductVersion", "5.4.7\0" END END diff --git a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj index bb2ad0023c..c5a3d25f3b 100644 --- a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=5.4.5;JUCE_APP_VERSION_HEX=0x50405;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=5.4.7;JUCE_APP_VERSION_HEX=0x50407;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=5.4.5;JUCE_APP_VERSION_HEX=0x50405;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=5.4.7;JUCE_APP_VERSION_HEX=0x50407;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;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreaded true @@ -233,6 +233,7 @@ + @@ -339,9 +340,6 @@ true - - true - true @@ -1624,6 +1622,7 @@ + @@ -1709,7 +1708,6 @@ - diff --git a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters index cb3b2b843a..1acc5e8090 100644 --- a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters @@ -496,6 +496,9 @@ Projucer\Utility\Helpers + + Projucer\Utility\Helpers + Projucer\Utility\PIPs @@ -616,9 +619,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -2325,6 +2325,9 @@ Projucer\Utility\Helpers + + Projucer\Utility\Helpers + Projucer\Utility\PIPs @@ -2580,9 +2583,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/extras/Projucer/Builds/VisualStudio2019/resources.rc b/extras/Projucer/Builds/VisualStudio2019/resources.rc index c41432352a..d5c8c37636 100644 --- a/extras/Projucer/Builds/VisualStudio2019/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2019/resources.rc @@ -1,3 +1,5 @@ +#pragma code_page(65001) + #ifdef JUCE_USER_DEFINED_RC_FILE #include JUCE_USER_DEFINED_RC_FILE #else @@ -7,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 5,4,5,0 +FILEVERSION 5,4,7,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -16,9 +18,9 @@ BEGIN VALUE "CompanyName", "ROLI Ltd.\0" VALUE "LegalCopyright", "ROLI Ltd.\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "5.4.5\0" + VALUE "FileVersion", "5.4.7\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "5.4.5\0" + VALUE "ProductVersion", "5.4.7\0" END END diff --git a/extras/Projucer/JuceLibraryCode/AppConfig.h b/extras/Projucer/JuceLibraryCode/AppConfig.h index 67263ef45d..cb5a32449f 100644 --- a/extras/Projucer/JuceLibraryCode/AppConfig.h +++ b/extras/Projucer/JuceLibraryCode/AppConfig.h @@ -66,7 +66,7 @@ #define JUCE_USE_DARK_SPLASH_SCREEN 1 -#define JUCE_PROJUCER_VERSION 0x50405 +#define JUCE_PROJUCER_VERSION 0x50407 //============================================================================== #define JUCE_MODULE_AVAILABLE_juce_analytics 1 diff --git a/extras/Projucer/JuceLibraryCode/BinaryData.cpp b/extras/Projucer/JuceLibraryCode/BinaryData.cpp index dbebab8c6e..8bf9c4cdda 100644 --- a/extras/Projucer/JuceLibraryCode/BinaryData.cpp +++ b/extras/Projucer/JuceLibraryCode/BinaryData.cpp @@ -5519,7 +5519,7 @@ static const unsigned char temp_binary_data_27[] = " && ! RuntimePermissions::isGranted (RuntimePermissions::recordAudio))\r\n" " {\r\n" " RuntimePermissions::request (RuntimePermissions::recordAudio,\r\n" -" [&] (bool granted) { if (granted) setAudioChannels (2, 2); });\r\n" +" [&] (bool granted) { setAudioChannels (granted ? 2 : 0, 2); });\r\n" " }\r\n" " else\r\n" " {\r\n" @@ -5528,7 +5528,7 @@ static const unsigned char temp_binary_data_27[] = " }\r\n" " }\r\n" "\r\n" -" ~%%content_component_class%%()\r\n" +" ~%%content_component_class%%() override\r\n" " {\r\n" " // This shuts down the audio device and clears the audio source.\r\n" " shutdownAudio();\r\n" @@ -5616,7 +5616,7 @@ static const unsigned char temp_binary_data_28[] = " && ! RuntimePermissions::isGranted (RuntimePermissions::recordAudio))\r\n" " {\r\n" " RuntimePermissions::request (RuntimePermissions::recordAudio,\r\n" -" [&] (bool granted) { if (granted) setAudioChannels (2, 2); });\r\n" +" [&] (bool granted) { setAudioChannels (granted ? 2 : 0, 2); });\r\n" " }\r\n" " else\r\n" " {\r\n" @@ -5704,7 +5704,7 @@ static const unsigned char temp_binary_data_29[] = "public:\r\n" " //==============================================================================\r\n" " %%content_component_class%%();\r\n" -" ~%%content_component_class%%();\r\n" +" ~%%content_component_class%%() override;\r\n" "\r\n" " //==============================================================================\r\n" " void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;\r\n" @@ -6174,7 +6174,7 @@ static const unsigned char temp_binary_data_35[] = "#pragma once\r\n" "\r\n" "//[Headers] -- You can add your own extra header files here --\r\n" -"%%include_juce_header%%\r\n" +"%%include_juce%%\r\n" "//[/Headers]\r\n" "\r\n" "%%include_files_h%%\r\n" @@ -7204,7 +7204,7 @@ static const unsigned char temp_binary_data_53[] = " ==============================================================================\r\n" "*/\r\n" "\r\n" -"#include \"../JuceLibraryCode/JuceHeader.h\"\r\n" +"%%include_juce%%\r\n" "#include \"%%filename%%\"\r\n" "\r\n" "%%component_begin%%\r\n" @@ -7838,15 +7838,15 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) case 0xd11e6d35: numBytes = 2085; return jucer_AnimatedComponentSimpleTemplate_h; case 0x6cf2645e: numBytes = 1563; return jucer_AnimatedComponentTemplate_cpp; case 0x97b055e3: numBytes = 1201; return jucer_AnimatedComponentTemplate_h; - case 0xfb6f6d96: numBytes = 3693; return jucer_AudioComponentSimpleTemplate_h; + case 0xfb6f6d96: numBytes = 3702; return jucer_AudioComponentSimpleTemplate_h; case 0xafccbd3f: numBytes = 3094; return jucer_AudioComponentTemplate_cpp; - case 0x915d7304: numBytes = 1374; return jucer_AudioComponentTemplate_h; + case 0x915d7304: numBytes = 1383; return jucer_AudioComponentTemplate_h; case 0x27c5a93a: numBytes = 1356; return jucer_AudioPluginEditorTemplate_cpp; case 0x4d0721bf: numBytes = 977; return jucer_AudioPluginEditorTemplate_h; case 0x51b49ac5: numBytes = 6036; return jucer_AudioPluginFilterTemplate_cpp; case 0x488afa0a: numBytes = 2272; return jucer_AudioPluginFilterTemplate_h; case 0xabad7041: numBytes = 2126; return jucer_ComponentTemplate_cpp; - case 0xfc72fe86: numBytes = 2051; return jucer_ComponentTemplate_h; + case 0xfc72fe86: numBytes = 2044; return jucer_ComponentTemplate_h; case 0x1657b643: numBytes = 1693; return jucer_ContentCompSimpleTemplate_h; case 0x0b66646c: numBytes = 1190; return jucer_ContentCompTemplate_cpp; case 0x6fa10171: numBytes = 1071; return jucer_ContentCompTemplate_h; @@ -7864,7 +7864,7 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) case 0x7fbac252: numBytes = 1665; return jucer_OpenGLComponentTemplate_cpp; case 0x491fa0d7: numBytes = 1263; return jucer_OpenGLComponentTemplate_h; case 0xbc050edc: numBytes = 4926; return jucer_PIPAudioProcessorTemplate_h; - case 0xf4ca9e9a: numBytes = 2447; return jucer_PIPMain_cpp; + case 0xf4ca9e9a: numBytes = 2421; return jucer_PIPMain_cpp; case 0x0b16e320: numBytes = 517; return jucer_PIPTemplate_h; case 0xcd472557: numBytes = 6433; return jucer_UnityPluginGUIScript_cs; case 0x763d39dc: numBytes = 1050; return colourscheme_dark_xml; diff --git a/extras/Projucer/JuceLibraryCode/BinaryData.h b/extras/Projucer/JuceLibraryCode/BinaryData.h index d9311d3671..85d9f8b033 100644 --- a/extras/Projucer/JuceLibraryCode/BinaryData.h +++ b/extras/Projucer/JuceLibraryCode/BinaryData.h @@ -90,13 +90,13 @@ namespace BinaryData const int jucer_AnimatedComponentTemplate_hSize = 1201; extern const char* jucer_AudioComponentSimpleTemplate_h; - const int jucer_AudioComponentSimpleTemplate_hSize = 3693; + const int jucer_AudioComponentSimpleTemplate_hSize = 3702; extern const char* jucer_AudioComponentTemplate_cpp; const int jucer_AudioComponentTemplate_cppSize = 3094; extern const char* jucer_AudioComponentTemplate_h; - const int jucer_AudioComponentTemplate_hSize = 1374; + const int jucer_AudioComponentTemplate_hSize = 1383; extern const char* jucer_AudioPluginEditorTemplate_cpp; const int jucer_AudioPluginEditorTemplate_cppSize = 1356; @@ -114,7 +114,7 @@ namespace BinaryData const int jucer_ComponentTemplate_cppSize = 2126; extern const char* jucer_ComponentTemplate_h; - const int jucer_ComponentTemplate_hSize = 2051; + const int jucer_ComponentTemplate_hSize = 2044; extern const char* jucer_ContentCompSimpleTemplate_h; const int jucer_ContentCompSimpleTemplate_hSize = 1693; @@ -168,7 +168,7 @@ namespace BinaryData const int jucer_PIPAudioProcessorTemplate_hSize = 4926; extern const char* jucer_PIPMain_cpp; - const int jucer_PIPMain_cppSize = 2447; + const int jucer_PIPMain_cppSize = 2421; extern const char* jucer_PIPTemplate_h; const int jucer_PIPTemplate_hSize = 517; diff --git a/extras/Projucer/JuceLibraryCode/JuceHeader.h b/extras/Projucer/JuceLibraryCode/JuceHeader.h index 765b42656d..abc5ebe606 100644 --- a/extras/Projucer/JuceLibraryCode/JuceHeader.h +++ b/extras/Projucer/JuceLibraryCode/JuceHeader.h @@ -45,7 +45,7 @@ namespace ProjectInfo { const char* const projectName = "Projucer"; const char* const companyName = "ROLI Ltd."; - const char* const versionString = "5.4.5"; - const int versionNumber = 0x50405; + const char* const versionString = "5.4.7"; + const int versionNumber = 0x50407; } #endif diff --git a/extras/Projucer/Projucer.jucer b/extras/Projucer/Projucer.jucer index 6f4f708036..4e877daa0d 100644 --- a/extras/Projucer/Projucer.jucer +++ b/extras/Projucer/Projucer.jucer @@ -1,13 +1,12 @@ @@ -636,6 +635,10 @@ file="Source/Utility/Helpers/jucer_TranslationHelpers.h"/> + + > 16; - int minor = (versionNum & 0x00ff00) >> 8; - int build = (versionNum & 0x0000ff) >> 0; + if (showAlertWindows) + AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, + "Update Server Communication Error", + "Failed to communicate with the JUCE update server.\n" + "Please try again in a few minutes.\n\n" + "If this problem persists you can download the latest version of JUCE from juce.com"); - return String (major) + '.' + String (minor) + '.' + String (build); - } - - String getProductVersionString() - { - return formatProductVersion (ProjectInfo::versionNumber); - } - - bool isNewVersion (const String& current, const String& other) - { - auto currentTokens = StringArray::fromTokens (current, ".", {}); - auto otherTokens = StringArray::fromTokens (other, ".", {}); - - jassert (currentTokens.size() == 3 && otherTokens.size() == 3); - - if (currentTokens[0].getIntValue() == otherTokens[0].getIntValue()) - { - if (currentTokens[1].getIntValue() == otherTokens[1].getIntValue()) - return currentTokens[2].getIntValue() < otherTokens[2].getIntValue(); - - return currentTokens[1].getIntValue() < otherTokens[1].getIntValue(); - } - - return currentTokens[0].getIntValue() < otherTokens[0].getIntValue(); - } -} - -void LatestVersionCheckerAndUpdater::queryUpdateServer() -{ - StringPairArray responseHeaders; - - URL latestVersionURL ("https://my.roli.com/software_versions/update_to/Projucer/" - + VersionHelpers::getProductVersionString() + '/' + getOSString() - + "?language=" + SystemStats::getUserLanguage()); - - std::unique_ptr inStream (latestVersionURL.createInputStream (false, nullptr, nullptr, - "X-API-Key: 265441b-343403c-20f6932-76361d\nContent-Type: " - "application/json\nAccept: application/json; version=1", - 0, &responseHeaders, &statusCode, 0)); - - if (threadShouldExit()) return; - - if (inStream.get() != nullptr && (statusCode == 303 || statusCode == 400)) - { - if (statusCode == 303) - relativeDownloadPath = responseHeaders["Location"]; - - jassert (relativeDownloadPath.isNotEmpty()); - - jsonReply = JSON::parse (inStream->readEntireStreamAsString()); } - else if (showAlertWindows) - { - if (statusCode == 204) - AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon, "No New Version Available", "Your JUCE version is up to date."); - else - AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "Network Error", "Could not connect to the web server.\n" - "Please check your internet connection and try again."); - } -} -void LatestVersionCheckerAndUpdater::processResult() -{ - if (! jsonReply.isObject()) + if (! info->isNewerVersionThanCurrent()) + { + if (showAlertWindows) + AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon, + "No New Version Available", + "Your JUCE version is up to date."); return; + } - if (statusCode == 400) + auto osString = [] { - auto errorObject = jsonReply.getDynamicObject()->getProperty ("error"); + #if JUCE_MAC + return "osx"; + #elif JUCE_WINDOWS + return "windows"; + #elif JUCE_LINUX + return "linux"; + #else + jassertfalse; + return "Unknown"; + #endif + }(); - if (errorObject.isObject()) + String requiredFilename ("juce-" + info->versionString + "-" + osString + ".zip"); + + for (auto& asset : info->assets) + { + if (asset.name == requiredFilename) { - auto message = errorObject.getProperty ("message", {}).toString(); + auto versionString = info->versionString; + auto releaseNotes = info->releaseNotes; - if (message.isNotEmpty()) - AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "JUCE Updater", message); + MessageManager::callAsync ([this, versionString, releaseNotes, asset] + { + askUserAboutNewVersion (versionString, releaseNotes, asset); + }); + + return; } } - else if (statusCode == 303) - { - askUserAboutNewVersion (jsonReply.getProperty ("version", {}).toString(), - jsonReply.getProperty ("notes", {}).toString()); - } + + if (showAlertWindows) + AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, + "Failed to find any new downloads", + "Please try again in a few minutes."); } //============================================================================== @@ -246,14 +192,15 @@ public: RectanglePlacement::stretchToFit, 1.0f); } - static std::unique_ptr launchDialog (const String& newVersion, const String& releaseNotes) + static std::unique_ptr launchDialog (const String& newVersionString, + const String& releaseNotes) { DialogWindow::LaunchOptions options; - options.dialogTitle = "Download JUCE version " + newVersion + "?"; + options.dialogTitle = "Download JUCE version " + newVersionString + "?"; options.resizable = false; - auto* content = new UpdateDialog (newVersion, releaseNotes); + auto* content = new UpdateDialog (newVersionString, releaseNotes); options.content.set (content, true); std::unique_ptr dialog (options.create()); @@ -292,66 +239,83 @@ private: DialogWindow* parentWindow = nullptr; }; -void LatestVersionCheckerAndUpdater::askUserForLocationToDownload() +void LatestVersionCheckerAndUpdater::askUserForLocationToDownload (const VersionInfo::Asset& asset) { - FileChooser chooser ("Please select the location into which you'd like to install the new version", + FileChooser chooser ("Please select the location into which you would like to install the new version", { getAppSettings().getStoredPath (Ids::jucePath, TargetOS::getThisOS()).get() }); if (chooser.browseForDirectory()) { auto targetFolder = chooser.getResult(); - if (isJUCEFolder (targetFolder)) + // By default we will install into 'targetFolder/JUCE', but we should install into + // 'targetFolder' if that is an existing JUCE directory. + bool willOverwriteJuceFolder = [&targetFolder] + { + if (isJUCEFolder (targetFolder)) + return true; + + targetFolder = targetFolder.getChildFile ("JUCE"); + + return isJUCEFolder (targetFolder); + }(); + + auto targetFolderPath = targetFolder.getFullPathName(); + + if (willOverwriteJuceFolder) { if (targetFolder.getChildFile (".git").isDirectory()) { AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "Downloading New JUCE Version", - "This folder is a GIT repository!\n\nYou should use a \"git pull\" to update it to the latest version."); + targetFolderPath + "\n\nis a GIT repository!\n\nYou should use a \"git pull\" to update it to the latest version."); return; } if (! AlertWindow::showOkCancelBox (AlertWindow::WarningIcon, "Overwrite Existing JUCE Folder?", - String ("Do you want to overwrite the folder:\n\n" + targetFolder.getFullPathName() + "\n\n..with the latest version from juce.com?\n\n" - "This will move the existing folder to " + targetFolder.getFullPathName() + "_old."))) + "Do you want to replace the folder\n\n" + targetFolderPath + "\n\nwith the latest version from juce.com?\n\n" + "This will move the existing folder to " + targetFolderPath + "_old.")) { return; } } - else + else if (targetFolder.exists()) { - targetFolder = targetFolder.getChildFile ("JUCE").getNonexistentSibling(); + if (! AlertWindow::showOkCancelBox (AlertWindow::WarningIcon, "Existing File Or Directory", + "Do you want to move\n\n" + targetFolderPath + "\n\nto\n\n" + targetFolderPath + "_old?")) + { + return; + } } - downloadAndInstall (targetFolder); + downloadAndInstall (asset, targetFolder); } } -void LatestVersionCheckerAndUpdater::askUserAboutNewVersion (const String& newVersion, const String& releaseNotes) +void LatestVersionCheckerAndUpdater::askUserAboutNewVersion (const String& newVersionString, + const String& releaseNotes, + const VersionInfo::Asset& asset) { - if (newVersion.isNotEmpty() && releaseNotes.isNotEmpty() - && VersionHelpers::isNewVersion (VersionHelpers::getProductVersionString(), newVersion)) - { - dialogWindow = UpdateDialog::launchDialog (newVersion, releaseNotes); + dialogWindow = UpdateDialog::launchDialog (newVersionString, releaseNotes); - if (auto* mm = ModalComponentManager::getInstance()) - mm->attachCallback (dialogWindow.get(), ModalCallbackFunction::create ([this] (int result) - { - if (result == 1) - askUserForLocationToDownload(); + if (auto* mm = ModalComponentManager::getInstance()) + mm->attachCallback (dialogWindow.get(), + ModalCallbackFunction::create ([this, asset] (int result) + { + if (result == 1) + askUserForLocationToDownload (asset); - dialogWindow.reset(); - })); - } + dialogWindow.reset(); + })); } //============================================================================== class DownloadAndInstallThread : private ThreadWithProgressWindow { public: - DownloadAndInstallThread (const URL& u, const File& t, std::function&& cb) + DownloadAndInstallThread (const VersionInfo::Asset& a, const File& t, std::function&& cb) : ThreadWithProgressWindow ("Downloading New Version", true, true), - downloadURL (u), targetFolder (t), completionCallback (std::move (cb)) + asset (a), targetFolder (t), completionCallback (std::move (cb)) { launchThread (3); } @@ -368,7 +332,9 @@ private: result = install (zipData); if (result.failed()) - MessageManager::callAsync ([result] () { AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "Installation Failed", result.getErrorMessage()); }); + MessageManager::callAsync ([result] { AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, + "Installation Failed", + result.getErrorMessage()); }); else MessageManager::callAsync (completionCallback); } @@ -378,10 +344,7 @@ private: setStatusMessage ("Downloading..."); int statusCode = 0; - StringPairArray responseHeaders; - - std::unique_ptr inStream (downloadURL.createInputStream (false, nullptr, nullptr, {}, 0, - &responseHeaders, &statusCode, 0)); + auto inStream = VersionInfo::createInputStreamForAsset (asset, statusCode); if (inStream != nullptr && statusCode == 200) { @@ -406,53 +369,53 @@ private: return Result::ok(); } - return Result::fail ("Failed to download from: " + downloadURL.toString (false)); + return Result::fail ("Failed to download from: " + asset.url); } - Result install (MemoryBlock& data) + Result install (const MemoryBlock& data) { setStatusMessage ("Installing..."); - auto result = unzipDownload (data); - - if (threadShouldExit()) - result = Result::fail ("Cancelled"); - - if (result.failed()) - return result; - - return Result::ok(); - } - - Result unzipDownload (const MemoryBlock& data) - { MemoryInputStream input (data, false); ZipFile zip (input); if (zip.getNumEntries() == 0) return Result::fail ("The downloaded file was not a valid JUCE file!"); - auto unzipTarget = File::createTempFile ({}); + struct ScopedDownloadFolder + { + ScopedDownloadFolder (const File& installTargetFolder) + { + folder = installTargetFolder.getSiblingFile (installTargetFolder.getFileNameWithoutExtension() + "_download").getNonexistentSibling(); + jassert (folder.createDirectory()); + } - if (! unzipTarget.createDirectory()) + ~ScopedDownloadFolder() { folder.deleteRecursively(); } + + File folder; + }; + + ScopedDownloadFolder unzipTarget (targetFolder); + + if (! unzipTarget.folder.isDirectory()) return Result::fail ("Couldn't create a temporary folder to unzip the new version!"); - auto r = zip.uncompressTo (unzipTarget); + auto r = zip.uncompressTo (unzipTarget.folder); if (r.failed()) - { - unzipTarget.deleteRecursively(); return r; - } + + if (threadShouldExit()) + return Result::fail ("Cancelled"); #if JUCE_LINUX || JUCE_MAC - r = setFilePermissions (unzipTarget, zip); + r = setFilePermissions (unzipTarget.folder, zip); if (r.failed()) - { - unzipTarget.deleteRecursively(); return r; - } + + if (threadShouldExit()) + return Result::fail ("Cancelled"); #endif if (targetFolder.exists()) @@ -460,21 +423,15 @@ private: auto oldFolder = targetFolder.getSiblingFile (targetFolder.getFileNameWithoutExtension() + "_old").getNonexistentSibling(); if (! targetFolder.moveFileTo (oldFolder)) - { - unzipTarget.deleteRecursively(); return Result::fail ("Could not remove the existing folder!\n\n" "This may happen if you are trying to download into a directory that requires administrator privileges to modify.\n" "Please select a folder that is writable by the current user."); - } } - if (! unzipTarget.moveFileTo (targetFolder)) - { - unzipTarget.deleteRecursively(); + if (! unzipTarget.folder.getChildFile ("JUCE").moveFileTo (targetFolder)) return Result::fail ("Could not overwrite the existing folder!\n\n" "This may happen if you are trying to download into a directory that requires administrator privileges to modify.\n" "Please select a folder that is writable by the current user."); - } return Result::ok(); } @@ -502,7 +459,7 @@ private: return Result::ok(); } - URL downloadURL; + VersionInfo::Asset asset; File targetFolder; std::function completionCallback; }; @@ -533,9 +490,9 @@ void restartProcess (const File& targetFolder) } } -void LatestVersionCheckerAndUpdater::downloadAndInstall (const File& targetFolder) +void LatestVersionCheckerAndUpdater::downloadAndInstall (const VersionInfo::Asset& asset, const File& targetFolder) { - installer.reset (new DownloadAndInstallThread ({ relativeDownloadPath }, targetFolder, + installer.reset (new DownloadAndInstallThread (asset, targetFolder, [this, targetFolder] { installer.reset(); diff --git a/extras/Projucer/Source/Application/jucer_AutoUpdater.h b/extras/Projucer/Source/Application/jucer_AutoUpdater.h index aa1949376f..2f4b288b58 100644 --- a/extras/Projucer/Source/Application/jucer_AutoUpdater.h +++ b/extras/Projucer/Source/Application/jucer_AutoUpdater.h @@ -26,6 +26,8 @@ #pragma once +#include "../Utility/Helpers/jucer_VersionInfo.h" + class DownloadAndInstallThread; class LatestVersionCheckerAndUpdater : public DeletedAtShutdown, @@ -43,17 +45,12 @@ public: private: //============================================================================== void run() override; - void queryUpdateServer(); - void processResult(); - void askUserAboutNewVersion (const String&, const String&); - void askUserForLocationToDownload(); - void downloadAndInstall (const File&); + void askUserAboutNewVersion (const String&, const String&, const VersionInfo::Asset&); + void askUserForLocationToDownload (const VersionInfo::Asset&); + void downloadAndInstall (const VersionInfo::Asset&, const File&); //============================================================================== bool showAlertWindows = false; - int statusCode = 0; - String relativeDownloadPath; - var jsonReply; std::unique_ptr installer; std::unique_ptr dialogWindow; diff --git a/extras/Projucer/Source/Application/jucer_CommonHeaders.h b/extras/Projucer/Source/Application/jucer_CommonHeaders.h index a74f655f30..0c328c12d5 100644 --- a/extras/Projucer/Source/Application/jucer_CommonHeaders.h +++ b/extras/Projucer/Source/Application/jucer_CommonHeaders.h @@ -28,6 +28,11 @@ //============================================================================== +// The GCC extensions define linux somewhere in the headers, so undef it here... +#if JUCE_GCC + #undef linux +#endif + struct TargetOS { enum OS diff --git a/extras/Projucer/Source/Application/jucer_Headers.h b/extras/Projucer/Source/Application/jucer_Headers.h index 048a9aa3e7..b96a1bbf0f 100644 --- a/extras/Projucer/Source/Application/jucer_Headers.h +++ b/extras/Projucer/Source/Application/jucer_Headers.h @@ -26,7 +26,7 @@ #pragma once -#include "../JuceLibraryCode/JuceHeader.h" +#include #include "jucer_CommonHeaders.h" #if JUCE_DEBUG diff --git a/extras/Projucer/Source/BinaryData/Templates/jucer_AudioComponentSimpleTemplate.h b/extras/Projucer/Source/BinaryData/Templates/jucer_AudioComponentSimpleTemplate.h index d0cba52058..06ba4d807b 100644 --- a/extras/Projucer/Source/BinaryData/Templates/jucer_AudioComponentSimpleTemplate.h +++ b/extras/Projucer/Source/BinaryData/Templates/jucer_AudioComponentSimpleTemplate.h @@ -30,7 +30,7 @@ public: && ! RuntimePermissions::isGranted (RuntimePermissions::recordAudio)) { RuntimePermissions::request (RuntimePermissions::recordAudio, - [&] (bool granted) { if (granted) setAudioChannels (2, 2); }); + [&] (bool granted) { setAudioChannels (granted ? 2 : 0, 2); }); } else { @@ -39,7 +39,7 @@ public: } } - ~%%content_component_class%%() + ~%%content_component_class%%() override { // This shuts down the audio device and clears the audio source. shutdownAudio(); diff --git a/extras/Projucer/Source/BinaryData/Templates/jucer_AudioComponentTemplate.cpp b/extras/Projucer/Source/BinaryData/Templates/jucer_AudioComponentTemplate.cpp index 946bc7bf5c..36461c5d04 100644 --- a/extras/Projucer/Source/BinaryData/Templates/jucer_AudioComponentTemplate.cpp +++ b/extras/Projucer/Source/BinaryData/Templates/jucer_AudioComponentTemplate.cpp @@ -20,7 +20,7 @@ && ! RuntimePermissions::isGranted (RuntimePermissions::recordAudio)) { RuntimePermissions::request (RuntimePermissions::recordAudio, - [&] (bool granted) { if (granted) setAudioChannels (2, 2); }); + [&] (bool granted) { setAudioChannels (granted ? 2 : 0, 2); }); } else { diff --git a/extras/Projucer/Source/BinaryData/Templates/jucer_AudioComponentTemplate.h b/extras/Projucer/Source/BinaryData/Templates/jucer_AudioComponentTemplate.h index 99c2590a26..33d583d128 100644 --- a/extras/Projucer/Source/BinaryData/Templates/jucer_AudioComponentTemplate.h +++ b/extras/Projucer/Source/BinaryData/Templates/jucer_AudioComponentTemplate.h @@ -20,7 +20,7 @@ class %%content_component_class%% : public AudioAppComponent public: //============================================================================== %%content_component_class%%(); - ~%%content_component_class%%(); + ~%%content_component_class%%() override; //============================================================================== void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override; diff --git a/extras/Projucer/Source/BinaryData/Templates/jucer_ComponentTemplate.h b/extras/Projucer/Source/BinaryData/Templates/jucer_ComponentTemplate.h index 780bdc624b..ffaafbfcb1 100644 --- a/extras/Projucer/Source/BinaryData/Templates/jucer_ComponentTemplate.h +++ b/extras/Projucer/Source/BinaryData/Templates/jucer_ComponentTemplate.h @@ -20,7 +20,7 @@ #pragma once //[Headers] -- You can add your own extra header files here -- -%%include_juce_header%% +%%include_juce%% //[/Headers] %%include_files_h%% diff --git a/extras/Projucer/Source/BinaryData/Templates/jucer_PIPMain.cpp b/extras/Projucer/Source/BinaryData/Templates/jucer_PIPMain.cpp index c26a2d0465..da0677bdd1 100644 --- a/extras/Projucer/Source/BinaryData/Templates/jucer_PIPMain.cpp +++ b/extras/Projucer/Source/BinaryData/Templates/jucer_PIPMain.cpp @@ -6,7 +6,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +%%include_juce%% #include "%%filename%%" %%component_begin%% diff --git a/extras/Projucer/Source/ComponentEditor/jucer_GeneratedCode.cpp b/extras/Projucer/Source/ComponentEditor/jucer_GeneratedCode.cpp index 0b43f9eef9..a63a13fe9d 100644 --- a/extras/Projucer/Source/ComponentEditor/jucer_GeneratedCode.cpp +++ b/extras/Projucer/Source/ComponentEditor/jucer_GeneratedCode.cpp @@ -319,10 +319,7 @@ static void copyAcrossUserSections (String& dest, const String& src) } //============================================================================== -void GeneratedCode::applyToCode (String& code, - const File& targetFile, - const String& oldFileWithUserData, - Project* project) const +void GeneratedCode::applyToCode (String& code, const File& targetFile, const String& oldFileWithUserData) const { replaceTemplate (code, "version", JUCEApplicationBase::getInstance()->getApplicationVersion()); replaceTemplate (code, "creationTime", Time::getCurrentTime().toString (true, true, true)); @@ -337,11 +334,8 @@ void GeneratedCode::applyToCode (String& code, replaceTemplate (code, "method_definitions", getCallbackDefinitions()); - File juceHeaderFile = project != nullptr ? project->getAppIncludeFile() - : targetFile.getSiblingFile ("JuceHeader.h"); - - replaceTemplate (code, "include_juce_header", CodeHelpers::createIncludeStatement (juceHeaderFile, targetFile)); - + replaceTemplate (code, "include_juce", CodeHelpers::createIncludePathIncludeStatement (Project::getJuceSourceHFilename())); + replaceTemplate (code, "include_files_h", getIncludeFileCode (includeFilesH, targetFile)); replaceTemplate (code, "include_files_cpp", getIncludeFileCode (includeFilesCPP, targetFile)); diff --git a/extras/Projucer/Source/ComponentEditor/jucer_GeneratedCode.h b/extras/Projucer/Source/ComponentEditor/jucer_GeneratedCode.h index a7e84f25a0..5f62f35dd0 100644 --- a/extras/Projucer/Source/ComponentEditor/jucer_GeneratedCode.h +++ b/extras/Projucer/Source/ComponentEditor/jucer_GeneratedCode.h @@ -41,11 +41,7 @@ public: ~GeneratedCode(); //============================================================================== - void applyToCode (String& code, - const File& targetFile, - const String& oldFileWithUserData, - Project* project) const; - + void applyToCode (String& code, const File& targetFile, const String& oldFileWithUserData) const; int getUniqueSuffix(); //============================================================================== diff --git a/extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp b/extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp index dea80bcde3..ad1e8a8e9f 100644 --- a/extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp +++ b/extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp @@ -532,11 +532,8 @@ bool JucerDocument::flushChangesToDocuments (Project* project, bool isInitial) String existingHeader (header->getCodeDocument().getAllContent()); String existingCpp (cpp->getCodeDocument().getAllContent()); - generated.applyToCode (headerTemplate, headerFile, - existingHeader, project); - - generated.applyToCode (cppTemplate, headerFile.withFileExtension (".cpp"), - existingCpp, project); + generated.applyToCode (headerTemplate, headerFile, existingHeader); + generated.applyToCode (cppTemplate, headerFile.withFileExtension (".cpp"), existingCpp); if (isInitial) { diff --git a/extras/Projucer/Source/Licenses/jucer_LicenseController.cpp b/extras/Projucer/Source/Licenses/jucer_LicenseController.cpp index c73d734579..941c1ac6f7 100644 --- a/extras/Projucer/Source/Licenses/jucer_LicenseController.cpp +++ b/extras/Projucer/Source/Licenses/jucer_LicenseController.cpp @@ -59,6 +59,8 @@ static const char* getLicenseStateValue (LicenseState::Type type) case LicenseState::Type::edu: return "edu"; case LicenseState::Type::indie: return "indie"; case LicenseState::Type::pro: return "pro"; + case LicenseState::Type::notLoggedIn: + case LicenseState::Type::noLicenseChosenYet: default: return nullptr; } } @@ -77,9 +79,10 @@ static const char* getApplicationUsageDataStateValue (LicenseState::ApplicationU { switch (type) { - case LicenseState::ApplicationUsageData::enabled: return "enabled"; - case LicenseState::ApplicationUsageData::disabled: return "disabled"; - default: return "notChosen"; + case LicenseState::ApplicationUsageData::enabled: return "enabled"; + case LicenseState::ApplicationUsageData::disabled: return "disabled"; + case LicenseState::ApplicationUsageData::notChosenYet: + default: return "notChosen"; } } diff --git a/extras/Projucer/Source/Licenses/jucer_LicenseWebview.h b/extras/Projucer/Source/Licenses/jucer_LicenseWebview.h index adb3709d5e..bdec05d2b4 100644 --- a/extras/Projucer/Source/Licenses/jucer_LicenseWebview.h +++ b/extras/Projucer/Source/Licenses/jucer_LicenseWebview.h @@ -212,9 +212,7 @@ private: return false; } - bool isValid = (url.getDomain().endsWith ("roli.com") || url.getDomain().endsWith ("juce.com")); - - if (isValid) + if (isValidURL (url)) lastURL = page; return true; @@ -235,9 +233,7 @@ private: URL url (page); bool isGitHub = url.getDomain().endsWith ("github.com"); - if (url.getDomain().endsWith ("roli.com") - || url.getDomain().endsWith ("juce.com") - || isGitHub) + if (isValidURL (url) || isGitHub) { url.launchInDefaultBrowser(); diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineClient.cpp b/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineClient.cpp index 40d6767ed0..d8f5cba595 100644 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineClient.cpp +++ b/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineClient.cpp @@ -256,7 +256,7 @@ public: build.setGlobalDefs (getGlobalDefs()); build.setCompileFlags (project.getCompileEngineSettings().getExtraCompilerFlagsString()); build.setExtraDLLs (getExtraDLLs()); - build.setJuceModulesFolder (EnabledModuleList::findDefaultModulesFolder (project).getFullPathName()); + build.setJuceModulesFolder (project.getEnabledModules().getDefaultModulesFolder().getFullPathName()); build.setUtilsCppInclude (project.getAppIncludeFile().getFullPathName()); @@ -336,9 +336,6 @@ private: if (exporter->canLaunchProject()) defs.add (exporter->getExporterIdentifierMacro() + "=1"); - // Use the JUCE implementation of std::function until the live build - // engine can compile the one from the standard library - defs.add (" _LIBCPP_FUNCTIONAL=1"); defs.removeEmptyStrings(); return defs.joinIntoString (" "); @@ -378,9 +375,9 @@ private: { auto isVSTHost = project.getEnabledModules().isModuleEnabled ("juce_audio_processors") - && (project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3") || project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST")); + && (project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3", false) || project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST", false)); - auto isPluginProject = proj.getProjectType().isAudioPlugin(); + auto isPluginProject = proj.isAudioPluginProject(); OwnedArray modules; proj.getEnabledModules().createRequiredModules (modules); @@ -391,10 +388,10 @@ private: { for (auto* m : modules) { - auto localModuleFolder = proj.getEnabledModules().shouldCopyModuleFilesLocally (m->moduleInfo.getID()).getValue() - ? proj.getLocalModuleFolder (m->moduleInfo.getID()) - : m->moduleInfo.getFolder(); + auto copyLocally = proj.getEnabledModules().shouldCopyModuleFilesLocally (m->moduleInfo.getID()); + auto localModuleFolder = copyLocally ? proj.getLocalModuleFolder (m->moduleInfo.getID()) + : m->moduleInfo.getFolder(); m->findAndAddCompiledUnits (*exporter, nullptr, compileUnits, isPluginProject || isVSTHost ? ProjectType::Target::SharedCodeTarget @@ -462,15 +459,16 @@ private: StringArray getSystemIncludePaths() { StringArray paths; + paths.add (project.getGeneratedCodeFolder().getFullPathName()); paths.addArray (getSearchPathsFromString (project.getCompileEngineSettings().getSystemHeaderPathString())); auto isVSTHost = project.getEnabledModules().isModuleEnabled ("juce_audio_processors") - && (project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3") - || project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST")); + && (project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3", false) + || project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST", false)); auto customVst3Path = getAppSettings().getStoredPath (Ids::vst3Path, TargetOS::getThisOS()).get().toString(); - if (customVst3Path.isNotEmpty() && (project.getProjectType().isAudioPlugin() || isVSTHost)) + if (customVst3Path.isNotEmpty() && (project.isAudioPluginProject() || isVSTHost)) paths.add (customVst3Path); OwnedArray modules; @@ -480,7 +478,7 @@ private: { paths.addIfNotAlreadyThere (module->getFolder().getParentDirectory().getFullPathName()); - if (customVst3Path.isEmpty() && (project.getProjectType().isAudioPlugin() || isVSTHost)) + if (customVst3Path.isEmpty() && (project.isAudioPluginProject() || isVSTHost)) if (module->getID() == "juce_audio_processors") paths.addIfNotAlreadyThere (module->getFolder().getChildFile ("format_types").getChildFile ("VST3_SDK").getFullPathName()); } diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineServer.cpp b/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineServer.cpp index 1f809f7cbc..8b7e926087 100644 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineServer.cpp +++ b/extras/Projucer/Source/LiveBuildEngine/jucer_CompileEngineServer.cpp @@ -52,6 +52,8 @@ #if JUCE_WINDOWS static void setParentProcessID (int); static int getCurrentProcessID(); +#else + #include #endif //============================================================================== diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_DiagnosticMessage.h b/extras/Projucer/Source/LiveBuildEngine/jucer_DiagnosticMessage.h index 252855cc9f..2aa2ab9e5e 100644 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_DiagnosticMessage.h +++ b/extras/Projucer/Source/LiveBuildEngine/jucer_DiagnosticMessage.h @@ -79,6 +79,7 @@ struct DiagnosticMessage case error: res << "error: "; break; case warning: res << "warning: "; break; case note: res << "note: "; break; + default: break; }; res << mainFile << ": "; diff --git a/extras/Projucer/Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp b/extras/Projucer/Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp index b3273dee2f..5b65750066 100644 --- a/extras/Projucer/Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp +++ b/extras/Projucer/Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp @@ -27,6 +27,7 @@ #include "../Application/jucer_Headers.h" #include "jucer_DownloadCompileEngineThread.h" #include "../LiveBuildEngine/jucer_CompileEngineDLL.h" +#include "../Utility/Helpers/jucer_VersionInfo.h" //============================================================================== bool DownloadCompileEngineThread::downloadAndInstall() @@ -83,38 +84,60 @@ void DownloadCompileEngineThread::run() Result DownloadCompileEngineThread::download (MemoryBlock& dest) { - int statusCode = 302; - const int timeoutMs = 10000; - StringPairArray responseHeaders; + auto info = VersionInfo::fetchFromUpdateServer (ProjectInfo::versionString); - URL url = getDownloadUrl(); - std::unique_ptr in (url.createInputStream (false, nullptr, nullptr, - String(), timeoutMs, &responseHeaders, - &statusCode, 0)); + if (info == nullptr) + return Result::fail ("Download error: cannot communicate with server"); - if (in == nullptr || statusCode != 200) - return Result::fail ("Download error: cannot establish connection"); - - MemoryOutputStream mo (dest, true); - - int64 size = in->getTotalLength(); - int64 bytesReceived = -1; - String msg("Downloading... (123)"); - - for (int64 pos = 0; pos < size; pos += bytesReceived) + auto requiredAssetName = [] { - setStatusMessage (msg.replace ("123", File::descriptionOfSizeInBytes (pos))); + String name ("JUCECompileEngine_"); - if (threadShouldExit()) - return Result::fail ("Download error: operation interrupted"); + #if JUCE_MAC + name << "osx_"; + #elif JUCE_WINDOWS + name << "windows_"; + #else + jassertfalse; + #endif - bytesReceived = mo.writeFromInputStream (*in, 8192); + return name + ProjectInfo::versionString + ".zip"; + }(); - if (bytesReceived == 0) - return Result::fail ("Download error: lost connection"); + for (auto& asset : info->assets) + { + if (asset.name == requiredAssetName) + { + int statusCode = 0; + auto in = VersionInfo::createInputStreamForAsset (asset, statusCode); + + if (in == nullptr || statusCode != 200) + return Result::fail ("Download error: cannot establish connection"); + + MemoryOutputStream mo (dest, true); + + int64 size = in->getTotalLength(); + int64 bytesReceived = -1; + String msg("Downloading... (123)"); + + for (int64 pos = 0; pos < size; pos += bytesReceived) + { + setStatusMessage (msg.replace ("123", File::descriptionOfSizeInBytes (pos))); + + if (threadShouldExit()) + return Result::fail ("Download error: operation interrupted"); + + bytesReceived = mo.writeFromInputStream (*in, 8192); + + if (bytesReceived == 0) + return Result::fail ("Download error: lost connection"); + } + + return Result::ok(); + } } - return Result::ok(); + return Result::fail ("Download error: no downloads available"); } Result DownloadCompileEngineThread::install (const MemoryBlock& data, File& targetFolder) @@ -131,21 +154,6 @@ Result DownloadCompileEngineThread::install (const MemoryBlock& data, File& targ return zip.uncompressTo (targetFolder); } -URL DownloadCompileEngineThread::getDownloadUrl() -{ - String urlStub ("http://assets.roli.com/juce/JUCECompileEngine_"); - - #if JUCE_MAC - urlStub << "osx_"; - #elif JUCE_WINDOWS - urlStub << "windows_"; - #else - jassertfalse; - #endif - - return urlStub + ProjectInfo::versionString + ".zip"; -} - File DownloadCompileEngineThread::getInstallFolder() { return CompileEngineDLL::getVersionedUserAppSupportFolder(); diff --git a/extras/Projucer/Source/Project/UI/Sidebar/jucer_ModuleTreeItems.h b/extras/Projucer/Source/Project/UI/Sidebar/jucer_ModuleTreeItems.h index 7917a4fdd4..709a23a243 100644 --- a/extras/Projucer/Source/Project/UI/Sidebar/jucer_ModuleTreeItems.h +++ b/extras/Projucer/Source/Project/UI/Sidebar/jucer_ModuleTreeItems.h @@ -153,6 +153,7 @@ private: group.properties.clear(); exporterModulePathDefaultValues.clear(); exporterModulePathValues.clear(); + globalPathValues.clear(); for (Project::ExporterIterator exporter (project); exporter.next();) { @@ -179,34 +180,39 @@ private: "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."); + + globalPathValues.add (getAppSettings().getStoredPath (isJUCEModule (moduleID) ? Ids::defaultJuceModulePath : Ids::defaultUserModulePath, + exporter->getTargetOSForExporter()).getPropertyAsValue()); } for (int i = 0; i < exporterModulePathDefaultValues.size(); ++i) { exporterModulePathDefaultValues.getReference (i).onDefaultChange = [this] { startTimer (50); }; + exporterModulePathValues.getReference (i).addListener (this); + globalPathValues.getReference (i).addListener (this); } - globalPathValue.removeListener (this); - globalPathValue.referTo (modules.getShouldUseGlobalPathValue (moduleID)); - globalPathValue.addListener (this); + useGlobalPathValue.removeListener (this); + useGlobalPathValue.referTo (modules.shouldUseGlobalPathValue (moduleID)); + useGlobalPathValue.addListener (this); auto menuItemString = (TargetOS::getThisOS() == TargetOS::osx ? "\"Projucer->Global Paths...\"" : "\"File->Global Paths...\""); - props.add (new BooleanPropertyComponent (globalPathValue, + props.add (new BooleanPropertyComponent (useGlobalPathValue, "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."); - props.add (new BooleanPropertyComponent (modules.shouldCopyModuleFilesLocally (moduleID), + props.add (new BooleanPropertyComponent (modules.shouldCopyModuleFilesLocallyValue (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 (modules.shouldShowAllModuleFilesInProject (moduleID), + props.add (new BooleanPropertyComponent (modules.shouldShowAllModuleFilesInProjectValue (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 " @@ -262,8 +268,8 @@ private: //============================================================================== Array exporterModulePathDefaultValues; - Array exporterModulePathValues; - Value globalPathValue; + Array exporterModulePathValues, globalPathValues; + Value useGlobalPathValue; OwnedArray configFlags; @@ -475,7 +481,7 @@ class EnabledModulesItem : public ProjectTreeItemBase, public: EnabledModulesItem (Project& p) : project (p), - moduleListTree (p.getEnabledModules().state) + moduleListTree (project.getEnabledModules().getState()) { moduleListTree.addListener (this); @@ -618,7 +624,7 @@ public: } else if (resultCode > 0) { - std::vector list; + std::vector list; int offset = -1; if (resultCode < 200) diff --git a/extras/Projucer/Source/Project/UI/jucer_ModulesInformationComponent.h b/extras/Projucer/Source/Project/UI/jucer_ModulesInformationComponent.h index 0b2ef9f60a..d78f9c02b5 100644 --- a/extras/Projucer/Source/Project/UI/jucer_ModulesInformationComponent.h +++ b/extras/Projucer/Source/Project/UI/jucer_ModulesInformationComponent.h @@ -35,7 +35,7 @@ class ModulesInformationComponent : public Component, public: ModulesInformationComponent (Project& p) : project (p), - modulesValueTree (p.getEnabledModules().state) + modulesValueTree (project.getEnabledModules().getState()) { listHeader = new ListBoxHeader ( { "Module", "Version", "Make Local Copy", "Paths" }, { 0.25f, 0.2f, 0.2f, 0.35f } ); @@ -135,9 +135,8 @@ public: g.drawFittedText (version, bounds.removeFromLeft (roundToInt (listHeader->getProportionAtIndex (1) * width)), Justification::centredLeft, 1); //============================================================================== - auto copyLocally = project.getEnabledModules().shouldCopyModuleFilesLocally (moduleID).getValue() ? "Yes" : "No"; - - g.drawFittedText (copyLocally, bounds.removeFromLeft (roundToInt (listHeader->getProportionAtIndex (2) * width)), Justification::centredLeft, 1); + g.drawFittedText (String (project.getEnabledModules().shouldCopyModuleFilesLocally (moduleID) ? "Yes" : "No"), + bounds.removeFromLeft (roundToInt (listHeader->getProportionAtIndex (2) * width)), Justification::centredLeft, 1); //============================================================================== String pathText; @@ -215,33 +214,41 @@ private: repaint(); } + static void setLocalCopyModeForAllModules (Project& project, bool copyLocally) + { + auto& modules = project.getEnabledModules(); + + for (auto i = modules.getNumModules(); --i >= 0;) + modules.shouldCopyModuleFilesLocallyValue (modules.getModuleID (i)) = copyLocally; + } + void showCopyModeMenu() { PopupMenu m; m.addItem (PopupMenu::Item ("Set all modules to copy locally") - .setAction ([&] { project.getEnabledModules().setLocalCopyModeForAllModules (true); })); + .setAction ([&] { setLocalCopyModeForAllModules (project, true); })); m.addItem (PopupMenu::Item ("Set all modules to not copy locally") - .setAction ([&] { project.getEnabledModules().setLocalCopyModeForAllModules (false); })); + .setAction ([&] { setLocalCopyModeForAllModules (project, false); })); m.showMenuAsync (PopupMenu::Options().withTargetComponent (setCopyModeButton)); } static void setAllModulesToUseGlobalPaths (Project& project, bool useGlobal) { - auto& moduleList = project.getEnabledModules(); + auto& modules = project.getEnabledModules(); - for (auto id : moduleList.getAllModules()) - moduleList.getShouldUseGlobalPathValue (id).setValue (useGlobal); + for (auto moduleID : modules.getAllModules()) + modules.shouldUseGlobalPathValue (moduleID) = useGlobal; } static void setSelectedModulesToUseGlobalPaths (Project& project, SparseSet selected, bool useGlobal) { - auto& moduleList = project.getEnabledModules(); + auto& modules = project.getEnabledModules(); for (int i = 0; i < selected.size(); ++i) - moduleList.getShouldUseGlobalPathValue (moduleList.getModuleID (selected[i])).setValue (useGlobal); + modules.shouldUseGlobalPathValue (modules.getModuleID (selected[i])) = useGlobal; } void showGlobalPathsMenu() diff --git a/extras/Projucer/Source/Project/UI/jucer_ProjectContentComponent.cpp b/extras/Projucer/Source/Project/UI/jucer_ProjectContentComponent.cpp index 052e3c0015..b8f2ec5b51 100644 --- a/extras/Projucer/Source/Project/UI/jucer_ProjectContentComponent.cpp +++ b/extras/Projucer/Source/Project/UI/jucer_ProjectContentComponent.cpp @@ -187,7 +187,9 @@ void ProjectContentComponent::setProject (Project* newProject) deleteProjectTabs(); project = newProject; - rebuildProjectTabs(); + + if (project != nullptr) + rebuildProjectTabs(); } } diff --git a/extras/Projucer/Source/Project/jucer_Module.cpp b/extras/Projucer/Source/Project/jucer_Module.cpp index a2b33e542c..f5ea011bbe 100644 --- a/extras/Projucer/Source/Project/jucer_Module.cpp +++ b/extras/Projucer/Source/Project/jucer_Module.cpp @@ -40,7 +40,7 @@ File ModuleDescription::getHeader() const { if (moduleFolder != File()) { - const char* extensions[] = { ".h", ".hpp", ".hxx" }; + static const char* extensions[] = { ".h", ".hpp", ".hxx" }; for (auto e : extensions) { @@ -56,14 +56,15 @@ File ModuleDescription::getHeader() const StringArray ModuleDescription::getDependencies() const { - auto deps = StringArray::fromTokens (moduleInfo ["dependencies"].toString(), " \t;,", "\"'"); - deps.trim(); - deps.removeEmptyStrings(); - return deps; + auto moduleDependencies = StringArray::fromTokens (moduleInfo ["dependencies"].toString(), " \t;,", "\"'"); + moduleDependencies.trim(); + moduleDependencies.removeEmptyStrings(); + + return moduleDependencies; } //============================================================================== -static bool tryToAddModuleFromFolder (const File& path, ModuleIDAndFolderList& list) +static bool tryToAddModuleFromFolder (const File& path, AvailableModuleList::ModuleIDAndFolderList& list) { ModuleDescription m (path); @@ -76,7 +77,7 @@ static bool tryToAddModuleFromFolder (const File& path, ModuleIDAndFolderList& l return false; } -static void addAllModulesInSubfoldersRecursively (const File& path, int depth, ModuleIDAndFolderList& list) +static void addAllModulesInSubfoldersRecursively (const File& path, int depth, AvailableModuleList::ModuleIDAndFolderList& list) { if (depth > 0) { @@ -94,27 +95,19 @@ static void addAllModulesInSubfoldersRecursively (const File& path, int depth, M } } -static void addAllModulesInFolder (const File& path, ModuleIDAndFolderList& list) +static void addAllModulesInFolder (const File& path, AvailableModuleList::ModuleIDAndFolderList& list) { if (! tryToAddModuleFromFolder (path, list)) { - int subfolders = 3; + static constexpr int subfolders = 3; addAllModulesInSubfoldersRecursively (path, subfolders, list); } } -static void sort (ModuleIDAndFolderList& listToSort) +struct ModuleScannerJob : public ThreadPoolJob { - std::sort (listToSort.begin(), listToSort.end(), [] (const ModuleIDAndFolder& m1, const ModuleIDAndFolder& m2) - { - return m1.first.compareIgnoreCase (m2.first) < 0; - }); -} - -//============================================================================== -struct ModuleScannerJob : public ThreadPoolJob -{ - ModuleScannerJob (const Array& paths, std::function&& callback) + ModuleScannerJob (const Array& paths, + std::function&& callback) : ThreadPoolJob ("ModuleScannerJob"), pathsToScan (paths), completionCallback (std::move (callback)) @@ -123,14 +116,19 @@ struct ModuleScannerJob : public ThreadPoolJob JobStatus runJob() override { - ModuleIDAndFolderList list; + AvailableModuleList::ModuleIDAndFolderList list; for (auto& p : pathsToScan) addAllModulesInFolder (p, list); if (! shouldExit()) { - sort (list); + std::sort (list.begin(), list.end(), [] (const AvailableModuleList::ModuleIDAndFolder& m1, + const AvailableModuleList::ModuleIDAndFolder& m2) + { + return m1.first.compareIgnoreCase (m2.first) < 0; + }); + completionCallback (list); } @@ -138,16 +136,12 @@ struct ModuleScannerJob : public ThreadPoolJob } Array pathsToScan; - std::function completionCallback; + std::function completionCallback; }; -AvailableModuleList::AvailableModuleList() -{ -} - ThreadPoolJob* AvailableModuleList::createScannerJob (const Array& paths) { - return new ModuleScannerJob (paths, [this] (ModuleIDAndFolderList scannedModuleList) + return new ModuleScannerJob (paths, [this] (AvailableModuleList::ModuleIDAndFolderList scannedModuleList) { { const ScopedLock swapLock (lock); @@ -177,14 +171,13 @@ void AvailableModuleList::scanPathsAsync (const Array& paths) removePendingAndAddJob (createScannerJob (paths)); } -ModuleIDAndFolderList AvailableModuleList::getAllModules() const +AvailableModuleList::ModuleIDAndFolderList AvailableModuleList::getAllModules() const { const ScopedLock readLock (lock); - return moduleList; } -ModuleIDAndFolder AvailableModuleList::getModuleWithID (const String& id) const +AvailableModuleList::ModuleIDAndFolder AvailableModuleList::getModuleWithID (const String& id) const { const ScopedLock readLock (lock); @@ -214,19 +207,18 @@ LibraryModule::LibraryModule (const ModuleDescription& d) { } -//============================================================================== void LibraryModule::writeIncludes (ProjectSaver& projectSaver, OutputStream& out) { auto& project = projectSaver.project; auto& modules = project.getEnabledModules(); - auto id = getID(); + auto moduleID = getID(); - if (modules.shouldCopyModuleFilesLocally (id).getValue()) + if (modules.shouldCopyModuleFilesLocally (moduleID)) { auto juceModuleFolder = moduleInfo.getFolder(); - auto localModuleFolder = project.getLocalModuleFolder (id); + auto localModuleFolder = project.getLocalModuleFolder (moduleID); localModuleFolder.createDirectory(); projectSaver.copyFolder (juceModuleFolder, localModuleFolder); } @@ -236,23 +228,14 @@ void LibraryModule::writeIncludes (ProjectSaver& projectSaver, OutputStream& out << ">" << newLine; } -//============================================================================== -static void parseAndAddLibs (StringArray& libList, const String& libs) +void LibraryModule::addSearchPathsToExporter (ProjectExporter& exporter) const { - libList.addTokens (libs, ", ", {}); - libList.trim(); - libList.removeDuplicates (false); -} - -void LibraryModule::addSettingsForModuleToExporter (ProjectExporter& exporter, ProjectSaver& projectSaver) const -{ - auto& project = exporter.getProject(); - auto moduleRelativePath = exporter.getModuleFolderRelativeToProject (getID()); exporter.addToExtraSearchPaths (moduleRelativePath.getParentDirectory()); String libDirPlatform; + if (exporter.isLinux()) libDirPlatform = "Linux"; else if (exporter.isCodeBlocks() && exporter.isWindows()) @@ -261,7 +244,7 @@ void LibraryModule::addSettingsForModuleToExporter (ProjectExporter& exporter, P libDirPlatform = exporter.getTargetFolder().getFileName(); auto libSubdirPath = moduleRelativePath.toUnixStyle() + "/libs/" + libDirPlatform; - auto moduleLibDir = File (project.getProjectFolder().getFullPathName() + "/" + libSubdirPath); + auto moduleLibDir = File (exporter.getProject().getProjectFolder().getFullPathName() + "/" + libSubdirPath); if (moduleLibDir.exists()) exporter.addToModuleLibPaths ({ libSubdirPath, moduleRelativePath.getRoot() }); @@ -275,27 +258,43 @@ void LibraryModule::addSettingsForModuleToExporter (ProjectExporter& exporter, P for (auto& path : paths) exporter.addToExtraSearchPaths (moduleRelativePath.getChildFile (path.unquoted())); } +} +void LibraryModule::addDefinesToExporter (ProjectExporter& exporter) const +{ + auto extraDefs = moduleInfo.getPreprocessorDefs().trim(); + + if (extraDefs.isNotEmpty()) + exporter.getExporterPreprocessorDefsValue() = exporter.getExporterPreprocessorDefsString() + "\n" + extraDefs; +} + +void LibraryModule::addCompileUnitsToExporter (ProjectExporter& exporter, ProjectSaver& projectSaver) const +{ + auto& project = exporter.getProject(); + auto& modules = project.getEnabledModules(); + + auto moduleID = getID(); + + auto localModuleFolder = modules.shouldCopyModuleFilesLocally (moduleID) ? project.getLocalModuleFolder (moduleID) + : moduleInfo.getFolder(); + + Array compiled; + findAndAddCompiledUnits (exporter, &projectSaver, compiled); + + if (modules.shouldShowAllModuleFilesInProject (moduleID)) + addBrowseableCode (exporter, compiled, localModuleFolder); +} + +void LibraryModule::addLibsToExporter (ProjectExporter& exporter) const +{ + auto parseAndAddLibsToList = [] (StringArray& libList, const String& libs) { - auto extraDefs = moduleInfo.getPreprocessorDefs().trim(); + libList.addTokens (libs, ", ", {}); + libList.trim(); + libList.removeDuplicates (false); + }; - if (extraDefs.isNotEmpty()) - exporter.getExporterPreprocessorDefsValue() = exporter.getExporterPreprocessorDefsString() + "\n" + extraDefs; - } - - { - Array compiled; - auto& modules = project.getEnabledModules(); - auto id = getID(); - - auto localModuleFolder = modules.shouldCopyModuleFilesLocally (id).getValue() ? project.getLocalModuleFolder (id) - : moduleInfo.getFolder(); - - findAndAddCompiledUnits (exporter, &projectSaver, compiled); - - if (modules.shouldShowAllModuleFilesInProject (id).getValue()) - addBrowseableCode (exporter, compiled, localModuleFolder); - } + auto& project = exporter.getProject(); if (exporter.isXcode()) { @@ -312,26 +311,34 @@ void LibraryModule::addSettingsForModuleToExporter (ProjectExporter& exporter, P auto frameworks = moduleInfo.moduleInfo [xcodeExporter.isOSX() ? "OSXFrameworks" : "iOSFrameworks"].toString(); xcodeExporter.xcodeFrameworks.addTokens (frameworks, ", ", {}); - parseAndAddLibs (xcodeExporter.xcodeLibs, moduleInfo.moduleInfo [exporter.isOSX() ? "OSXLibs" : "iOSLibs"].toString()); + parseAndAddLibsToList (xcodeExporter.xcodeLibs, moduleInfo.moduleInfo [exporter.isOSX() ? "OSXLibs" : "iOSLibs"].toString()); } else if (exporter.isLinux()) { - parseAndAddLibs (exporter.linuxLibs, moduleInfo.moduleInfo ["linuxLibs"].toString()); - parseAndAddLibs (exporter.linuxPackages, moduleInfo.moduleInfo ["linuxPackages"].toString()); + parseAndAddLibsToList (exporter.linuxLibs, moduleInfo.moduleInfo ["linuxLibs"].toString()); + parseAndAddLibsToList (exporter.linuxPackages, moduleInfo.moduleInfo ["linuxPackages"].toString()); } else if (exporter.isWindows()) { if (exporter.isCodeBlocks()) - parseAndAddLibs (exporter.mingwLibs, moduleInfo.moduleInfo ["mingwLibs"].toString()); + parseAndAddLibsToList (exporter.mingwLibs, moduleInfo.moduleInfo ["mingwLibs"].toString()); else - parseAndAddLibs (exporter.windowsLibs, moduleInfo.moduleInfo ["windowsLibs"].toString()); + parseAndAddLibsToList (exporter.windowsLibs, moduleInfo.moduleInfo ["windowsLibs"].toString()); } else if (exporter.isAndroid()) { - parseAndAddLibs (exporter.androidLibs, moduleInfo.moduleInfo ["androidLibs"].toString()); + parseAndAddLibsToList (exporter.androidLibs, moduleInfo.moduleInfo ["androidLibs"].toString()); } } +void LibraryModule::addSettingsForModuleToExporter (ProjectExporter& exporter, ProjectSaver& projectSaver) const +{ + addSearchPathsToExporter (exporter); + addDefinesToExporter (exporter); + addCompileUnitsToExporter (exporter, projectSaver); + addLibsToExporter (exporter); +} + void LibraryModule::getConfigFlags (Project& project, OwnedArray& flags) const { auto header = moduleInfo.getHeader(); @@ -384,7 +391,25 @@ void LibraryModule::getConfigFlags (Project& project, OwnedArray= 0) + { + auto topLevelGroup = path.substring (0, slash); + auto remainingPath = path.substring (slash + 1); + + auto newGroup = group.getOrCreateSubGroup (topLevelGroup); + addFileWithGroups (newGroup, file, remainingPath); + } + else + { + if (! group.containsChildForFile (file)) + group.addRelativeFile (file, -1, false); + } +} + struct FileSorter { static int compareElements (const File& f1, const File& f2) @@ -393,16 +418,19 @@ struct FileSorter } }; -bool LibraryModule::CompileUnit::hasSuffix (const File& f, const char* suffix) +void LibraryModule::findBrowseableFiles (const File& folder, Array& filesFound) const { - auto fileWithoutSuffix = f.getFileNameWithoutExtension() + "."; + Array tempList; + FileSorter sorter; - return fileWithoutSuffix.containsIgnoreCase (suffix + String (".")) - || fileWithoutSuffix.containsIgnoreCase (suffix + String ("_")); -} + DirectoryIterator iter (folder, true, "*", File::findFiles); + bool isHiddenFile; -void LibraryModule::CompileUnit::writeInclude (MemoryOutputStream&) const -{ + while (iter.next (nullptr, &isHiddenFile, nullptr, nullptr, nullptr, nullptr)) + if (! isHiddenFile && iter.getFile().hasFileExtension (browseableFileExtensions)) + tempList.addSorted (sorter, iter.getFile()); + + filesFound.addArray (tempList); } bool LibraryModule::CompileUnit::isNeededForExporter (ProjectExporter& exporter) const @@ -428,6 +456,14 @@ String LibraryModule::CompileUnit::getFilenameForProxyFile() const return "include_" + file.getFileName(); } +bool LibraryModule::CompileUnit::hasSuffix (const File& f, const char* suffix) +{ + auto fileWithoutSuffix = f.getFileNameWithoutExtension() + "."; + + return fileWithoutSuffix.containsIgnoreCase (suffix + String (".")) + || fileWithoutSuffix.containsIgnoreCase (suffix + String ("_")); +} + Array LibraryModule::getAllCompileUnits (ProjectType::Target::Type forTarget) const { auto files = getFolder().findChildFiles (File::findFiles, false); @@ -486,40 +522,6 @@ void LibraryModule::findAndAddCompiledUnits (ProjectExporter& exporter, } } -static void addFileWithGroups (Project::Item& group, const RelativePath& file, const String& path) -{ - auto slash = path.indexOfChar (File::getSeparatorChar()); - - if (slash >= 0) - { - auto topLevelGroup = path.substring (0, slash); - auto remainingPath = path.substring (slash + 1); - - auto newGroup = group.getOrCreateSubGroup (topLevelGroup); - addFileWithGroups (newGroup, file, remainingPath); - } - else - { - if (! group.containsChildForFile (file)) - group.addRelativeFile (file, -1, false); - } -} - -void LibraryModule::findBrowseableFiles (const File& folder, Array& filesFound) const -{ - Array tempList; - FileSorter sorter; - - DirectoryIterator iter (folder, true, "*", File::findFiles); - bool isHiddenFile; - - while (iter.next (nullptr, &isHiddenFile, nullptr, nullptr, nullptr, nullptr)) - if (! isHiddenFile && iter.getFile().hasFileExtension (browseableFileExtensions)) - tempList.addSorted (sorter, iter.getFile()); - - filesFound.addArray (tempList); -} - void LibraryModule::addBrowseableCode (ProjectExporter& exporter, const Array& compiled, const File& localModuleFolder) const { if (sourceFiles.isEmpty()) @@ -531,7 +533,7 @@ void LibraryModule::addBrowseableCode (ProjectExporter& exporter, const Array (state.getChildWithProperty (Ids::ID, moduleID) - .getProperty (Ids::useGlobalPath)); -} - -Value EnabledModuleList::getShouldUseGlobalPathValue (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()); -} - -struct ModuleTreeSorter -{ - static int compareElements (const ValueTree& m1, const ValueTree& m2) - { - return m1[Ids::ID].toString().compareIgnoreCase (m2[Ids::ID]); - } -}; - -void EnabledModuleList::sortAlphabetically() -{ - ModuleTreeSorter sorter; - state.sort (sorter, getUndoManager(), false); -} - -Value EnabledModuleList::shouldCopyModuleFilesLocally (const String& moduleID) const -{ - return state.getChildWithProperty (Ids::ID, moduleID) - .getPropertyAsValue (Ids::useLocalCopy, getUndoManager()); -} - -void EnabledModuleList::addModule (const File& moduleFolder, bool copyLocally, bool useGlobalPath, bool sendAnalyticsEvent) -{ - ModuleDescription info (moduleFolder); - - if (info.isValid()) - { - auto moduleID = info.getID(); - - if (! isModuleEnabled (moduleID)) - { - ValueTree module (Ids::MODULE); - module.setProperty (Ids::ID, moduleID, getUndoManager()); - - state.appendChild (module, getUndoManager()); - sortAlphabetically(); - - shouldShowAllModuleFilesInProject (moduleID) = true; - shouldCopyModuleFilesLocally (moduleID) = copyLocally; - getShouldUseGlobalPathValue (moduleID) = useGlobalPath; - - RelativePath path (moduleFolder.getParentDirectory(), - project.getProjectFolder(), RelativePath::projectFolder); - - for (Project::ExporterIterator exporter (project); exporter.next();) - exporter->getPathForModuleValue (moduleID) = path.toUnixStyle(); - - if (! useGlobalPath) - project.rescanExporterPathModules (false); - - if (sendAnalyticsEvent) - { - StringPairArray data; - data.set ("label", moduleID); - - Analytics::getInstance()->logEvent ("Module Added", data, ProjucerAnalyticsEvent::projectEvent); - } - } - } -} - -void EnabledModuleList::removeModule (String moduleID) // must be pass-by-value, and not a const ref! -{ - for (auto i = state.getNumChildren(); --i >= 0;) - if (state.getChild(i) [Ids::ID] == moduleID) - state.removeChild (i, getUndoManager()); - - for (Project::ExporterIterator exporter (project); exporter.next();) - exporter->removePathForModule (moduleID); -} - -void EnabledModuleList::createRequiredModules (OwnedArray& modules) -{ - for (int i = 0; i < getNumModules(); ++i) - modules.add (new LibraryModule (getModuleInfo (getModuleID (i)))); -} - StringArray EnabledModuleList::getAllModules() const { StringArray moduleIDs; @@ -679,6 +570,54 @@ StringArray EnabledModuleList::getAllModules() const return moduleIDs; } +void EnabledModuleList::createRequiredModules (OwnedArray& modules) +{ + for (int i = 0; i < getNumModules(); ++i) + modules.add (new LibraryModule (getModuleInfo (getModuleID (i)))); +} + +void EnabledModuleList::sortAlphabetically() +{ + struct ModuleTreeSorter + { + static int compareElements (const ValueTree& m1, const ValueTree& m2) + { + return m1[Ids::ID].toString().compareIgnoreCase (m2[Ids::ID]); + } + }; + + ModuleTreeSorter sorter; + state.sort (sorter, getUndoManager(), false); +} + +File EnabledModuleList::getDefaultModulesFolder() const +{ + File globalPath (getAppSettings().getStoredPath (Ids::defaultJuceModulePath, TargetOS::getThisOS()).get().toString()); + + if (globalPath.exists()) + return globalPath; + + for (auto& exporterPathModule : project.getExporterPathsModuleList().getAllModules()) + { + auto f = exporterPathModule.second; + + if (f.isDirectory()) + return f.getParentDirectory(); + } + + return File::getCurrentWorkingDirectory(); +} + +ModuleDescription EnabledModuleList::getModuleInfo (const String& moduleID) +{ + return ModuleDescription (project.getModuleWithID (moduleID).second); +} + +bool EnabledModuleList::isModuleEnabled (const String& moduleID) const +{ + return state.getChildWithProperty (Ids::ID, moduleID).isValid(); +} + static void getDependencies (Project& project, const String& moduleID, StringArray& dependencies) { auto info = project.getEnabledModules().getModuleInfo (moduleID); @@ -717,6 +656,39 @@ bool EnabledModuleList::doesModuleHaveHigherCppStandardThanProject (const String return (moduleCppStandard.getIntValue() > projectCppStandard.getIntValue()); } +bool EnabledModuleList::shouldUseGlobalPath (const String& moduleID) const +{ + return (bool) shouldUseGlobalPathValue (moduleID).getValue(); +} + +Value EnabledModuleList::shouldUseGlobalPathValue (const String& moduleID) const +{ + return state.getChildWithProperty (Ids::ID, moduleID) + .getPropertyAsValue (Ids::useGlobalPath, getUndoManager()); +} + +bool EnabledModuleList::shouldShowAllModuleFilesInProject (const String& moduleID) const +{ + return (bool) shouldShowAllModuleFilesInProjectValue (moduleID).getValue(); +} + +Value EnabledModuleList::shouldShowAllModuleFilesInProjectValue (const String& moduleID) const +{ + return state.getChildWithProperty (Ids::ID, moduleID) + .getPropertyAsValue (Ids::showAllCode, getUndoManager()); +} + +bool EnabledModuleList::shouldCopyModuleFilesLocally (const String& moduleID) const +{ + return (bool) shouldCopyModuleFilesLocallyValue (moduleID).getValue(); +} + +Value EnabledModuleList::shouldCopyModuleFilesLocallyValue (const String& moduleID) const +{ + return state.getChildWithProperty (Ids::ID, moduleID) + .getPropertyAsValue (Ids::useLocalCopy, getUndoManager()); +} + bool EnabledModuleList::areMostModulesUsingGlobalPath() const { int numYes = 0, numNo = 0; @@ -738,7 +710,7 @@ bool EnabledModuleList::areMostModulesCopiedLocally() const for (auto i = getNumModules(); --i >= 0;) { - if (shouldCopyModuleFilesLocally (getModuleID (i)).getValue()) + if (shouldCopyModuleFilesLocally (getModuleID (i))) ++numYes; else ++numNo; @@ -747,40 +719,43 @@ bool EnabledModuleList::areMostModulesCopiedLocally() const return numYes > numNo; } -void EnabledModuleList::setLocalCopyModeForAllModules (bool copyLocally) +void EnabledModuleList::addModule (const File& moduleFolder, bool copyLocally, bool useGlobalPath, bool sendAnalyticsEvent) { - for (auto i = getNumModules(); --i >= 0;) - shouldCopyModuleFilesLocally (project.getEnabledModules().getModuleID (i)) = copyLocally; -} + ModuleDescription info (moduleFolder); -File EnabledModuleList::findDefaultModulesFolder (Project& project) -{ - File globalPath (getAppSettings().getStoredPath (Ids::defaultJuceModulePath, TargetOS::getThisOS()).get().toString()); - - if (globalPath.exists()) - return globalPath; - - for (auto& exporterPathModule : project.getExporterPathsModuleList().getAllModules()) + if (info.isValid()) { - auto f = exporterPathModule.second; + auto moduleID = info.getID(); - if (f.isDirectory()) - return f.getParentDirectory(); - } + if (! isModuleEnabled (moduleID)) + { + ValueTree module (Ids::MODULE); + module.setProperty (Ids::ID, moduleID, getUndoManager()); - return File::getCurrentWorkingDirectory(); -} + state.appendChild (module, getUndoManager()); + sortAlphabetically(); -void EnabledModuleList::addModuleFromUserSelectedFile() -{ - static auto lastLocation = findDefaultModulesFolder (project); + shouldShowAllModuleFilesInProjectValue (moduleID) = true; + shouldCopyModuleFilesLocallyValue (moduleID) = copyLocally; + shouldUseGlobalPathValue (moduleID) = useGlobalPath; - FileChooser fc ("Select a module to add...", lastLocation, {}); + RelativePath path (moduleFolder.getParentDirectory(), + project.getProjectFolder(), RelativePath::projectFolder); - if (fc.browseForDirectory()) - { - lastLocation = fc.getResult(); - addModuleOfferingToCopy (lastLocation, true); + for (Project::ExporterIterator exporter (project); exporter.next();) + exporter->getPathForModuleValue (moduleID) = path.toUnixStyle(); + + if (! useGlobalPath) + project.rescanExporterPathModules (false); + + if (sendAnalyticsEvent) + { + StringPairArray data; + data.set ("label", moduleID); + + Analytics::getInstance()->logEvent ("Module Added", data, ProjucerAnalyticsEvent::projectEvent); + } + } } } @@ -797,6 +772,19 @@ void EnabledModuleList::addModuleInteractive (const String& moduleID) addModuleFromUserSelectedFile(); } +void EnabledModuleList::addModuleFromUserSelectedFile() +{ + auto lastLocation = getDefaultModulesFolder(); + + FileChooser fc ("Select a module to add...", lastLocation, {}); + + if (fc.browseForDirectory()) + { + lastLocation = fc.getResult(); + addModuleOfferingToCopy (lastLocation, true); + } +} + void EnabledModuleList::addModuleOfferingToCopy (const File& f, bool isFromUserSpecifiedFolder) { ModuleDescription m (f); @@ -820,12 +808,12 @@ void EnabledModuleList::addModuleOfferingToCopy (const File& f, bool isFromUserS true); } -bool isJUCEFolder (const File& f) +void EnabledModuleList::removeModule (String moduleID) // must be pass-by-value, and not a const ref! { - return isJUCEModulesFolder (f.getChildFile ("modules")); -} + for (auto i = state.getNumChildren(); --i >= 0;) + if (state.getChild(i) [Ids::ID] == moduleID) + state.removeChild (i, getUndoManager()); -bool isJUCEModulesFolder (const File& f) -{ - return f.isDirectory() && f.getChildFile ("juce_core").isDirectory(); + for (Project::ExporterIterator exporter (project); exporter.next();) + exporter->removePathForModule (moduleID); } diff --git a/extras/Projucer/Source/Project/jucer_Module.h b/extras/Projucer/Source/Project/jucer_Module.h index ba216b335a..66b986f065 100644 --- a/extras/Projucer/Source/Project/jucer_Module.h +++ b/extras/Projucer/Source/Project/jucer_Module.h @@ -30,16 +30,11 @@ class ProjectExporter; class ProjectSaver; -//============================================================================== -bool isJUCEModulesFolder (const File&); -bool isJUCEFolder (const File&); - //============================================================================== struct ModuleDescription { - ModuleDescription() {} + ModuleDescription() = default; ModuleDescription (const File& folder); - ModuleDescription (const var& info) : moduleInfo (info) {} bool isValid() const { return getID().isNotEmpty(); } @@ -57,8 +52,6 @@ struct ModuleDescription File getFolder() const { jassert (moduleFolder != File()); return moduleFolder; } File getHeader() const; - bool isPluginClient() const { return getID() == "juce_audio_plugin_client"; } - File moduleFolder; var moduleInfo; URL url; @@ -91,7 +84,6 @@ public: File file; bool isCompiledForObjC, isCompiledForNonObjC; - void writeInclude (MemoryOutputStream&) const; bool isNeededForExporter (ProjectExporter&) const; String getFilenameForProxyFile() const; static bool hasSuffix (const File&, const char*); @@ -104,20 +96,25 @@ public: ModuleDescription moduleInfo; private: - mutable Array sourceFiles; - OwnedArray configFlags; + void addSearchPathsToExporter (ProjectExporter&) const; + void addDefinesToExporter (ProjectExporter&) const; + void addCompileUnitsToExporter (ProjectExporter&, ProjectSaver&) const; + void addLibsToExporter (ProjectExporter&) const; void addBrowseableCode (ProjectExporter&, const Array& compiled, const File& localModuleFolder) const; + + mutable Array sourceFiles; + OwnedArray configFlags; }; //============================================================================== -using ModuleIDAndFolder = std::pair; -using ModuleIDAndFolderList = std::vector; - class AvailableModuleList { public: - AvailableModuleList(); + using ModuleIDAndFolder = std::pair; + using ModuleIDAndFolderList = std::vector; + + AvailableModuleList() = default; void scanPaths (const Array&); void scanPathsAsync (const Array&); @@ -157,46 +154,49 @@ class EnabledModuleList public: EnabledModuleList (Project&, const ValueTree&); - static File findDefaultModulesFolder (Project&); + //============================================================================== + ValueTree getState() const { return state; } - bool isModuleEnabled (const String& moduleID) const; + StringArray getAllModules() const; + void createRequiredModules (OwnedArray& modules); + void sortAlphabetically(); - bool shouldUseGlobalPath (const String& moduleID) const; - Value getShouldUseGlobalPathValue (const String& moduleID) const; + File getDefaultModulesFolder() const; - Value shouldShowAllModuleFilesInProject (const String& moduleID); - Value shouldCopyModuleFilesLocally (const String& moduleID) const; - - void removeModule (String moduleID); - bool isAudioPluginModuleMissing() const; + int getNumModules() const { return state.getNumChildren(); } + String getModuleID (int index) const { return state.getChild (index) [Ids::ID].toString(); } ModuleDescription getModuleInfo (const String& moduleID); + bool isModuleEnabled (const String& moduleID) const; + StringArray getExtraDependenciesNeeded (const String& moduleID) const; + bool doesModuleHaveHigherCppStandardThanProject (const String& moduleID); + + bool shouldUseGlobalPath (const String& moduleID) const; + Value shouldUseGlobalPathValue (const String& moduleID) const; + + bool shouldShowAllModuleFilesInProject (const String& moduleID) const; + Value shouldShowAllModuleFilesInProjectValue (const String& moduleID) const; + + bool shouldCopyModuleFilesLocally (const String& moduleID) const; + Value shouldCopyModuleFilesLocallyValue (const String& moduleID) const; + + bool areMostModulesUsingGlobalPath() const; + bool areMostModulesCopiedLocally() const; + + //============================================================================== void addModule (const File& moduleManifestFile, bool copyLocally, bool useGlobalPath, bool sendAnalyticsEvent); void addModuleInteractive (const String& moduleID); void addModuleFromUserSelectedFile(); 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(); - - Project& project; - ValueTree state; + void removeModule (String moduleID); private: UndoManager* getUndoManager() const { return project.getUndoManagerFor (state); } + Project& project; + ValueTree state; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EnabledModuleList) }; diff --git a/extras/Projucer/Source/Project/jucer_Project.cpp b/extras/Projucer/Source/Project/jucer_Project.cpp index 9c8d1a43d2..e6872247f0 100644 --- a/extras/Projucer/Source/Project/jucer_Project.cpp +++ b/extras/Projucer/Source/Project/jucer_Project.cpp @@ -855,6 +855,10 @@ bool Project::shouldBuildTargetType (ProjectType::Target::Type targetType) const return projectType.isAudioPlugin(); case ProjectType::Target::unspecified: return false; + case ProjectType::Target::GUIApp: + case ProjectType::Target::ConsoleApp: + case ProjectType::Target::StaticLibrary: + case ProjectType::Target::DynamicLibrary: default: break; } @@ -894,6 +898,7 @@ const char* ProjectType::Target::getName() const noexcept case UnityPlugIn: return "Unity Plugin"; case SharedCodeTarget: return "Shared Code"; case AggregateTarget: return "All"; + case unspecified: default: return "undefined"; } } @@ -915,6 +920,8 @@ ProjectType::Target::TargetFileType ProjectType::Target::getTargetFileType() con case RTASPlugIn: return pluginBundle; case UnityPlugIn: return pluginBundle; case SharedCodeTarget: return staticLibrary; + case AggregateTarget: + case unspecified: default: break; } @@ -1006,7 +1013,7 @@ void Project::createPropertyEditors (PropertyListBuilder& props) props.add (new TextPropertyComponent (bundleIdentifierValue, "Bundle Identifier", 256, false), "A unique identifier for this product, mainly for use in OSX/iOS builds. It should be something like 'com.yourcompanyname.yourproductname'"); - if (getProjectType().isAudioPlugin()) + if (isAudioPluginProject()) createAudioPluginPropertyEditors (props); { @@ -1889,17 +1896,17 @@ String Project::getIAAPluginName() //============================================================================== bool Project::isAUPluginHost() { - return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_AU"); + return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_AU", false); } bool Project::isVSTPluginHost() { - return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_VST"); + return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_VST", false); } bool Project::isVST3PluginHost() { - return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3"); + return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3", false); } //============================================================================== @@ -2100,7 +2107,7 @@ void Project::rescanExporterPathModules (bool async) exporterPathsModuleList->scanPaths (getExporterModulePathsToScan (*this)); } -ModuleIDAndFolder Project::getModuleWithID (const String& id) +AvailableModuleList::ModuleIDAndFolder Project::getModuleWithID (const String& id) { if (! getEnabledModules().shouldUseGlobalPath (id)) { diff --git a/extras/Projucer/Source/Project/jucer_Project.h b/extras/Projucer/Source/Project/jucer_Project.h index 16b8be9d87..80711e8ba4 100644 --- a/extras/Projucer/Source/Project/jucer_Project.h +++ b/extras/Projucer/Source/Project/jucer_Project.h @@ -67,9 +67,8 @@ public: File getBinaryDataCppFile (int index) const; File getBinaryDataHeaderFile() const { return getBinaryDataCppFile (0).withFileExtension (".h"); } - String getAppConfigFilename() const { return "AppConfig.h"; } - String getJuceSourceFilenameRoot() const { return "JuceLibraryCode"; } - String getJuceSourceHFilename() const { return "JuceHeader.h"; } + static String getAppConfigFilename() { return "AppConfig.h"; } + static String getJuceSourceHFilename() { return "JuceHeader.h"; } //============================================================================== template @@ -148,7 +147,6 @@ public: String getVSTNumMIDIInputsString() const { return pluginVSTNumMidiInputsValue.get(); } String getVSTNumMIDIOutputsString() const { return pluginVSTNumMidiOutputsValue.get(); } - //============================================================================== static bool checkMultiChoiceVar (const ValueWithDefault& valueToCheck, Identifier idToCheck) noexcept { if (! valueToCheck.get().isArray()) @@ -162,18 +160,18 @@ public: return false; } - //============================================================================== - bool shouldBuildVST() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildVST); } - bool shouldBuildVST3() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildVST3); } - bool shouldBuildAU() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildAU); } - bool shouldBuildAUv3() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildAUv3); } - bool shouldBuildRTAS() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildRTAS); } - bool shouldBuildAAX() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildAAX); } - bool shouldBuildStandalonePlugin() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildStandalone); } - bool shouldBuildUnityPlugin() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::buildUnity); } - bool shouldEnableIAA() const { return checkMultiChoiceVar (pluginFormatsValue, Ids::enableIAA); } + bool isAudioPluginProject() const { return getProjectType().isAudioPlugin(); } + + bool shouldBuildVST() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildVST); } + bool shouldBuildVST3() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildVST3); } + bool shouldBuildAU() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildAU); } + bool shouldBuildAUv3() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildAUv3); } + bool shouldBuildRTAS() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildRTAS); } + bool shouldBuildAAX() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildAAX); } + bool shouldBuildStandalonePlugin() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildStandalone); } + bool shouldBuildUnityPlugin() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::buildUnity); } + bool shouldEnableIAA() const { return isAudioPluginProject() && checkMultiChoiceVar (pluginFormatsValue, Ids::enableIAA); } - //============================================================================== bool isPluginSynth() const { return checkMultiChoiceVar (pluginCharacteristicsValue, Ids::pluginIsSynth); } bool pluginWantsMidiInput() const { return checkMultiChoiceVar (pluginCharacteristicsValue, Ids::pluginWantsMidiIn); } bool pluginProducesMidiOutput() const { return checkMultiChoiceVar (pluginCharacteristicsValue, Ids::pluginProducesMidiOut); } @@ -184,7 +182,6 @@ public: bool isPluginAAXBypassDisabled() const { return checkMultiChoiceVar (pluginCharacteristicsValue, Ids::pluginAAXDisableBypass); } bool isPluginAAXMultiMonoDisabled() const { return checkMultiChoiceVar (pluginCharacteristicsValue, Ids::pluginAAXDisableMultiMono); } - //============================================================================== static StringArray getAllAUMainTypeStrings() noexcept; static Array getAllAUMainTypeVars() noexcept; Array getDefaultAUMainTypes() const noexcept; diff --git a/extras/Projucer/Source/Project/jucer_ProjectType.h b/extras/Projucer/Source/Project/jucer_ProjectType.h index 14c318a262..9a9931fe9b 100644 --- a/extras/Projucer/Source/Project/jucer_ProjectType.h +++ b/extras/Projucer/Source/Project/jucer_ProjectType.h @@ -191,6 +191,11 @@ struct ProjectType_AudioPlugin : public ProjectType case Target::SharedCodeTarget: case Target::AggregateTarget: return true; + case Target::GUIApp: + case Target::ConsoleApp: + case Target::StaticLibrary: + case Target::DynamicLibrary: + case Target::unspecified: default: break; } diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h index aaa4988bfd..0e6ad2054d 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h @@ -51,18 +51,8 @@ public: bool supportsTargetType (ProjectType::Target::Type type) const override { - switch (type) - { - case ProjectType::Target::GUIApp: - case ProjectType::Target::StaticLibrary: - case ProjectType::Target::DynamicLibrary: - case ProjectType::Target::StandalonePlugIn: - return true; - default: - break; - } - - return false; + return type == ProjectType::Target::GUIApp || type == ProjectType::Target::StaticLibrary + || type == ProjectType::Target::DynamicLibrary || type == ProjectType::Target::StandalonePlugIn; } //============================================================================== @@ -360,7 +350,9 @@ private: if (! isLibrary()) mo << "SET(BINARY_NAME \"juce_jni\")" << newLine << newLine; - if (project.getConfigFlag ("JUCE_USE_ANDROID_OBOE").get()) + auto useOboe = project.getEnabledModules().isModuleEnabled ("juce_audio_devices") && project.isConfigFlagEnabled ("JUCE_USE_ANDROID_OBOE", false); + + if (useOboe) { String oboePath (androidOboeRepositoryPath.get().toString().trim().quoted()); @@ -386,7 +378,7 @@ private: mo << " \"${ANDROID_NDK}/sources/android/cpufeatures\"" << newLine; - if (project.getConfigFlag ("JUCE_USE_ANDROID_OBOE").get()) + if (useOboe) mo << " \"${OBOE_DIR}/include\"" << newLine; mo << ")" << newLine << newLine; @@ -541,7 +533,7 @@ private: mo << " \"cpufeatures\"" << newLine; } - if (project.getConfigFlag ("JUCE_USE_ANDROID_OBOE").get()) + if (useOboe) mo << " \"oboe\"" << newLine; mo << ")" << newLine; @@ -885,7 +877,7 @@ private: if (m->getID() == moduleID) { auto javaFolder = m->getFolder().getChildFile ("native").getChildFile ("javaopt"); - addModuleJavaFolderToSourceSet (javaSourceSets, javaFolder.getChildFile("app")); + addModuleJavaFolderToSourceSet (javaSourceSets, javaFolder.getChildFile ("app")); return; } } @@ -900,13 +892,14 @@ private: { auto javaFolder = module->getFolder().getChildFile ("native").getChildFile ("javacore"); - addModuleJavaFolderToSourceSet (javaSourceSets, javaFolder.getChildFile("init")); + addModuleJavaFolderToSourceSet (javaSourceSets, javaFolder.getChildFile ("init")); if (! isLibrary()) - addModuleJavaFolderToSourceSet (javaSourceSets, javaFolder.getChildFile("app")); + addModuleJavaFolderToSourceSet (javaSourceSets, javaFolder.getChildFile ("app")); } - if (project.getEnabledModules().isModuleEnabled ("juce_gui_basics") && getActivityClassString() == getDefaultActivityClass()) + if (project.getEnabledModules().isModuleEnabled ("juce_gui_basics") + && (getActivityClassString() == getDefaultActivityClass() || isContentSharingEnabled())) addOptJavaFolderToSourceSetsForModule (javaSourceSets, modules, "juce_gui_basics"); if (areRemoteNotificationsEnabled()) @@ -1223,6 +1216,8 @@ private: bool isInAppBillingEnabled() const { return androidInAppBillingPermission.get(); } + bool isContentSharingEnabled() const { return androidEnableContentSharing.get(); } + String getJNIActivityClassName() const { return getActivityClassString().replaceCharacter ('.', '/'); @@ -1350,7 +1345,7 @@ private: mo << " \"" << file.toUnixStyle() << "\"" << newLine; if ((! projectItem.shouldBeCompiled()) || (! shouldFileBeCompiledByDefault (f)) - || (getProject().getProjectType().isAudioPlugin() + || (getProject().isAudioPluginProject() && targetType != ProjectType::Target::SharedCodeTarget && targetType != ProjectType::Target::StandalonePlugIn)) { @@ -1447,6 +1442,9 @@ private: if (isInAppBillingEnabled()) defines.set ("JUCE_IN_APP_PURCHASES", "1"); + if (isContentSharingEnabled()) + defines.set ("JUCE_CONTENT_SHARING", "1"); + if (supportsGLv3()) defines.set ("JUCE_ANDROID_GL_ES_VERSION_3_0", "1"); @@ -1612,6 +1610,7 @@ private: screens->setAttribute ("android:normalScreens", "true"); screens->setAttribute ("android:largeScreens", "true"); screens->setAttribute ("android:anyDensity", "true"); + screens->setAttribute ("android:xlargeScreens", "true"); } } } @@ -1775,14 +1774,14 @@ private: void createProviderElement (XmlElement& application) const { - if (androidEnableContentSharing.get()) + if (isContentSharingEnabled()) { auto* provider = application.createNewChildElement ("provider"); provider->setAttribute ("android:name", "com.roli.juce.JuceSharingContentProvider"); provider->setAttribute ("android:authorities", project.getBundleIdentifierString().toLowerCase() + ".sharingcontentprovider"); provider->setAttribute ("android:grantUriPermissions", "true"); - provider->setAttribute ("android:exported", "false"); + provider->setAttribute ("android:exported", "true"); } } diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h index 0384e55ffa..49062cc650 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h @@ -304,7 +304,7 @@ private: template void getFileInfoList (Target& target, Exporter& exporter, const Project::Item& projectItem, std::vector>& fileInfoList) const { - auto targetType = (getProject().getProjectType().isAudioPlugin() ? target.type : Target::Type::SharedCodeTarget); + auto targetType = (getProject().isAudioPluginProject() ? target.type : Target::Type::SharedCodeTarget); if (projectItem.isGroup()) { @@ -356,6 +356,8 @@ private: properties.add ("MODULE"); break; + case ProjectType::Target::TargetFileType::macOSAppex: + case ProjectType::Target::TargetFileType::unknown: default: continue; } diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h index 722b566abe..7a470e560b 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h @@ -122,6 +122,13 @@ public: case ProjectType::Target::VSTPlugIn: case ProjectType::Target::DynamicLibrary: return true; + case ProjectType::Target::AAXPlugIn: + case ProjectType::Target::RTASPlugIn: + case ProjectType::Target::UnityPlugIn: + case ProjectType::Target::VST3PlugIn: + case ProjectType::Target::AudioUnitPlugIn: + case ProjectType::Target::AudioUnitv3PlugIn: + case ProjectType::Target::unspecified: default: break; } @@ -167,13 +174,8 @@ public: if (targetType == ProjectType::Target::SharedCodeTarget) return; - if (auto* target = new CodeBlocksTarget (*this, targetType)) - { - if (targetType == ProjectType::Target::AggregateTarget) - targets.insert (0, target); - else - targets.add (target); - } + targets.insert (targetType == ProjectType::Target::AggregateTarget ? 0 : -1, + new CodeBlocksTarget (*this, targetType)); }); // If you hit this assert, you tried to generate a project for an exporter @@ -274,6 +276,8 @@ private: case staticLibrary: return ".lib"; case sharedLibraryOrDLL: case pluginBundle: return ".dll"; + case macOSAppex: + case unknown: default: break; } @@ -284,17 +288,10 @@ private: { case executable: return {}; case staticLibrary: return ".a"; - case sharedLibraryOrDLL: return ".so"; - case pluginBundle: - switch (type) - { - case VSTPlugIn: return ".so"; - default: break; - } - - return ".so"; - + case sharedLibraryOrDLL: return ".so"; + case macOSAppex: + case unknown: default: break; } @@ -432,7 +429,7 @@ private: if (config.exporter.isLinux()) { - if (target.isDynamicLibrary() || getProject().getProjectType().isAudioPlugin()) + if (target.isDynamicLibrary() || getProject().isAudioPluginProject()) flags.add ("-fPIC"); auto packages = getPackages(); @@ -495,7 +492,7 @@ private: { auto librarySearchPaths = config.getLibrarySearchPaths(); - if (getProject().getProjectType().isAudioPlugin() && target.type != ProjectType::Target::SharedCodeTarget) + if (getProject().isAudioPluginProject() && target.type != ProjectType::Target::SharedCodeTarget) librarySearchPaths.add (RelativePath (getSharedCodePath (config), RelativePath::buildTargetFolder).getParentDirectory().toUnixStyle().quoted()); return librarySearchPaths; @@ -523,22 +520,10 @@ private: static int getTypeIndex (const ProjectType::Target::Type& type) { - switch (type) - { - case ProjectType::Target::GUIApp: - case ProjectType::Target::StandalonePlugIn: - return 0; - case ProjectType::Target::ConsoleApp: - return 1; - case ProjectType::Target::StaticLibrary: - case ProjectType::Target::SharedCodeTarget: - return 2; - case ProjectType::Target::DynamicLibrary: - case ProjectType::Target::VSTPlugIn: - return 3; - default: - break; - } + if (type == ProjectType::Target::GUIApp || type == ProjectType::Target::StandalonePlugIn) return 0; + if (type == ProjectType::Target::ConsoleApp) return 1; + if (type == ProjectType::Target::StaticLibrary || type == ProjectType::Target::SharedCodeTarget) return 2; + if (type == ProjectType::Target::DynamicLibrary || type == ProjectType::Target::VSTPlugIn) return 3; return 0; } @@ -601,7 +586,7 @@ private: xml.createNewChildElement ("Option")->setAttribute ("type", getTypeIndex (target.type)); xml.createNewChildElement ("Option")->setAttribute ("compiler", "gcc"); - if (getProject().getProjectType().isAudioPlugin() && target.type != ProjectType::Target::SharedCodeTarget) + if (getProject().isAudioPluginProject() && target.type != ProjectType::Target::SharedCodeTarget) xml.createNewChildElement ("Option")->setAttribute ("external_deps", getSharedCodePath (config)); { @@ -635,7 +620,7 @@ private: { auto* linker = xml.createNewChildElement ("Linker"); - if (getProject().getProjectType().isAudioPlugin() && target.type != ProjectType::Target::SharedCodeTarget) + if (getProject().isAudioPluginProject() && target.type != ProjectType::Target::SharedCodeTarget) setAddOption (*linker, "option", getSharedCodePath (config).quoted()); for (auto& flag : getLinkerFlags (config, target)) @@ -747,7 +732,7 @@ private: // the single target CodeBlocksTarget& getMainTarget() const { - if (getProject().getProjectType().isAudioPlugin()) + if (getProject().isAudioPluginProject()) return getTargetWithType (ProjectType::Target::SharedCodeTarget); for (auto* target : targets) @@ -761,7 +746,7 @@ private: CodeBlocksTarget& getTargetForProjectItem (const Project::Item& projectItem) const { - if (getProject().getProjectType().isAudioPlugin()) + if (getProject().isAudioPluginProject()) { if (! projectItem.shouldBeCompiled()) return getTargetWithType (ProjectType::Target::SharedCodeTarget); diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h index f47c1331a4..dd8e2ec37f 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h @@ -196,7 +196,8 @@ public: void createConfigProperties (PropertyListBuilder& props) override { - addVisualStudioPluginInstallPathProperties (props); + if (project.isAudioPluginProject()) + addVisualStudioPluginInstallPathProperties (props); props.add (new ChoicePropertyComponent (architectureTypeValue, "Architecture", { get32BitArchName(), get64BitArchName() }, @@ -725,15 +726,10 @@ public: String getProjectType() const { - switch (getTargetFileType()) - { - case executable: - return "Application"; - case staticLibrary: - return "StaticLibrary"; - default: - break; - } + auto targetFileType = getTargetFileType(); + + if (targetFileType == executable) return "Application"; + if (targetFileType == staticLibrary) return "StaticLibrary"; return "DynamicLibrary"; } @@ -741,7 +737,7 @@ public: //============================================================================== void addFilesToCompile (const Project::Item& projectItem, XmlElement& cpps, XmlElement& headers, XmlElement& otherFiles) const { - auto targetType = (getOwner().getProject().getProjectType().isAudioPlugin() ? type : SharedCodeTarget); + auto targetType = (getOwner().getProject().isAudioPluginProject() ? type : SharedCodeTarget); if (projectItem.isGroup()) { @@ -823,7 +819,7 @@ public: bool addFilesToFilter (const Project::Item& projectItem, const String& path, XmlElement& cpps, XmlElement& headers, XmlElement& otherFiles, XmlElement& groups) const { - auto targetType = (getOwner().getProject().getProjectType().isAudioPlugin() ? type : SharedCodeTarget); + auto targetType = (getOwner().getProject().isAudioPluginProject() ? type : SharedCodeTarget); if (projectItem.isGroup()) { @@ -976,25 +972,17 @@ public: { auto fileType = getTargetFileType(); - switch (fileType) + if (fileType == executable) return ".exe"; + if (fileType == staticLibrary) return ".lib"; + if (fileType == sharedLibraryOrDLL) return ".dll"; + + if (fileType == pluginBundle) { - case executable: return ".exe"; - case staticLibrary: return ".lib"; - case sharedLibraryOrDLL: return ".dll"; + if (type == VST3PlugIn) return ".vst3"; + if (type == AAXPlugIn) return ".aaxdll"; + if (type == RTASPlugIn) return ".dpm"; - case pluginBundle: - switch (type) - { - case VST3PlugIn: return ".vst3"; - case AAXPlugIn: return ".aaxdll"; - case RTASPlugIn: return ".dpm"; - default: break; - } - - return ".dll"; - - default: - break; + return ".dll"; } return {}; @@ -1133,7 +1121,7 @@ public: String getPostBuildSteps (const MSVCBuildConfiguration& config) const { - auto postBuild = config.getPostbuildCommandString(); + auto postBuild = config.getPostbuildCommandString().replace ("\n", "\r\n");; auto extraPostBuild = getExtraPostBuildSteps (config); return postBuild + String (postBuild.isNotEmpty() && extraPostBuild.isNotEmpty() ? "\r\n" : "") + extraPostBuild; @@ -1141,7 +1129,7 @@ public: String getPreBuildSteps (const MSVCBuildConfiguration& config) const { - auto preBuild = config.getPrebuildCommandString(); + auto preBuild = config.getPrebuildCommandString().replace ("\n", "\r\n");; auto extraPreBuild = getExtraPreBuildSteps (config); return preBuild + String (preBuild.isNotEmpty() && extraPreBuild.isNotEmpty() ? "\r\n" : "") + extraPreBuild; @@ -1149,22 +1137,15 @@ public: void addExtraPreprocessorDefines (StringPairArray& defines) const { - switch (type) + if (type == AAXPlugIn) { - case AAXPlugIn: - { - auto aaxLibsFolder = RelativePath (owner.getAAXPathString(), RelativePath::projectFolder).getChildFile ("Libs"); - defines.set ("JucePlugin_AAXLibs_path", createRebasedPath (aaxLibsFolder)); - } - break; - case RTASPlugIn: - { - RelativePath rtasFolder (owner.getRTASPathString(), RelativePath::projectFolder); - defines.set ("JucePlugin_WinBag_path", createRebasedPath (rtasFolder.getChildFile ("WinBag"))); - } - break; - default: - break; + auto aaxLibsFolder = RelativePath (owner.getAAXPathString(), RelativePath::projectFolder).getChildFile ("Libs"); + defines.set ("JucePlugin_AAXLibs_path", createRebasedPath (aaxLibsFolder)); + } + else if (type == RTASPlugIn) + { + RelativePath rtasFolder (owner.getRTASPathString(), RelativePath::projectFolder); + defines.set ("JucePlugin_WinBag_path", createRebasedPath (rtasFolder.getChildFile ("WinBag"))); } } @@ -1352,6 +1333,9 @@ public: case ProjectType::Target::UnityPlugIn: case ProjectType::Target::DynamicLibrary: return true; + case ProjectType::Target::AudioUnitPlugIn: + case ProjectType::Target::AudioUnitv3PlugIn: + case ProjectType::Target::unspecified: default: break; } @@ -1411,11 +1395,8 @@ public: callForAllSupportedTargets ([this] (ProjectType::Target::Type targetType) { - if (MSVCTargetBase* target = new MSVCTargetBase (targetType, *this)) - { - if (targetType != ProjectType::Target::AggregateTarget) - targets.add (target); - } + if (targetType != ProjectType::Target::AggregateTarget) + targets.add (new MSVCTargetBase (targetType, *this)); }); // If you hit this assert, you tried to generate a project for an exporter @@ -1462,20 +1443,15 @@ public: } } - static void writeRCValue (MemoryOutputStream& mo, const String& n, const String& value) - { - if (value.isNotEmpty()) - mo << " VALUE \"" << n << "\", \"" - << CppTokeniserFunctions::addEscapeChars (value) << "\\0\"" << newLine; - } - static void createRCFile (const Project& p, const File& iconFile, const File& rcFile) { auto version = p.getVersionString(); MemoryOutputStream mo; - mo << "#ifdef JUCE_USER_DEFINED_RC_FILE" << newLine + mo << "#pragma code_page(65001)" << newLine + << newLine + << "#ifdef JUCE_USER_DEFINED_RC_FILE" << newLine << " #include JUCE_USER_DEFINED_RC_FILE" << newLine << "#else" << newLine << newLine @@ -1491,12 +1467,19 @@ public: << " BLOCK \"040904E4\"" << newLine << " BEGIN" << newLine; - writeRCValue (mo, "CompanyName", p.getCompanyNameString()); - writeRCValue (mo, "LegalCopyright", p.getCompanyCopyrightString()); - writeRCValue (mo, "FileDescription", p.getProjectNameString()); - writeRCValue (mo, "FileVersion", version); - writeRCValue (mo, "ProductName", p.getProjectNameString()); - writeRCValue (mo, "ProductVersion", version); + auto writeRCValue = [&mo] (const String& n, const String& value) + { + if (value.isNotEmpty()) + mo << " VALUE \"" << n << "\", \"" + << value.replace ("\"", "\"\"") << "\\0\"" << newLine; + }; + + writeRCValue ("CompanyName", p.getCompanyNameString()); + writeRCValue ("LegalCopyright", p.getCompanyCopyrightString()); + writeRCValue ("FileDescription", p.getProjectNameString()); + writeRCValue ("FileVersion", version); + writeRCValue ("ProductName", p.getProjectNameString()); + writeRCValue ("ProductVersion", version); mo << " END" << newLine << " END" << newLine diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h index 88fd4f1ed5..71b0adf521 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h @@ -37,7 +37,7 @@ protected: public: MakeBuildConfiguration (Project& p, const ValueTree& settings, const ProjectExporter& e) : BuildConfiguration (p, settings, e), - architectureTypeValue (config, Ids::linuxArchitecture, getUndoManager(), "-march=native") + architectureTypeValue (config, Ids::linuxArchitecture, getUndoManager(), String()) { linkTimeOptimisationValue.setDefault (false); optimisationLevelValue.setDefault (isDebug() ? gccO0 : gccO3); @@ -175,15 +175,11 @@ public: String getTargetFileSuffix() const { - switch (type) - { - case VSTPlugIn: - case UnityPlugIn: - case DynamicLibrary: return ".so"; - case SharedCodeTarget: - case StaticLibrary: return ".a"; - default: break; - } + if (type == VSTPlugIn || type == UnityPlugIn || type == DynamicLibrary) + return ".so"; + + if (type == SharedCodeTarget || type == StaticLibrary) + return ".a"; return {}; } @@ -357,6 +353,12 @@ public: case ProjectType::Target::DynamicLibrary: case ProjectType::Target::UnityPlugIn: return true; + case ProjectType::Target::VST3PlugIn: + case ProjectType::Target::AAXPlugIn: + case ProjectType::Target::RTASPlugIn: + case ProjectType::Target::AudioUnitPlugIn: + case ProjectType::Target::AudioUnitv3PlugIn: + case ProjectType::Target::unspecified: default: break; } @@ -407,13 +409,8 @@ public: { callForAllSupportedTargets ([this] (ProjectType::Target::Type targetType) { - if (MakefileTarget* target = new MakefileTarget (targetType, *this)) - { - if (targetType == ProjectType::Target::AggregateTarget) - targets.insert (0, target); - else - targets.add (target); - } + targets.insert (targetType == ProjectType::Target::AggregateTarget ? 0 : -1, + new MakefileTarget (targetType, *this)); }); // If you hit this assert, you tried to generate a project for an exporter @@ -585,8 +582,7 @@ private: { auto result = makefileExtraLinkerFlags; - if (! config.isDebug()) - result.add ("-fvisibility=hidden"); + result.add ("-fvisibility=hidden"); if (config.isLinkTimeOptimisationEnabled()) result.add ("-flto"); @@ -718,7 +714,7 @@ private: } else { - if (! getProject().getProjectType().isAudioPlugin()) + if (! getProject().isAudioPluginProject()) out << "all : " << target->getBuildProduct() << newLine << newLine; target->writeTargetLine (out, packages); @@ -903,7 +899,7 @@ private: { Array> targetFiles; - auto targetType = (p.getProjectType().isAudioPlugin() ? target->type : MakefileTarget::SharedCodeTarget); + auto targetType = (p.isAudioPluginProject() ? target->type : MakefileTarget::SharedCodeTarget); for (auto& f : files) if (p.getTargetTypeFromFilePath (f.first, true) == targetType) @@ -955,7 +951,7 @@ private: phonyTargetLine << ".PHONY: clean all strip"; - if (! getProject().getProjectType().isAudioPlugin()) + if (! getProject().isAudioPluginProject()) return phonyTargetLine.toString(); for (auto target : targets) diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h index 532a05bfb5..298a758284 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h @@ -104,6 +104,7 @@ public: customXcodeResourceFoldersValue (settings, Ids::customXcodeResourceFolders, getUndoManager()), customXcassetsFolderValue (settings, Ids::customXcassetsFolder, getUndoManager()), appSandboxValue (settings, Ids::appSandbox, getUndoManager()), + appSandboxInheritanceValue (settings, Ids::appSandboxInheritance, getUndoManager()), appSandboxOptionsValue (settings, Ids::appSandboxOptions, getUndoManager(), Array(), ","), hardenedRuntimeValue (settings, Ids::hardenedRuntime, getUndoManager()), hardenedRuntimeOptionsValue (settings, Ids::hardenedRuntimeOptions, getUndoManager(), Array(), ","), @@ -116,11 +117,15 @@ public: iosBluetoothPermissionNeededValue (settings, Ids::iosBluetoothPermissionNeeded, getUndoManager()), iosBluetoothPermissionTextValue (settings, Ids::iosBluetoothPermissionText, getUndoManager(), "This app requires access to Bluetooth to function correctly."), + sendAppleEventsPermissionNeededValue (settings, Ids::sendAppleEventsPermissionNeeded, getUndoManager()), + sendAppleEventsPermissionTextValue (settings, Ids::sendAppleEventsPermissionText, getUndoManager(), + "This app requires the ability to send Apple events to function correctly."), uiFileSharingEnabledValue (settings, Ids::UIFileSharingEnabled, getUndoManager()), uiSupportsDocumentBrowserValue (settings, Ids::UISupportsDocumentBrowser, getUndoManager()), uiStatusBarHiddenValue (settings, Ids::UIStatusBarHidden, getUndoManager()), documentExtensionsValue (settings, Ids::documentExtensions, getUndoManager()), iosInAppPurchasesValue (settings, Ids::iosInAppPurchases, getUndoManager()), + iosContentSharingValue (settings, Ids::iosContentSharing, getUndoManager(), true), iosBackgroundAudioValue (settings, Ids::iosBackgroundAudio, getUndoManager()), iosBackgroundBleValue (settings, Ids::iosBackgroundBle, getUndoManager()), iosPushNotificationsValue (settings, Ids::iosPushNotifications, getUndoManager()), @@ -147,65 +152,70 @@ public: } //============================================================================== - String getPListToMergeString() const { return customPListValue.get(); } - String getPListPrefixHeaderString() const { return pListPrefixHeaderValue.get(); } - bool isPListPreprocessEnabled() const { return pListPreprocessValue.get(); } + String getPListToMergeString() const { return customPListValue.get(); } + String getPListPrefixHeaderString() const { return pListPrefixHeaderValue.get(); } + bool isPListPreprocessEnabled() const { return pListPreprocessValue.get(); } - String getSubprojectsString() const { return subprojectsValue.get(); } + String getSubprojectsString() const { return subprojectsValue.get(); } - String getExtraFrameworksString() const { return extraFrameworksValue.get(); } - String getFrameworkSearchPathsString() const { return frameworkSearchPathsValue.get(); } - String getExtraCustomFrameworksString() const { return extraCustomFrameworksValue.get(); } - String getEmbeddedFrameworksString() const { return embeddedFrameworksValue.get(); } + String getExtraFrameworksString() const { return extraFrameworksValue.get(); } + String getFrameworkSearchPathsString() const { return frameworkSearchPathsValue.get(); } + String getExtraCustomFrameworksString() const { return extraCustomFrameworksValue.get(); } + String getEmbeddedFrameworksString() const { return embeddedFrameworksValue.get(); } - String getPostBuildScript() const { return postbuildCommandValue.get(); } - String getPreBuildScript() const { return prebuildCommandValue.get(); } + String getPostBuildScript() const { return postbuildCommandValue.get(); } + String getPreBuildScript() const { return prebuildCommandValue.get(); } - bool shouldDuplicateAppExResourcesFolder() const { return duplicateAppExResourcesFolderValue.get(); } + bool shouldDuplicateAppExResourcesFolder() const { return duplicateAppExResourcesFolderValue.get(); } - String getDeviceFamilyString() const { return iosDeviceFamilyValue.get(); } + String getDeviceFamilyString() const { return iosDeviceFamilyValue.get(); } - String getiPhoneScreenOrientationString() const { return iPhoneScreenOrientationValue.get(); } - String getiPadScreenOrientationString() const { return iPadScreenOrientationValue.get(); } + String getiPhoneScreenOrientationString() const { return iPhoneScreenOrientationValue.get(); } + String getiPadScreenOrientationString() const { return iPadScreenOrientationValue.get(); } - String getCustomResourceFoldersString() const { return customXcodeResourceFoldersValue.get().toString().replaceCharacters ("\r\n", "::"); } - String getCustomXcassetsFolderString() const { return customXcassetsFolderValue.get(); } - String getCustomLaunchStoryboardString() const { return customLaunchStoryboardValue.get(); } - bool shouldAddStoryboardToProject() const { return getCustomLaunchStoryboardString().isNotEmpty() || getCustomXcassetsFolderString().isEmpty(); } + String getCustomResourceFoldersString() const { return customXcodeResourceFoldersValue.get().toString().replaceCharacters ("\r\n", "::"); } + String getCustomXcassetsFolderString() const { return customXcassetsFolderValue.get(); } + String getCustomLaunchStoryboardString() const { return customLaunchStoryboardValue.get(); } + bool shouldAddStoryboardToProject() const { return getCustomLaunchStoryboardString().isNotEmpty() || getCustomXcassetsFolderString().isEmpty(); } - bool isHardenedRuntimeEnabled() const { return hardenedRuntimeValue.get(); } - Array getHardenedRuntimeOptions() const { return *hardenedRuntimeOptionsValue.get().getArray(); } + bool isHardenedRuntimeEnabled() const { return hardenedRuntimeValue.get(); } + Array getHardenedRuntimeOptions() const { return *hardenedRuntimeOptionsValue.get().getArray(); } - bool isAppSandboxEnabled() const { return appSandboxValue.get(); } - Array getAppSandboxOptions() const { return *appSandboxOptionsValue.get().getArray(); } + bool isAppSandboxEnabled() const { return appSandboxValue.get(); } + bool isAppSandboxInhertianceEnabled() const { return appSandboxInheritanceValue.get(); } + Array getAppSandboxOptions() const { return *appSandboxOptionsValue.get().getArray(); } - bool isMicrophonePermissionEnabled() const { return microphonePermissionNeededValue.get(); } - String getMicrophonePermissionsTextString() const { return microphonePermissionsTextValue.get(); } + bool isMicrophonePermissionEnabled() const { return microphonePermissionNeededValue.get(); } + String getMicrophonePermissionsTextString() const { return microphonePermissionsTextValue.get(); } - bool isCameraPermissionEnabled() const { return cameraPermissionNeededValue.get(); } - String getCameraPermissionTextString() const { return cameraPermissionTextValue.get(); } + bool isCameraPermissionEnabled() const { return cameraPermissionNeededValue.get(); } + String getCameraPermissionTextString() const { return cameraPermissionTextValue.get(); } - bool isBluetoothPermissionEnabled() const { return iosBluetoothPermissionNeededValue.get(); } - String getBluetoothPermissionTextString() const { return iosBluetoothPermissionTextValue.get(); } + bool isBluetoothPermissionEnabled() const { return iosBluetoothPermissionNeededValue.get(); } + String getBluetoothPermissionTextString() const { return iosBluetoothPermissionTextValue.get(); } - bool isInAppPurchasesEnabled() const { return iosInAppPurchasesValue.get(); } - bool isBackgroundAudioEnabled() const { return iosBackgroundAudioValue.get(); } - bool isBackgroundBleEnabled() const { return iosBackgroundBleValue.get(); } - bool isPushNotificationsEnabled() const { return iosPushNotificationsValue.get(); } - bool isAppGroupsEnabled() const { return iosAppGroupsValue.get(); } - bool isiCloudPermissionsEnabled() const { return iCloudPermissionsValue.get(); } - bool isFileSharingEnabled() const { return uiFileSharingEnabledValue.get(); } - bool isDocumentBrowserEnabled() const { return uiSupportsDocumentBrowserValue.get(); } - bool isStatusBarHidden() const { return uiStatusBarHiddenValue.get(); } + bool isSendAppleEventsPermissionEnabled() const { return sendAppleEventsPermissionNeededValue.get(); } + String getSendAppleEventsPermissionTextString() const { return sendAppleEventsPermissionTextValue.get(); } - String getDocumentExtensionsString() const { return documentExtensionsValue.get(); } + bool isInAppPurchasesEnabled() const { return iosInAppPurchasesValue.get(); } + bool isContentSharingEnabled() const { return iosContentSharingValue.get(); } + bool isBackgroundAudioEnabled() const { return iosBackgroundAudioValue.get(); } + bool isBackgroundBleEnabled() const { return iosBackgroundBleValue.get(); } + bool isPushNotificationsEnabled() const { return iosPushNotificationsValue.get(); } + bool isAppGroupsEnabled() const { return iosAppGroupsValue.get(); } + bool isiCloudPermissionsEnabled() const { return iCloudPermissionsValue.get(); } + bool isFileSharingEnabled() const { return uiFileSharingEnabledValue.get(); } + bool isDocumentBrowserEnabled() const { return uiSupportsDocumentBrowserValue.get(); } + bool isStatusBarHidden() const { return uiStatusBarHiddenValue.get(); } - bool shouldKeepCustomXcodeSchemes() const { return keepCustomXcodeSchemesValue.get(); } + String getDocumentExtensionsString() const { return documentExtensionsValue.get(); } - String getDevelopmentTeamIDString() const { return iosDevelopmentTeamIDValue.get(); } - String getAppGroupIdString() const { return iosAppGroupsIDValue.get(); } + bool shouldKeepCustomXcodeSchemes() const { return keepCustomXcodeSchemesValue.get(); } - String getDefaultLaunchStoryboardName() const { jassert (iOS); return "LaunchScreen"; } + String getDevelopmentTeamIDString() const { return iosDevelopmentTeamIDValue.get(); } + String getAppGroupIdString() const { return iosAppGroupsIDValue.get(); } + + String getDefaultLaunchStoryboardName() const { jassert (iOS); return "LaunchScreen"; } //============================================================================== bool usesMMFiles() const override { return true; } @@ -245,6 +255,7 @@ public: case ProjectType::Target::AudioUnitPlugIn: case ProjectType::Target::UnityPlugIn: return ! iOS; + case ProjectType::Target::unspecified: default: break; } @@ -273,7 +284,7 @@ public: "This way you can specify them for OS X and iOS separately, and modify the content of the resource folders " "without re-saving the Projucer project."); - if (getProject().getProjectType().isAudioPlugin()) + if (getProject().isAudioPluginProject()) props.add (new ChoicePropertyComponent (duplicateAppExResourcesFolderValue, "Add Duplicate Resources Folder to App Extension"), "Disable this to prevent the Projucer from creating a duplicate resources folder for AUv3 app extensions."); @@ -318,6 +329,11 @@ public: props.add (new ChoicePropertyComponent (appSandboxValue, "Use App Sandbox"), "Enable this to use the app sandbox."); + props.add (new ChoicePropertyComponentWithEnablement (appSandboxInheritanceValue, appSandboxValue, "App Sandbox Inheritance"), + "If app sandbox is enabled, this setting will configure a child process to inherit the sandbox of its parent. " + "Note that if you enable this and have specified any other app sandbox entitlements below, the child process " + "will fail to launch."); + std::vector> sandboxOptions { { "Network: Incoming Connections (Server)", "network.server" }, @@ -434,6 +450,16 @@ public: "Bluetooth Access Text", 1024, false), "A short description of why your app requires Bluetooth access."); } + else + { + props.add (new ChoicePropertyComponent (sendAppleEventsPermissionNeededValue, "Send Apple Events"), + "Enable this to allow your app to send Apple events. " + "The user of your app will be prompted to grant permissions to control other apps."); + + props.add (new TextPropertyComponentWithEnablement (sendAppleEventsPermissionTextValue, sendAppleEventsPermissionNeededValue, + "Send Apple Events Text", 1024, false), + "A short description of why your app requires the ability to send Apple events."); + } props.add (new ChoicePropertyComponent (iosInAppPurchasesValue, "In-App Purchases Capability"), "Enable this to grant your app the capability for in-app purchases. " @@ -441,6 +467,9 @@ public: if (iOS) { + props.add (new ChoicePropertyComponent (iosContentSharingValue, "Content Sharing"), + "Enable this to allow your app to share content with other apps."); + props.add (new ChoicePropertyComponent (iosBackgroundAudioValue, "Audio Background Capability"), "Enable this to grant your app the capability to access audio when in background mode. " "This permission is required if your app creates a MIDI input or output device."); @@ -490,6 +519,7 @@ public: props.add (new TextPropertyComponent (subprojectsValue, "Xcode Subprojects", 8192, true), "Paths to Xcode projects that should be added to the build (one per line). " + "These can be absolute or relative to the build directory. " "The names of the required build products can be specified after a colon, comma separated, " "e.g. \"path/to/MySubProject.xcodeproj: MySubProject, OtherTarget\". " "If no build products are specified, all build products associated with a subproject will be added."); @@ -581,13 +611,8 @@ public: { callForAllSupportedTargets ([this] (ProjectType::Target::Type targetType) { - if (auto* target = new XcodeTarget (targetType, *this)) - { - if (targetType == ProjectType::Target::AggregateTarget) - targets.insert (0, target); - else - targets.add (target); - } + targets.insert (targetType == ProjectType::Target::AggregateTarget ? 0 : -1, + new XcodeTarget (targetType, *this)); }); // If you hit this assert, you tried to generate a project for an exporter @@ -667,7 +692,9 @@ protected: //============================================================================== void createConfigProperties (PropertyListBuilder& props) override { - addXcodePluginInstallPathProperties (props); + if (project.isAudioPluginProject()) + addXcodePluginInstallPathProperties (props); + addRecommendedLLVMCompilerWarningsProperty (props); addGCCOptimisationProperty (props); @@ -712,7 +739,10 @@ protected: props.add (new ChoicePropertyComponent (stripLocalSymbolsEnabled, "Strip Local Symbols"), "Enable this to strip any locally defined symbols resulting in a smaller binary size. Enabling this " - "will also remove any function names from crash logs. Must be disabled for static library projects."); + "will also remove any function names from crash logs. Must be disabled for static library projects. " + "Note that disabling this will not necessarily generate full debug symbols. For release configs, " + "you will also need to add the following to the \"Custom Xcode Flags\" field: " + "GCC_GENERATE_DEBUGGING_SYMBOLS = YES, STRIP_INSTALLED_PRODUCT = NO, COPY_PHASE_STRIP = NO"); } String getModuleLibraryArchName() const override @@ -965,6 +995,7 @@ public: xcodeCopyToProductInstallPathAfterBuild = false; break; + case ProjectType::Target::unspecified: default: // unknown target type! jassertfalse; @@ -1014,7 +1045,7 @@ public: { Array result; - auto targetType = (owner.getProject().getProjectType().isAudioPlugin() ? type : SharedCodeTarget); + auto targetType = (owner.getProject().isAudioPluginProject() ? type : SharedCodeTarget); if (projectItem.isGroup()) { @@ -1185,8 +1216,8 @@ public: || (owner.isiOS() && owner.isiCloudPermissionsEnabled())) return true; - if (owner.project.getProjectType().isAudioPlugin() - && ( (owner.isOSX() && type == Target::AudioUnitv3PlugIn) + if (owner.project.isAudioPluginProject() + && ((owner.isOSX() && type == Target::AudioUnitv3PlugIn) || (owner.isiOS() && type == Target::StandalonePlugIn && owner.getProject().shouldEnableIAA()))) return true; @@ -1420,7 +1451,6 @@ public: defines.set ("_NDEBUG", "1"); defines.set ("NDEBUG", "1"); s.set ("GCC_GENERATE_DEBUGGING_SYMBOLS", "NO"); - s.set ("GCC_SYMBOLS_PRIVATE_EXTERN", "YES"); s.set ("DEAD_CODE_STRIPPING", "YES"); } @@ -1435,6 +1465,9 @@ public: if (owner.isInAppPurchasesEnabled()) defines.set ("JUCE_IN_APP_PURCHASES", "1"); + if (owner.iOS && owner.isContentSharingEnabled()) + defines.set ("JUCE_CONTENT_SHARING", "1"); + if (owner.isPushNotificationsEnabled()) defines.set ("JUCE_PUSH_NOTIFICATIONS", "1"); @@ -1480,6 +1513,12 @@ public: case AAXPlugIn: return config.isPluginBinaryCopyStepEnabled() ? config.getAAXBinaryLocationString() : String(); case UnityPlugIn: return config.isPluginBinaryCopyStepEnabled() ? config.getUnityPluginBinaryLocationString() : String(); case SharedCodeTarget: return owner.isiOS() ? "@executable_path/Frameworks" : "@executable_path/../Frameworks"; + case StaticLibrary: + case DynamicLibrary: + case AudioUnitv3PlugIn: + case StandalonePlugIn: + case AggregateTarget: + case unspecified: default: return {}; } } @@ -1502,7 +1541,7 @@ public: librarySearchPaths.add (owner.getSearchPathForStaticLibrary (lib)); } - if (owner.project.getProjectType().isAudioPlugin()) + if (owner.project.isAudioPluginProject()) { if (owner.getTargetOfType (Target::SharedCodeTarget) != nullptr) { @@ -1570,6 +1609,11 @@ public: : owner.getDefaultLaunchStoryboardName()); } } + else + { + if (owner.isSendAppleEventsPermissionEnabled()) + addPlistDictionaryKey (dict, "NSAppleEventsUsageDescription", owner.getSendAppleEventsPermissionTextString()); + } addPlistDictionaryKey (dict, "CFBundleExecutable", "${EXECUTABLE_NAME}"); @@ -1980,11 +2024,14 @@ private: postbuildCommandValue, prebuildCommandValue, duplicateAppExResourcesFolderValue, iosDeviceFamilyValue, iPhoneScreenOrientationValue, iPadScreenOrientationValue, customXcodeResourceFoldersValue, customXcassetsFolderValue, - appSandboxValue, appSandboxOptionsValue, + appSandboxValue, appSandboxInheritanceValue, appSandboxOptionsValue, hardenedRuntimeValue, hardenedRuntimeOptionsValue, - microphonePermissionNeededValue, microphonePermissionsTextValue, cameraPermissionNeededValue, cameraPermissionTextValue, iosBluetoothPermissionNeededValue, iosBluetoothPermissionTextValue, + microphonePermissionNeededValue, microphonePermissionsTextValue, + cameraPermissionNeededValue, cameraPermissionTextValue, + iosBluetoothPermissionNeededValue, iosBluetoothPermissionTextValue, + sendAppleEventsPermissionNeededValue, sendAppleEventsPermissionTextValue, uiFileSharingEnabledValue, uiSupportsDocumentBrowserValue, uiStatusBarHiddenValue, documentExtensionsValue, iosInAppPurchasesValue, - iosBackgroundAudioValue, iosBackgroundBleValue, iosPushNotificationsValue, iosAppGroupsValue, iCloudPermissionsValue, + iosContentSharingValue, iosBackgroundAudioValue, iosBackgroundBleValue, iosPushNotificationsValue, iosAppGroupsValue, iCloudPermissionsValue, iosDevelopmentTeamIDValue, iosAppGroupsIDValue, keepCustomXcodeSchemesValue, useHeaderMapValue, customLaunchStoryboardValue, exporterBundleIdentifierValue; @@ -2140,7 +2187,8 @@ private: void addFilesAndGroupsToProject (StringArray& topLevelGroupIDs) const { for (auto* target : targets) - addEntitlementsFile (*target); + if (target->shouldAddEntitlements()) + addEntitlementsFile (*target); for (auto& group : getAllGroups()) { @@ -2223,7 +2271,7 @@ private: auto sourceFiles = target->sourceIDs; if (target->type == XcodeTarget::SharedCodeTarget - || (! project.getProjectType().isAudioPlugin())) + || (! project.isAudioPluginProject())) sourceFiles.addArray (sourceIDs); target->addBuildPhase ("PBXSourcesBuildPhase", sourceFiles); @@ -2234,11 +2282,11 @@ private: target->addShellScriptBuildPhase ("Post-build script", getPostBuildScript()); - if (project.getProjectType().isAudioPlugin() && project.shouldBuildAUv3() + if (project.isAudioPluginProject() && project.shouldBuildAUv3() && project.shouldBuildStandalonePlugin() && target->type == XcodeTarget::StandalonePlugIn) embedAppExtension(); - if (project.getProjectType().isAudioPlugin() && project.shouldBuildUnityPlugin() + if (project.isAudioPluginProject() && project.shouldBuildUnityPlugin() && target->type == XcodeTarget::UnityPlugIn) embedUnityScript(); @@ -2345,7 +2393,7 @@ private: { StringArray dependencies; - if (project.getProjectType().isAudioPlugin()) + if (project.isAudioPluginProject()) { if (target.type == XcodeTarget::StandalonePlugIn) // depends on AUv3 and shared code { @@ -2596,21 +2644,14 @@ private: s.set ("CLANG_WARN_UNREACHABLE_CODE", "YES"); s.set ("CLANG_WARN__DUPLICATE_METHOD_MATCH", "YES"); s.set ("WARNING_CFLAGS", "\"-Wreorder\""); + s.set ("GCC_INLINES_ARE_PRIVATE_EXTERN", projectType.isStaticLibrary() ? "NO" : "YES"); - if (projectType.isStaticLibrary()) - { - s.set ("GCC_INLINES_ARE_PRIVATE_EXTERN", "NO"); - s.set ("GCC_SYMBOLS_PRIVATE_EXTERN", "NO"); - } - else - { - s.set ("GCC_INLINES_ARE_PRIVATE_EXTERN", "YES"); - } + // GCC_SYMBOLS_PRIVATE_EXTERN only takes effect if ENABLE_TESTABILITY is off + s.set ("ENABLE_TESTABILITY", "NO"); + s.set ("GCC_SYMBOLS_PRIVATE_EXTERN", "YES"); if (config.isDebug()) { - s.set ("ENABLE_TESTABILITY", "YES"); - if (config.getOSXArchitectureString() == osxArch_Default) s.set ("ONLY_ACTIVE_ARCH", "YES"); } @@ -2649,8 +2690,12 @@ private: if (iOS && isPushNotificationsEnabled()) xcodeFrameworks.addIfNotAlreadyThere ("UserNotifications"); - if (isiOS() && project.getConfigFlag ("JUCE_USE_CAMERA").get()) + if (iOS + && project.getEnabledModules().isModuleEnabled ("juce_video") + && project.isConfigFlagEnabled ("JUCE_USE_CAMERA", false)) + { xcodeFrameworks.addIfNotAlreadyThere ("ImageIO"); + } xcodeFrameworks.addTokens (getExtraFrameworksString(), ",;", "\"'"); xcodeFrameworks.trim(); @@ -2769,19 +2814,8 @@ private: if (! subprojectPath.endsWith (".xcodeproj")) subprojectPath += ".xcodeproj"; - File subprojectFile; - - if (File::isAbsolutePath (subprojectPath)) - { - subprojectFile = subprojectPath; - } - else - { - subprojectFile = getProject().getProjectFolder().getChildFile (subprojectPath); - - RelativePath p (subprojectPath, RelativePath::projectFolder); - subprojectPath = p.rebased (getProject().getProjectFolder(), getTargetFolder(), RelativePath::buildTargetFolder).toUnixStyle(); - } + File subprojectFile = File::isAbsolutePath (subprojectPath) ? subprojectPath + : getTargetFolder().getChildFile (subprojectPath); if (! subprojectFile.isDirectory()) continue; @@ -2802,8 +2836,8 @@ private: if (availableBuildProducts.empty()) continue; - auto subprojectFileType = getFileType (RelativePath (subprojectPath, RelativePath::projectFolder)); - auto subprojectFileID = addFileOrFolderReference (subprojectPath, "", subprojectFileType); + auto subprojectFileType = getFileType (RelativePath (subprojectFile.getFullPathName(), RelativePath::buildTargetFolder)); + auto subprojectFileID = addFileOrFolderReference (subprojectFile.getFullPathName(), "", subprojectFileType); subprojectFileIDs.add (subprojectFileID); StringArray proxyIDs; @@ -2838,7 +2872,7 @@ private: } } - auto productGroupID = createFileRefID (subprojectPath + "_products"); + auto productGroupID = createFileRefID (subprojectFile.getFullPathName() + "_products"); addGroup (productGroupID, "Products", proxyIDs); subprojectReferences.add ({ productGroupID, subprojectFileID }); @@ -3104,25 +3138,34 @@ private: { StringPairArray entitlements; - if (project.getProjectType().isAudioPlugin()) + if (isiOS()) { - if (isiOS()) + if (project.isAudioPluginProject() && project.shouldEnableIAA()) + entitlements.set ("inter-app-audio", ""); + + if (isiCloudPermissionsEnabled()) { - if (project.shouldEnableIAA()) - entitlements.set ("inter-app-audio", ""); - } - else if (target.type == XcodeTarget::AudioUnitv3PlugIn) - { - entitlements.set ("com.apple.security.app-sandbox", ""); + entitlements.set ("com.apple.developer.icloud-container-identifiers", + "\n" + " iCloud.$(CFBundleIdentifier)\n" + " "); + + entitlements.set ("com.apple.developer.icloud-services", + "\n" + " CloudDocuments\n" + " "); + + entitlements.set ("com.apple.developer.ubiquity-container-identifiers", + "\n" + " iCloud.$(CFBundleIdentifier)\n" + " "); } } - else - { - if (isPushNotificationsEnabled()) - entitlements.set (isiOS() ? "aps-environment" - : "com.apple.developer.aps-environment", - "development"); - } + + if (isPushNotificationsEnabled()) + entitlements.set (isiOS() ? "aps-environment" + : "com.apple.developer.aps-environment", + "development"); if (isAppGroupsEnabled()) { @@ -3141,32 +3184,27 @@ private: for (auto& option : getHardenedRuntimeOptions()) entitlements.set (option, ""); - if (isAppSandboxEnabled()) - for (auto& option : getAppSandboxOptions()) - entitlements.set (option, ""); - - if (isiOS() && isiCloudPermissionsEnabled()) + if (isAppSandboxEnabled() || (isOSX() && project.isAudioPluginProject() && target.type == XcodeTarget::AudioUnitv3PlugIn)) { - entitlements.set ("com.apple.developer.icloud-container-identifiers", - "\n" - " iCloud.$(CFBundleIdentifier)\n" - " "); + entitlements.set ("com.apple.security.app-sandbox", ""); - entitlements.set ("com.apple.developer.icloud-services", - "\n" - " CloudDocuments\n" - " "); + if (isAppSandboxInhertianceEnabled()) + { + // no other sandbox options can be specified if sandbox inheritance is enabled! + jassert (getAppSandboxOptions().isEmpty()); - entitlements.set ("com.apple.developer.ubiquity-container-identifiers", - "\n" - " iCloud.$(CFBundleIdentifier)\n" - " "); + entitlements.set ("com.apple.security.inherit", ""); + } + + if (isAppSandboxEnabled()) + for (auto& option : getAppSandboxOptions()) + entitlements.set (option, ""); } return entitlements; } - String addEntitlementsFile (XcodeTarget& target) const + void addEntitlementsFile (XcodeTarget& target) const { String content = "\n" @@ -3175,13 +3213,11 @@ private: "\n"; auto entitlements = getEntitlements (target); - auto keys = entitlements.getAllKeys(); - for (auto& key : keys) - { + for (auto& key : entitlements.getAllKeys()) content += "\t" + key + "\n" "\t" + entitlements[key] + "\n"; - } + content += "\n" "\n"; @@ -3189,7 +3225,7 @@ private: overwriteFileIfDifferentOrThrow (entitlementsFile, content); RelativePath entitlementsPath (entitlementsFile, getTargetFolder(), RelativePath::buildTargetFolder); - return addFile (entitlementsPath, false, false, false, false, nullptr, {}); + addFile (entitlementsPath, false, false, false, false, nullptr, {}); } String addProjectItem (const Project::Item& projectItem) const diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp index c90cd2d365..98b91f429b 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp @@ -80,6 +80,7 @@ ProjectExporter* ProjectExporter::createNewExporter (Project& project, const int case 7: exp = new CodeBlocksProjectExporter (project, ValueTree (CodeBlocksProjectExporter ::getValueTreeTypeName (CodeBlocksProjectExporter::windowsTarget)), CodeBlocksProjectExporter::windowsTarget); break; case 8: exp = new CodeBlocksProjectExporter (project, ValueTree (CodeBlocksProjectExporter ::getValueTreeTypeName (CodeBlocksProjectExporter::linuxTarget)), CodeBlocksProjectExporter::linuxTarget); break; case 9: exp = new CLionProjectExporter (project, ValueTree (CLionProjectExporter ::getValueTreeTypeName())); break; + default: break; } exp->createDefaultConfigs(); @@ -617,7 +618,7 @@ TargetOS::OS ProjectExporter::getTargetOSForExporter() const RelativePath ProjectExporter::getModuleFolderRelativeToProject (const String& moduleID) const { - if (project.getEnabledModules().shouldCopyModuleFilesLocally (moduleID).getValue()) + if (project.getEnabledModules().shouldCopyModuleFilesLocally (moduleID)) return RelativePath (project.getRelativePathForFile (project.getLocalModuleFolder (moduleID)), RelativePath::projectFolder); @@ -636,7 +637,7 @@ String ProjectExporter::getLegacyModulePath() const RelativePath ProjectExporter::getLegacyModulePath (const String& moduleID) const { - if (project.getEnabledModules().state.getChildWithProperty (Ids::ID, moduleID) ["useLocalCopy"]) + if (project.getEnabledModules().shouldCopyModuleFilesLocally (moduleID)) return RelativePath (project.getRelativePathForFile (project.getGeneratedCodeFolder() .getChildFile ("modules") .getChildFile (moduleID)), RelativePath::projectFolder); @@ -927,11 +928,15 @@ ProjectExporter::BuildConfiguration::BuildConfiguration (Project& p, const Value "-Wreorder", "-Wconstant-conversion", "-Wsign-conversion", "-Wunused-private-field", "-Wbool-conversion", "-Wextra-semi", "-Wunreachable-code", "-Wzero-as-null-pointer-constant", "-Wcast-align", "-Winconsistent-missing-destructor-override", "-Wshift-sign-overflow", "-Wnullable-to-nonnull-conversion", - "-Wno-missing-field-initializers", "-Wno-ignored-qualifiers" }; + "-Wno-missing-field-initializers", "-Wno-ignored-qualifiers", + "-Wswitch-enum" + }; recommendedCompilerWarningFlags["GCC"] = { "-Wall", "-Wextra", "-Wstrict-aliasing", "-Wuninitialized", "-Wunused-parameter", "-Wsign-compare", "-Woverloaded-virtual", "-Wreorder", "-Wsign-conversion", "-Wunreachable-code", "-Wzero-as-null-pointer-constant", "-Wcast-align", "-Wno-implicit-fallthrough", - "-Wno-maybe-uninitialized", "-Wno-missing-field-initializers", "-Wno-ignored-qualifiers" }; + "-Wno-maybe-uninitialized", "-Wno-missing-field-initializers", "-Wno-ignored-qualifiers", + "-Wswitch-enum", "-Wredundant-decls" + }; recommendedCompilerWarningFlags["GCC-7"] = recommendedCompilerWarningFlags["GCC"]; recommendedCompilerWarningFlags["GCC-7"].add ("-Wno-strict-overflow"); } diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.h index 57577a5336..ec3ae4a0ec 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.h @@ -95,7 +95,7 @@ public: auto projectRootHash = project.getProjectRoot().toXmlString().hashCode(); - if (project.getProjectType().isAudioPlugin()) + if (project.isAudioPluginProject()) { writePluginCharacteristicsFile(); @@ -157,7 +157,7 @@ public: if (errors.size() == 0) { - if (project.getProjectType().isAudioPlugin()) + if (project.isAudioPluginProject()) writePluginCharacteristicsFile(); writeAppConfigFile (modules, loadUserContentFromAppConfig()); @@ -348,7 +348,7 @@ private: return longest; } - File getAppConfigFile() const { return generatedCodeFolder.getChildFile (project.getAppConfigFilename()); } + File getAppConfigFile() const { return generatedCodeFolder.getChildFile (Project::getAppConfigFilename()); } String loadUserContentFromAppConfig() const { @@ -525,7 +525,7 @@ private: mem.setNewLineString (projectLineFeed); writeAppConfig (mem, modules, userContent); - saveGeneratedFile (project.getAppConfigFilename(), mem); + saveGeneratedFile (Project::getAppConfigFilename(), mem); } void writeAppHeader (MemoryOutputStream& out, const OwnedArray& modules) @@ -542,7 +542,7 @@ private: out << "#pragma once" << newLine << newLine; if (appConfigFile.exists()) - out << CodeHelpers::createIncludeStatement (project.getAppConfigFilename()) << newLine; + out << CodeHelpers::createIncludeStatement (Project::getAppConfigFilename()) << newLine; if (modules.size() > 0) { @@ -590,7 +590,7 @@ private: mem.setNewLineString (projectLineFeed); writeAppHeader (mem, modules); - saveGeneratedFile (project.getJuceSourceHFilename(), mem); + saveGeneratedFile (Project::getJuceSourceHFilename(), mem); } void writeModuleCppWrappers (const OwnedArray& modules) @@ -606,7 +606,7 @@ private: mem << "*/" << newLine << newLine - << "#include " << project.getAppConfigFilename().quoted() << newLine + << "#include " << Project::getAppConfigFilename().quoted() << newLine << "#include <"; if (cu.file.getFileExtension() != ".r") // .r files are included without the path diff --git a/extras/Projucer/Source/ProjectSaving/jucer_XcodeProjectParser.h b/extras/Projucer/Source/ProjectSaving/jucer_XcodeProjectParser.h index 9335be7319..030beea5be 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_XcodeProjectParser.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_XcodeProjectParser.h @@ -200,10 +200,14 @@ private: case '{': ++braceDepth; break; + case '}': if (--braceDepth == 0) return content.substr ((size_t) std::distance (content.begin(), start), (size_t) std::distance (start, ptr)); + + default: + break; } } diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_CodeHelpers.cpp b/extras/Projucer/Source/Utility/Helpers/jucer_CodeHelpers.cpp index bf7af246f3..18a1a7990b 100644 --- a/extras/Projucer/Source/Utility/Helpers/jucer_CodeHelpers.cpp +++ b/extras/Projucer/Source/Utility/Helpers/jucer_CodeHelpers.cpp @@ -135,6 +135,11 @@ namespace CodeHelpers return "#include \"" + includePath + "\""; } + String createIncludePathIncludeStatement (const String& includedFilename) + { + return "#include <" + includedFilename + ">"; + } + String makeBinaryDataIdentifierName (const File& file) { return makeValidIdentifier (file.getFileName() diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_CodeHelpers.h b/extras/Projucer/Source/Utility/Helpers/jucer_CodeHelpers.h index d348f8367a..5947e083ec 100644 --- a/extras/Projucer/Source/Utility/Helpers/jucer_CodeHelpers.h +++ b/extras/Projucer/Source/Utility/Helpers/jucer_CodeHelpers.h @@ -34,9 +34,11 @@ namespace CodeHelpers String unindent (const String& code, int numSpaces); String makeValidIdentifier (String s, bool capitalise, bool removeColons, bool allowTemplates, bool allowAsterisks = false); + String makeBinaryDataIdentifierName (const File& file); + String createIncludeStatement (const File& includedFile, const File& targetFile); String createIncludeStatement (const String& includePath); - String makeBinaryDataIdentifierName (const File& file); + String createIncludePathIncludeStatement (const String& includedFilename); String stringLiteral (const String& text, int maxLineLength = -1); String floatLiteral (double value, int numDecPlaces); diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_MiscUtilities.cpp b/extras/Projucer/Source/Utility/Helpers/jucer_MiscUtilities.cpp index c8879ca9e0..a9bb75facd 100644 --- a/extras/Projucer/Source/Utility/Helpers/jucer_MiscUtilities.cpp +++ b/extras/Projucer/Source/Utility/Helpers/jucer_MiscUtilities.cpp @@ -411,6 +411,16 @@ bool isValidJUCEExamplesDirectory (const File& directory) noexcept return directory.getChildFile ("Assets").getChildFile ("juce_icon.png").existsAsFile(); } +bool isJUCEFolder (const File& f) +{ + return isJUCEModulesFolder (f.getChildFile ("modules")); +} + +bool isJUCEModulesFolder (const File& f) +{ + return f.isDirectory() && f.getChildFile ("juce_core").isDirectory(); +} + //============================================================================== static var parseJUCEHeaderMetadata (const StringArray& lines) { diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_MiscUtilities.h b/extras/Projucer/Source/Utility/Helpers/jucer_MiscUtilities.h index f96b5ce18b..db6742da30 100644 --- a/extras/Projucer/Source/Utility/Helpers/jucer_MiscUtilities.h +++ b/extras/Projucer/Source/Utility/Helpers/jucer_MiscUtilities.h @@ -73,6 +73,9 @@ bool isPIPFile (const File&) noexcept; bool isValidJUCEExamplesDirectory (const File&) noexcept; +bool isJUCEModulesFolder (const File&); +bool isJUCEFolder (const File&); + //============================================================================== int indexOfLineStartingWith (const StringArray& lines, const String& text, int startIndex); diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h b/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h index 5a3ef9cbc3..27abe6b787 100644 --- a/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h +++ b/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h @@ -187,6 +187,7 @@ namespace Ids DECLARE_ID (useLocalCopy); DECLARE_ID (overwriteOnSave); DECLARE_ID (appSandbox); + DECLARE_ID (appSandboxInheritance); DECLARE_ID (appSandboxOptions); DECLARE_ID (hardenedRuntime); DECLARE_ID (hardenedRuntimeOptions); @@ -194,6 +195,8 @@ namespace Ids DECLARE_ID (microphonePermissionsText); DECLARE_ID (cameraPermissionNeeded); DECLARE_ID (cameraPermissionText); + DECLARE_ID (sendAppleEventsPermissionNeeded); + DECLARE_ID (sendAppleEventsPermissionText); DECLARE_ID (androidJavaLibs); DECLARE_ID (androidAdditionalJavaFolders); DECLARE_ID (androidAdditionalResourceFolders); @@ -245,6 +248,7 @@ namespace Ids DECLARE_ID (iPadScreenOrientation); DECLARE_ID (iosScreenOrientation); DECLARE_ID (iosInAppPurchases); + DECLARE_ID (iosContentSharing); DECLARE_ID (iosBackgroundAudio); DECLARE_ID (iosBackgroundBle); DECLARE_ID (iosPushNotifications); diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_VersionInfo.cpp b/extras/Projucer/Source/Utility/Helpers/jucer_VersionInfo.cpp new file mode 100644 index 0000000000..63cefab1ef --- /dev/null +++ b/extras/Projucer/Source/Utility/Helpers/jucer_VersionInfo.cpp @@ -0,0 +1,115 @@ +/* + ============================================================================== + + 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 "../../Application/jucer_Headers.h" +#include "jucer_VersionInfo.h" + +std::unique_ptr VersionInfo::fetchFromUpdateServer (const String& versionString) +{ + return fetch ("tags/" + versionString); +} + +std::unique_ptr VersionInfo::fetchLatestFromUpdateServer() +{ + return fetch ("latest"); +} + +std::unique_ptr VersionInfo::createInputStreamForAsset (const Asset& asset, int& statusCode) +{ + URL downloadUrl (asset.url); + StringPairArray responseHeaders; + + return std::unique_ptr (downloadUrl.createInputStream (false, nullptr, nullptr, + "Accept: application/octet-stream", + 0, &responseHeaders, &statusCode, 1)); +} + +bool VersionInfo::isNewerVersionThanCurrent() +{ + jassert (versionString.isNotEmpty()); + + auto currentTokens = StringArray::fromTokens (ProjectInfo::versionString, ".", {}); + auto thisTokens = StringArray::fromTokens (versionString, ".", {}); + + jassert (thisTokens.size() == 3 && thisTokens.size() == 3); + + if (currentTokens[0].getIntValue() == thisTokens[0].getIntValue()) + { + if (currentTokens[1].getIntValue() == thisTokens[1].getIntValue()) + return currentTokens[2].getIntValue() < thisTokens[2].getIntValue(); + + return currentTokens[1].getIntValue() < thisTokens[1].getIntValue(); + } + + return currentTokens[0].getIntValue() < thisTokens[0].getIntValue(); +} + +std::unique_ptr VersionInfo::fetch (const String& endpoint) +{ + URL latestVersionURL ("https://api.github.com/repos/WeAreROLI/JUCE/releases/" + endpoint); + std::unique_ptr inStream (latestVersionURL.createInputStream (false)); + + if (inStream == nullptr) + return nullptr; + + auto content = inStream->readEntireStreamAsString(); + auto latestReleaseDetails = JSON::parse (content); + + auto* json = latestReleaseDetails.getDynamicObject(); + + if (json == nullptr) + return nullptr; + + auto versionString = json->getProperty ("tag_name").toString(); + + if (versionString.isEmpty()) + return nullptr; + + auto* assets = json->getProperty ("assets").getArray(); + + if (assets == nullptr) + return nullptr; + + auto releaseNotes = json->getProperty ("body").toString(); + std::vector parsedAssets; + + for (auto& asset : *assets) + { + if (auto* assetJson = asset.getDynamicObject()) + { + parsedAssets.push_back ({ assetJson->getProperty ("name").toString(), + assetJson->getProperty ("url").toString() }); + jassert (parsedAssets.back().name.isNotEmpty()); + jassert (parsedAssets.back().url.isNotEmpty()); + } + else + { + jassertfalse; + } + } + + return std::unique_ptr (new VersionInfo ({ versionString, releaseNotes, std::move (parsedAssets) })); +} diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_VersionInfo.h b/extras/Projucer/Source/Utility/Helpers/jucer_VersionInfo.h new file mode 100644 index 0000000000..68ec8e710b --- /dev/null +++ b/extras/Projucer/Source/Utility/Helpers/jucer_VersionInfo.h @@ -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. + + ============================================================================== +*/ + +#pragma once + + +//============================================================================== +class VersionInfo +{ +public: + struct Asset + { + const String name; + const String url; + }; + + static std::unique_ptr fetchFromUpdateServer (const String& versionString); + static std::unique_ptr fetchLatestFromUpdateServer(); + static std::unique_ptr createInputStreamForAsset (const Asset& asset, int& statusCode); + + bool isNewerVersionThanCurrent(); + + const String versionString; + const String releaseNotes; + const std::vector assets; + +private: + VersionInfo() = default; + + static std::unique_ptr fetch (const String&); +}; diff --git a/extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp b/extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp index 483ad06dd6..496aecd40e 100644 --- a/extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp +++ b/extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp @@ -346,11 +346,17 @@ void PIPGenerator::addModules (ValueTree& jucerTree) Result PIPGenerator::setProjectSettings (ValueTree& jucerTree) { - jucerTree.setProperty (Ids::name, metadata[Ids::name], nullptr); - jucerTree.setProperty (Ids::companyName, metadata[Ids::vendor], nullptr); - jucerTree.setProperty (Ids::version, metadata[Ids::version], nullptr); - jucerTree.setProperty (Ids::userNotes, metadata[Ids::description], nullptr); - jucerTree.setProperty (Ids::companyWebsite, metadata[Ids::website], nullptr); + auto setPropertyIfNotEmpty = [&jucerTree] (const Identifier& name, const var& value) + { + if (value != var()) + jucerTree.setProperty (name, value, nullptr); + }; + + setPropertyIfNotEmpty (Ids::name, metadata[Ids::name]); + setPropertyIfNotEmpty (Ids::companyName, metadata[Ids::vendor]); + setPropertyIfNotEmpty (Ids::version, metadata[Ids::version]); + setPropertyIfNotEmpty (Ids::userNotes, metadata[Ids::description]); + setPropertyIfNotEmpty (Ids::companyWebsite, metadata[Ids::website]); auto defines = metadata[Ids::defines].toString(); @@ -372,7 +378,7 @@ Result PIPGenerator::setProjectSettings (ValueTree& jucerTree) } } - jucerTree.setProperty (Ids::defines, defines, nullptr); + setPropertyIfNotEmpty (Ids::defines, defines); auto type = metadata[Ids::type].toString(); @@ -387,9 +393,10 @@ Result PIPGenerator::setProjectSettings (ValueTree& jucerTree) else if (type == "AudioProcessor") { jucerTree.setProperty (Ids::projectType, "audioplug", nullptr); - jucerTree.setProperty (Ids::pluginManufacturer, metadata[Ids::vendor], nullptr); jucerTree.setProperty (Ids::pluginAUIsSandboxSafe, "1", nullptr); + setPropertyIfNotEmpty (Ids::pluginManufacturer, metadata[Ids::vendor]); + StringArray pluginFormatsToBuild (Ids::buildVST3.toString(), Ids::buildAU.toString(), Ids::buildStandalone.toString()); pluginFormatsToBuild.addArray (getExtraPluginFormatsToBuild()); @@ -425,10 +432,16 @@ String PIPGenerator::getMainFileTextForType() { String mainTemplate (BinaryData::jucer_PIPMain_cpp); - mainTemplate = mainTemplate.replace ("%%filename%%", useLocalCopy ? pipFile.getFileName() - : isTemp ? pipFile.getFullPathName() - : RelativePath (pipFile, outputDirectory.getChildFile ("Source"), - RelativePath::unknown).toUnixStyle()); + auto includeFilename = [&] + { + if (useLocalCopy) return pipFile.getFileName(); + if (isTemp) return pipFile.getFullPathName(); + + return RelativePath (pipFile, outputDirectory.getChildFile ("Source"), RelativePath::unknown).toUnixStyle(); + }(); + + mainTemplate = mainTemplate.replace ("%%filename%%", includeFilename) + .replace ("%%include_juce%%", CodeHelpers::createIncludePathIncludeStatement (Project::getJuceSourceHFilename())); auto type = metadata[Ids::type].toString(); @@ -525,8 +538,7 @@ StringArray PIPGenerator::getPluginCharacteristics() const Ids::pluginEditorRequiresKeys.toString() }; else if (name == "AUv3SynthPlugin" || name == "MultiOutSynthPlugin") return { Ids::pluginIsSynth.toString(), - Ids::pluginWantsMidiIn.toString(), - Ids::pluginIsSynth.toString() }; + Ids::pluginWantsMidiIn.toString() }; else if (name == "ArpeggiatorPlugin") return { Ids::pluginWantsMidiIn.toString(), Ids::pluginProducesMidiOut.toString(), diff --git a/extras/Projucer/Source/Utility/UI/PropertyComponents/jucer_FilePathPropertyComponent.h b/extras/Projucer/Source/Utility/UI/PropertyComponents/jucer_FilePathPropertyComponent.h index bda4a63a0a..7acd7ae451 100644 --- a/extras/Projucer/Source/Utility/UI/PropertyComponents/jucer_FilePathPropertyComponent.h +++ b/extras/Projucer/Source/Utility/UI/PropertyComponents/jucer_FilePathPropertyComponent.h @@ -87,7 +87,6 @@ public: void filesDropped (const StringArray& selectedFiles, int, int) override { - setTo (selectedFiles[0]); highlightForDragAndDrop = false; diff --git a/extras/Projucer/Source/Wizards/jucer_NewFileWizard.cpp b/extras/Projucer/Source/Wizards/jucer_NewFileWizard.cpp index 70a84940d7..831430036b 100644 --- a/extras/Projucer/Source/Wizards/jucer_NewFileWizard.cpp +++ b/extras/Projucer/Source/Wizards/jucer_NewFileWizard.cpp @@ -170,7 +170,7 @@ public: { auto content = fillInBasicTemplateFields (newFile, parent, templateName) .replace ("%%component_class%%", className) - .replace ("%%include_juce%%", CodeHelpers::createIncludeStatement (parent.project.getAppIncludeFile(), newFile)); + .replace ("%%include_juce%%", CodeHelpers::createIncludePathIncludeStatement (Project::getJuceSourceHFilename())); content = replaceLineFeeds (content, parent.project.getProjectLineFeed()); diff --git a/extras/Projucer/Source/Wizards/jucer_NewProjectWizardComponent.h b/extras/Projucer/Source/Wizards/jucer_NewProjectWizardComponent.h index 49c3042f31..8c83da3759 100644 --- a/extras/Projucer/Source/Wizards/jucer_NewProjectWizardComponent.h +++ b/extras/Projucer/Source/Wizards/jucer_NewProjectWizardComponent.h @@ -423,7 +423,10 @@ public: return; if (modulesPathBox.isUsingGlobalPaths) + { getAppSettings().getStoredPath (Ids::defaultJuceModulePath, TargetOS::getThisOS()).setValue (wizard->modulesFolder.getFullPathName(), nullptr); + ProjucerApplication::getApp().rescanJUCEPathModules(); + } } auto projectDir = fileBrowser.getSelectedFile (0); diff --git a/extras/Projucer/Source/Wizards/jucer_ProjectWizard_Animated.h b/extras/Projucer/Source/Wizards/jucer_ProjectWizard_Animated.h index 6988b26baf..5dbd0d388a 100644 --- a/extras/Projucer/Source/Wizards/jucer_ProjectWizard_Animated.h +++ b/extras/Projucer/Source/Wizards/jucer_ProjectWizard_Animated.h @@ -71,14 +71,13 @@ struct AnimatedAppWizard : public NewProjectWizard setExecutableNameForAllTargets (project, File::createLegalFileName (appTitle)); - String appHeaders (CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), mainCppFile)); + auto juceHeaderInclude = CodeHelpers::createIncludePathIncludeStatement (Project::getJuceSourceHFilename()); + auto appHeaders = juceHeaderInclude + newLine + CodeHelpers::createIncludeStatement (contentCompH, mainCppFile); // create main window - appHeaders << newLine << CodeHelpers::createIncludeStatement (contentCompH, mainCppFile); - String windowH = project.getFileTemplate (createCppFile ? "jucer_AnimatedComponentTemplate_h" : "jucer_AnimatedComponentSimpleTemplate_h") - .replace ("%%include_juce%%", CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), contentCompH), false) + .replace ("%%include_juce%%", juceHeaderInclude) .replace ("%%content_component_class%%", contentCompName, false); if (! FileHelpers::overwriteFileWithNewDataIfDifferent (contentCompH, windowH)) @@ -89,7 +88,7 @@ struct AnimatedAppWizard : public NewProjectWizard if (createCppFile) { String windowCpp = project.getFileTemplate ("jucer_AnimatedComponentTemplate_cpp") - .replace ("%%include_juce%%", CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), contentCompCpp), false) + .replace ("%%include_juce%%", juceHeaderInclude) .replace ("%%include_corresponding_header%%", CodeHelpers::createIncludeStatement (contentCompH, contentCompCpp), false) .replace ("%%content_component_class%%", contentCompName, false); diff --git a/extras/Projucer/Source/Wizards/jucer_ProjectWizard_AudioApp.h b/extras/Projucer/Source/Wizards/jucer_ProjectWizard_AudioApp.h index 80aa745f1d..45eed35783 100644 --- a/extras/Projucer/Source/Wizards/jucer_ProjectWizard_AudioApp.h +++ b/extras/Projucer/Source/Wizards/jucer_ProjectWizard_AudioApp.h @@ -71,14 +71,13 @@ struct AudioAppWizard : public NewProjectWizard setExecutableNameForAllTargets (project, File::createLegalFileName (appTitle)); - String appHeaders (CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), mainCppFile)); + auto juceHeaderInclude = CodeHelpers::createIncludePathIncludeStatement (Project::getJuceSourceHFilename()); + auto appHeaders = juceHeaderInclude + newLine + CodeHelpers::createIncludeStatement (contentCompH, mainCppFile); // create main window - appHeaders << newLine << CodeHelpers::createIncludeStatement (contentCompH, mainCppFile); - String windowH = project.getFileTemplate (createCppFile ? "jucer_AudioComponentTemplate_h" : "jucer_AudioComponentSimpleTemplate_h") - .replace ("%%include_juce%%", CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), contentCompH), false) + .replace ("%%include_juce%%", juceHeaderInclude) .replace ("%%content_component_class%%", contentCompName, false); if (! FileHelpers::overwriteFileWithNewDataIfDifferent (contentCompH, windowH)) @@ -89,7 +88,7 @@ struct AudioAppWizard : public NewProjectWizard if (createCppFile) { String windowCpp = project.getFileTemplate ("jucer_AudioComponentTemplate_cpp") - .replace ("%%include_juce%%", CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), contentCompCpp), false) + .replace ("%%include_juce%%", juceHeaderInclude) .replace ("%%include_corresponding_header%%", CodeHelpers::createIncludeStatement (contentCompH, contentCompCpp), false) .replace ("%%content_component_class%%", contentCompName, false); diff --git a/extras/Projucer/Source/Wizards/jucer_ProjectWizard_AudioPlugin.h b/extras/Projucer/Source/Wizards/jucer_ProjectWizard_AudioPlugin.h index b81d28744c..767efd83ad 100644 --- a/extras/Projucer/Source/Wizards/jucer_ProjectWizard_AudioPlugin.h +++ b/extras/Projucer/Source/Wizards/jucer_ProjectWizard_AudioPlugin.h @@ -62,7 +62,7 @@ struct AudioPluginAppWizard : public NewProjectWizard setExecutableNameForAllTargets (project, File::createLegalFileName (appTitle)); - String appHeaders (CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), filterCppFile)); + auto juceHeaderInclude = CodeHelpers::createIncludePathIncludeStatement (Project::getJuceSourceHFilename()); String filterCpp = project.getFileTemplate ("jucer_AudioPluginFilterTemplate_cpp") .replace ("%%filter_headers%%", CodeHelpers::createIncludeStatement (filterHFile, filterCppFile) @@ -71,7 +71,7 @@ struct AudioPluginAppWizard : public NewProjectWizard .replace ("%%editor_class_name%%", editorClassName, false); String filterH = project.getFileTemplate ("jucer_AudioPluginFilterTemplate_h") - .replace ("%%app_headers%%", appHeaders, false) + .replace ("%%app_headers%%", juceHeaderInclude, false) .replace ("%%filter_class_name%%", filterClassName, false); String editorCpp = project.getFileTemplate ("jucer_AudioPluginEditorTemplate_cpp") @@ -81,7 +81,7 @@ struct AudioPluginAppWizard : public NewProjectWizard .replace ("%%editor_class_name%%", editorClassName, false); String editorH = project.getFileTemplate ("jucer_AudioPluginEditorTemplate_h") - .replace ("%%editor_headers%%", appHeaders + newLine + CodeHelpers::createIncludeStatement (filterHFile, filterCppFile), false) + .replace ("%%editor_headers%%", juceHeaderInclude + newLine + CodeHelpers::createIncludeStatement (filterHFile, filterCppFile), false) .replace ("%%filter_class_name%%", filterClassName, false) .replace ("%%editor_class_name%%", editorClassName, false); diff --git a/extras/Projucer/Source/Wizards/jucer_ProjectWizard_Console.h b/extras/Projucer/Source/Wizards/jucer_ProjectWizard_Console.h index 277bd8b081..3aba175c8b 100644 --- a/extras/Projucer/Source/Wizards/jucer_ProjectWizard_Console.h +++ b/extras/Projucer/Source/Wizards/jucer_ProjectWizard_Console.h @@ -69,10 +69,9 @@ struct ConsoleAppWizard : public NewProjectWizard if (createMainCpp) { File mainCppFile = getSourceFilesFolder().getChildFile ("Main.cpp"); - String appHeaders (CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), mainCppFile)); String mainCpp = project.getFileTemplate ("jucer_MainConsoleAppTemplate_cpp") - .replace ("%%app_headers%%", appHeaders, false); + .replace ("%%app_headers%%", CodeHelpers::createIncludePathIncludeStatement (Project::getJuceSourceHFilename()), false); if (! FileHelpers::overwriteFileWithNewDataIfDifferent (mainCppFile, mainCpp)) failedFiles.add (mainCppFile.getFullPathName()); diff --git a/extras/Projucer/Source/Wizards/jucer_ProjectWizard_GUIApp.h b/extras/Projucer/Source/Wizards/jucer_ProjectWizard_GUIApp.h index 2f39be9a4c..710ae57627 100644 --- a/extras/Projucer/Source/Wizards/jucer_ProjectWizard_GUIApp.h +++ b/extras/Projucer/Source/Wizards/jucer_ProjectWizard_GUIApp.h @@ -75,7 +75,8 @@ struct GUIAppWizard : public NewProjectWizard setExecutableNameForAllTargets (project, File::createLegalFileName (appTitle)); - String appHeaders (CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), mainCppFile)); + auto juceHeaderInclude = CodeHelpers::createIncludePathIncludeStatement (Project::getJuceSourceHFilename()); + auto appHeaders = juceHeaderInclude; if (createWindow) { @@ -83,7 +84,7 @@ struct GUIAppWizard : public NewProjectWizard String windowH = project.getFileTemplate (createCppFile ? "jucer_ContentCompTemplate_h" : "jucer_ContentCompSimpleTemplate_h") - .replace ("%%include_juce%%", CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), contentCompH), false) + .replace ("%%include_juce%%", juceHeaderInclude) .replace ("%%content_component_class%%", contentCompName, false); if (! FileHelpers::overwriteFileWithNewDataIfDifferent (contentCompH, windowH)) @@ -94,7 +95,7 @@ struct GUIAppWizard : public NewProjectWizard if (createCppFile) { String windowCpp = project.getFileTemplate ("jucer_ContentCompTemplate_cpp") - .replace ("%%include_juce%%", CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), contentCompCpp), false) + .replace ("%%include_juce%%", juceHeaderInclude) .replace ("%%include_corresponding_header%%", CodeHelpers::createIncludeStatement (contentCompH, contentCompCpp), false) .replace ("%%content_component_class%%", contentCompName, false); diff --git a/extras/Projucer/Source/Wizards/jucer_ProjectWizard_openGL.h b/extras/Projucer/Source/Wizards/jucer_ProjectWizard_openGL.h index 44dee4c0fa..29b092b223 100644 --- a/extras/Projucer/Source/Wizards/jucer_ProjectWizard_openGL.h +++ b/extras/Projucer/Source/Wizards/jucer_ProjectWizard_openGL.h @@ -71,14 +71,13 @@ struct OpenGLAppWizard : public NewProjectWizard setExecutableNameForAllTargets (project, File::createLegalFileName (appTitle)); - String appHeaders (CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), mainCppFile)); + auto juceHeaderInclude = CodeHelpers::createIncludePathIncludeStatement (Project::getJuceSourceHFilename()); + auto appHeaders = juceHeaderInclude + newLine + CodeHelpers::createIncludeStatement (contentCompH, mainCppFile); // create main window - appHeaders << newLine << CodeHelpers::createIncludeStatement (contentCompH, mainCppFile); - String windowH = project.getFileTemplate (createCppFile ? "jucer_OpenGLComponentTemplate_h" : "jucer_OpenGLComponentSimpleTemplate_h") - .replace ("%%include_juce%%", CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), contentCompH), false) + .replace ("%%include_juce%%", juceHeaderInclude) .replace ("%%content_component_class%%", contentCompName, false); if (! FileHelpers::overwriteFileWithNewDataIfDifferent (contentCompH, windowH)) @@ -89,7 +88,7 @@ struct OpenGLAppWizard : public NewProjectWizard if (createCppFile) { String windowCpp = project.getFileTemplate ("jucer_OpenGLComponentTemplate_cpp") - .replace ("%%include_juce%%", CodeHelpers::createIncludeStatement (project.getAppIncludeFile(), contentCompCpp), false) + .replace ("%%include_juce%%", juceHeaderInclude) .replace ("%%include_corresponding_header%%", CodeHelpers::createIncludeStatement (contentCompH, contentCompCpp), false) .replace ("%%content_component_class%%", contentCompName, false); diff --git a/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile b/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile index 7030e0c713..835dafce5c 100644 --- a/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile +++ b/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile @@ -32,7 +32,7 @@ ifeq ($(CONFIG),Debug) JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) - TARGET_ARCH := -march=native + TARGET_ARCH := endif JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) @@ -41,7 +41,7 @@ ifeq ($(CONFIG),Debug) JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS) JUCE_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 x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -lrt -ldl -lpthread -lGL $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif @@ -53,7 +53,7 @@ ifeq ($(CONFIG),Release) JUCE_OUTDIR := build ifeq ($(TARGET_ARCH),) - TARGET_ARCH := -march=native + TARGET_ARCH := endif JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCE_UNIT_TESTS=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) @@ -62,7 +62,7 @@ ifeq ($(CONFIG),Release) JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 $(CFLAGS) JUCE_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 x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS) + JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS) CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) endif diff --git a/extras/UnitTestRunner/Builds/MacOSX/ConsoleApp.entitlements b/extras/UnitTestRunner/Builds/MacOSX/ConsoleApp.entitlements deleted file mode 100644 index 6631ffa6f2..0000000000 --- a/extras/UnitTestRunner/Builds/MacOSX/ConsoleApp.entitlements +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj b/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj index 682a789408..f3a25509a7 100644 --- a/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj +++ b/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj @@ -195,13 +195,6 @@ path = "../../JuceLibraryCode/include_juce_video.mm"; sourceTree = "SOURCE_ROOT"; }; - 11416532EEB177F4EFE69AF4 = { - isa = PBXFileReference; - lastKnownFileType = text.plist.xml; - name = ConsoleApp.entitlements; - path = ConsoleApp.entitlements; - sourceTree = "SOURCE_ROOT"; - }; 1932D54A7FAE13BADBA3E9B5 = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; @@ -723,7 +716,7 @@ ); INSTALL_PATH = "/usr/bin"; MACOSX_DEPLOYMENT_TARGET = 10.10; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.UnitTestRunner; PRODUCT_NAME = "UnitTestRunner"; USE_HEADERMAP = NO; @@ -758,7 +751,6 @@ "JucePlugin_Build_Standalone=0", "JucePlugin_Build_Unity=0", ); - GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( "../../JuceLibraryCode", @@ -768,7 +760,7 @@ INSTALL_PATH = "/usr/bin"; LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.10; - OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers"; + OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum"; PRODUCT_BUNDLE_IDENTIFIER = com.roli.UnitTestRunner; PRODUCT_NAME = "UnitTestRunner"; USE_HEADERMAP = NO; @@ -800,11 +792,12 @@ CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; @@ -848,10 +841,12 @@ CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = NO; GCC_C_LANGUAGE_STANDARD = c11; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; diff --git a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj index 6af4475be3..a13eb9c96a 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj +++ b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj @@ -821,9 +821,6 @@ true - - true - true @@ -1148,6 +1145,9 @@ true + + true + true @@ -2157,6 +2157,7 @@ + @@ -2446,7 +2447,6 @@ - diff --git a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters index 264aba3ab4..4af3605098 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters +++ b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters @@ -1204,9 +1204,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -1555,6 +1552,9 @@ JUCE Modules\juce_dsp\processors + + JUCE Modules\juce_dsp\processors + JUCE Modules\juce_dsp @@ -2778,6 +2778,9 @@ JUCE Modules\juce_audio_devices\midi_io + + JUCE Modules\juce_audio_devices\native + JUCE Modules\juce_audio_devices\native @@ -3645,9 +3648,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/extras/UnitTestRunner/Builds/VisualStudio2017/resources.rc b/extras/UnitTestRunner/Builds/VisualStudio2017/resources.rc index 3874e39ce9..a85b3f7a74 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2017/resources.rc +++ b/extras/UnitTestRunner/Builds/VisualStudio2017/resources.rc @@ -1,3 +1,5 @@ +#pragma code_page(65001) + #ifdef JUCE_USER_DEFINED_RC_FILE #include JUCE_USER_DEFINED_RC_FILE #else diff --git a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj index 0b5ab61b5f..d88e4e10d8 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj +++ b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj @@ -821,9 +821,6 @@ true - - true - true @@ -1148,6 +1145,9 @@ true + + true + true @@ -2157,6 +2157,7 @@ + @@ -2446,7 +2447,6 @@ - diff --git a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters index df8438a86e..10d0c722e8 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters +++ b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters @@ -1204,9 +1204,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -1555,6 +1552,9 @@ JUCE Modules\juce_dsp\processors + + JUCE Modules\juce_dsp\processors + JUCE Modules\juce_dsp @@ -2778,6 +2778,9 @@ JUCE Modules\juce_audio_devices\midi_io + + JUCE Modules\juce_audio_devices\native + JUCE Modules\juce_audio_devices\native @@ -3645,9 +3648,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/extras/UnitTestRunner/Builds/VisualStudio2019/resources.rc b/extras/UnitTestRunner/Builds/VisualStudio2019/resources.rc index 3874e39ce9..a85b3f7a74 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2019/resources.rc +++ b/extras/UnitTestRunner/Builds/VisualStudio2019/resources.rc @@ -1,3 +1,5 @@ +#pragma code_page(65001) + #ifdef JUCE_USER_DEFINED_RC_FILE #include JUCE_USER_DEFINED_RC_FILE #else diff --git a/extras/UnitTestRunner/JuceLibraryCode/AppConfig.h b/extras/UnitTestRunner/JuceLibraryCode/AppConfig.h index 4391f9a02f..db8b0ac3f1 100644 --- a/extras/UnitTestRunner/JuceLibraryCode/AppConfig.h +++ b/extras/UnitTestRunner/JuceLibraryCode/AppConfig.h @@ -47,7 +47,7 @@ #define JUCE_USE_DARK_SPLASH_SCREEN 1 -#define JUCE_PROJUCER_VERSION 0x50405 +#define JUCE_PROJUCER_VERSION 0x50407 //============================================================================== #define JUCE_MODULE_AVAILABLE_juce_analytics 1 diff --git a/extras/UnitTestRunner/Source/Main.cpp b/extras/UnitTestRunner/Source/Main.cpp index 47ebd68281..3c9a56ad44 100644 --- a/extras/UnitTestRunner/Source/Main.cpp +++ b/extras/UnitTestRunner/Source/Main.cpp @@ -24,7 +24,7 @@ ============================================================================== */ -#include "../JuceLibraryCode/JuceHeader.h" +#include //============================================================================== class ConsoleLogger : public Logger diff --git a/extras/UnitTestRunner/UnitTestRunner.jucer b/extras/UnitTestRunner/UnitTestRunner.jucer index 6cbcabaa96..95c774e212 100644 --- a/extras/UnitTestRunner/UnitTestRunner.jucer +++ b/extras/UnitTestRunner/UnitTestRunner.jucer @@ -1,7 +1,7 @@ @@ -40,8 +40,8 @@ - - + + diff --git a/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj b/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj index e4316edfa9..60566b10c0 100644 --- a/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj +++ b/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj @@ -750,9 +750,6 @@ true - - true - true @@ -1965,6 +1962,7 @@ + @@ -2229,7 +2227,6 @@ - diff --git a/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj.filters b/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj.filters index 0eb6401297..659f396597 100644 --- a/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj.filters +++ b/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj.filters @@ -1060,9 +1060,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc @@ -2487,6 +2484,9 @@ JUCE Modules\juce_audio_devices\midi_io + + JUCE Modules\juce_audio_devices\native + JUCE Modules\juce_audio_devices\native @@ -3279,9 +3279,6 @@ JUCE Modules\juce_core\misc - - JUCE Modules\juce_core\misc - JUCE Modules\juce_core\misc diff --git a/extras/WindowsDLL/JuceLibraryCode/AppConfig.h b/extras/WindowsDLL/JuceLibraryCode/AppConfig.h index b5fc6a5fa9..fee59eb7ab 100644 --- a/extras/WindowsDLL/JuceLibraryCode/AppConfig.h +++ b/extras/WindowsDLL/JuceLibraryCode/AppConfig.h @@ -47,7 +47,7 @@ #define JUCE_USE_DARK_SPLASH_SCREEN 1 -#define JUCE_PROJUCER_VERSION 0x50405 +#define JUCE_PROJUCER_VERSION 0x50407 //============================================================================== #define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 diff --git a/extras/WindowsDLL/WindowsDLL.jucer b/extras/WindowsDLL/WindowsDLL.jucer index d713ca99bc..228a9bc6d5 100644 --- a/extras/WindowsDLL/WindowsDLL.jucer +++ b/extras/WindowsDLL/WindowsDLL.jucer @@ -1,7 +1,7 @@ diff --git a/modules/juce_analytics/juce_analytics.h b/modules/juce_analytics/juce_analytics.h index 0bf9255ed6..36828075a0 100644 --- a/modules/juce_analytics/juce_analytics.h +++ b/modules/juce_analytics/juce_analytics.h @@ -24,6 +24,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -33,15 +34,15 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_analytics - vendor: juce - version: 5.4.5 - name: JUCE analytics classes - description: Classes to collect analytics and send to destinations - website: http://www.juce.com/juce - license: GPL/Commercial + ID: juce_analytics + vendor: juce + version: 5.4.7 + name: JUCE analytics classes + description: Classes to collect analytics and send to destinations + website: http://www.juce.com/juce + license: GPL/Commercial - dependencies: juce_gui_basics + dependencies: juce_gui_basics END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp index 40ba299231..dd5302068c 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp +++ b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp @@ -87,15 +87,38 @@ String AudioChannelSet::getChannelTypeName (AudioChannelSet::ChannelType type) case ambisonicACN13: return NEEDS_TRANS("Ambisonic 13"); case ambisonicACN14: return NEEDS_TRANS("Ambisonic 14"); case ambisonicACN15: return NEEDS_TRANS("Ambisonic 15"); + case ambisonicACN16: return NEEDS_TRANS("Ambisonic 16"); + case ambisonicACN17: return NEEDS_TRANS("Ambisonic 17"); + case ambisonicACN18: return NEEDS_TRANS("Ambisonic 18"); + case ambisonicACN19: return NEEDS_TRANS("Ambisonic 19"); + case ambisonicACN20: return NEEDS_TRANS("Ambisonic 20"); + case ambisonicACN21: return NEEDS_TRANS("Ambisonic 21"); + case ambisonicACN22: return NEEDS_TRANS("Ambisonic 22"); + case ambisonicACN23: return NEEDS_TRANS("Ambisonic 23"); + case ambisonicACN24: return NEEDS_TRANS("Ambisonic 24"); + case ambisonicACN25: return NEEDS_TRANS("Ambisonic 25"); + case ambisonicACN26: return NEEDS_TRANS("Ambisonic 26"); + case ambisonicACN27: return NEEDS_TRANS("Ambisonic 27"); + case ambisonicACN28: return NEEDS_TRANS("Ambisonic 28"); + case ambisonicACN29: return NEEDS_TRANS("Ambisonic 29"); + case ambisonicACN30: return NEEDS_TRANS("Ambisonic 30"); + case ambisonicACN31: return NEEDS_TRANS("Ambisonic 31"); + case ambisonicACN32: return NEEDS_TRANS("Ambisonic 32"); + case ambisonicACN33: return NEEDS_TRANS("Ambisonic 33"); + case ambisonicACN34: return NEEDS_TRANS("Ambisonic 34"); + case ambisonicACN35: return NEEDS_TRANS("Ambisonic 35"); case bottomFrontLeft: return NEEDS_TRANS("Bottom Front Left"); case bottomFrontCentre: return NEEDS_TRANS("Bottom Front Centre"); case bottomFrontRight: return NEEDS_TRANS("Bottom Front Right"); + case proximityLeft: return NEEDS_TRANS("Proximity Left"); + case proximityRight: return NEEDS_TRANS("Proximity Right"); case bottomSideLeft: return NEEDS_TRANS("Bottom Side Left"); case bottomSideRight: return NEEDS_TRANS("Bottom Side Right"); case bottomRearLeft: return NEEDS_TRANS("Bottom Rear Left"); case bottomRearCentre: return NEEDS_TRANS("Bottom Rear Centre"); case bottomRearRight: return NEEDS_TRANS("Bottom Rear Right"); - case discreteChannel0: return NEEDS_TRANS("Discrete channel"); + case discreteChannel0: + case unknown: default: break; } @@ -148,16 +171,40 @@ String AudioChannelSet::getAbbreviatedChannelTypeName (AudioChannelSet::ChannelT case ambisonicACN13: return "ACN13"; case ambisonicACN14: return "ACN14"; case ambisonicACN15: return "ACN15"; + case ambisonicACN16: return "ACN16"; + case ambisonicACN17: return "ACN17"; + case ambisonicACN18: return "ACN18"; + case ambisonicACN19: return "ACN19"; + case ambisonicACN20: return "ACN20"; + case ambisonicACN21: return "ACN21"; + case ambisonicACN22: return "ACN22"; + case ambisonicACN23: return "ACN23"; + case ambisonicACN24: return "ACN24"; + case ambisonicACN25: return "ACN25"; + case ambisonicACN26: return "ACN26"; + case ambisonicACN27: return "ACN27"; + case ambisonicACN28: return "ACN28"; + case ambisonicACN29: return "ACN29"; + case ambisonicACN30: return "ACN30"; + case ambisonicACN31: return "ACN31"; + case ambisonicACN32: return "ACN32"; + case ambisonicACN33: return "ACN33"; + case ambisonicACN34: return "ACN34"; + case ambisonicACN35: return "ACN35"; case topSideLeft: return "Tsl"; case topSideRight: return "Tsr"; case bottomFrontLeft: return "Bfl"; case bottomFrontCentre: return "Bfc"; case bottomFrontRight: return "Bfr"; + case proximityLeft: return "Pl"; + case proximityRight: return "Pr"; case bottomSideLeft: return "Bsl"; case bottomSideRight: return "Bsr"; case bottomRearLeft: return "Brl"; case bottomRearCentre: return "Brc"; case bottomRearRight: return "Brr"; + case discreteChannel0: + case unknown: default: break; } @@ -216,6 +263,26 @@ AudioChannelSet::ChannelType AudioChannelSet::getChannelTypeFromAbbreviation (co if (abbr == "ACN13") return ambisonicACN13; if (abbr == "ACN14") return ambisonicACN14; if (abbr == "ACN15") return ambisonicACN15; + if (abbr == "ACN16") return ambisonicACN16; + if (abbr == "ACN17") return ambisonicACN17; + if (abbr == "ACN18") return ambisonicACN18; + if (abbr == "ACN19") return ambisonicACN19; + if (abbr == "ACN20") return ambisonicACN20; + if (abbr == "ACN21") return ambisonicACN21; + if (abbr == "ACN22") return ambisonicACN22; + if (abbr == "ACN23") return ambisonicACN23; + if (abbr == "ACN24") return ambisonicACN24; + if (abbr == "ACN25") return ambisonicACN25; + if (abbr == "ACN26") return ambisonicACN26; + if (abbr == "ACN27") return ambisonicACN27; + if (abbr == "ACN28") return ambisonicACN28; + if (abbr == "ACN29") return ambisonicACN29; + if (abbr == "ACN30") return ambisonicACN30; + if (abbr == "ACN31") return ambisonicACN31; + if (abbr == "ACN32") return ambisonicACN32; + if (abbr == "ACN33") return ambisonicACN33; + if (abbr == "ACN34") return ambisonicACN34; + if (abbr == "ACN35") return ambisonicACN35; if (abbr == "Tsl") return topSideLeft; if (abbr == "Tsr") return topSideRight; if (abbr == "Bfl") return bottomFrontLeft; diff --git a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.h b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.h index e9985a18fa..850a963bbb 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.h +++ b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.h @@ -369,7 +369,7 @@ public: bottomFrontCentre = 63, /**< Bottom Front Centre (Bfc) */ bottomFrontRight = 64, /**< Bottom Front Right (Bfr) */ - proxymityLeft = 65, /**< Proximity Left (Pl) */ + proximityLeft = 65, /**< Proximity Left (Pl) */ proximityRight = 66, /**< Proximity Right (Pr) */ bottomSideLeft = 67, /**< Bottom Side Left (Bsl) */ diff --git a/modules/juce_audio_basics/buffers/juce_AudioProcessLoadMeasurer.cpp b/modules/juce_audio_basics/buffers/juce_AudioProcessLoadMeasurer.cpp index 1795949351..46315a7247 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioProcessLoadMeasurer.cpp +++ b/modules/juce_audio_basics/buffers/juce_AudioProcessLoadMeasurer.cpp @@ -7,15 +7,11 @@ 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). + 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 diff --git a/modules/juce_audio_basics/buffers/juce_AudioProcessLoadMeasurer.h b/modules/juce_audio_basics/buffers/juce_AudioProcessLoadMeasurer.h index 53a3377cb1..3624816964 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioProcessLoadMeasurer.h +++ b/modules/juce_audio_basics/buffers/juce_AudioProcessLoadMeasurer.h @@ -7,15 +7,11 @@ 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). + 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 @@ -31,6 +27,8 @@ namespace juce /** Maintains an ongoing measurement of the proportion of time which is being spent inside an audio callback. + + @tags{Audio} */ class JUCE_API AudioProcessLoadMeasurer { @@ -68,6 +66,8 @@ public: myCallback->doTheCallback(); } @endcode + + @tags{Audio} */ struct JUCE_API ScopedTimer { diff --git a/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h b/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h index f4ab1df073..67e6888908 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h +++ b/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h @@ -23,6 +23,53 @@ namespace juce { +#ifndef DOXYGEN +/** The contents of this namespace are used to implement AudioBuffer and should + not be used elsewhere. Their interfaces (and existence) are liable to change! +*/ +namespace detail +{ + /** On iOS/arm7 the alignment of `double` is greater than the alignment of + `std::max_align_t`, so we can't trust max_align_t. Instead, we query + lots of primitive types and use the maximum alignment of all of them. + + We're putting this stuff outside AudioBuffer itself to avoid creating + unnecessary copies for each distinct template instantiation of + AudioBuffer. + + MSVC 2015 doesn't like when we write getMaxAlignment as a loop which + accumulates the max alignment (declarations not allowed in constexpr + function body) so instead we use this recursive version which + instantiates a zillion templates. + */ + + template struct Type {}; + + constexpr size_t getMaxAlignment() noexcept { return 0; } + + template + constexpr size_t getMaxAlignment (Type, Type... tail) noexcept + { + return jmax (alignof (Head), getMaxAlignment (tail...)); + } + + constexpr size_t maxAlignment = getMaxAlignment (Type{}, + Type{}, + Type{}, + Type{}, + Type{}, + Type{}, + Type{}, + Type{}, + Type{}, + Type{}, + Type{}, + Type{}, + Type{}, + Type{}); +} // namespace detail +#endif + //============================================================================== /** A multi-channel buffer containing floating point audio samples. @@ -1075,8 +1122,10 @@ private: void allocateData() { - static_assert (std::alignment_of::value <= std::alignment_of::value, + #if (! JUCE_GCC) || (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 + static_assert (alignof (Type) <= detail::maxAlignment, "AudioBuffer cannot hold types with alignment requirements larger than that guaranteed by malloc"); + #endif jassert (size >= 0); auto channelListSize = (size_t) (numChannels + 1) * sizeof (Type*); diff --git a/modules/juce_audio_basics/juce_audio_basics.h b/modules/juce_audio_basics/juce_audio_basics.h index 83a108310e..93fd4c6510 100644 --- a/modules/juce_audio_basics/juce_audio_basics.h +++ b/modules/juce_audio_basics/juce_audio_basics.h @@ -20,6 +20,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -29,17 +30,17 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_audio_basics - vendor: juce - version: 5.4.5 - name: JUCE audio and MIDI data classes - description: Classes for audio buffer manipulation, midi message handling, synthesis, etc. - website: http://www.juce.com/juce - license: ISC + ID: juce_audio_basics + vendor: juce + version: 5.4.7 + name: JUCE audio and MIDI data classes + description: Classes for audio buffer manipulation, midi message handling, synthesis, etc. + website: http://www.juce.com/juce + license: ISC - dependencies: juce_core - OSXFrameworks: Accelerate - iOSFrameworks: Accelerate + dependencies: juce_core + OSXFrameworks: Accelerate + iOSFrameworks: Accelerate END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_audio_basics/midi/juce_MidiKeyboardState.cpp b/modules/juce_audio_basics/midi/juce_MidiKeyboardState.cpp index 68b8db06be..d027624dbc 100644 --- a/modules/juce_audio_basics/midi/juce_MidiKeyboardState.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiKeyboardState.cpp @@ -75,7 +75,7 @@ void MidiKeyboardState::noteOnInternal (const int midiChannel, const int midiNo { if (isPositiveAndBelow (midiNoteNumber, 128)) { - noteStates [midiNoteNumber] |= (1 << (midiChannel - 1)); + noteStates[midiNoteNumber] = static_cast (noteStates[midiNoteNumber] | (1 << (midiChannel - 1))); for (int i = listeners.size(); --i >= 0;) listeners.getUnchecked(i)->handleNoteOn (this, midiChannel, midiNoteNumber, velocity); @@ -100,7 +100,7 @@ void MidiKeyboardState::noteOffInternal (const int midiChannel, const int midiN { if (isNoteOn (midiChannel, midiNoteNumber)) { - noteStates [midiNoteNumber] &= ~(1 << (midiChannel - 1)); + noteStates[midiNoteNumber] = static_cast (noteStates[midiNoteNumber] & ~(1 << (midiChannel - 1))); for (int i = listeners.size(); --i >= 0;) listeners.getUnchecked(i)->handleNoteOff (this, midiChannel, midiNoteNumber, velocity); diff --git a/modules/juce_audio_basics/midi/juce_MidiKeyboardState.h b/modules/juce_audio_basics/midi/juce_MidiKeyboardState.h index 47aaf6923c..96c5b65488 100644 --- a/modules/juce_audio_basics/midi/juce_MidiKeyboardState.h +++ b/modules/juce_audio_basics/midi/juce_MidiKeyboardState.h @@ -193,7 +193,7 @@ public: private: //============================================================================== CriticalSection lock; - uint16 noteStates [128]; + uint16 noteStates[128]; MidiBuffer eventsToAdd; Array listeners; diff --git a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp index df2e4660f3..24eb3a0619 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp @@ -336,8 +336,8 @@ void MPEInstrument::noteOff (int midiChannel, note->keyState = (note->keyState == MPENote::keyDownAndSustained) ? MPENote::sustained : MPENote::off; note->noteOffVelocity = midiNoteOffVelocity; - // If no more notes are playing on this channel, reset the dimension values - if (getLastNotePlayedPtr (midiChannel) == nullptr) + // If no more notes are playing on this channel in mpe mode, reset the dimension values + if (! legacyMode.isEnabled && getLastNotePlayedPtr (midiChannel) == nullptr) { pressureDimension.lastValueReceivedOnChannel[midiChannel - 1] = MPEValue::minValue(); pitchbendDimension.lastValueReceivedOnChannel[midiChannel - 1] = MPEValue::centreValue(); @@ -395,7 +395,7 @@ void MPEInstrument::polyAftertouch (int midiChannel, int midiNoteNumber, MPEValu MPEValue MPEInstrument::getInitialValueForNewNote (int midiChannel, MPEDimension& dimension) const { - if (getLastNotePlayedPtr (midiChannel) != nullptr) + if (! legacyMode.isEnabled && getLastNotePlayedPtr (midiChannel) != nullptr) return &dimension == &pressureDimension ? MPEValue::minValue() : MPEValue::centreValue(); return dimension.lastValueReceivedOnChannel[midiChannel - 1]; @@ -497,11 +497,13 @@ void MPEInstrument::updateNoteTotalPitchbend (MPENote& note) { auto zone = zoneLayout.getLowerZone(); - if (! zone.isUsing (note.midiChannel)) + if (! zone.isActive() || ! zone.isUsing (note.midiChannel)) { - if (zoneLayout.getUpperZone().isUsing (note.midiChannel)) + auto upperZone = zoneLayout.getUpperZone(); + + if (upperZone.isActive() && upperZone.isUsing (note.midiChannel)) { - zone = zoneLayout.getUpperZone(); + zone = upperZone; } else { @@ -576,11 +578,9 @@ void MPEInstrument::handleSustainOrSostenuto (int midiChannel, bool isDown, bool if (! isSostenuto) { - if (legacyMode.isEnabled) - { - isMemberChannelSustained[midiChannel - 1] = isDown; - } - else + isMemberChannelSustained[midiChannel - 1] = isDown; + + if (! legacyMode.isEnabled) { if (zone.isLowerZone()) for (auto i = zone.getFirstMemberChannel(); i <= zone.getLastMemberChannel(); ++i) diff --git a/modules/juce_audio_basics/utilities/juce_ADSR.h b/modules/juce_audio_basics/utilities/juce_ADSR.h index 23d7aed78e..8f50ceefda 100644 --- a/modules/juce_audio_basics/utilities/juce_ADSR.h +++ b/modules/juce_audio_basics/utilities/juce_ADSR.h @@ -30,6 +30,8 @@ namespace juce To use it, call setSampleRate() with the current sample rate and give it some parameters with setParameters() then call getNextSample() to get the envelope value to be applied to each audio sample or applyEnvelopeToBuffer() to apply the envelope to a whole buffer. + + @tags{Audio} */ class ADSR { @@ -42,7 +44,11 @@ public: } //============================================================================== - /** Holds the parameters being used by an ADSR object. */ + /** + Holds the parameters being used by an ADSR object. + + @tags{Audio} + */ struct Parameters { /** Attack time in seconds. */ diff --git a/modules/juce_audio_basics/utilities/juce_SmoothedValue.h b/modules/juce_audio_basics/utilities/juce_SmoothedValue.h index ac6073e3d8..a472fb00c2 100644 --- a/modules/juce_audio_basics/utilities/juce_SmoothedValue.h +++ b/modules/juce_audio_basics/utilities/juce_SmoothedValue.h @@ -179,10 +179,18 @@ protected: */ namespace ValueSmoothingTypes { - /** Used to indicate a linear smoothing between values. */ + /** + Used to indicate a linear smoothing between values. + + @tags{Audio} + */ struct Linear {}; - /** Used to indicate a smoothing between multiplicative values. */ + /** + Used to indicate a smoothing between multiplicative values. + + @tags{Audio} + */ struct Multiplicative {}; } diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp index 7c8625c567..823a1b209b 100644 --- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp +++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp @@ -124,18 +124,29 @@ void AudioDeviceManager::audioDeviceListChanged() { if (currentAudioDevice != nullptr) { - auto isCurrentDeviceStillAvailable = [&] + auto currentDeviceStillAvailable = [&] { - for (auto* dt : availableDeviceTypes) - if (currentAudioDevice->getTypeName() == dt->getTypeName()) - for (auto& dn : dt->getDeviceNames()) - if (currentAudioDevice->getName() == dn) + auto currentTypeName = currentAudioDevice->getTypeName(); + auto currentDeviceName = currentAudioDevice->getName(); + + for (auto* deviceType : availableDeviceTypes) + { + if (currentTypeName == deviceType->getTypeName()) + { + for (auto& deviceName : deviceType->getDeviceNames (true)) + if (currentDeviceName == deviceName) return true; - return false; - }; + for (auto& deviceName : deviceType->getDeviceNames (false)) + if (currentDeviceName == deviceName) + return true; + } + } - if (! isCurrentDeviceStillAvailable()) + return false; + }(); + + if (! currentDeviceStillAvailable) { closeAudioDevice(); diff --git a/modules/juce_audio_devices/juce_audio_devices.cpp b/modules/juce_audio_devices/juce_audio_devices.cpp index a7f816e979..6c79d2c7f0 100644 --- a/modules/juce_audio_devices/juce_audio_devices.cpp +++ b/modules/juce_audio_devices/juce_audio_devices.cpp @@ -169,7 +169,10 @@ #error "Oboe cannot be enabled at the same time as openSL! Please disable JUCE_USE_ANDROID_OPENSLES" #endif - #include + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wunused-parameter" + #include + #pragma clang diagnostic pop #endif #endif @@ -231,13 +234,18 @@ #include "native/juce_android_Audio.cpp" #include "native/juce_android_Midi.cpp" - #if JUCE_USE_ANDROID_OPENSLES - #include "native/juce_android_OpenSL.cpp" + #if JUCE_USE_ANDROID_OPENSLES || JUCE_USE_ANDROID_OBOE + #include "native/juce_android_HighPerformanceAudioHelpers.h" + + #if JUCE_USE_ANDROID_OPENSLES + #include "native/juce_android_OpenSL.cpp" + #endif + + #if JUCE_USE_ANDROID_OBOE + #include "native/juce_android_Oboe.cpp" + #endif #endif - #if JUCE_USE_ANDROID_OBOE - #include "native/juce_android_Oboe.cpp" - #endif #endif #if ! JUCE_SYSTEMAUDIOVOL_IMPLEMENTED diff --git a/modules/juce_audio_devices/juce_audio_devices.h b/modules/juce_audio_devices/juce_audio_devices.h index 6117412923..1209d3c85a 100644 --- a/modules/juce_audio_devices/juce_audio_devices.h +++ b/modules/juce_audio_devices/juce_audio_devices.h @@ -20,6 +20,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -29,19 +30,19 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_audio_devices - vendor: juce - version: 5.4.5 - 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 - license: ISC + ID: juce_audio_devices + vendor: juce + version: 5.4.7 + 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 + license: ISC - dependencies: juce_audio_basics, juce_events - OSXFrameworks: CoreAudio CoreMIDI AudioToolbox - iOSFrameworks: CoreAudio CoreMIDI AudioToolbox AVFoundation - linuxPackages: alsa - mingwLibs: winmm + dependencies: juce_audio_basics, juce_events + OSXFrameworks: CoreAudio CoreMIDI AudioToolbox + iOSFrameworks: CoreAudio CoreMIDI AudioToolbox AVFoundation + linuxPackages: alsa + mingwLibs: winmm END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_audio_devices/midi_io/juce_MidiDevices.h b/modules/juce_audio_devices/midi_io/juce_MidiDevices.h index eb9d7eaf88..054a376ab0 100644 --- a/modules/juce_audio_devices/midi_io/juce_MidiDevices.h +++ b/modules/juce_audio_devices/midi_io/juce_MidiDevices.h @@ -30,6 +30,8 @@ namespace juce getDefaultDevice() methods of MidiInput and MidiOutput or by calling getDeviceInfo() on an instance of these classes. Devices can be opened by passing the identifier to the openDevice() method. + + @tags{Audio} */ struct MidiDeviceInfo { diff --git a/modules/juce_audio_devices/native/java/app/com/roli/juce/JuceMidiSupport.java b/modules/juce_audio_devices/native/java/app/com/roli/juce/JuceMidiSupport.java index 713f3350f9..39a756419c 100644 --- a/modules/juce_audio_devices/native/java/app/com/roli/juce/JuceMidiSupport.java +++ b/modules/juce_audio_devices/native/java/app/com/roli/juce/JuceMidiSupport.java @@ -1,3 +1,25 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; diff --git a/modules/juce_audio_devices/native/juce_android_HighPerformanceAudioHelpers.h b/modules/juce_audio_devices/native/juce_android_HighPerformanceAudioHelpers.h new file mode 100644 index 0000000000..adc29ca6f4 --- /dev/null +++ b/modules/juce_audio_devices/native/juce_android_HighPerformanceAudioHelpers.h @@ -0,0 +1,132 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + +namespace juce +{ + +//============================================================================== +/** + Some shared helpers methods for using the high-performance audio paths on + Android devices (OpenSL and Oboe). + + @tags{Audio} +*/ +namespace AndroidHighPerformanceAudioHelpers +{ + //============================================================================== + static double getNativeSampleRate() + { + return audioManagerGetProperty ("android.media.property.OUTPUT_SAMPLE_RATE").getDoubleValue(); + } + + static int getNativeBufferSize() + { + auto deviceBufferSize = audioManagerGetProperty ("android.media.property.OUTPUT_FRAMES_PER_BUFFER").getIntValue(); + + if (deviceBufferSize == 0) + return 192; + + return deviceBufferSize; + } + + static bool isProAudioDevice() + { + static bool isSapaSupported = SystemStats::getDeviceManufacturer().containsIgnoreCase ("SAMSUNG") + && DynamicLibrary().open ("libapa_jni.so"); + + return androidHasSystemFeature ("android.hardware.audio.pro") || isSapaSupported; + } + + static bool hasLowLatencyAudioPath() + { + return androidHasSystemFeature ("android.hardware.audio.low_latency"); + } + + static bool canUseHighPerformanceAudioPath (int requestedBufferSize, int requestedSampleRate) + { + return ((requestedBufferSize % getNativeBufferSize()) == 0) + && (requestedSampleRate == getNativeSampleRate()) + && isProAudioDevice(); + } + + //============================================================================== + static int getMinimumBuffersToEnqueue (double requestedSampleRate) + { + if (canUseHighPerformanceAudioPath (getNativeBufferSize(), (int) requestedSampleRate)) + { + // see https://developer.android.com/ndk/guides/audio/opensl/opensl-prog-notes.html#sandp + // "For Android 4.2 (API level 17) and earlier, a buffer count of two or more is required + // for lower latency. Beginning with Android 4.3 (API level 18), a buffer count of one + // is sufficient for lower latency." + return (getAndroidSDKVersion() >= 18 ? 1 : 2); + } + + // not using low-latency path so we can use the absolute minimum number of buffers to queue + return 1; + } + + static int buffersToQueueForBufferDuration (int bufferDurationInMs, double sampleRate) noexcept + { + auto maxBufferFrames = static_cast (std::ceil (bufferDurationInMs * sampleRate / 1000.0)); + auto maxNumBuffers = static_cast (std::ceil (static_cast (maxBufferFrames) + / static_cast (getNativeBufferSize()))); + + return jmax (getMinimumBuffersToEnqueue (sampleRate), maxNumBuffers); + } + + static int getMaximumBuffersToEnqueue (double maximumSampleRate) noexcept + { + static constexpr int maxBufferSizeMs = 200; + + return jmax (8, buffersToQueueForBufferDuration (maxBufferSizeMs, maximumSampleRate)); + } + + static Array getAvailableBufferSizes (Array availableSampleRates) + { + auto nativeBufferSize = getNativeBufferSize(); + + auto minBuffersToQueue = getMinimumBuffersToEnqueue (getNativeSampleRate()); + auto maxBuffersToQueue = getMaximumBuffersToEnqueue (findMaximum (availableSampleRates.getRawDataPointer(), + availableSampleRates.size())); + + Array bufferSizes; + + for (int i = minBuffersToQueue; i <= maxBuffersToQueue; ++i) + bufferSizes.add (i * nativeBufferSize); + + return bufferSizes; + } + + static int getDefaultBufferSize (double currentSampleRate) + { + static constexpr int defaultBufferSizeForLowLatencyDeviceMs = 40; + static constexpr int defaultBufferSizeForStandardLatencyDeviceMs = 100; + + auto defaultBufferLength = (hasLowLatencyAudioPath() ? defaultBufferSizeForLowLatencyDeviceMs + : defaultBufferSizeForStandardLatencyDeviceMs); + + auto defaultBuffersToEnqueue = buffersToQueueForBufferDuration (defaultBufferLength, currentSampleRate); + return defaultBuffersToEnqueue * getNativeBufferSize(); + } +} + +} // namespace juce diff --git a/modules/juce_audio_devices/native/juce_android_Oboe.cpp b/modules/juce_audio_devices/native/juce_android_Oboe.cpp index 4d2025072a..eeb5758425 100644 --- a/modules/juce_audio_devices/native/juce_android_Oboe.cpp +++ b/modules/juce_audio_devices/native/juce_android_Oboe.cpp @@ -42,7 +42,7 @@ struct OboeAudioIODeviceBufferHelpers static constexpr int bitDepth() { return 16; } - static void referAudioBufferDirectlyToOboeIfPossible (int16*, AudioBuffer&, int) {} + static bool referAudioBufferDirectlyToOboeIfPossible (int16*, AudioBuffer&, int) { return false; } static void convertFromOboe (const int16* srcInterleaved, AudioBuffer& audioBuffer, int numSamples) { @@ -78,20 +78,21 @@ struct OboeAudioIODeviceBufferHelpers static constexpr int bitDepth() { return 32; } - static void referAudioBufferDirectlyToOboeIfPossible (float* nativeBuffer, AudioBuffer& audioBuffer, int numSamples) + static bool referAudioBufferDirectlyToOboeIfPossible (float* nativeBuffer, AudioBuffer& audioBuffer, int numSamples) { if (audioBuffer.getNumChannels() == 1) + { audioBuffer.setDataToReferTo (&nativeBuffer, 1, numSamples); + return true; + } + + return false; } static void convertFromOboe (const float* srcInterleaved, AudioBuffer& audioBuffer, int numSamples) { // No need to convert, we instructed the buffer to point to the src data directly already - if (audioBuffer.getNumChannels() == 1) - { - jassert (audioBuffer.getWritePointer (0) == srcInterleaved); - return; - } + jassert (audioBuffer.getWritePointer (0) != srcInterleaved); for (int i = 0; i < audioBuffer.getNumChannels(); ++i) { @@ -107,11 +108,7 @@ struct OboeAudioIODeviceBufferHelpers static void convertToOboe (const AudioBuffer& audioBuffer, float* dstInterleaved, int numSamples) { // No need to convert, we instructed the buffer to point to the src data directly already - if (audioBuffer.getNumChannels() == 1) - { - jassert (audioBuffer.getReadPointer (0) == dstInterleaved); - return; - } + jassert (audioBuffer.getReadPointer (0) != dstInterleaved); for (int i = 0; i < audioBuffer.getNumChannels(); ++i) { @@ -197,16 +194,7 @@ public: Array getAvailableBufferSizes() override { - // we need to offer the lowest possible buffer size which - // is the native buffer size - const int defaultNumMultiples = 8; - const int nativeBufferSize = getNativeBufferSize(); - Array bufferSizes; - - for (int i = 1; i < defaultNumMultiples; ++i) - bufferSizes.add (i * nativeBufferSize); - - return bufferSizes; + return AndroidHighPerformanceAudioHelpers::getAvailableBufferSizes (getAvailableSampleRates()); } String open (const BigInteger& inputChannels, const BigInteger& outputChannels, @@ -215,8 +203,8 @@ public: close(); lastError.clear(); - sampleRate = (int) requestedSampleRate; + sampleRate = (int) (requestedSampleRate > 0 ? requestedSampleRate : AndroidHighPerformanceAudioHelpers::getNativeSampleRate()); actualBufferSize = (bufferSize <= 0) ? getDefaultBufferSize() : bufferSize; // The device may report no max, claiming "no limits". Pick sensible defaults. @@ -274,16 +262,12 @@ public: int getDefaultBufferSize() override { - // Only on a Pro-Audio device will we set the lowest possible buffer size - // by default. We need to be more conservative on other devices - // as they may be low-latency, but still have a crappy CPU. - return (isProAudioDevice() ? 1 : 6) - * getNativeBufferSize(); + return AndroidHighPerformanceAudioHelpers::getDefaultBufferSize (getCurrentSampleRate()); } double getCurrentSampleRate() override { - return (sampleRate == 0.0 ? getNativeSampleRate() : sampleRate); + return (sampleRate == 0.0 ? AndroidHighPerformanceAudioHelpers::getNativeSampleRate() : sampleRate); } void start (AudioIODeviceCallback* newCallback) override @@ -375,10 +359,11 @@ private: { static const int standardRates[] = { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }; + Array rates (standardRates, numElementsInArray (standardRates)); // make sure the native sample rate is part of the list - int native = (int) getNativeSampleRate(); + int native = (int) AndroidHighPerformanceAudioHelpers::getNativeSampleRate(); if (native != 0 && ! rates.contains (native)) rates.add (native); @@ -511,10 +496,10 @@ private: void open (int deviceId, oboe::Direction direction, oboe::SharingMode sharingMode, int channelCount, oboe::AudioFormat format, - int32 sampleRate, int32 bufferSize, - oboe::AudioStreamCallback* callback = nullptr) + int32 newSampleRate, int32 newBufferSize, + oboe::AudioStreamCallback* newCallback = nullptr) { - oboe::DefaultStreamValues::FramesPerBurst = getDefaultFramesPerBurst(); + oboe::DefaultStreamValues::FramesPerBurst = AndroidHighPerformanceAudioHelpers::getNativeBufferSize(); oboe::AudioStreamBuilder builder; @@ -526,9 +511,9 @@ private: builder.setSharingMode (sharingMode); builder.setChannelCount (channelCount); builder.setFormat (format); - builder.setSampleRate (sampleRate); + builder.setSampleRate (newSampleRate); builder.setPerformanceMode (oboe::PerformanceMode::LowLatency); - builder.setCallback (callback); + builder.setCallback (newCallback); JUCE_OBOE_LOG (String ("Preparing Oboe stream with params:") + "\nAAudio supported = " + String (int (builder.isAAudioSupported())) @@ -538,17 +523,17 @@ private: + "\nSharingMode = " + getOboeString (sharingMode) + "\nChannelCount = " + String (channelCount) + "\nFormat = " + getOboeString (format) - + "\nSampleRate = " + String (sampleRate) + + "\nSampleRate = " + String (newSampleRate) + "\nPerformanceMode = " + getOboeString (oboe::PerformanceMode::LowLatency)); openResult = builder.openStream (&stream); JUCE_OBOE_LOG ("Building Oboe stream with result: " + getOboeString (openResult) + "\nStream state = " + (stream != nullptr ? getOboeString (stream->getState()) : String ("?"))); - if (stream != nullptr && bufferSize != 0) + if (stream != nullptr && newBufferSize != 0) { - JUCE_OBOE_LOG ("Setting the bufferSizeInFrames to " + String (bufferSize)); - stream->setBufferSizeInFrames (bufferSize); + JUCE_OBOE_LOG ("Setting the bufferSizeInFrames to " + String (newBufferSize)); + stream->setBufferSizeInFrames (newBufferSize); } JUCE_OBOE_LOG (String ("Stream details:") @@ -573,6 +558,7 @@ private: if (stream != nullptr) { oboe::Result result = stream->close(); + ignoreUnused (result); JUCE_OBOE_LOG ("Requested Oboe stream close with result: " + getOboeString (result)); } } @@ -665,16 +651,16 @@ private: } // Not strictly required as these should not change, but recommended by Google anyway - void checkStreamSetup (OboeStream* stream, int deviceId, int numChannels, int sampleRate, - int bufferSize, oboe::AudioFormat format) + void checkStreamSetup (OboeStream* stream, int deviceId, int numChannels, int expectedSampleRate, + int expectedBufferSize, oboe::AudioFormat format) { if (auto* nativeStream = stream != nullptr ? stream->getNativeStream() : nullptr) { - ignoreUnused (deviceId, numChannels, sampleRate, bufferSize); + ignoreUnused (deviceId, numChannels, sampleRate, expectedBufferSize); ignoreUnused (streamFormat, bitDepth); jassert (numChannels == nativeStream->getChannelCount()); - jassert (sampleRate == 0 || sampleRate == nativeStream->getSampleRate()); + jassert (expectedSampleRate == 0 || expectedSampleRate == nativeStream->getSampleRate()); jassert (format == nativeStream->getFormat()); } } @@ -768,7 +754,6 @@ private: // only output stream should be the master stream receiving callbacks jassert (stream->getDirection() == oboe::Direction::Output && stream == outputStream->getNativeStream()); - //----------------- // Read input from Oboe inputStreamSampleBuffer.clear(); inputStreamNativeBuffer.calloc (static_cast (numInputChannels * bufferSize)); @@ -788,11 +773,13 @@ private: if (result) { - OboeAudioIODeviceBufferHelpers::referAudioBufferDirectlyToOboeIfPossible (inputStreamNativeBuffer.get(), - inputStreamSampleBuffer, - result.value()); + auto referringDirectlyToOboeData = OboeAudioIODeviceBufferHelpers + ::referAudioBufferDirectlyToOboeIfPossible (inputStreamNativeBuffer.get(), + inputStreamSampleBuffer, + result.value()); - OboeAudioIODeviceBufferHelpers::convertFromOboe (inputStreamNativeBuffer.get(), inputStreamSampleBuffer, result.value()); + if (! referringDirectlyToOboeData) + OboeAudioIODeviceBufferHelpers::convertFromOboe (inputStreamNativeBuffer.get(), inputStreamSampleBuffer, result.value()); } else { @@ -803,24 +790,24 @@ private: inputLatency = getLatencyFor (*inputStream); } - //----------------- // Setup output buffer - outputStreamSampleBuffer.clear(); + auto referringDirectlyToOboeData = OboeAudioIODeviceBufferHelpers + ::referAudioBufferDirectlyToOboeIfPossible (static_cast (audioData), + outputStreamSampleBuffer, + numFrames); - OboeAudioIODeviceBufferHelpers::referAudioBufferDirectlyToOboeIfPossible (static_cast (audioData), - outputStreamSampleBuffer, - numFrames); + if (! referringDirectlyToOboeData) + outputStreamSampleBuffer.clear(); - //----------------- // Process // NB: the number of samples read from the input can potentially differ from numFrames. owner.process (inputStreamSampleBuffer.getArrayOfReadPointers(), numInputChannels, outputStreamSampleBuffer.getArrayOfWritePointers(), numOutputChannels, numFrames); - //----------------- // Write output to Oboe - OboeAudioIODeviceBufferHelpers::convertToOboe (outputStreamSampleBuffer, static_cast (audioData), numFrames); + if (! referringDirectlyToOboeData) + OboeAudioIODeviceBufferHelpers::convertToOboe (outputStreamSampleBuffer, static_cast (audioData), numFrames); if (isOutputLatencyDetectionSupported) outputLatency = getLatencyFor (*outputStream); @@ -874,9 +861,7 @@ private: const int64_t appFrameIndex = isOutput ? nativeStream.getFramesWritten() : nativeStream.getFramesRead(); // Assume that the next frame will be processed at the current time - using namespace std::chrono; - int64_t appFrameAppTime = getCurrentTimeNanos();//duration_cast (steady_clock::now().time_since_epoch()).count(); - int64_t appFrameAppTime2 = duration_cast (steady_clock::now().time_since_epoch()).count(); + int64_t appFrameAppTime = getCurrentTimeNanos(); // Calculate the number of frames between app and hardware int64_t frameIndexDelta = appFrameIndex - hardwareFrameIndex; @@ -903,6 +888,8 @@ private: void onErrorBeforeClose (oboe::AudioStream* stream, oboe::Result error) override { + ignoreUnused (error); + // only output stream should be the master stream receiving callbacks jassert (stream->getDirection() == oboe::Direction::Output); @@ -980,31 +967,6 @@ private: bool running = false; - //============================================================================== - static double getNativeSampleRate() - { - return audioManagerGetProperty ("android.media.property.OUTPUT_SAMPLE_RATE").getDoubleValue(); - } - - static int getNativeBufferSize() - { - auto val = audioManagerGetProperty ("android.media.property.OUTPUT_FRAMES_PER_BUFFER").getIntValue(); - return val > 0 ? val : 512; - } - - static bool isProAudioDevice() - { - return androidHasSystemFeature ("android.hardware.audio.pro"); - } - - static int getDefaultFramesPerBurst() - { - // NB: this function only works for inbuilt speakers and headphones - auto framesPerBurstString = javaString (audioManagerGetProperty ("android.media.property.OUTPUT_FRAMES_PER_BUFFER")); - - return framesPerBurstString != 0 ? getEnv()->CallStaticIntMethod (JavaInteger, JavaInteger.parseInt, framesPerBurstString.get(), 10) : 192; - } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OboeAudioIODevice) }; @@ -1088,8 +1050,8 @@ public: oboe::SharingMode::Shared, forInput ? 1 : 2, getAndroidSDKVersion() >= 21 ? oboe::AudioFormat::Float : oboe::AudioFormat::I16, - (int) OboeAudioIODevice::getNativeSampleRate(), - OboeAudioIODevice::getNativeBufferSize(), + (int) AndroidHighPerformanceAudioHelpers::getNativeSampleRate(), + AndroidHighPerformanceAudioHelpers::getNativeBufferSize(), nullptr); if (auto* nativeStream = tempStream.getNativeStream()) @@ -1202,6 +1164,8 @@ public: for (auto& device : inputDevices) { + ignoreUnused (device); + JUCE_OBOE_LOG ("name = " << device.name); JUCE_OBOE_LOG ("id = " << String (device.id)); JUCE_OBOE_LOG ("sample rates size = " << String (device.sampleRates.size())); @@ -1212,6 +1176,8 @@ public: for (auto& device : outputDevices) { + ignoreUnused (device); + JUCE_OBOE_LOG ("name = " << device.name); JUCE_OBOE_LOG ("id = " << String (device.id)); JUCE_OBOE_LOG ("sample rates size = " << String (device.sampleRates.size())); @@ -1350,8 +1316,8 @@ public: oboe::SharingMode::Exclusive, 1, oboe::AudioFormat::Float, - (int) OboeAudioIODevice::getNativeSampleRate(), - OboeAudioIODevice::getNativeBufferSize(), + (int) AndroidHighPerformanceAudioHelpers::getNativeSampleRate(), + AndroidHighPerformanceAudioHelpers::getNativeBufferSize(), this)), formatUsed (oboe::AudioFormat::Float) { @@ -1363,8 +1329,8 @@ public: oboe::SharingMode::Exclusive, 1, oboe::AudioFormat::I16, - (int) OboeAudioIODevice::getNativeSampleRate(), - OboeAudioIODevice::getNativeBufferSize(), + (int) AndroidHighPerformanceAudioHelpers::getNativeSampleRate(), + AndroidHighPerformanceAudioHelpers::getNativeBufferSize(), this)); formatUsed = oboe::AudioFormat::I16; @@ -1446,15 +1412,19 @@ private: oboe::AudioFormat formatUsed; }; +//============================================================================== pthread_t juce_createRealtimeAudioThread (void* (*entry) (void*), void* userPtr) { - std::unique_ptr thread (new OboeRealtimeThread()); + auto thread = std::make_unique(); if (! thread->isOk()) return {}; auto threadID = thread->startThread (entry, userPtr); - thread.release(); // the thread will de-allocate itself + + // the thread will de-allocate itself + thread.release(); + return threadID; } diff --git a/modules/juce_audio_devices/native/juce_android_OpenSL.cpp b/modules/juce_audio_devices/native/juce_android_OpenSL.cpp index 4a19f7710b..ce2599bc63 100644 --- a/modules/juce_audio_devices/native/juce_android_OpenSL.cpp +++ b/modules/juce_audio_devices/native/juce_android_OpenSL.cpp @@ -852,10 +852,11 @@ public: static const double rates[] = { 8000.0, 11025.0, 12000.0, 16000.0, 22050.0, 24000.0, 32000.0, 44100.0, 48000.0 }; + Array retval (rates, numElementsInArray (rates)); // make sure the native sample rate is part of the list - double native = getNativeSampleRate(); + double native = AndroidHighPerformanceAudioHelpers::getNativeSampleRate(); if (native != 0.0 && ! retval.contains (native)) retval.add (native); @@ -865,17 +866,7 @@ public: Array getAvailableBufferSizes() override { - // we need to offer the lowest possible buffer size which - // is the native buffer size - auto nativeBufferSize = getNativeBufferSize(); - auto minBuffersToQueue = getMinimumBuffersToEnqueue(); - auto maxBuffersToQueue = getMaximumBuffersToEnqueue(); - - Array retval; - for (int i = minBuffersToQueue; i <= maxBuffersToQueue; ++i) - retval.add (i * nativeBufferSize); - - return retval; + return AndroidHighPerformanceAudioHelpers::getAvailableBufferSizes (getAvailableSampleRates()); } String open (const BigInteger& inputChannels, @@ -887,15 +878,20 @@ public: lastError.clear(); - sampleRate = (int) (requestedSampleRate > 0 ? requestedSampleRate : getNativeSampleRate()); + sampleRate = (int) (requestedSampleRate > 0 ? requestedSampleRate : AndroidHighPerformanceAudioHelpers::getNativeSampleRate()); + auto preferredBufferSize = (bufferSize > 0) ? bufferSize : getDefaultBufferSize(); - auto totalPreferredBufferSize = (bufferSize <= 0) ? getDefaultBufferSize() : bufferSize; - auto nativeBufferSize = getNativeBufferSize(); - bool useHighPerformanceAudioPath = canUseHighPerformanceAudioPath (totalPreferredBufferSize, sampleRate); + audioBuffersToEnqueue = [this, preferredBufferSize] + { + if (AndroidHighPerformanceAudioHelpers::canUseHighPerformanceAudioPath (preferredBufferSize, sampleRate)) + return preferredBufferSize / AndroidHighPerformanceAudioHelpers::getNativeBufferSize(); - audioBuffersToEnqueue = useHighPerformanceAudioPath ? (totalPreferredBufferSize / nativeBufferSize) : 1; - actualBufferSize = totalPreferredBufferSize / audioBuffersToEnqueue; - jassert ((actualBufferSize * audioBuffersToEnqueue) == totalPreferredBufferSize); + return 1; + }(); + + actualBufferSize = preferredBufferSize / audioBuffersToEnqueue; + + jassert ((actualBufferSize * audioBuffersToEnqueue) == preferredBufferSize); activeOutputChans = outputChannels; activeOutputChans.setRange (2, activeOutputChans.getHighestBit(), false); @@ -934,8 +930,8 @@ public: DBG ("OpenSL: numInputChannels = " << numInputChannels << ", numOutputChannels = " << numOutputChannels - << ", nativeBufferSize = " << getNativeBufferSize() - << ", nativeSampleRate = " << getNativeSampleRate() + << ", nativeBufferSize = " << AndroidHighPerformanceAudioHelpers::getNativeBufferSize() + << ", nativeSampleRate = " << AndroidHighPerformanceAudioHelpers::getNativeSampleRate() << ", actualBufferSize = " << actualBufferSize << ", audioBuffersToEnqueue = " << audioBuffersToEnqueue << ", sampleRate = " << sampleRate @@ -968,16 +964,12 @@ public: int getDefaultBufferSize() override { - auto defaultBufferLength = (hasLowLatencyAudioPath() ? defaultBufferSizeForLowLatencyDeviceMs - : defaultBufferSizeForStandardLatencyDeviceMs); - - auto defaultBuffersToEnqueue = buffersToQueueForBufferDuration (defaultBufferLength, getCurrentSampleRate()); - return defaultBuffersToEnqueue * getNativeBufferSize(); + return AndroidHighPerformanceAudioHelpers::getDefaultBufferSize (getCurrentSampleRate()); } double getCurrentSampleRate() override { - return (sampleRate == 0.0 ? getNativeSampleRate() : sampleRate); + return (sampleRate == 0.0 ? AndroidHighPerformanceAudioHelpers::getNativeSampleRate() : sampleRate); } void start (AudioIODeviceCallback* newCallback) override @@ -1048,91 +1040,6 @@ private: std::unique_ptr session; - enum - { - defaultBufferSizeForLowLatencyDeviceMs = 40, - defaultBufferSizeForStandardLatencyDeviceMs = 100 - }; - - static int getMinimumBuffersToEnqueue (double sampleRateToCheck = getNativeSampleRate()) - { - if (canUseHighPerformanceAudioPath (getNativeBufferSize(), (int) sampleRateToCheck)) - { - // see https://developer.android.com/ndk/guides/audio/opensl/opensl-prog-notes.html#sandp - // "For Android 4.2 (API level 17) and earlier, a buffer count of two or more is required - // for lower latency. Beginning with Android 4.3 (API level 18), a buffer count of one - // is sufficient for lower latency." - return (getAndroidSDKVersion() >= 18 ? 1 : 2); - } - - // we will not use the low-latency path so we can use the absolute minimum number of buffers - // to queue - return 1; - } - - int getMaximumBuffersToEnqueue() noexcept - { - constexpr auto maxBufferSizeMs = 200; - - auto availableSampleRates = getAvailableSampleRates(); - auto maximumSampleRate = findMaximum(availableSampleRates.getRawDataPointer(), availableSampleRates.size()); - - // ensure we don't return something crazy small - return jmax (8, buffersToQueueForBufferDuration (maxBufferSizeMs, maximumSampleRate)); - } - - static int buffersToQueueForBufferDuration (int bufferDurationInMs, double sampleRate) noexcept - { - auto maxBufferFrames = static_cast (std::ceil (bufferDurationInMs * sampleRate / 1000.0)); - auto maxNumBuffers = static_cast (std::ceil (static_cast (maxBufferFrames) - / static_cast (getNativeBufferSize()))); - - return jmax (getMinimumBuffersToEnqueue (sampleRate), maxNumBuffers); - } - - //============================================================================== - static double getNativeSampleRate() - { - return audioManagerGetProperty ("android.media.property.OUTPUT_SAMPLE_RATE").getDoubleValue(); - } - - static int getNativeBufferSize() - { - const int val = audioManagerGetProperty ("android.media.property.OUTPUT_FRAMES_PER_BUFFER").getIntValue(); - return val > 0 ? val : 512; - } - - static bool isProAudioDevice() - { - return androidHasSystemFeature ("android.hardware.audio.pro") || isSapaSupported(); - } - - static bool hasLowLatencyAudioPath() - { - return androidHasSystemFeature ("android.hardware.audio.low_latency"); - } - - static bool canUseHighPerformanceAudioPath (int requestedBufferSize, int requestedSampleRate) - { - return ((requestedBufferSize % getNativeBufferSize()) == 0) - && (requestedSampleRate == getNativeSampleRate()) - && isProAudioDevice(); - } - - //============================================================================== - // Some minimum Sapa support to check if this device supports pro audio - static bool isSamsungDevice() - { - return SystemStats::getDeviceManufacturer().containsIgnoreCase ("SAMSUNG"); - } - - static bool isSapaSupported() - { - static bool supported = isSamsungDevice() && DynamicLibrary().open ("libapa_jni.so"); - - return supported; - } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OpenSLAudioIODevice) }; @@ -1263,7 +1170,7 @@ public: SLDataLocator_OutputMix outputMixLocator = {SL_DATALOCATOR_OUTPUTMIX, outputMix}; PCMDataFormatEx dataFormat; - BufferHelpers::initPCMDataFormat (dataFormat, 1, OpenSLAudioIODevice::getNativeSampleRate()); + BufferHelpers::initPCMDataFormat (dataFormat, 1, AndroidHighPerformanceAudioHelpers::getNativeSampleRate()); SLDataSource source = { &queueLocator, &dataFormat }; SLDataSink sink = { &outputMixLocator, nullptr }; @@ -1306,7 +1213,7 @@ public: } } - bool isOK() const { return queue != nullptr; } + bool isOk() const { return queue != nullptr; } pthread_t startThread (void* (*entry) (void*), void* userPtr) { @@ -1365,7 +1272,7 @@ private: SlRef player; SlRef queue; - int bufferSize = OpenSLAudioIODevice::getNativeBufferSize(); + int bufferSize = AndroidHighPerformanceAudioHelpers::getNativeBufferSize(); HeapBlock buffer { HeapBlock (static_cast (1 * bufferSize * numBuffers)) }; void* (*threadEntryProc) (void*) = nullptr; @@ -1376,14 +1283,15 @@ private: pthread_t threadID; }; +//============================================================================== pthread_t juce_createRealtimeAudioThread (void* (*entry) (void*), void* userPtr) { - std::unique_ptr thread (new SLRealtimeThread); + auto thread = std::make_unique(); - if (! thread->isOK()) - return 0; + if (! thread->isOk()) + return {}; - pthread_t threadID = thread->startThread (entry, userPtr); + auto threadID = thread->startThread (entry, userPtr); // the thread will de-allocate itself thread.release(); diff --git a/modules/juce_audio_devices/native/juce_win32_ASIO.cpp b/modules/juce_audio_devices/native/juce_win32_ASIO.cpp index 2bfcbe0527..34f438f25b 100644 --- a/modules/juce_audio_devices/native/juce_win32_ASIO.cpp +++ b/modules/juce_audio_devices/native/juce_win32_ASIO.cpp @@ -43,7 +43,9 @@ namespace ASIODebugging { message = "ASIO: " + message; DBG (message); - Logger::writeToLog (message); + + if (Logger::getCurrentLogger() != nullptr) + Logger::writeToLog (message); } static void logError (const String& context, long error) @@ -336,7 +338,9 @@ public: close(); JUCE_ASIO_LOG ("closed"); - removeCurrentDriver(); + + if (! removeCurrentDriver()) + JUCE_ASIO_LOG ("** Driver crashed while being closed"); } void updateSampleRates() @@ -451,7 +455,9 @@ public: if (needToReset) { JUCE_ASIO_LOG (" Resetting"); - removeCurrentDriver(); + + if (! removeCurrentDriver()) + JUCE_ASIO_LOG ("** Driver crashed while being closed"); loadDriver(); String initError = initDriver(); @@ -1075,28 +1081,32 @@ private: } } - static bool shouldReleaseObject (const String& driverName) + bool removeCurrentDriver() { - return driverName != "Yamaha Steinberg USB ASIO"; - } + bool releasedOK = true; - void removeCurrentDriver() - { if (asioObject != nullptr) { - char buffer[512] = {}; - asioObject->getDriverName (buffer); - - if (shouldReleaseObject (buffer)) + #if ! JUCE_MINGW + __try + #endif + { asioObject->Release(); + } + #if ! JUCE_MINGW + __except (EXCEPTION_EXECUTE_HANDLER) { releasedOK = false; } + #endif asioObject = nullptr; } + + return releasedOK; } bool loadDriver() { - removeCurrentDriver(); + if (! removeCurrentDriver()) + JUCE_ASIO_LOG ("** Driver crashed while being closed"); bool crashed = false; bool ok = tryCreatingDriver (crashed); @@ -1256,7 +1266,9 @@ private: { JUCE_ASIO_LOG_ERROR (error, err); disposeBuffers(); - removeCurrentDriver(); + + if (! removeCurrentDriver()) + JUCE_ASIO_LOG ("** Driver crashed while being closed"); } else { diff --git a/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp b/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp index 34f30d7b61..fb6e97f051 100644 --- a/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp +++ b/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp @@ -514,7 +514,6 @@ private: IDirectSoundBuffer* pOutputBuffer; DWORD writeOffset; int totalBytesPerBuffer, bytesPerBuffer; - unsigned int lastPlayCursor; bool firstPlayTime; int64 lastPlayTime, ticksPerBuffer; @@ -1215,13 +1214,13 @@ public: initialiseDSoundFunctions(); } - void scanForDevices() + void scanForDevices() override { hasScanned = true; deviceList.scan(); } - StringArray getDeviceNames (bool wantInputNames) const + StringArray getDeviceNames (bool wantInputNames) const override { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -1229,13 +1228,13 @@ public: : deviceList.outputDeviceNames; } - int getDefaultDeviceIndex (bool /*forInput*/) const + int getDefaultDeviceIndex (bool /*forInput*/) const override { jassert (hasScanned); // need to call scanForDevices() before doing this return 0; } - int getIndexOfDevice (AudioIODevice* device, bool asInput) const + int getIndexOfDevice (AudioIODevice* device, bool asInput) const override { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -1246,10 +1245,10 @@ public: return -1; } - bool hasSeparateInputsAndOutputs() const { return true; } + bool hasSeparateInputsAndOutputs() const override { return true; } AudioIODevice* createDevice (const String& outputDeviceName, - const String& inputDeviceName) + const String& inputDeviceName) override { jassert (hasScanned); // need to call scanForDevices() before doing this diff --git a/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp b/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp index 3ac6f36e3b..76ed55b715 100644 --- a/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp +++ b/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp @@ -352,8 +352,8 @@ void copyWavFormat (WAVEFORMATEXTENSIBLE& dest, const WAVEFORMATEX* src) noexcep class WASAPIDeviceBase { public: - WASAPIDeviceBase (const ComSmartPtr& d, bool exclusiveMode, std::function&& cb) - : device (d), useExclusiveMode (exclusiveMode), reopenCallback (cb) + WASAPIDeviceBase (const ComSmartPtr& d, bool exclusiveMode) + : device (d), useExclusiveMode (exclusiveMode) { clientEvent = CreateEvent (nullptr, false, false, nullptr); @@ -429,7 +429,8 @@ public: && tryInitialisingWithBufferSize (bufferSizeSamples)) { sampleRateHasChanged = false; - shouldClose = false; + shouldShutdown = false; + channelMaps.clear(); for (int i = 0; i <= channels.getHighestBit(); ++i) @@ -468,9 +469,19 @@ public: sampleRateHasChanged = true; } - void deviceBecameInactive() + void deviceSessionBecameInactive() { - shouldClose = true; + isActive = false; + } + + void deviceSessionExpired() + { + shouldShutdown = true; + } + + void deviceSessionBecameActive() + { + isActive = true; } //============================================================================== @@ -487,8 +498,7 @@ public: Array channelMaps; UINT32 actualBufferSize = 0; int bytesPerSample = 0, bytesPerFrame = 0; - bool sampleRateHasChanged = false, shouldClose = false; - std::function reopenCallback; + std::atomic sampleRateHasChanged { false }, shouldShutdown { false }, isActive { true }; virtual void updateFormat (bool isFloat) = 0; @@ -504,13 +514,20 @@ private: JUCE_COMRESULT OnChannelVolumeChanged (DWORD, float*, DWORD, LPCGUID) { return S_OK; } JUCE_COMRESULT OnGroupingParamChanged (LPCGUID, LPCGUID) { return S_OK; } - JUCE_COMRESULT OnStateChanged(AudioSessionState state) + JUCE_COMRESULT OnStateChanged (AudioSessionState state) { - if (state == AudioSessionStateActive) - owner.reopenCallback(); - - if (state == AudioSessionStateInactive || state == AudioSessionStateExpired) - owner.deviceBecameInactive(); + switch (state) + { + case AudioSessionStateInactive: + owner.deviceSessionBecameInactive(); + break; + case AudioSessionStateExpired: + owner.deviceSessionExpired(); + break; + case AudioSessionStateActive: + owner.deviceSessionBecameActive(); + break; + } return S_OK; } @@ -692,8 +709,8 @@ private: class WASAPIInputDevice : public WASAPIDeviceBase { public: - WASAPIInputDevice (const ComSmartPtr& d, bool exclusiveMode, std::function&& reopenCallback) - : WASAPIDeviceBase (d, exclusiveMode, std::move (reopenCallback)) + WASAPIInputDevice (const ComSmartPtr& d, bool exclusiveMode) + : WASAPIDeviceBase (d, exclusiveMode) { } @@ -746,6 +763,8 @@ public: return false; purgeInputBuffers(); + isActive = true; + return true; } @@ -853,8 +872,8 @@ private: class WASAPIOutputDevice : public WASAPIDeviceBase { public: - WASAPIOutputDevice (const ComSmartPtr& d, bool exclusiveMode, std::function&& reopenCallback) - : WASAPIDeviceBase (d, exclusiveMode, std::move (reopenCallback)) + WASAPIOutputDevice (const ComSmartPtr& d, bool exclusiveMode) + : WASAPIDeviceBase (d, exclusiveMode) { } @@ -899,7 +918,12 @@ public: if (check (renderClient->GetBuffer (samplesToDo, &outputData))) renderClient->ReleaseBuffer (samplesToDo, AUDCLNT_BUFFERFLAGS_SILENT); - return check (client->Start()); + if (! check (client->Start())) + return false; + + isActive = true; + + return true; } int getNumSamplesAvailableToCopy() const @@ -1124,7 +1148,8 @@ public: if (inputDevice != nullptr) ResetEvent (inputDevice->clientEvent); if (outputDevice != nullptr) ResetEvent (outputDevice->clientEvent); - deviceBecameInactive = false; + shouldShutdown = false; + deviceSampleRateChanged = false; startThread (8); Thread::sleep (5); @@ -1233,7 +1258,6 @@ public: auto bufferSize = currentBufferSizeSamples; auto numInputBuffers = getActiveInputChannels().countNumberOfSetBits(); auto numOutputBuffers = getActiveOutputChannels().countNumberOfSetBits(); - bool sampleRateHasChanged = false; AudioBuffer ins (jmax (1, numInputBuffers), bufferSize + 32); AudioBuffer outs (jmax (1, numOutputBuffers), bufferSize + 32); @@ -1244,14 +1268,23 @@ public: while (! threadShouldExit()) { - if (outputDevice != nullptr && outputDevice->shouldClose) - deviceBecameInactive = true; - - if (inputDevice != nullptr && ! deviceBecameInactive) + if ((outputDevice != nullptr && outputDevice->shouldShutdown) + || (inputDevice != nullptr && inputDevice->shouldShutdown)) { - if (inputDevice->shouldClose) - deviceBecameInactive = true; + shouldShutdown = true; + triggerAsyncUpdate(); + break; + } + + auto inputDeviceActive = (inputDevice != nullptr && inputDevice->isActive); + auto outputDeviceActive = (outputDevice != nullptr && outputDevice->isActive); + + if (! inputDeviceActive && ! outputDeviceActive) + continue; + + if (inputDeviceActive) + { if (outputDevice == nullptr) { if (WaitForSingleObject (inputDevice->clientEvent, 1000) == WAIT_TIMEOUT) @@ -1272,12 +1305,13 @@ public: if (inputDevice->sampleRateHasChanged) { - sampleRateHasChanged = true; - sampleRateChangedByOutput = false; + deviceSampleRateChanged = true; + triggerAsyncUpdate(); + + break; } } - if (! deviceBecameInactive) { const ScopedTryLock sl (startStopLock); @@ -1288,7 +1322,7 @@ public: outs.clear(); } - if (outputDevice != nullptr && ! deviceBecameInactive) + if (outputDeviceActive) { // Note that this function is handed the input device so it can check for the event and make sure // the input reservoir is filled up correctly even when bufferSize > device actualBufferSize @@ -1296,15 +1330,11 @@ public: if (outputDevice->sampleRateHasChanged) { - sampleRateHasChanged = true; - sampleRateChangedByOutput = true; - } - } + deviceSampleRateChanged = true; + triggerAsyncUpdate(); - if (sampleRateHasChanged || deviceBecameInactive) - { - triggerAsyncUpdate(); - break; // Quit the thread... will restart it later! + break; + } } } } @@ -1332,7 +1362,7 @@ private: AudioIODeviceCallback* callback = {}; CriticalSection startStopLock; - bool sampleRateChangedByOutput = false, deviceBecameInactive = false; + std::atomic shouldShutdown { false }, deviceSampleRateChanged { false }; BigInteger lastKnownInputChannels, lastKnownOutputChannels; @@ -1368,57 +1398,54 @@ private: auto flow = getDataFlow (device); - auto deviceReopenCallback = [this] - { - if (deviceBecameInactive) - { - deviceBecameInactive = false; - MessageManager::callAsync ([this] { reopenDevices(); }); - } - }; - if (deviceId == inputDeviceId && flow == eCapture) - inputDevice.reset (new WASAPIInputDevice (device, useExclusiveMode, deviceReopenCallback)); + inputDevice.reset (new WASAPIInputDevice (device, useExclusiveMode)); else if (deviceId == outputDeviceId && flow == eRender) - outputDevice.reset (new WASAPIOutputDevice (device, useExclusiveMode, deviceReopenCallback)); + outputDevice.reset (new WASAPIOutputDevice (device, useExclusiveMode)); } return (outputDeviceId.isEmpty() || (outputDevice != nullptr && outputDevice->isOk())) && (inputDeviceId.isEmpty() || (inputDevice != nullptr && inputDevice->isOk())); } - void reopenDevices() - { - outputDevice = nullptr; - inputDevice = nullptr; - - initialise(); - - open (lastKnownInputChannels, lastKnownOutputChannels, - getChangedSampleRate(), currentBufferSizeSamples); - - start (callback); - } - //============================================================================== void handleAsyncUpdate() override { - stop(); + auto closeDevices = [this] + { + close(); - // sample rate change - if (! deviceBecameInactive) - reopenDevices(); - } + outputDevice = nullptr; + inputDevice = nullptr; + }; - double getChangedSampleRate() const - { - if (outputDevice != nullptr && sampleRateChangedByOutput) - return outputDevice->defaultSampleRate; + if (shouldShutdown) + { + closeDevices(); + } + else if (deviceSampleRateChanged) + { + auto sampleRateChangedByInput = (inputDevice != nullptr && inputDevice->sampleRateHasChanged); - if (inputDevice != nullptr && ! sampleRateChangedByOutput) - return inputDevice->defaultSampleRate; + closeDevices(); + initialise(); - return 0.0; + auto changedSampleRate = [this, sampleRateChangedByInput] () + { + if (inputDevice != nullptr && sampleRateChangedByInput) + return inputDevice->defaultSampleRate; + + if (outputDevice != nullptr && ! sampleRateChangedByInput) + return outputDevice->defaultSampleRate; + + return 0.0; + }(); + + open (lastKnownInputChannels, lastKnownOutputChannels, + changedSampleRate, currentBufferSizeSamples); + + start (callback); + } } //============================================================================== @@ -1445,7 +1472,7 @@ public: } //============================================================================== - void scanForDevices() + void scanForDevices() override { hasScanned = true; @@ -1458,7 +1485,7 @@ public: outputDeviceIds, inputDeviceIds); } - StringArray getDeviceNames (bool wantInputNames) const + StringArray getDeviceNames (bool wantInputNames) const override { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -1466,13 +1493,13 @@ public: : outputDeviceNames; } - int getDefaultDeviceIndex (bool /*forInput*/) const + int getDefaultDeviceIndex (bool /*forInput*/) const override { jassert (hasScanned); // need to call scanForDevices() before doing this return 0; } - int getIndexOfDevice (AudioIODevice* device, bool asInput) const + int getIndexOfDevice (AudioIODevice* device, bool asInput) const override { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -1483,10 +1510,10 @@ public: return -1; } - bool hasSeparateInputsAndOutputs() const { return true; } + bool hasSeparateInputsAndOutputs() const override { return true; } AudioIODevice* createDevice (const String& outputDeviceName, - const String& inputDeviceName) + const String& inputDeviceName) override { jassert (hasScanned); // need to call scanForDevices() before doing this @@ -1539,7 +1566,7 @@ private: HRESULT notify() { if (device != nullptr) - device->triggerAsyncDeviceChangeCallback(); + device->triggerAsyncDeviceChangeCallback(); return S_OK; } diff --git a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp index 18f6511096..e6802e9528 100644 --- a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp @@ -168,10 +168,11 @@ namespace AiffFileHelpers switch (key) { - case minor: keyString = "minor"; break; - case major: keyString = "major"; break; - case neither: keyString = "neither"; break; - case both: keyString = "both"; break; + case minor: keyString = "minor"; break; + case major: keyString = "major"; break; + case neither: keyString = "neither"; break; + case both: keyString = "both"; break; + default: break; } if (keyString != nullptr) @@ -334,7 +335,7 @@ namespace AiffFileHelpers out.writeIntBigEndian (offset); auto labelLength = jmin ((size_t) 254, label.getNumBytesAsUTF8()); // seems to need null terminator even though it's a pstring - out.writeByte ((char) labelLength + 1); + out.writeByte (static_cast (labelLength + 1)); out.write (label.toUTF8(), labelLength); out.writeByte (0); @@ -367,7 +368,7 @@ namespace AiffFileHelpers auto comment = values.getValue (prefix + "Text", String()); auto commentLength = jmin (comment.getNumBytesAsUTF8(), (size_t) 65534); - out.writeShortBigEndian ((short) commentLength + 1); + out.writeShortBigEndian (static_cast (commentLength + 1)); out.write (comment.toUTF8(), commentLength); out.writeByte (0); @@ -975,7 +976,7 @@ AudioFormatReader* AiffAudioFormat::createReaderFor (InputStream* sourceStream, MemoryMappedAudioFormatReader* AiffAudioFormat::createMemoryMappedReader (const File& file) { - return createMemoryMappedReader (file.createInputStream()); + return createMemoryMappedReader (file.createInputStream().release()); } MemoryMappedAudioFormatReader* AiffAudioFormat::createMemoryMappedReader (FileInputStream* fin) diff --git a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp index 33453b81c1..6c4510dde6 100644 --- a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp @@ -117,6 +117,10 @@ namespace FlacNamespace #pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wshadow" #pragma clang diagnostic ignored "-Wdeprecated-register" + #pragma clang diagnostic ignored "-Wswitch-enum" + #if __has_warning ("-Wimplicit-fallthrough") + #pragma clang diagnostic ignored "-Wimplicit-fallthrough" + #endif #if __has_warning("-Wzero-as-null-pointer-constant") #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #endif @@ -127,6 +131,12 @@ namespace FlacNamespace #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wsign-conversion" + #pragma GCC diagnostic ignored "-Wswitch-enum" + #pragma GCC diagnostic ignored "-Wswitch-default" + #pragma GCC diagnostic ignored "-Wredundant-decls" + #if __GNUC__ >= 7 + #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" + #endif #endif #if JUCE_INTEL diff --git a/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp index b39dbbfccc..a9be6a7f32 100644 --- a/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp @@ -34,18 +34,18 @@ class LAMEEncoderAudioFormat::Writer : public AudioFormatWriter public: Writer (OutputStream* destStream, const String& formatName, const File& appFile, int vbr, int cbr, - double sampleRate, unsigned int numberOfChannels, - int bitsPerSample, const StringPairArray& metadata) - : AudioFormatWriter (destStream, formatName, sampleRate, - numberOfChannels, (unsigned int) bitsPerSample), + double sampleRateIn, unsigned int numberOfChannels, + int bitsPerSampleIn, const StringPairArray& metadata) + : AudioFormatWriter (destStream, formatName, sampleRateIn, + numberOfChannels, (unsigned int) bitsPerSampleIn), vbrLevel (vbr), cbrBitrate (cbr) { WavAudioFormat wavFormat; - if (auto* out = tempWav.getFile().createOutputStream()) + if (auto out = tempWav.getFile().createOutputStream()) { - writer.reset (wavFormat.createWriterFor (out, sampleRate, numChannels, - bitsPerSample, metadata, 0)); + writer.reset (wavFormat.createWriterFor (out.release(), sampleRateIn, numChannels, + bitsPerSampleIn, metadata, 0)); args.add (appFile.getFullPathName()); diff --git a/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp index 93cd37f36b..544b2daf47 100644 --- a/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp @@ -1562,7 +1562,8 @@ struct MP3Stream } frameIndex = jmin (frameIndex & ~(storedStartPosInterval - 1), - frameStreamPositions.size() * storedStartPosInterval - 1); + (frameStreamPositions.size() - 1) * storedStartPosInterval); + stream.setPosition (frameStreamPositions.getUnchecked (frameIndex / storedStartPosInterval)); currentFrameIndex = frameIndex; reset(); @@ -1878,6 +1879,9 @@ private: *in0++ = *in1++; } break; + + default: + break; } } diff --git a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp index f138d8c890..4d8d2c9dd7 100644 --- a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp @@ -43,7 +43,9 @@ namespace OggVorbisNamespace #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wshadow" + #pragma clang diagnostic ignored "-Wfloat-conversion" #pragma clang diagnostic ignored "-Wdeprecated-register" + #pragma clang diagnostic ignored "-Wswitch-enum" #if __has_warning("-Wzero-as-null-pointer-constant") #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #endif @@ -52,7 +54,11 @@ namespace OggVorbisNamespace #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wsign-conversion" + #pragma GCC diagnostic ignored "-Wfloat-conversion" #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" + #pragma GCC diagnostic ignored "-Wswitch-enum" + #pragma GCC diagnostic ignored "-Wswitch-default" + #pragma GCC diagnostic ignored "-Wredundant-decls" #endif #include "oggvorbis/vorbisenc.h" @@ -208,7 +214,7 @@ public: while (numToRead > 0) { float** dataIn = nullptr; - auto samps = ov_read_float (&ovFile, &dataIn, numToRead, &bitStream); + auto samps = static_cast (ov_read_float (&ovFile, &dataIn, numToRead, &bitStream)); if (samps <= 0) break; @@ -490,9 +496,9 @@ StringArray OggVorbisAudioFormat::getQualityOptions() int OggVorbisAudioFormat::estimateOggFileQuality (const File& source) { - if (auto* in = source.createInputStream()) + if (auto in = source.createInputStream()) { - if (auto r = std::unique_ptr (createReaderFor (in, true))) + if (auto r = std::unique_ptr (createReaderFor (in.release(), true))) { auto lengthSecs = r->lengthInSamples / r->sampleRate; auto approxBitsPerSecond = (int) (source.getSize() * 8 / lengthSecs); diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp index 3515786aed..dd03c70d9d 100644 --- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp @@ -157,8 +157,8 @@ const char* const WavAudioFormat::tracktionLoopInfo = "tracktion loop info"; //============================================================================== namespace WavFileHelpers { - JUCE_CONSTEXPR inline int chunkName (const char* name) noexcept { return (int) ByteOrder::littleEndianInt (name); } - JUCE_CONSTEXPR inline size_t roundUpSize (size_t sz) noexcept { return (sz + 3) & ~3u; } + constexpr inline int chunkName (const char* name) noexcept { return (int) ByteOrder::littleEndianInt (name); } + constexpr inline size_t roundUpSize (size_t sz) noexcept { return (sz + 3) & ~3u; } #if JUCE_MSVC #pragma pack (push, 1) @@ -1703,7 +1703,7 @@ AudioFormatReader* WavAudioFormat::createReaderFor (InputStream* sourceStream, b MemoryMappedAudioFormatReader* WavAudioFormat::createMemoryMappedReader (const File& file) { - return createMemoryMappedReader (file.createInputStream()); + return createMemoryMappedReader (file.createInputStream().release()); } MemoryMappedAudioFormatReader* WavAudioFormat::createMemoryMappedReader (FileInputStream* fin) @@ -1748,7 +1748,7 @@ namespace WavFileHelpers TemporaryFile tempFile (file); WavAudioFormat wav; - std::unique_ptr reader (wav.createReaderFor (file.createInputStream(), true)); + std::unique_ptr reader (wav.createReaderFor (file.createInputStream().release(), true)); if (reader != nullptr) { @@ -1781,7 +1781,7 @@ bool WavAudioFormat::replaceMetadataInFile (const File& wavFile, const StringPai { using namespace WavFileHelpers; - std::unique_ptr reader (static_cast (createReaderFor (wavFile.createInputStream(), true))); + std::unique_ptr reader (static_cast (createReaderFor (wavFile.createInputStream().release(), true))); if (reader != nullptr) { diff --git a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/os.h b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/os.h index 412ca7622f..4997d657ff 100644 --- a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/os.h +++ b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/os.h @@ -145,7 +145,7 @@ static __inline void vorbis_fpu_restore(vorbis_fpu_control fpu){ /* Optimized code path for x86_64 builds. Uses SSE2 intrinsics. This can be done safely because all x86_64 CPUs supports SSE2. */ -#if (! JUCE_PROJUCER_LIVE_BUILD) && ((defined(_MSC_VER) && defined(_WIN64)) || (defined(__GNUC__) && defined (__x86_64__))) +#if ! JUCE_PROJUCER_LIVE_BUILD && ((JUCE_MSVC && JUCE_64BIT) || (JUCE_GCC && defined (__x86_64__))) # define VORBIS_FPU_CONTROL typedef ogg_int16_t vorbis_fpu_control; diff --git a/modules/juce_audio_formats/format/juce_AudioFormatManager.cpp b/modules/juce_audio_formats/format/juce_AudioFormatManager.cpp index 768271995a..17e3e09be7 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatManager.cpp +++ b/modules/juce_audio_formats/format/juce_AudioFormatManager.cpp @@ -126,14 +126,14 @@ AudioFormatReader* AudioFormatManager::createReaderFor (const File& file) for (auto* af : knownFormats) if (af->canHandleFile (file)) - if (auto* in = file.createInputStream()) - if (auto* r = af->createReaderFor (in, true)) + if (auto in = file.createInputStream()) + if (auto* r = af->createReaderFor (in.release(), true)) return r; return nullptr; } -AudioFormatReader* AudioFormatManager::createReaderFor (InputStream* audioFileStream) +AudioFormatReader* AudioFormatManager::createReaderFor (std::unique_ptr audioFileStream) { // you need to actually register some formats before the manager can // use them to open a file! @@ -141,22 +141,21 @@ AudioFormatReader* AudioFormatManager::createReaderFor (InputStream* audioFileSt if (audioFileStream != nullptr) { - std::unique_ptr in (audioFileStream); - auto originalStreamPos = in->getPosition(); + auto originalStreamPos = audioFileStream->getPosition(); for (auto* af : knownFormats) { - if (auto* r = af->createReaderFor (in.get(), false)) + if (auto* r = af->createReaderFor (audioFileStream.get(), false)) { - in.release(); + audioFileStream.release(); return r; } - in->setPosition (originalStreamPos); + audioFileStream->setPosition (originalStreamPos); // the stream that is passed-in must be capable of being repositioned so // that all the formats can have a go at opening it. - jassert (in->getPosition() == originalStreamPos); + jassert (audioFileStream->getPosition() == originalStreamPos); } } diff --git a/modules/juce_audio_formats/format/juce_AudioFormatManager.h b/modules/juce_audio_formats/format/juce_AudioFormatManager.h index 36140e839f..bbc5a4bfdd 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatManager.h +++ b/modules/juce_audio_formats/format/juce_AudioFormatManager.h @@ -138,7 +138,7 @@ public: If none of the registered formats can open the stream, it'll return nullptr. If it returns a reader, it's the caller's responsibility to delete the reader. */ - AudioFormatReader* createReaderFor (InputStream* audioFileStream); + AudioFormatReader* createReaderFor (std::unique_ptr audioFileStream); private: //============================================================================== diff --git a/modules/juce_audio_formats/juce_audio_formats.h b/modules/juce_audio_formats/juce_audio_formats.h index 179d89f804..1247742ba0 100644 --- a/modules/juce_audio_formats/juce_audio_formats.h +++ b/modules/juce_audio_formats/juce_audio_formats.h @@ -24,6 +24,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -33,17 +34,17 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_audio_formats - vendor: juce - version: 5.4.5 - name: JUCE audio file format codecs - description: Classes for reading and writing various audio file formats. - website: http://www.juce.com/juce - license: GPL/Commercial + ID: juce_audio_formats + vendor: juce + version: 5.4.7 + name: JUCE audio file format codecs + description: Classes for reading and writing various audio file formats. + website: http://www.juce.com/juce + license: GPL/Commercial - dependencies: juce_audio_basics - OSXFrameworks: CoreAudio CoreMIDI QuartzCore AudioToolbox - iOSFrameworks: AudioToolbox QuartzCore + dependencies: juce_audio_basics + OSXFrameworks: CoreAudio CoreMIDI QuartzCore AudioToolbox + iOSFrameworks: AudioToolbox QuartzCore END_JUCE_MODULE_DECLARATION 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 14c4e9a35f..7698e704b3 100644 --- a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm +++ b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm @@ -44,6 +44,7 @@ #pragma clang diagnostic ignored "-Wextra-semi" #pragma clang diagnostic ignored "-Wcast-align" #pragma clang diagnostic ignored "-Wshadow" + #pragma clang diagnostic ignored "-Wswitch-enum" #if __has_warning("-Wzero-as-null-pointer-constant") #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #endif @@ -1085,16 +1086,19 @@ public: switch (lastTimeStamp.mSMPTETime.mType) { - case kSMPTETimeType2398: info.frameRate = AudioPlayHead::fps23976; break; - case kSMPTETimeType24: info.frameRate = AudioPlayHead::fps24; break; - case kSMPTETimeType25: info.frameRate = AudioPlayHead::fps25; break; - case kSMPTETimeType30Drop: info.frameRate = AudioPlayHead::fps30drop; break; - case kSMPTETimeType30: info.frameRate = AudioPlayHead::fps30; break; - case kSMPTETimeType2997: info.frameRate = AudioPlayHead::fps2997; break; + case kSMPTETimeType2398: info.frameRate = AudioPlayHead::fps23976; break; + case kSMPTETimeType24: info.frameRate = AudioPlayHead::fps24; break; + case kSMPTETimeType25: info.frameRate = AudioPlayHead::fps25; break; + case kSMPTETimeType30Drop: info.frameRate = AudioPlayHead::fps30drop; break; + case kSMPTETimeType30: info.frameRate = AudioPlayHead::fps30; break; + case kSMPTETimeType2997: info.frameRate = AudioPlayHead::fps2997; break; case kSMPTETimeType2997Drop: info.frameRate = AudioPlayHead::fps2997drop; break; - case kSMPTETimeType60: info.frameRate = AudioPlayHead::fps60; break; - case kSMPTETimeType60Drop: info.frameRate = AudioPlayHead::fps60drop; break; - default: info.frameRate = AudioPlayHead::fpsUnknown; break; + case kSMPTETimeType60: info.frameRate = AudioPlayHead::fps60; break; + case kSMPTETimeType60Drop: info.frameRate = AudioPlayHead::fps60drop; break; + case kSMPTETimeType5994: + case kSMPTETimeType5994Drop: + case kSMPTETimeType50: + default: info.frameRate = AudioPlayHead::fpsUnknown; break; } if (CallHostBeatAndTempo (&info.ppqPosition, &info.bpm) != noErr) @@ -1811,7 +1815,7 @@ private: } } - void processBlock (AudioBuffer& buffer, MidiBuffer& midiBuffer) noexcept + void processBlock (juce::AudioBuffer& buffer, MidiBuffer& midiBuffer) noexcept { const ScopedLock sl (juceFilter->getCallbackLock()); 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 93cd35d7fa..bd86ac2e28 100644 --- a/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm +++ b/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm @@ -970,16 +970,19 @@ public: switch (lastTimeStamp.mSMPTETime.mType) { - case kSMPTETimeType2398: info.frameRate = AudioPlayHead::fps23976; break; - case kSMPTETimeType24: info.frameRate = AudioPlayHead::fps24; break; - case kSMPTETimeType25: info.frameRate = AudioPlayHead::fps25; break; - case kSMPTETimeType2997: info.frameRate = AudioPlayHead::fps2997; break; + case kSMPTETimeType2398: info.frameRate = AudioPlayHead::fps23976; break; + case kSMPTETimeType24: info.frameRate = AudioPlayHead::fps24; break; + case kSMPTETimeType25: info.frameRate = AudioPlayHead::fps25; break; + case kSMPTETimeType2997: info.frameRate = AudioPlayHead::fps2997; break; case kSMPTETimeType2997Drop: info.frameRate = AudioPlayHead::fps2997drop; break; - case kSMPTETimeType30Drop: info.frameRate = AudioPlayHead::fps30drop; break; - case kSMPTETimeType30: info.frameRate = AudioPlayHead::fps30; break; - case kSMPTETimeType60Drop: info.frameRate = AudioPlayHead::fps60drop; break; - case kSMPTETimeType60: info.frameRate = AudioPlayHead::fps60; break; - default: info.frameRate = AudioPlayHead::fpsUnknown; break; + case kSMPTETimeType30Drop: info.frameRate = AudioPlayHead::fps30drop; break; + case kSMPTETimeType30: info.frameRate = AudioPlayHead::fps30; break; + case kSMPTETimeType60Drop: info.frameRate = AudioPlayHead::fps60drop; break; + case kSMPTETimeType60: info.frameRate = AudioPlayHead::fps60; break; + case kSMPTETimeType5994: + case kSMPTETimeType5994Drop: + case kSMPTETimeType50: + default: info.frameRate = AudioPlayHead::fpsUnknown; break; } double num; @@ -1127,7 +1130,7 @@ private: AudioBufferList* bufferList = nullptr; int maxFrames, numberOfChannels; bool isInterleaved; - AudioBuffer scratchBuffer; + juce::AudioBuffer scratchBuffer; }; //============================================================================== @@ -1427,6 +1430,7 @@ private: } break; + case AURenderEventMIDISysEx: default: break; } @@ -1553,7 +1557,7 @@ private: return noErr; } - void processBlock (AudioBuffer& buffer, MidiBuffer& midiBuffer) noexcept + void processBlock (juce::AudioBuffer& buffer, MidiBuffer& midiBuffer) noexcept { auto& processor = getAudioProcessor(); const ScopedLock sl (processor.getCallbackLock()); diff --git a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp index 8b4376f46e..59be86f754 100644 --- a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp +++ b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp @@ -41,8 +41,6 @@ // set it then by default we'll just create a simple one as below. #if ! JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP -extern juce::AudioProcessor* JUCE_CALLTYPE createPluginFilter(); - #include "juce_StandaloneFilterWindow.h" namespace juce diff --git a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h index 0cc15378bd..e3d8c3aac0 100644 --- a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h +++ b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h @@ -24,9 +24,9 @@ ============================================================================== */ -#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client -extern juce::AudioProcessor* JUCE_API JUCE_CALLTYPE createPluginFilterOfType (juce::AudioProcessor::WrapperType type); -#endif +#pragma once + +#include "../utility/juce_CreatePluginFilter.h" namespace juce { @@ -123,15 +123,7 @@ public: //============================================================================== virtual void createPlugin() { - #if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client - processor.reset (::createPluginFilterOfType (AudioProcessor::wrapperType_Standalone)); - #else - AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Standalone); - processor.reset (createPluginFilter()); - AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Undefined); - #endif - jassert (processor != nullptr); // Your createPluginFilter() function must return a valid object! - + processor.reset (createPluginFilterOfType (AudioProcessor::wrapperType_Standalone)); processor->disableNonMainBuses(); processor->setRateAndBufferSizeDetails (44100, 512); @@ -255,36 +247,23 @@ public: { DialogWindow::LaunchOptions o; - int minNumInputs = std::numeric_limits::max(), maxNumInputs = 0, - minNumOutputs = std::numeric_limits::max(), maxNumOutputs = 0; - - auto updateMinAndMax = [] (int newValue, int& minValue, int& maxValue) - { - minValue = jmin (minValue, newValue); - maxValue = jmax (maxValue, newValue); - }; + int maxNumInputs = 0, maxNumOutputs = 0; if (channelConfiguration.size() > 0) { - auto defaultConfig = channelConfiguration.getReference (0); - updateMinAndMax ((int) defaultConfig.numIns, minNumInputs, maxNumInputs); - updateMinAndMax ((int) defaultConfig.numOuts, minNumOutputs, maxNumOutputs); + auto& defaultConfig = channelConfiguration.getReference (0); + + maxNumInputs = jmax (0, (int) defaultConfig.numIns); + maxNumOutputs = jmax (0, (int) defaultConfig.numOuts); } if (auto* bus = processor->getBus (true, 0)) - updateMinAndMax (bus->getDefaultLayout().size(), minNumInputs, maxNumInputs); + maxNumInputs = jmax (0, bus->getDefaultLayout().size()); if (auto* bus = processor->getBus (false, 0)) - updateMinAndMax (bus->getDefaultLayout().size(), minNumOutputs, maxNumOutputs); + maxNumOutputs = jmax (0, bus->getDefaultLayout().size()); - minNumInputs = jmin (minNumInputs, maxNumInputs); - minNumOutputs = jmin (minNumOutputs, maxNumOutputs); - - o.content.setOwned (new SettingsComponent (*this, deviceManager, - minNumInputs, - maxNumInputs, - minNumOutputs, - maxNumOutputs)); + o.content.setOwned (new SettingsComponent (*this, deviceManager, maxNumInputs, maxNumOutputs)); o.content->setSize (500, 550); o.dialogTitle = TRANS("Audio/MIDI Settings"); @@ -425,14 +404,12 @@ private: public: SettingsComponent (StandalonePluginHolder& pluginHolder, AudioDeviceManager& deviceManagerToUse, - int minAudioInputChannels, int maxAudioInputChannels, - int minAudioOutputChannels, int maxAudioOutputChannels) : owner (pluginHolder), deviceSelector (deviceManagerToUse, - minAudioInputChannels, maxAudioInputChannels, - minAudioOutputChannels, maxAudioOutputChannels, + 0, maxAudioInputChannels, + 0, maxAudioOutputChannels, true, (pluginHolder.processor.get() != nullptr && pluginHolder.processor->producesMidi()), true, false), @@ -574,7 +551,7 @@ private: @tags{Audio} */ class StandaloneFilterWindow : public DocumentWindow, - public Button::Listener + private Button::Listener { public: //============================================================================== @@ -681,20 +658,6 @@ public: JUCEApplicationBase::quit(); } - void buttonClicked (Button*) override - { - PopupMenu m; - m.addItem (1, TRANS("Audio/MIDI Settings...")); - m.addSeparator(); - m.addItem (2, TRANS("Save current state...")); - m.addItem (3, TRANS("Load a saved state...")); - m.addSeparator(); - m.addItem (4, TRANS("Reset to default state")); - - m.showMenuAsync (PopupMenu::Options(), - ModalCallbackFunction::forComponent (menuCallback, this)); - } - void handleMenuResult (int result) { switch (result) @@ -724,6 +687,20 @@ public: std::unique_ptr pluginHolder; private: + void buttonClicked (Button*) override + { + PopupMenu m; + m.addItem (1, TRANS("Audio/MIDI Settings...")); + m.addSeparator(); + m.addItem (2, TRANS("Save current state...")); + m.addItem (3, TRANS("Load a saved state...")); + m.addSeparator(); + m.addItem (4, TRANS("Reset to default state")); + + m.showMenuAsync (PopupMenu::Options(), + ModalCallbackFunction::forComponent (menuCallback, this)); + } + //============================================================================== class MainContentComponent : public Component, private Value::Listener, diff --git a/modules/juce_audio_plugin_client/Unity/juce_UnityPluginInterface.h b/modules/juce_audio_plugin_client/Unity/juce_UnityPluginInterface.h index 5cfe674e5c..a86daeee81 100644 --- a/modules/juce_audio_plugin_client/Unity/juce_UnityPluginInterface.h +++ b/modules/juce_audio_plugin_client/Unity/juce_UnityPluginInterface.h @@ -30,7 +30,7 @@ //============================================================================== #define UNITY_AUDIO_PLUGIN_API_VERSION 0x010401 -#if JUCE_WINDOWS +#if JUCE_MSVC #define UNITY_INTERFACE_API __stdcall #define UNITY_INTERFACE_EXPORT __declspec(dllexport) #else 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 879c9066b4..5a70020c5d 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -162,6 +162,10 @@ namespace juce #endif #endif +#if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + extern JUCE_API double getScaleFactorForWindow (HWND); +#endif + extern JUCE_API bool handleManufacturerSpecificVST2Opcode (int32, pointer_sized_int, void*, float); } @@ -835,17 +839,16 @@ public: void audioProcessorChanged (AudioProcessor*) override { vstEffect.initialDelay = processor->getLatencySamples(); - - if (hostCallback != nullptr) - hostCallback (&vstEffect, Vst2::audioMasterUpdateDisplay, 0, 0, nullptr, 0); - triggerAsyncUpdate(); } void handleAsyncUpdate() override { if (hostCallback != nullptr) - hostCallback (&vstEffect, Vst2::audioMasterIOChanged, 0, 0, nullptr, 0); + { + hostCallback (&vstEffect, Vst2::audioMasterUpdateDisplay, 0, 0, nullptr, 0); + hostCallback (&vstEffect, Vst2::audioMasterIOChanged, 0, 0, nullptr, 0); + } } bool getPinProperties (Vst2::VstPinProperties& properties, bool direction, int index) const @@ -898,210 +901,6 @@ public: } //============================================================================== - struct SpeakerMappings : private AudioChannelSet // (inheritance only to give easier access to items in the namespace) - { - struct Mapping - { - int32 vst2; - ChannelType channels[13]; - - bool matches (const Array& chans) const noexcept - { - const int n = sizeof (channels) / sizeof (ChannelType); - - for (int i = 0; i < n; ++i) - { - if (channels[i] == unknown) return (i == chans.size()); - if (i == chans.size()) return (channels[i] == unknown); - - if (channels[i] != chans.getUnchecked(i)) - return false; - } - - return true; - } - }; - - static AudioChannelSet vstArrangementTypeToChannelSet (const Vst2::VstSpeakerArrangement& arr) - { - if (arr.type == Vst2::kSpeakerArrEmpty) return AudioChannelSet::disabled(); - if (arr.type == Vst2::kSpeakerArrMono) return AudioChannelSet::mono(); - if (arr.type == Vst2::kSpeakerArrStereo) return AudioChannelSet::stereo(); - if (arr.type == Vst2::kSpeakerArr30Cine) return AudioChannelSet::createLCR(); - if (arr.type == Vst2::kSpeakerArr30Music) return AudioChannelSet::createLRS(); - if (arr.type == Vst2::kSpeakerArr40Cine) return AudioChannelSet::createLCRS(); - if (arr.type == Vst2::kSpeakerArr50) return AudioChannelSet::create5point0(); - if (arr.type == Vst2::kSpeakerArr51) return AudioChannelSet::create5point1(); - if (arr.type == Vst2::kSpeakerArr60Cine) return AudioChannelSet::create6point0(); - if (arr.type == Vst2::kSpeakerArr61Cine) return AudioChannelSet::create6point1(); - if (arr.type == Vst2::kSpeakerArr60Music) return AudioChannelSet::create6point0Music(); - if (arr.type == Vst2::kSpeakerArr61Music) return AudioChannelSet::create6point1Music(); - if (arr.type == Vst2::kSpeakerArr70Music) return AudioChannelSet::create7point0(); - if (arr.type == Vst2::kSpeakerArr70Cine) return AudioChannelSet::create7point0SDDS(); - if (arr.type == Vst2::kSpeakerArr71Music) return AudioChannelSet::create7point1(); - if (arr.type == Vst2::kSpeakerArr71Cine) return AudioChannelSet::create7point1SDDS(); - if (arr.type == Vst2::kSpeakerArr40Music) return AudioChannelSet::quadraphonic(); - - for (auto* m = getMappings(); m->vst2 != Vst2::kSpeakerArrEmpty; ++m) - { - if (m->vst2 == arr.type) - { - AudioChannelSet s; - - for (int i = 0; m->channels[i] != 0; ++i) - s.addChannel (m->channels[i]); - - return s; - } - } - - return AudioChannelSet::discreteChannels (arr.numChannels); - } - - static int32 channelSetToVstArrangementType (AudioChannelSet channels) - { - if (channels == AudioChannelSet::disabled()) return Vst2::kSpeakerArrEmpty; - if (channels == AudioChannelSet::mono()) return Vst2::kSpeakerArrMono; - if (channels == AudioChannelSet::stereo()) return Vst2::kSpeakerArrStereo; - if (channels == AudioChannelSet::createLCR()) return Vst2::kSpeakerArr30Cine; - if (channels == AudioChannelSet::createLRS()) return Vst2::kSpeakerArr30Music; - if (channels == AudioChannelSet::createLCRS()) return Vst2::kSpeakerArr40Cine; - if (channels == AudioChannelSet::create5point0()) return Vst2::kSpeakerArr50; - if (channels == AudioChannelSet::create5point1()) return Vst2::kSpeakerArr51; - if (channels == AudioChannelSet::create6point0()) return Vst2::kSpeakerArr60Cine; - if (channels == AudioChannelSet::create6point1()) return Vst2::kSpeakerArr61Cine; - if (channels == AudioChannelSet::create6point0Music()) return Vst2::kSpeakerArr60Music; - if (channels == AudioChannelSet::create6point1Music()) return Vst2::kSpeakerArr61Music; - if (channels == AudioChannelSet::create7point0()) return Vst2::kSpeakerArr70Music; - if (channels == AudioChannelSet::create7point0SDDS()) return Vst2::kSpeakerArr70Cine; - if (channels == AudioChannelSet::create7point1()) return Vst2::kSpeakerArr71Music; - if (channels == AudioChannelSet::create7point1SDDS()) return Vst2::kSpeakerArr71Cine; - if (channels == AudioChannelSet::quadraphonic()) return Vst2::kSpeakerArr40Music; - - if (channels == AudioChannelSet::disabled()) - return Vst2::kSpeakerArrEmpty; - - auto chans = channels.getChannelTypes(); - - for (auto* m = getMappings(); m->vst2 != Vst2::kSpeakerArrEmpty; ++m) - if (m->matches (chans)) - return m->vst2; - - return Vst2::kSpeakerArrUserDefined; - } - - static void channelSetToVstArrangement (const AudioChannelSet& channels, Vst2::VstSpeakerArrangement& result) - { - result.type = channelSetToVstArrangementType (channels); - result.numChannels = channels.size(); - - for (int i = 0; i < result.numChannels; ++i) - { - auto& speaker = result.speakers[i]; - - zeromem (&speaker, sizeof (Vst2::VstSpeakerProperties)); - speaker.type = getSpeakerType (channels.getTypeOfChannel (i)); - } - } - - static const Mapping* getMappings() noexcept - { - static const Mapping mappings[] = - { - { Vst2::kSpeakerArrMono, { centre, unknown } }, - { Vst2::kSpeakerArrStereo, { left, right, unknown } }, - { Vst2::kSpeakerArrStereoSurround, { leftSurround, rightSurround, unknown } }, - { Vst2::kSpeakerArrStereoCenter, { leftCentre, rightCentre, unknown } }, - { Vst2::kSpeakerArrStereoSide, { leftSurroundRear, rightSurroundRear, unknown } }, - { Vst2::kSpeakerArrStereoCLfe, { centre, LFE, unknown } }, - { Vst2::kSpeakerArr30Cine, { left, right, centre, unknown } }, - { Vst2::kSpeakerArr30Music, { left, right, surround, unknown } }, - { Vst2::kSpeakerArr31Cine, { left, right, centre, LFE, unknown } }, - { Vst2::kSpeakerArr31Music, { left, right, LFE, surround, unknown } }, - { Vst2::kSpeakerArr40Cine, { left, right, centre, surround, unknown } }, - { Vst2::kSpeakerArr40Music, { left, right, leftSurround, rightSurround, unknown } }, - { Vst2::kSpeakerArr41Cine, { left, right, centre, LFE, surround, unknown } }, - { Vst2::kSpeakerArr41Music, { left, right, LFE, leftSurround, rightSurround, unknown } }, - { Vst2::kSpeakerArr50, { left, right, centre, leftSurround, rightSurround, unknown } }, - { Vst2::kSpeakerArr51, { left, right, centre, LFE, leftSurround, rightSurround, unknown } }, - { Vst2::kSpeakerArr60Cine, { left, right, centre, leftSurround, rightSurround, surround, unknown } }, - { Vst2::kSpeakerArr60Music, { left, right, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, unknown } }, - { Vst2::kSpeakerArr61Cine, { left, right, centre, LFE, leftSurround, rightSurround, surround, unknown } }, - { Vst2::kSpeakerArr61Music, { left, right, LFE, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, unknown } }, - { Vst2::kSpeakerArr70Cine, { left, right, centre, leftSurround, rightSurround, topFrontLeft, topFrontRight, unknown } }, - { Vst2::kSpeakerArr70Music, { left, right, centre, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, unknown } }, - { Vst2::kSpeakerArr71Cine, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontRight, unknown } }, - { Vst2::kSpeakerArr71Music, { left, right, centre, LFE, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, unknown } }, - { Vst2::kSpeakerArr80Cine, { left, right, centre, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } }, - { Vst2::kSpeakerArr80Music, { left, right, centre, leftSurround, rightSurround, surround, leftSurroundRear, rightSurroundRear, unknown } }, - { Vst2::kSpeakerArr81Cine, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } }, - { Vst2::kSpeakerArr81Music, { left, right, centre, LFE, leftSurround, rightSurround, surround, leftSurroundRear, rightSurroundRear, unknown } }, - { Vst2::kSpeakerArr102, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontCentre, topFrontRight, topRearLeft, topRearRight, LFE2, unknown } }, - { Vst2::kSpeakerArrEmpty, { unknown } } - }; - - return mappings; - } - - static inline int32 getSpeakerType (AudioChannelSet::ChannelType type) noexcept - { - switch (type) - { - case AudioChannelSet::left: return Vst2::kSpeakerL; - case AudioChannelSet::right: return Vst2::kSpeakerR; - case AudioChannelSet::centre: return Vst2::kSpeakerC; - case AudioChannelSet::LFE: return Vst2::kSpeakerLfe; - case AudioChannelSet::leftSurround: return Vst2::kSpeakerLs; - case AudioChannelSet::rightSurround: return Vst2::kSpeakerRs; - case AudioChannelSet::leftCentre: return Vst2::kSpeakerLc; - case AudioChannelSet::rightCentre: return Vst2::kSpeakerRc; - case AudioChannelSet::surround: return Vst2::kSpeakerS; - case AudioChannelSet::leftSurroundRear: return Vst2::kSpeakerSl; - case AudioChannelSet::rightSurroundRear: return Vst2::kSpeakerSr; - case AudioChannelSet::topMiddle: return Vst2::kSpeakerTm; - case AudioChannelSet::topFrontLeft: return Vst2::kSpeakerTfl; - case AudioChannelSet::topFrontCentre: return Vst2::kSpeakerTfc; - case AudioChannelSet::topFrontRight: return Vst2::kSpeakerTfr; - case AudioChannelSet::topRearLeft: return Vst2::kSpeakerTrl; - case AudioChannelSet::topRearCentre: return Vst2::kSpeakerTrc; - case AudioChannelSet::topRearRight: return Vst2::kSpeakerTrr; - case AudioChannelSet::LFE2: return Vst2::kSpeakerLfe2; - default: break; - } - - return 0; - } - - static inline AudioChannelSet::ChannelType getChannelType (int32 type) noexcept - { - switch (type) - { - case Vst2::kSpeakerL: return AudioChannelSet::left; - case Vst2::kSpeakerR: return AudioChannelSet::right; - case Vst2::kSpeakerC: return AudioChannelSet::centre; - case Vst2::kSpeakerLfe: return AudioChannelSet::LFE; - case Vst2::kSpeakerLs: return AudioChannelSet::leftSurround; - case Vst2::kSpeakerRs: return AudioChannelSet::rightSurround; - case Vst2::kSpeakerLc: return AudioChannelSet::leftCentre; - case Vst2::kSpeakerRc: return AudioChannelSet::rightCentre; - case Vst2::kSpeakerS: return AudioChannelSet::surround; - case Vst2::kSpeakerSl: return AudioChannelSet::leftSurroundRear; - case Vst2::kSpeakerSr: return AudioChannelSet::rightSurroundRear; - case Vst2::kSpeakerTm: return AudioChannelSet::topMiddle; - case Vst2::kSpeakerTfl: return AudioChannelSet::topFrontLeft; - case Vst2::kSpeakerTfc: return AudioChannelSet::topFrontCentre; - case Vst2::kSpeakerTfr: return AudioChannelSet::topFrontRight; - case Vst2::kSpeakerTrl: return AudioChannelSet::topRearLeft; - case Vst2::kSpeakerTrc: return AudioChannelSet::topRearCentre; - case Vst2::kSpeakerTrr: return AudioChannelSet::topRearRight; - case Vst2::kSpeakerLfe2: return AudioChannelSet::LFE2; - default: break; - } - - return AudioChannelSet::unknown; - } - }; - void timerCallback() override { if (shouldDeleteEditor) @@ -1269,6 +1068,9 @@ public: // A component to hold the AudioProcessorEditor, and cope with some housekeeping // chores when it changes or repaints. struct EditorCompWrapper : public Component + #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + , public Timer + #endif { EditorCompWrapper (JuceVSTWrapper& w, AudioProcessorEditor& editor) : wrapper (w) @@ -1287,12 +1089,13 @@ public: #if JUCE_WINDOWS if (! getHostType().isReceptor()) addMouseListener (this, true); - #if JUCE_WIN_PER_MONITOR_DPI_AWARE - wrapper.editorScaleFactor = static_cast (Desktop::getInstance().getDisplays().getMainDisplay().scale); - #endif #endif ignoreUnused (fakeMouseGenerator); + + #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + startTimer (500); + #endif } ~EditorCompWrapper() override @@ -1306,16 +1109,7 @@ public: void getEditorBounds (Vst2::ERect& bounds) { auto b = getSizeToContainChild(); - - bounds.top = 0; - bounds.left = 0; - bounds.bottom = (int16) b.getHeight(); - bounds.right = (int16) b.getWidth(); - - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - bounds.bottom = (int16) roundToInt (bounds.bottom * wrapper.editorScaleFactor); - bounds.right = (int16) roundToInt (bounds.right * wrapper.editorScaleFactor); - #endif + bounds = convertToHostBounds ({ 0, 0, (int16) b.getHeight(), (int16) b.getWidth() }); } void attachToHost (VstOpCodeArguments args) @@ -1326,14 +1120,6 @@ public: #if JUCE_WINDOWS addToDesktop (0, args.ptr); hostWindow = (HWND) args.ptr; - - if (auto* ed = getEditorComp()) - #if JUCE_WIN_PER_MONITOR_DPI_AWARE - if (auto* peer = ed->getPeer()) - wrapper.editorScaleFactor = (float) peer->getPlatformScaleFactor(); - #else - ed->setScaleFactor (wrapper.editorScaleFactor); - #endif #elif JUCE_LINUX addToDesktop (0, args.ptr); hostWindow = (Window) args.ptr; @@ -1370,34 +1156,28 @@ public: AudioProcessorEditor* getEditorComp() const noexcept { - return dynamic_cast (getChildComponent(0)); + return dynamic_cast (getChildComponent (0)); } - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - void checkScaleFactorIsCorrect() - { - if (auto* peer = getEditorComp()->getPeer()) - { - auto peerScaleFactor = (float) peer->getPlatformScaleFactor(); - - if (! approximatelyEqual (peerScaleFactor, wrapper.editorScaleFactor)) - wrapper.handleSetContentScaleFactor (peerScaleFactor); - } - } - #endif - void resized() override { if (auto* ed = getEditorComp()) { - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - checkScaleFactorIsCorrect(); - #endif - ed->setTopLeftPosition (0, 0); if (shouldResizeEditor) - ed->setBounds (ed->getLocalArea (this, getLocalBounds())); + { + auto newBounds = getLocalBounds(); + + #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + if (! lastBounds.isEmpty() && isWithin (newBounds.toDouble().getAspectRatio(), lastBounds.toDouble().getAspectRatio(), 0.1)) + return; + + lastBounds = newBounds; + #endif + + ed->setBounds (ed->getLocalArea (this, newBounds)); + } updateWindowSize (false); } @@ -1446,9 +1226,15 @@ public: shouldResizeEditor = true; #else ignoreUnused (resizeEditor); + + auto scale = Desktop::getInstance().getGlobalScaleFactor(); + + if (auto* peer = ed->getPeer()) + scale *= (float) peer->getPlatformScaleFactor(); + XResizeWindow (display.display, (Window) getWindowHandle(), - static_cast (roundToInt (pos.getWidth() * wrapper.editorScaleFactor)), - static_cast (roundToInt (pos.getHeight() * wrapper.editorScaleFactor))); + static_cast (roundToInt (pos.getWidth() * scale)), + static_cast (roundToInt (pos.getHeight() * scale))); #endif #if JUCE_MAC @@ -1460,6 +1246,10 @@ public: void resizeHostWindow (int newWidth, int newHeight) { + auto rect = convertToHostBounds ({ 0, 0, (int16) newHeight, (int16) newWidth }); + newWidth = rect.right - rect.left; + newHeight = rect.bottom - rect.top; + bool sizeWasSuccessful = false; if (auto host = wrapper.hostCallback) @@ -1468,11 +1258,6 @@ public: if (status == (pointer_sized_int) 1 || getHostType().isAbletonLive()) { - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - newWidth = roundToInt (newWidth * wrapper.editorScaleFactor); - newHeight = roundToInt (newHeight * wrapper.editorScaleFactor); - #endif - const ScopedValueSetter inSizeWindowSetter (isInSizeWindow, true); sizeWasSuccessful = (host (wrapper.getAEffect(), Vst2::audioMasterSizeWindow, @@ -1495,11 +1280,6 @@ public: int dh = 0; const int frameThickness = GetSystemMetrics (SM_CYFIXEDFRAME); - #if JUCE_WIN_PER_MONITOR_DPI_AWARE - newWidth = roundToInt (newWidth * wrapper.editorScaleFactor); - newHeight = roundToInt (newHeight * wrapper.editorScaleFactor); - #endif - HWND w = (HWND) getWindowHandle(); while (w != 0) @@ -1548,6 +1328,29 @@ public: } } + void setContentScaleFactor (float scale) + { + if (! approximatelyEqual (scale, editorScaleFactor)) + { + editorScaleFactor = scale; + + if (auto* ed = getEditorComp()) + ed->setScaleFactor (editorScaleFactor); + + updateWindowSize (true); + } + } + + #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + void timerCallback() override + { + auto hostWindowScale = (float) getScaleFactorForWindow (hostWindow); + + if (hostWindowScale > 0.0f && ! approximatelyEqual (hostWindowScale, editorScaleFactor)) + wrapper.handleSetContentScaleFactor (hostWindowScale); + } + #endif + #if JUCE_WINDOWS void mouseDown (const MouseEvent&) override { @@ -1573,20 +1376,39 @@ public: } #endif + //============================================================================== + static Vst2::ERect convertToHostBounds (const Vst2::ERect& rect) + { + auto desktopScale = Desktop::getInstance().getGlobalScaleFactor(); + + if (approximatelyEqual (desktopScale, 1.0f)) + return rect; + + return { (int16) roundToInt (rect.top * desktopScale), + (int16) roundToInt (rect.left * desktopScale), + (int16) roundToInt (rect.bottom * desktopScale), + (int16) roundToInt (rect.right * desktopScale)}; + } + //============================================================================== JuceVSTWrapper& wrapper; FakeMouseMoveGenerator fakeMouseGenerator; bool isInSizeWindow = false; bool shouldResizeEditor = true; + float editorScaleFactor = 1.0f; + #if JUCE_MAC void* hostWindow = nullptr; #elif JUCE_LINUX ScopedXDisplay display; Window hostWindow = {}; - #else + #elif JUCE_WINDOWS HWND hostWindow = {}; WindowsHooks hooks; + #if JUCE_WIN_PER_MONITOR_DPI_AWARE + juce::Rectangle lastBounds; + #endif #endif JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EditorCompWrapper) @@ -2220,18 +2042,10 @@ private: pointer_sized_int handleSetContentScaleFactor (float scale) { #if ! JUCE_MAC - if (! approximatelyEqual (scale, editorScaleFactor)) - { - editorScaleFactor = scale; + if (editorComp != nullptr) + editorComp->setContentScaleFactor (scale); - if (editorComp != nullptr) - #if JUCE_WINDOWS && ! JUCE_WIN_PER_MONITOR_DPI_AWARE - if (auto* ed = editorComp->getEditorComp()) - ed->setScaleFactor (scale); - #else - editorComp->updateWindowSize (true); - #endif - } + lastScaleFactorReceived = scale; #else ignoreUnused (scale); #endif @@ -2301,7 +2115,7 @@ private: VSTMidiEventList outgoingEvents; #if ! JUCE_MAC - float editorScaleFactor = 1.0f; + float lastScaleFactorReceived = 1.0f; #endif LegacyAudioParametersWrapper juceParameters; 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 0947eb5f72..35dbcb1480 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -90,6 +90,10 @@ using namespace Steinberg; extern JUCE_API void detachComponentFromWindowRefVST (Component*, void* nsWindow, bool isNSView); #endif +#if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + extern JUCE_API double getScaleFactorForWindow (HWND); +#endif + //============================================================================== class JuceAudioProcessor : public Vst::IUnitInfo { @@ -952,7 +956,9 @@ private: std::atomic vst3IsPlaying { false }, inSetupProcessing { false }; + #if ! JUCE_MAC float lastScaleFactorReceived = 1.0f; + #endif void setupParameters() { @@ -1035,13 +1041,14 @@ private: : Vst::EditorView (&ec, nullptr), owner (&ec), pluginInstance (p) { - editorScaleFactor = ec.lastScaleFactorReceived; - component.reset (new ContentWrapperComponent (*this, p)); #if JUCE_MAC if (getHostType().type == PluginHostType::SteinbergCubase10) cubase10Workaround.reset (new Cubase10WindowResizeWorkaround (*this)); + #else + if (! approximatelyEqual (editorScaleFactor, ec.lastScaleFactorReceived)) + setContentScaleFactor (ec.lastScaleFactorReceived); #endif } @@ -1081,18 +1088,11 @@ private: component->addToDesktop (0, parent); component->setOpaque (true); component->setVisible (true); - #if JUCE_WIN_PER_MONITOR_DPI_AWARE - component->checkScaleFactorIsCorrect(); - #endif #else isNSView = (strcmp (type, kPlatformTypeNSView) == 0); macHostWindow = juce::attachComponentToWindowRefVST (component.get(), parent, isNSView); #endif - #if ! JUCE_MAC - setContentScaleFactor ((Steinberg::IPlugViewContentScaleSupport::ScaleFactor) editorScaleFactor); - #endif - component->resizeHostWindow(); systemWindow = parent; attachedToParent(); @@ -1128,45 +1128,26 @@ private: { if (newSize != nullptr) { - rect = *newSize; + rect = convertFromHostBounds (*newSize); if (component != nullptr) { auto w = rect.getWidth(); auto h = rect.getHeight(); - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - w = roundToInt (w / editorScaleFactor); - h = roundToInt (h / editorScaleFactor); - - if (getHostType().type == PluginHostType::SteinbergCubase10) - { - auto integerScaleFactor = (int) std::round (editorScaleFactor); - - // Workaround for Cubase 10 sending double-scaled bounds when opening editor - if (isWithin ((int) w, component->getWidth() * integerScaleFactor, 2) - && isWithin ((int) h, component->getHeight() * integerScaleFactor, 2)) - { - w /= integerScaleFactor; - h /= integerScaleFactor; - } - } - #endif - component->setSize (w, h); #if JUCE_MAC if (cubase10Workaround != nullptr) + { cubase10Workaround->triggerAsyncUpdate(); + } else #endif - if (auto* peer = component->getPeer()) - peer->updateBounds(); - - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - if (getHostType().type == PluginHostType::SteinbergCubase10) - component->resizeHostWindow(); - #endif + { + if (auto* peer = component->getPeer()) + peer->updateBounds(); + } } return kResultTrue; @@ -1180,16 +1161,9 @@ private: { if (size != nullptr && component != nullptr) { - auto w = component->getWidth(); - auto h = component->getHeight(); - - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - w = roundToInt (w * editorScaleFactor); - h = roundToInt (h * editorScaleFactor); - #endif - - *size = ViewRect (0, 0, w, h); + auto editorBounds = component->getSizeToContainChild(); + *size = convertToHostBounds ({ 0, 0, editorBounds.getWidth(), editorBounds.getHeight() }); return kResultTrue; } @@ -1200,7 +1174,8 @@ private: { if (component != nullptr) if (auto* editor = component->pluginEditor.get()) - return editor->isResizable() ? kResultTrue : kResultFalse; + if (editor->isResizable()) + return kResultTrue; return kResultFalse; } @@ -1213,21 +1188,18 @@ private: { if (auto* constrainer = editor->getConstrainer()) { - auto scale = editor->getTransform().getScaleFactor(); + *rectToCheck = convertFromHostBounds (*rectToCheck); - auto minW = (double) (constrainer->getMinimumWidth() * scale); - auto maxW = (double) (constrainer->getMaximumWidth() * scale); - auto minH = (double) (constrainer->getMinimumHeight() * scale); - auto maxH = (double) (constrainer->getMaximumHeight() * scale); + auto transformScale = std::sqrt (std::abs (editor->getTransform().getDeterminant())); + + auto minW = (double) (constrainer->getMinimumWidth() * transformScale); + auto maxW = (double) (constrainer->getMaximumWidth() * transformScale); + auto minH = (double) (constrainer->getMinimumHeight() * transformScale); + auto maxH = (double) (constrainer->getMaximumHeight() * transformScale); auto width = (double) (rectToCheck->right - rectToCheck->left); auto height = (double) (rectToCheck->bottom - rectToCheck->top); - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - width /= editorScaleFactor; - height /= editorScaleFactor; - #endif - width = jlimit (minW, maxW, width); height = jlimit (minH, maxH, height); @@ -1267,13 +1239,10 @@ private: } } - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - width *= editorScaleFactor; - height *= editorScaleFactor; - #endif - rectToCheck->right = rectToCheck->left + roundToInt (width); rectToCheck->bottom = rectToCheck->top + roundToInt (height); + + *rectToCheck = convertToHostBounds (*rectToCheck); } } @@ -1287,33 +1256,24 @@ private: tresult PLUGIN_API setContentScaleFactor (Steinberg::IPlugViewContentScaleSupport::ScaleFactor factor) override { #if ! JUCE_MAC - auto hostType = getHostType().type; - - if (hostType == PluginHostType::SteinbergCubase10 || hostType == PluginHostType::FruityLoops) - { - if (component.get() != nullptr) - if (auto* peer = component->getPeer()) - factor = static_cast (peer->getPlatformScaleFactor()); - } - if (! approximatelyEqual ((float) factor, editorScaleFactor)) { editorScaleFactor = (float) factor; - if (auto* o = owner.get()) - o->lastScaleFactorReceived = editorScaleFactor; + if (owner != nullptr) + owner->lastScaleFactorReceived = editorScaleFactor; - if (component == nullptr) - return kResultFalse; + if (component != nullptr) + { + if (auto* editor = component->pluginEditor.get()) + { + editor->setScaleFactor (editorScaleFactor); - #if JUCE_WINDOWS && ! JUCE_WIN_PER_MONITOR_DPI_AWARE - if (auto* ed = component->pluginEditor.get()) - ed->setScaleFactor ((float) factor); - #endif - - component->resizeHostWindow(); - component->setTopLeftPosition (0, 0); - component->repaint(); + component->resizeHostWindow(); + component->setTopLeftPosition (0, 0); + component->repaint(); + } + } } return kResultTrue; @@ -1333,8 +1293,37 @@ private: onSize (&viewRect); } + static ViewRect convertToHostBounds (ViewRect pluginRect) + { + auto desktopScale = Desktop::getInstance().getGlobalScaleFactor(); + + if (approximatelyEqual (desktopScale, 1.0f)) + return pluginRect; + + return { roundToInt (pluginRect.left * desktopScale), + roundToInt (pluginRect.top * desktopScale), + roundToInt (pluginRect.right * desktopScale), + roundToInt (pluginRect.bottom * desktopScale) }; + } + + static ViewRect convertFromHostBounds (ViewRect hostRect) + { + auto desktopScale = Desktop::getInstance().getGlobalScaleFactor(); + + if (approximatelyEqual (desktopScale, 1.0f)) + return hostRect; + + return { roundToInt (hostRect.left / desktopScale), + roundToInt (hostRect.top / desktopScale), + roundToInt (hostRect.right / desktopScale), + roundToInt (hostRect.bottom / desktopScale) }; + } + //============================================================================== struct ContentWrapperComponent : public Component + #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + , private Timer + #endif { ContentWrapperComponent (JuceVST3Editor& editor, AudioProcessor& plugin) : pluginEditor (plugin.createEditorIfNeeded()), @@ -1349,16 +1338,22 @@ private: if (pluginEditor != nullptr) { addAndMakeVisible (pluginEditor.get()); - pluginEditor->setTopLeftPosition (0, 0); + lastBounds = getSizeToContainChild(); - isResizingParentToFitChild = true; - setBounds (lastBounds); - isResizingParentToFitChild = false; + + { + const ScopedValueSetter resizingParentSetter (resizingParent, true); + setBounds (lastBounds); + } resizeHostWindow(); } + #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + startTimer (500); + #endif + ignoreUnused (fakeMouseGenerator); } @@ -1386,7 +1381,7 @@ private: void childBoundsChanged (Component*) override { - if (isResizingChildToFitParent) + if (resizingChild) return; auto b = getSizeToContainChild(); @@ -1394,46 +1389,38 @@ private: if (lastBounds != b) { lastBounds = b; - isResizingParentToFitChild = true; + + const ScopedValueSetter resizingParentSetter (resizingParent, true); resizeHostWindow(); - isResizingParentToFitChild = false; } } - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - void checkScaleFactorIsCorrect() - { - if (auto* peer = pluginEditor->getPeer()) - { - auto peerScaleFactor = (float) peer->getPlatformScaleFactor(); - - if (! approximatelyEqual (peerScaleFactor, owner.editorScaleFactor)) - owner.setContentScaleFactor (peerScaleFactor); - } - } - #endif - void resized() override { if (pluginEditor != nullptr) { - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - checkScaleFactorIsCorrect(); - #endif - - if (! isResizingParentToFitChild) + if (! resizingParent) { - lastBounds = getLocalBounds(); - isResizingChildToFitParent = true; + auto newBounds = getLocalBounds(); + + #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + if (! lastBounds.isEmpty() && isWithin (newBounds.toDouble().getAspectRatio(), lastBounds.toDouble().getAspectRatio(), 0.1)) + return; + #endif + + lastBounds = newBounds; + + const ScopedValueSetter resizingChildSetter (resizingChild, true); if (auto* constrainer = pluginEditor->getConstrainer()) { auto aspectRatio = constrainer->getFixedAspectRatio(); - auto width = (double) lastBounds.getWidth(); - auto height = (double) lastBounds.getHeight(); if (aspectRatio != 0) { + auto width = (double) lastBounds.getWidth(); + auto height = (double) lastBounds.getHeight(); + if (width / height > aspectRatio) setBounds ({ 0, 0, roundToInt (height * aspectRatio), lastBounds.getHeight() }); else @@ -1443,7 +1430,6 @@ private: pluginEditor->setTopLeftPosition (0, 0); pluginEditor->setBounds (pluginEditor->getLocalArea (this, getLocalBounds())); - isResizingChildToFitParent = false; } } } @@ -1463,15 +1449,10 @@ private: if (owner.plugFrame != nullptr) { - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - w = roundToInt (w * owner.editorScaleFactor); - h = roundToInt (h * owner.editorScaleFactor); - #endif - - ViewRect newSize (0, 0, w, h); + auto newSize = convertToHostBounds ({ 0, 0, b.getWidth(), b.getHeight() }); { - const ScopedValueSetter resizingParentSetter (isResizingParentToFitChild, true); + const ScopedValueSetter resizingParentSetter (resizingParent, true); owner.plugFrame->resizeView (&owner, &newSize); } @@ -1488,11 +1469,20 @@ private: std::unique_ptr pluginEditor; private: + #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + void timerCallback() override + { + auto hostWindowScale = (float) getScaleFactorForWindow ((HWND) owner.systemWindow); + + if (hostWindowScale > 0.0 && ! approximatelyEqual (hostWindowScale, owner.editorScaleFactor)) + owner.setContentScaleFactor (hostWindowScale); + } + #endif + JuceVST3Editor& owner; FakeMouseMoveGenerator fakeMouseGenerator; Rectangle lastBounds; - bool isResizingChildToFitParent = false; - bool isResizingParentToFitChild = false; + bool resizingChild = false, resizingParent = false; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ContentWrapperComponent) }; @@ -1525,12 +1515,12 @@ private: }; std::unique_ptr cubase10Workaround; - #endif - + #else float editorScaleFactor = 1.0f; - #if JUCE_WINDOWS - WindowsHooks hooks; + #if JUCE_WINDOWS + WindowsHooks hooks; + #endif #endif //============================================================================== @@ -3175,7 +3165,7 @@ JUCE_EXPORTED_FUNCTION IPluginFactory* PLUGIN_API GetPluginFactory() { PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST3; - #if JUCE_WINDOWS + #if JUCE_MSVC // Cunning trick to force this function to be exported. Life's too short to // faff around creating .def files for this kind of thing. #pragma comment(linker, "/EXPORT:" __FUNCTION__ "=" __FUNCDNAME__) 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 61ec8686d7..5fce55a8ff 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client.h +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client.h @@ -24,6 +24,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -33,15 +34,15 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_audio_plugin_client - vendor: juce - version: 5.4.5 - name: JUCE audio plugin wrapper classes - description: Classes for building VST, VST3, AudioUnit, AAX and RTAS plugins. - website: http://www.juce.com/juce - license: GPL/Commercial + ID: juce_audio_plugin_client + vendor: juce + version: 5.4.7 + name: JUCE audio plugin wrapper classes + description: Classes for building VST, VST3, AudioUnit, AAX and RTAS plugins. + website: http://www.juce.com/juce + license: GPL/Commercial - dependencies: juce_gui_basics, juce_audio_basics, juce_audio_processors + dependencies: juce_gui_basics, juce_audio_basics, juce_audio_processors END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_2.mm b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_2.mm index 5b83f67116..b8752d9487 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_2.mm +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_2.mm @@ -39,6 +39,7 @@ #pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" #pragma clang diagnostic ignored "-Wshadow-all" #pragma clang diagnostic ignored "-Wcast-align" + #pragma clang diagnostic ignored "-Wswitch-enum" #if __has_warning("-Wzero-as-null-pointer-constant") #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #endif diff --git a/modules/juce_audio_plugin_client/utility/juce_CreatePluginFilter.h b/modules/juce_audio_plugin_client/utility/juce_CreatePluginFilter.h new file mode 100644 index 0000000000..2939675503 --- /dev/null +++ b/modules/juce_audio_plugin_client/utility/juce_CreatePluginFilter.h @@ -0,0 +1,51 @@ +/* + ============================================================================== + + 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 + +/** Somewhere in the codebase of your plugin, you need to implement this function + and make it return a new instance of the filter subclass that you're building. +*/ +juce::AudioProcessor* JUCE_CALLTYPE createPluginFilter(); + +namespace juce +{ + +inline AudioProcessor* JUCE_API JUCE_CALLTYPE createPluginFilterOfType (AudioProcessor::WrapperType type) +{ + AudioProcessor::setTypeOfNextNewPlugin (type); + AudioProcessor* const pluginInstance = ::createPluginFilter(); + AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Undefined); + + // your createPluginFilter() method must return an object! + jassert (pluginInstance != nullptr && pluginInstance->wrapperType == type); + + return pluginInstance; +} + +} // namespace juce diff --git a/modules/juce_audio_plugin_client/utility/juce_IncludeModuleHeaders.h b/modules/juce_audio_plugin_client/utility/juce_IncludeModuleHeaders.h index 701c4df909..0c820a990d 100644 --- a/modules/juce_audio_plugin_client/utility/juce_IncludeModuleHeaders.h +++ b/modules/juce_audio_plugin_client/utility/juce_IncludeModuleHeaders.h @@ -25,6 +25,7 @@ */ #include "../juce_audio_plugin_client.h" +#include "juce_CreatePluginFilter.h" namespace juce { @@ -42,5 +43,3 @@ namespace juce return hostType; } } - -extern juce::AudioProcessor* JUCE_API JUCE_CALLTYPE createPluginFilterOfType (juce::AudioProcessor::WrapperType); diff --git a/modules/juce_audio_plugin_client/utility/juce_IncludeSystemHeaders.h b/modules/juce_audio_plugin_client/utility/juce_IncludeSystemHeaders.h index da0c178af6..2c0f129848 100644 --- a/modules/juce_audio_plugin_client/utility/juce_IncludeSystemHeaders.h +++ b/modules/juce_audio_plugin_client/utility/juce_IncludeSystemHeaders.h @@ -31,7 +31,7 @@ #define STRICT 1 #include #include - #if ! JUCE_MINGW + #if JUCE_MSVC #pragma warning (disable : 4312 4355) #endif #ifdef __INTEL_COMPILER diff --git a/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h b/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h index 11f5d8ff26..dfba2d3f7e 100644 --- a/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h +++ b/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h @@ -260,6 +260,7 @@ public: case VBVSTScanner: return "VBVSTScanner"; case ViennaEnsemblePro: return "Vienna Ensemble Pro"; case WaveBurner: return "WaveBurner"; + case UnknownHost: default: break; } diff --git a/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp b/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp index e55db48ff5..059686d89f 100644 --- a/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp +++ b/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp @@ -44,14 +44,6 @@ std::function PluginHostType::jucePlugInIsRunningInAudioS bool juce_isRunningInUnity() { return PluginHostType::getPluginLoadedAs() == AudioProcessor::wrapperType_Unity; } #endif -#if JUCE_MODULE_AVAILABLE_juce_opengl && JucePlugin_Build_VST - bool juce_shouldDoubleScaleNativeGLWindow() - { - return PluginHostType::getPluginLoadedAs() == AudioProcessor::wrapperType_VST - && getHostType().type == PluginHostType::AbletonLive10; - } -#endif - #ifndef JUCE_VST3_CAN_REPLACE_VST2 #define JUCE_VST3_CAN_REPLACE_VST2 1 #endif @@ -158,11 +150,6 @@ bool JUCE_API handleManufacturerSpecificVST2Opcode (int32 index, pointer_sized_i } // namespace juce //============================================================================== -/** Somewhere in the codebase of your plugin, you need to implement this function - and make it return a new instance of the filter subclass that you're building. -*/ -extern AudioProcessor* JUCE_CALLTYPE createPluginFilter(); - #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(); @@ -172,18 +159,6 @@ extern AudioProcessor* JUCE_CALLTYPE createPluginFilter(); #endif #endif -AudioProcessor* JUCE_API JUCE_CALLTYPE createPluginFilterOfType (AudioProcessor::WrapperType type) -{ - AudioProcessor::setTypeOfNextNewPlugin (type); - AudioProcessor* const pluginInstance = createPluginFilter(); - AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Undefined); - - // your createPluginFilter() method must return an object! - jassert (pluginInstance != nullptr && pluginInstance->wrapperType == type); - - return pluginInstance; -} - bool PluginHostType::isInterAppAudioConnected() const { #if JucePlugin_Enable_IAA && JucePlugin_Build_Standalone && JUCE_IOS && (! JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP) diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index 0136e58baf..8d4ac0ca6e 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -1401,8 +1401,10 @@ public: if (audioUnit != nullptr) { UInt32 paramListSize = 0; - haveParameterList = AudioUnitGetPropertyInfo (audioUnit, kAudioUnitProperty_ParameterList, kAudioUnitScope_Global, - 0, ¶mListSize, nullptr) == noErr; + auto err = AudioUnitGetPropertyInfo (audioUnit, kAudioUnitProperty_ParameterList, kAudioUnitScope_Global, + 0, ¶mListSize, nullptr); + + haveParameterList = (paramListSize > 0 && err == noErr); if (! haveParameterList) return; @@ -1448,28 +1450,16 @@ public: || info.unit == kAudioUnitParameterUnit_Boolean); bool isBoolean = info.unit == kAudioUnitParameterUnit_Boolean; - String label; - - switch (info.unit) + auto label = [info] () -> String { - case kAudioUnitParameterUnit_Percent: - label = "%"; - break; - case kAudioUnitParameterUnit_Seconds: - label = "s"; - break; - case kAudioUnitParameterUnit_Hertz: - label = "Hz"; - break; - case kAudioUnitParameterUnit_Decibels: - label = "dB"; - break; - case kAudioUnitParameterUnit_Milliseconds: - label = "ms"; - break; - default: - break; - } + if (info.unit == kAudioUnitParameterUnit_Percent) return "%"; + if (info.unit == kAudioUnitParameterUnit_Seconds) return "s"; + if (info.unit == kAudioUnitParameterUnit_Hertz) return "Hz"; + if (info.unit == kAudioUnitParameterUnit_Decibels) return "dB"; + if (info.unit == kAudioUnitParameterUnit_Milliseconds) return "ms"; + + return {}; + }(); auto* parameter = new AUInstanceParameter (*this, ids[i], @@ -1830,6 +1820,7 @@ private: break; + case kAudioUnitEvent_PropertyChange: default: if (event.mArgument.mProperty.mPropertyID == kAudioUnitProperty_ParameterList) { diff --git a/modules/juce_audio_processors/format_types/juce_VST3Common.h b/modules/juce_audio_processors/format_types/juce_VST3Common.h index dc40caf601..9d70684d51 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3Common.h +++ b/modules/juce_audio_processors/format_types/juce_VST3Common.h @@ -206,6 +206,29 @@ static inline Steinberg::Vst::Speaker getSpeakerType (const AudioChannelSet& set case AudioChannelSet::discreteChannel0: return Steinberg::Vst::kSpeakerM; + case AudioChannelSet::ambisonicACN16: + case AudioChannelSet::ambisonicACN17: + case AudioChannelSet::ambisonicACN18: + case AudioChannelSet::ambisonicACN19: + case AudioChannelSet::ambisonicACN20: + case AudioChannelSet::ambisonicACN21: + case AudioChannelSet::ambisonicACN22: + case AudioChannelSet::ambisonicACN23: + case AudioChannelSet::ambisonicACN24: + case AudioChannelSet::ambisonicACN25: + case AudioChannelSet::ambisonicACN26: + case AudioChannelSet::ambisonicACN27: + case AudioChannelSet::ambisonicACN28: + case AudioChannelSet::ambisonicACN29: + case AudioChannelSet::ambisonicACN30: + case AudioChannelSet::ambisonicACN31: + case AudioChannelSet::ambisonicACN32: + case AudioChannelSet::ambisonicACN33: + case AudioChannelSet::ambisonicACN34: + case AudioChannelSet::ambisonicACN35: + case AudioChannelSet::proximityLeft: + case AudioChannelSet::proximityRight: + case AudioChannelSet::unknown: default: break; } diff --git a/modules/juce_audio_processors/format_types/juce_VST3Headers.h b/modules/juce_audio_processors/format_types/juce_VST3Headers.h index f8b1351de7..b6dcda4b6d 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3Headers.h +++ b/modules/juce_audio_processors/format_types/juce_VST3Headers.h @@ -47,6 +47,7 @@ #pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma clang diagnostic ignored "-Wextra-semi" #pragma clang diagnostic ignored "-Wmissing-braces" + #pragma clang diagnostic ignored "-Wswitch-default" #if __has_warning("-Wshadow-field") #pragma clang diagnostic ignored "-Wshadow-field" #endif diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index 4e290c5348..1157907b5c 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -32,6 +32,10 @@ namespace juce { +#if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + extern void setThreadDPIAwarenessForWindow (HWND); +#endif + using namespace Steinberg; //============================================================================== @@ -841,6 +845,7 @@ struct DLLHandle if (auto exitFn = (ExitModuleFn) getFunction ("bundleExit")) exitFn(); + CFBundleUnloadExecutable (bundleRef); CFRelease (bundleRef); bundleRef = nullptr; } @@ -1096,7 +1101,6 @@ struct VST3PluginWindow : public AudioProcessorEditor, public ComponentMovementWatcher, #if ! JUCE_MAC public ComponentPeer::ScaleFactorListener, - public Timer, #endif public IPlugFrame { @@ -1111,20 +1115,22 @@ struct VST3PluginWindow : public AudioProcessorEditor, warnOnFailure (view->setFrame (this)); - Steinberg::IPlugViewContentScaleSupport* scaleInterface = nullptr; + #if ! JUCE_MAC view->queryInterface (Steinberg::IPlugViewContentScaleSupport::iid, (void**) &scaleInterface); - - if (scaleInterface != nullptr) - { - pluginRespondsToDPIChanges = true; - scaleInterface->release(); - } + #endif resizeToFit(); } ~VST3PluginWindow() override { + #if ! JUCE_MAC + if (scaleInterface != nullptr) + scaleInterface->release(); + + removeScaleFactorListeners(); + #endif + warnOnFailure (view->removed()); warnOnFailure (view->setFrame (nullptr)); @@ -1135,12 +1141,6 @@ struct VST3PluginWindow : public AudioProcessorEditor, #endif view = nullptr; - - #if ! JUCE_MAC - for (int i = 0; i < ComponentPeer::getNumPeers(); ++i) - if (auto* p = ComponentPeer::getPeer (i)) - p->removeScaleFactorListener (this); - #endif } JUCE_DECLARE_VST3_COM_REF_METHODS @@ -1169,6 +1169,8 @@ struct VST3PluginWindow : public AudioProcessorEditor, void componentPeerChanged() override { #if ! JUCE_MAC + removeScaleFactorListeners(); + if (auto* topPeer = getTopLevelComponent()->getPeer()) topPeer->addScaleFactorListener (this); #endif @@ -1187,7 +1189,7 @@ struct VST3PluginWindow : public AudioProcessorEditor, auto pos = (topComp->getLocalPoint (this, Point()) * nativeScaleFactor).roundToInt(); #endif - recursiveResize = true; + const ScopedValueSetter recursiveResizeSetter (recursiveResize, true); ViewRect rect; @@ -1200,9 +1202,14 @@ struct VST3PluginWindow : public AudioProcessorEditor, auto w = roundToInt (rect.getWidth() / nativeScaleFactor); auto h = roundToInt (rect.getHeight() / nativeScaleFactor); + setSize (w, h); #if JUCE_WINDOWS + #if JUCE_WIN_PER_MONITOR_DPI_AWARE + setThreadDPIAwarenessForWindow (pluginHandle); + #endif + SetWindowPos (pluginHandle, 0, pos.x, pos.y, rect.getWidth(), rect.getHeight(), isVisible() ? SWP_SHOWWINDOW : SWP_HIDEWINDOW); @@ -1217,6 +1224,10 @@ struct VST3PluginWindow : public AudioProcessorEditor, warnOnFailure (view->getSize (&rect)); #if JUCE_WINDOWS + #if JUCE_WIN_PER_MONITOR_DPI_AWARE + setThreadDPIAwarenessForWindow (pluginHandle); + #endif + SetWindowPos (pluginHandle, 0, pos.x, pos.y, rect.getWidth(), rect.getHeight(), isVisible() ? SWP_SHOWWINDOW : SWP_HIDEWINDOW); @@ -1227,8 +1238,6 @@ struct VST3PluginWindow : public AudioProcessorEditor, // Some plugins don't update their cursor correctly when mousing out the window Desktop::getInstance().getMainMouseSource().forceMouseCursorUpdate(); - - recursiveResize = false; } } @@ -1236,11 +1245,6 @@ struct VST3PluginWindow : public AudioProcessorEditor, { attachPluginWindow(); - #if ! JUCE_MAC - if (auto* topPeer = getTopLevelComponent()->getPeer()) - nativeScaleFactorChanged ((float) topPeer->getPlatformScaleFactor()); - #endif - if (! hasDoneInitialResize) resizeToFit(); @@ -1255,46 +1259,8 @@ struct VST3PluginWindow : public AudioProcessorEditor, nativeScaleFactor = (float) newScaleFactor; - if (pluginRespondsToDPIChanges) - { - Steinberg::IPlugViewContentScaleSupport* scaleInterface = nullptr; - view->queryInterface (Steinberg::IPlugViewContentScaleSupport::iid, (void**) &scaleInterface); - - if (scaleInterface != nullptr) - { - scaleInterface->setContentScaleFactor ((Steinberg::IPlugViewContentScaleSupport::ScaleFactor) nativeScaleFactor); - scaleInterface->release(); - } - } - else - { - // If the plug-in doesn't respond to scale factor changes then we need to scale our window, but - // we can't do it immediately as it may cause a recursive resize loop so fire up a timer - startTimerHz (4); - } - } - - bool willCauseRecursiveResize (int w, int h) - { - auto newScreenBounds = Rectangle (w, h).withPosition (getScreenPosition()); - - return Desktop::getInstance().getDisplays().findDisplayForRect (newScreenBounds).scale != nativeScaleFactor; - } - - void timerCallback() override - { - ViewRect rect; - warnOnFailure (view->getSize (&rect)); - - auto w = roundToInt ((rect.right - rect.left) / nativeScaleFactor); - auto h = roundToInt ((rect.bottom - rect.top) / nativeScaleFactor); - - if (willCauseRecursiveResize (w, h)) - return; - - // window can be resized safely now - stopTimer(); - setSize (w, h); + if (scaleInterface != nullptr) + scaleInterface->setContentScaleFactor ((Steinberg::IPlugViewContentScaleSupport::ScaleFactor) nativeScaleFactor); } #endif @@ -1309,12 +1275,11 @@ struct VST3PluginWindow : public AudioProcessorEditor, tresult PLUGIN_API resizeView (IPlugView* incomingView, ViewRect* newSize) override { - if (incomingView != nullptr - && newSize != nullptr - && incomingView == view) + if (incomingView != nullptr && newSize != nullptr && incomingView == view) { resizeWithRect (embeddedComponent, *newSize, nativeScaleFactor); setSize (embeddedComponent.getWidth(), embeddedComponent.getHeight()); + return kResultTrue; } @@ -1323,6 +1288,56 @@ struct VST3PluginWindow : public AudioProcessorEditor, } private: + //============================================================================== + static void resizeWithRect (Component& comp, const ViewRect& rect, float scaleFactor) + { + comp.setBounds (roundToInt (rect.left / scaleFactor), + roundToInt (rect.top / scaleFactor), + jmax (10, std::abs (roundToInt (rect.getWidth() / scaleFactor))), + jmax (10, std::abs (roundToInt (rect.getHeight() / scaleFactor)))); + } + + void attachPluginWindow() + { + if (pluginHandle == nullptr) + { + #if JUCE_WINDOWS + if (auto* topComp = getTopLevelComponent()) + { + peer.reset (embeddedComponent.createNewPeer (0, topComp->getWindowHandle())); + pluginHandle = (HandleFormat) peer->getNativeHandle(); + nativeScaleFactor = (float) peer->getPlatformScaleFactor(); + } + #elif JUCE_MAC + embeddedComponent.setBounds (getLocalBounds()); + addAndMakeVisible (embeddedComponent); + pluginHandle = (NSView*) embeddedComponent.getView(); + #endif + + if (pluginHandle != nullptr) + warnOnFailure (view->attached (pluginHandle, defaultVST3WindowType)); + else + jassertfalse; + + #if ! JUCE_MAC + if (auto* topPeer = getTopLevelComponent()->getPeer()) + { + nativeScaleFactor = 1.0f; // force update + nativeScaleFactorChanged ((float) topPeer->getPlatformScaleFactor()); + } + #endif + } + } + + #if ! JUCE_MAC + void removeScaleFactorListeners() + { + for (int i = 0; i < ComponentPeer::getNumPeers(); ++i) + if (auto* p = ComponentPeer::getPeer (i)) + p->removeScaleFactorListener (this); + } + #endif + //============================================================================== Atomic refCount { 1 }; ComSmartPtr view; @@ -1351,43 +1366,14 @@ private: HandleFormat pluginHandle = {}; bool recursiveResize = false; + #if ! JUCE_MAC + Steinberg::IPlugViewContentScaleSupport* scaleInterface = nullptr; + #endif + float nativeScaleFactor = 1.0f; bool hasDoneInitialResize = false; - bool pluginRespondsToDPIChanges = false; //============================================================================== - static void resizeWithRect (Component& comp, const ViewRect& rect, float scaleFactor) - { - comp.setBounds (roundToInt (rect.left / scaleFactor), - roundToInt (rect.top / scaleFactor), - jmax (10, std::abs (roundToInt (rect.getWidth() / scaleFactor))), - jmax (10, std::abs (roundToInt (rect.getHeight() / scaleFactor)))); - } - - void attachPluginWindow() - { - if (pluginHandle == nullptr) - { - #if JUCE_WINDOWS - if (auto* topComp = getTopLevelComponent()) - peer.reset (embeddedComponent.createNewPeer (0, topComp->getWindowHandle())); - else - peer = nullptr; - - if (peer != nullptr) - pluginHandle = (HandleFormat) peer->getNativeHandle(); - #elif JUCE_MAC - embeddedComponent.setBounds (getLocalBounds()); - addAndMakeVisible (embeddedComponent); - pluginHandle = (NSView*) embeddedComponent.getView(); - jassert (pluginHandle != nil); - #endif - - if (pluginHandle != nullptr) - warnOnFailure (view->attached (pluginHandle, defaultVST3WindowType)); - } - } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VST3PluginWindow) }; @@ -2067,8 +2053,13 @@ public: outputArrangements.add (getVst3SpeakerArrangement (requested.isDisabled() ? getBus (false, i)->getLastEnabledLayout() : requested)); } - if (processor->setBusArrangements (inputArrangements.getRawDataPointer(), inputArrangements.size(), - outputArrangements.getRawDataPointer(), outputArrangements.size()) != kResultTrue) + // Some plug-ins will crash if you pass a nullptr to setBusArrangements! + Vst::SpeakerArrangement nullArrangement = {}; + auto* inputArrangementData = inputArrangements.isEmpty() ? &nullArrangement : inputArrangements.getRawDataPointer(); + auto* outputArrangementData = outputArrangements.isEmpty() ? &nullArrangement : outputArrangements.getRawDataPointer(); + + if (processor->setBusArrangements (inputArrangementData, inputArrangements.size(), + outputArrangementData, outputArrangements.size()) != kResultTrue) return false; // check if the layout matches the request @@ -2239,10 +2230,17 @@ public: //============================================================================== int getNumPrograms() override { return programNames.size(); } - const String getProgramName (int index) override { return programNames[index]; } - int getCurrentProgram() override { return jmax (0, (int) editController->getParamNormalized (programParameterID) * (programNames.size() - 1)); } + const String getProgramName (int index) override { return index >= 0 ? programNames[index] : String(); } void changeProgramName (int, const String&) override {} + int getCurrentProgram() override + { + if (programNames.size() > 0 && editController != nullptr) + return jmax (0, roundToInt (editController->getParamNormalized (programParameterID) * (programNames.size() - 1))); + + return 0; + } + void setCurrentProgram (int program) override { if (programNames.size() > 0 && editController != nullptr) diff --git a/modules/juce_audio_processors/format_types/juce_VSTCommon.h b/modules/juce_audio_processors/format_types/juce_VSTCommon.h index 1eea8e321b..33a864efc8 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTCommon.h +++ b/modules/juce_audio_processors/format_types/juce_VSTCommon.h @@ -49,14 +49,14 @@ struct SpeakerMappings : private AudioChannelSet // (inheritance only to give e bool matches (const Array& chans) const noexcept { - const int n = sizeof (channels) / sizeof (ChannelType); + auto n = static_cast (sizeof (channels) / sizeof (ChannelType)); for (int i = 0; i < n; ++i) { if (channels[i] == unknown) return (i == chans.size()); if (i == chans.size()) return (channels[i] == unknown); - if (channels[i] != chans.getUnchecked(i)) + if (channels[i] != chans.getUnchecked (i)) return false; } @@ -125,27 +125,56 @@ struct SpeakerMappings : private AudioChannelSet // (inheritance only to give e else if (channels == AudioChannelSet::create7point1SDDS()) return Vst2::kSpeakerArr71Cine; else if (channels == AudioChannelSet::quadraphonic()) return Vst2::kSpeakerArr40Music; - Array chans (channels.getChannelTypes()); - if (channels == AudioChannelSet::disabled()) return Vst2::kSpeakerArrEmpty; - for (const Mapping* m = getMappings(); m->vst2 != Vst2::kSpeakerArrEmpty; ++m) + auto chans = channels.getChannelTypes(); + + for (auto* m = getMappings(); m->vst2 != Vst2::kSpeakerArrEmpty; ++m) if (m->matches (chans)) return m->vst2; return Vst2::kSpeakerArrUserDefined; } + static void channelSetToVstArrangement (const AudioChannelSet& channels, Vst2::VstSpeakerArrangement& result) + { + result.type = channelSetToVstArrangementType (channels); + result.numChannels = channels.size(); + + for (int i = 0; i < result.numChannels; ++i) + { + auto& speaker = result.speakers[i]; + + zeromem (&speaker, sizeof (Vst2::VstSpeakerProperties)); + speaker.type = getSpeakerType (channels.getTypeOfChannel (i)); + } + } + /** Class to hold a speaker configuration */ class VstSpeakerConfigurationHolder { public: - VstSpeakerConfigurationHolder() { clear(); } - VstSpeakerConfigurationHolder (const Vst2::VstSpeakerArrangement& vstConfig) { operator= (vstConfig); } - VstSpeakerConfigurationHolder (const VstSpeakerConfigurationHolder& other) { operator= (other.get()); } + VstSpeakerConfigurationHolder() + { + clear(); + } + + VstSpeakerConfigurationHolder (const Vst2::VstSpeakerArrangement& vstConfig) + { + operator= (vstConfig); + } + + VstSpeakerConfigurationHolder (const VstSpeakerConfigurationHolder& other) + { + operator= (other.get()); + } + VstSpeakerConfigurationHolder (VstSpeakerConfigurationHolder&& other) - : storage (std::move (other.storage)) { other.clear(); } + : storage (std::move (other.storage)) + { + other.clear(); + } VstSpeakerConfigurationHolder (const AudioChannelSet& channels) { @@ -241,9 +270,9 @@ struct SpeakerMappings : private AudioChannelSet // (inheritance only to give e { Vst2::kSpeakerArr71Music, { left, right, centre, LFE, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, unknown } }, { Vst2::kSpeakerArr80Cine, { left, right, centre, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } }, { Vst2::kSpeakerArr80Music, { left, right, centre, leftSurround, rightSurround, surround, leftSurroundRear, rightSurroundRear, unknown } }, - { Vst2::kSpeakerArr81Cine, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } }, - { Vst2::kSpeakerArr81Music, { left, right, centre, LFE, leftSurround, rightSurround, surround, leftSurroundRear, rightSurroundRear, unknown } }, - { Vst2::kSpeakerArr102, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontCentre, topFrontRight, topRearLeft, topRearRight, LFE2, unknown } }, + { Vst2::kSpeakerArr81Cine, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } }, + { Vst2::kSpeakerArr81Music, { left, right, centre, LFE, leftSurround, rightSurround, surround, leftSurroundRear, rightSurroundRear, unknown } }, + { Vst2::kSpeakerArr102, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontCentre, topFrontRight, topRearLeft, topRearRight, LFE2, unknown } }, { Vst2::kSpeakerArrEmpty, { unknown } } }; @@ -252,31 +281,33 @@ struct SpeakerMappings : private AudioChannelSet // (inheritance only to give e static inline int32 getSpeakerType (AudioChannelSet::ChannelType type) noexcept { - switch (type) + static const std::map speakerTypeMap = { - case AudioChannelSet::left: return Vst2::kSpeakerL; - case AudioChannelSet::right: return Vst2::kSpeakerR; - case AudioChannelSet::centre: return Vst2::kSpeakerC; - case AudioChannelSet::LFE: return Vst2::kSpeakerLfe; - case AudioChannelSet::leftSurround: return Vst2::kSpeakerLs; - case AudioChannelSet::rightSurround: return Vst2::kSpeakerRs; - case AudioChannelSet::leftCentre: return Vst2::kSpeakerLc; - case AudioChannelSet::rightCentre: return Vst2::kSpeakerRc; - case AudioChannelSet::surround: return Vst2::kSpeakerS; - case AudioChannelSet::leftSurroundRear: return Vst2::kSpeakerSl; - case AudioChannelSet::rightSurroundRear: return Vst2::kSpeakerSr; - case AudioChannelSet::topMiddle: return Vst2::kSpeakerTm; - case AudioChannelSet::topFrontLeft: return Vst2::kSpeakerTfl; - case AudioChannelSet::topFrontCentre: return Vst2::kSpeakerTfc; - case AudioChannelSet::topFrontRight: return Vst2::kSpeakerTfr; - case AudioChannelSet::topRearLeft: return Vst2::kSpeakerTrl; - case AudioChannelSet::topRearCentre: return Vst2::kSpeakerTrc; - case AudioChannelSet::topRearRight: return Vst2::kSpeakerTrr; - case AudioChannelSet::LFE2: return Vst2::kSpeakerLfe2; - default: break; - } + { AudioChannelSet::left, Vst2::kSpeakerL }, + { AudioChannelSet::right, Vst2::kSpeakerR }, + { AudioChannelSet::centre, Vst2::kSpeakerC }, + { AudioChannelSet::LFE, Vst2::kSpeakerLfe }, + { AudioChannelSet::leftSurround, Vst2::kSpeakerLs }, + { AudioChannelSet::rightSurround, Vst2::kSpeakerRs }, + { AudioChannelSet::leftCentre, Vst2::kSpeakerLc }, + { AudioChannelSet::rightCentre, Vst2::kSpeakerRc }, + { AudioChannelSet::surround, Vst2::kSpeakerS }, + { AudioChannelSet::leftSurroundRear, Vst2::kSpeakerSl }, + { AudioChannelSet::rightSurroundRear, Vst2::kSpeakerSr }, + { AudioChannelSet::topMiddle, Vst2::kSpeakerTm }, + { AudioChannelSet::topFrontLeft, Vst2::kSpeakerTfl }, + { AudioChannelSet::topFrontCentre, Vst2::kSpeakerTfc }, + { AudioChannelSet::topFrontRight, Vst2::kSpeakerTfr }, + { AudioChannelSet::topRearLeft, Vst2::kSpeakerTrl }, + { AudioChannelSet::topRearCentre, Vst2::kSpeakerTrc }, + { AudioChannelSet::topRearRight, Vst2::kSpeakerTrr }, + { AudioChannelSet::LFE2, Vst2::kSpeakerLfe2 } + }; - return 0; + if (speakerTypeMap.find (type) == speakerTypeMap.end()) + return 0; + + return speakerTypeMap.at (type); } static inline AudioChannelSet::ChannelType getChannelType (int32 type) noexcept diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index bdc935fc39..41e86aadf2 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -104,6 +104,9 @@ namespace Vst2 //============================================================================== namespace juce { +#if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + extern void setThreadDPIAwarenessForWindow (HWND); +#endif //============================================================================== namespace @@ -1593,7 +1596,7 @@ struct VSTPluginInstance : public AudioPluginInstance, } } - return programNames [index]; + return {}; } void changeProgramName (int index, const String& newName) override @@ -2053,7 +2056,8 @@ private: String name; CriticalSection lock; std::atomic wantsMidiMessages { false }; - bool initialised = false, isPowerOn = false; + bool initialised = false; + std::atomic isPowerOn { false }; bool lastProcessBlockCallWasBypass = false, vstSupportsBypass = false; mutable StringArray programNames; AudioBuffer outOfPlaceBuffer; @@ -2388,11 +2392,12 @@ private: case AudioPlayHead::fps30: setHostTimeFrameRate (Vst2::kVstSmpte30fps, 30.0, position.timeInSeconds); break; case AudioPlayHead::fps60: setHostTimeFrameRate (Vst2::kVstSmpte60fps, 60.0, position.timeInSeconds); break; - case AudioPlayHead::fps23976: setHostTimeFrameRateDrop (Vst2::kVstSmpte239fps, 24.0, position.timeInSeconds); break; - case AudioPlayHead::fps2997: setHostTimeFrameRateDrop (Vst2::kVstSmpte2997fps, 30.0, position.timeInSeconds); break; + case AudioPlayHead::fps23976: setHostTimeFrameRateDrop (Vst2::kVstSmpte239fps, 24.0, position.timeInSeconds); break; + case AudioPlayHead::fps2997: setHostTimeFrameRateDrop (Vst2::kVstSmpte2997fps, 30.0, position.timeInSeconds); break; case AudioPlayHead::fps2997drop: setHostTimeFrameRateDrop (Vst2::kVstSmpte2997dfps, 30.0, position.timeInSeconds); break; case AudioPlayHead::fps30drop: setHostTimeFrameRateDrop (Vst2::kVstSmpte30dfps, 30.0, position.timeInSeconds); break; - case AudioPlayHead::fps60drop: setHostTimeFrameRateDrop (Vst2::kVstSmpte599fps, 60.0, position.timeInSeconds); break; + case AudioPlayHead::fps60drop: setHostTimeFrameRateDrop (Vst2::kVstSmpte599fps, 60.0, position.timeInSeconds); break; + case AudioPlayHead::fpsUnknown: default: break; } @@ -2711,16 +2716,20 @@ private: { switch (getVstCategory()) { - case Vst2::kPlugCategEffect: return "Effect"; - case Vst2::kPlugCategSynth: return "Synth"; - case Vst2::kPlugCategAnalysis: return "Analysis"; - case Vst2::kPlugCategMastering: return "Mastering"; - case Vst2::kPlugCategSpacializer: return "Spacial"; - case Vst2::kPlugCategRoomFx: return "Reverb"; - case Vst2::kPlugSurroundFx: return "Surround"; - case Vst2::kPlugCategRestoration: return "Restoration"; - case Vst2::kPlugCategGenerator: return "Tone generation"; - default: break; + case Vst2::kPlugCategEffect: return "Effect"; + case Vst2::kPlugCategSynth: return "Synth"; + case Vst2::kPlugCategAnalysis: return "Analysis"; + case Vst2::kPlugCategMastering: return "Mastering"; + case Vst2::kPlugCategSpacializer: return "Spacial"; + case Vst2::kPlugCategRoomFx: return "Reverb"; + case Vst2::kPlugSurroundFx: return "Surround"; + case Vst2::kPlugCategRestoration: return "Restoration"; + case Vst2::kPlugCategGenerator: return "Tone generation"; + case Vst2::kPlugCategOfflineProcess: return "Offline Process"; + case Vst2::kPlugCategShell: return "Shell"; + case Vst2::kPlugCategUnknown: return "Unknown"; + case Vst2::kPlugCategMaxCount: + default: break; } return nullptr; @@ -2777,7 +2786,6 @@ public: pluginWindow = None; display = XWindowSystem::getInstance()->displayRef(); ignoreUnused (pluginRefusesToResize, alreadyInside); - #elif JUCE_MAC ignoreUnused (recursiveResize, pluginRefusesToResize, alreadyInside); @@ -2818,18 +2826,16 @@ public: carbonWrapper.reset(); #endif cocoaWrapper.reset(); - #elif JUCE_LINUX - display = XWindowSystem::getInstance()->displayUnref(); + #else + #if JUCE_LINUX + display = XWindowSystem::getInstance()->displayUnref(); + #endif + + removeScaleFactorListeners(); #endif activeVSTWindows.removeFirstMatchingValue (this); plugin.editorBeingDeleted (this); - - #if ! JUCE_MAC - for (int i = 0; i < ComponentPeer::getNumPeers(); ++i) - if (auto* peer = ComponentPeer::getPeer (i)) - peer->removeScaleFactorListener (this); - #endif } //============================================================================== @@ -2897,7 +2903,16 @@ public: #if JUCE_WINDOWS if (pluginHWND != 0) - MoveWindow (pluginHWND, pos.getX(), pos.getY(), roundToInt (getWidth() * nativeScaleFactor), roundToInt (getHeight() * nativeScaleFactor), TRUE); + { + #if JUCE_WIN_PER_MONITOR_DPI_AWARE + setThreadDPIAwarenessForWindow (pluginHWND); + #endif + + MoveWindow (pluginHWND, pos.getX(), pos.getY(), + roundToInt (getWidth() * nativeScaleFactor), + roundToInt (getHeight() * nativeScaleFactor), + TRUE); + } #elif JUCE_LINUX if (pluginWindow != 0) { @@ -2941,6 +2956,8 @@ public: closePluginWindow(); openPluginWindow(); + removeScaleFactorListeners(); + if (auto* peer = getTopLevelComponent()->getPeer()) peer->addScaleFactorListener (this); @@ -2950,16 +2967,6 @@ public: void nativeScaleFactorChanged (double newScaleFactor) override { setScaleFactorAndDispatchMessage (newScaleFactor); - - #if JUCE_WINDOWS - Vst2::ERect* rect = nullptr; - dispatch (Vst2::effEditGetRect, 0, 0, &rect, 0); - - if (! isWindowSizeCorrectForPlugin (roundToInt ((rect->right - rect->left) / nativeScaleFactor), - roundToInt ((rect->bottom - rect->top) / nativeScaleFactor))) - return; - #endif - componentMovedOrResized (true, true); } @@ -3037,26 +3044,7 @@ public: } private: - VSTPluginInstance& plugin; - bool isOpen = false, recursiveResize = false; - bool pluginWantsKeys = false, pluginRefusesToResize = false, alreadyInside = false; - - #if ! JUCE_MAC - bool pluginRespondsToDPIChanges = false; - #endif - - #if ! JUCE_MAC - float nativeScaleFactor = 1.0f; - #if JUCE_WINDOWS - HWND pluginHWND = {}; - void* originalWndProc = {}; - int sizeCheckCount = 0; - #elif JUCE_LINUX - ::Display* display; - Window pluginWindow; - #endif - #endif - + //============================================================================== // This is a workaround for old Mackie plugins that crash if their // window is deleted more than once. bool shouldAvoidDeletingWindow() const @@ -3129,33 +3117,13 @@ private: if (auto* peer = getTopLevelComponent()->getPeer()) setScaleFactorAndDispatchMessage (peer->getPlatformScaleFactor()); - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - std::unique_ptr dpiDisabler; - - if (! pluginRespondsToDPIChanges) - dpiDisabler.reset (new ScopedDPIAwarenessDisabler()); - #endif - Vst2::ERect* rect = nullptr; + dispatch (Vst2::effEditGetRect, 0, 0, &rect, 0); - - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - // some plug-ins are fussy about this - dpiDisabler.reset (nullptr); - #endif - dispatch (Vst2::effEditOpen, 0, 0, getWindowHandle(), 0); - - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - if (! pluginRespondsToDPIChanges) - dpiDisabler.reset (new ScopedDPIAwarenessDisabler()); - #endif - - // do this before and after like in the steinberg example - dispatch (Vst2::effEditGetRect, 0, 0, &rect, 0); + dispatch (Vst2::effEditGetRect, 0, 0, &rect, 0); // do this before and after like in the steinberg example dispatch (Vst2::effGetProgram, 0, 0, nullptr, 0); // also in steinberg code - // Install keyboard hooks pluginWantsKeys = (dispatch (Vst2::effKeysRequired, 0, 0, nullptr, 0) == 0); #if JUCE_WINDOWS @@ -3180,10 +3148,6 @@ private: #pragma warning (pop) - #if JUCE_WIN_PER_MONITOR_DPI_AWARE - dpiDisabler.reset (nullptr); - #endif - RECT r; GetWindowRect (pluginHWND, &r); auto w = (int) (r.right - r.left); @@ -3200,6 +3164,10 @@ private: // very dodgy logic to decide which size is right. if (std::abs (rw - w) > 350 || std::abs (rh - h) > 350) { + #if JUCE_WIN_PER_MONITOR_DPI_AWARE + setThreadDPIAwarenessForWindow (pluginHWND); + #endif + SetWindowPos (pluginHWND, 0, 0, 0, roundToInt (rw * nativeScaleFactor), roundToInt (rh * nativeScaleFactor), SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER); @@ -3253,6 +3221,13 @@ private: startTimer (18 + juce::Random::getSystemRandom().nextInt (5)); repaint(); } + + void removeScaleFactorListeners() + { + for (int i = 0; i < ComponentPeer::getNumPeers(); ++i) + if (auto* peer = ComponentPeer::getPeer (i)) + peer->removeScaleFactorListener (this); + } #endif //============================================================================== @@ -3295,7 +3270,6 @@ private: bool willCauseRecursiveResize (int w, int h) { auto newScreenBounds = Rectangle (w, h).withPosition (getScreenPosition()); - return Desktop::getInstance().getDisplays().findDisplayForRect (newScreenBounds).scale != nativeScaleFactor; } @@ -3309,7 +3283,6 @@ private: void checkPluginWindowSize() { - #if JUCE_WIN_PER_MONITOR_DPI_AWARE if (! pluginRespondsToDPIChanges) { Vst2::ERect* rect = nullptr; @@ -3328,23 +3301,6 @@ private: sizeCheckCount = 0; } } - #else - { - RECT r; - GetWindowRect (pluginHWND, &r); - - auto w = r.right - r.left; - auto h = r.bottom - r.top; - - if (isShowing() && w > 0 && h > 0 - && (w != getWidth() || h != getHeight()) - && !pluginRefusesToResize) - { - setSize (w, h); - sizeCheckCount = 0; - } - } - #endif } // hooks to get keyboard events from VST windows.. @@ -3386,104 +3342,125 @@ private: #endif //============================================================================== - #if JUCE_MAC - #if JUCE_SUPPORT_CARBON - struct CarbonWrapperComponent : public CarbonViewWrapperComponent - { - CarbonWrapperComponent (VSTPluginWindow& w) : owner (w) - { - keepPluginWindowWhenHidden = w.shouldAvoidDeletingWindow(); - setRepaintsChildHIViewWhenCreated (w.shouldRepaintCarbonWindowWhenCreated()); - } + #if JUCE_MAC + #if JUCE_SUPPORT_CARBON + struct CarbonWrapperComponent : public CarbonViewWrapperComponent + { + CarbonWrapperComponent (VSTPluginWindow& w) : owner (w) + { + keepPluginWindowWhenHidden = w.shouldAvoidDeletingWindow(); + setRepaintsChildHIViewWhenCreated (w.shouldRepaintCarbonWindowWhenCreated()); + } - ~CarbonWrapperComponent() - { - deleteWindow(); - } + ~CarbonWrapperComponent() + { + deleteWindow(); + } - HIViewRef attachView (WindowRef windowRef, HIViewRef /*rootView*/) override - { - owner.openPluginWindow (windowRef); - return {}; - } + HIViewRef attachView (WindowRef windowRef, HIViewRef /*rootView*/) override + { + owner.openPluginWindow (windowRef); + return {}; + } - void removeView (HIViewRef) override - { - if (owner.isOpen) - { - owner.isOpen = false; - owner.dispatch (Vst2::effEditClose, 0, 0, 0, 0); - owner.dispatch (Vst2::effEditSleep, 0, 0, 0, 0); - } - } + void removeView (HIViewRef) override + { + if (owner.isOpen) + { + owner.isOpen = false; + owner.dispatch (Vst2::effEditClose, 0, 0, 0, 0); + owner.dispatch (Vst2::effEditSleep, 0, 0, 0, 0); + } + } - bool getEmbeddedViewSize (int& w, int& h) override - { - Vst2::ERect* rect = nullptr; - owner.dispatch (Vst2::effEditGetRect, 0, 0, &rect, 0); - w = rect->right - rect->left; - h = rect->bottom - rect->top; - return true; - } + bool getEmbeddedViewSize (int& w, int& h) override + { + Vst2::ERect* rect = nullptr; + owner.dispatch (Vst2::effEditGetRect, 0, 0, &rect, 0); + w = rect->right - rect->left; + h = rect->bottom - rect->top; + return true; + } - void handleMouseDown (int x, int y) override - { - if (! alreadyInside) - { - alreadyInside = true; - getTopLevelComponent()->toFront (true); - owner.dispatch (Vst2::effEditMouse, x, y, 0, 0); - alreadyInside = false; - } - else - { - PostEvent (::mouseDown, 0); - } - } + void handleMouseDown (int x, int y) override + { + if (! alreadyInside) + { + alreadyInside = true; + getTopLevelComponent()->toFront (true); + owner.dispatch (Vst2::effEditMouse, x, y, 0, 0); + alreadyInside = false; + } + else + { + PostEvent (::mouseDown, 0); + } + } - void handlePaint() override - { - if (auto* peer = getPeer()) - { - auto pos = peer->globalToLocal (getScreenPosition()); - Vst2::ERect r; - r.left = (int16) pos.getX(); - r.top = (int16) pos.getY(); - r.right = (int16) (r.left + getWidth()); - r.bottom = (int16) (r.top + getHeight()); + void handlePaint() override + { + if (auto* peer = getPeer()) + { + auto pos = peer->globalToLocal (getScreenPosition()); + Vst2::ERect r; + r.left = (int16) pos.getX(); + r.top = (int16) pos.getY(); + r.right = (int16) (r.left + getWidth()); + r.bottom = (int16) (r.top + getHeight()); - owner.dispatch (Vst2::effEditDraw, 0, 0, &r, 0); - } - } + owner.dispatch (Vst2::effEditDraw, 0, 0, &r, 0); + } + } - private: - VSTPluginWindow& owner; - bool alreadyInside = false; + private: + VSTPluginWindow& owner; + bool alreadyInside = false; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CarbonWrapperComponent) - }; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CarbonWrapperComponent) + }; - friend struct CarbonWrapperComponent; - std::unique_ptr carbonWrapper; + friend struct CarbonWrapperComponent; + std::unique_ptr carbonWrapper; + #endif + + std::unique_ptr cocoaWrapper; + + void resized() override + { + #if JUCE_SUPPORT_CARBON + if (carbonWrapper != nullptr) + carbonWrapper->setSize (getWidth(), getHeight()); + #endif + + if (cocoaWrapper != nullptr) + cocoaWrapper->setSize (getWidth(), getHeight()); + } + #endif + + //============================================================================== + VSTPluginInstance& plugin; + bool isOpen = false, recursiveResize = false; + bool pluginWantsKeys = false, pluginRefusesToResize = false, alreadyInside = false; + + #if ! JUCE_MAC + bool pluginRespondsToDPIChanges = false; + float nativeScaleFactor = 1.0f; #endif - std::unique_ptr cocoaWrapper; - - void resized() override - { - #if JUCE_SUPPORT_CARBON - if (carbonWrapper != nullptr) - carbonWrapper->setSize (getWidth(), getHeight()); - #endif - - if (cocoaWrapper != nullptr) - cocoaWrapper->setSize (getWidth(), getHeight()); - } - #endif + #if JUCE_WINDOWS + HWND pluginHWND = {}; + void* originalWndProc = {}; + int sizeCheckCount = 0; + #elif JUCE_LINUX + ::Display* display; + Window pluginWindow; + #endif + //============================================================================== JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VSTPluginWindow) }; #endif + #if JUCE_MSVC #pragma warning (pop) #endif diff --git a/modules/juce_audio_processors/juce_audio_processors.h b/modules/juce_audio_processors/juce_audio_processors.h index 62b0f498d8..972e60f0e4 100644 --- a/modules/juce_audio_processors/juce_audio_processors.h +++ b/modules/juce_audio_processors/juce_audio_processors.h @@ -24,6 +24,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -33,17 +34,17 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_audio_processors - vendor: juce - version: 5.4.5 - name: JUCE audio processor classes - description: Classes for loading and playing VST, AU, LADSPA, or internally-generated audio processors. - website: http://www.juce.com/juce - license: GPL/Commercial + ID: juce_audio_processors + vendor: juce + version: 5.4.7 + name: JUCE audio processor classes + description: Classes for loading and playing VST, AU, LADSPA, or internally-generated audio processors. + website: http://www.juce.com/juce + license: GPL/Commercial - dependencies: juce_gui_extra, juce_audio_basics - OSXFrameworks: CoreAudio CoreMIDI AudioToolbox - iOSFrameworks: AudioToolbox + dependencies: juce_gui_extra, juce_audio_basics + OSXFrameworks: CoreAudio CoreMIDI AudioToolbox + iOSFrameworks: AudioToolbox END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp index bd40623c53..5443351af5 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp @@ -364,6 +364,7 @@ void AudioProcessor::setPlayConfigDetails (int newNumIns, int newNumOuts, double jassert (success && newNumIns == getTotalNumInputChannels() && newNumOuts == getTotalNumOutputChannels()); setRateAndBufferSizeDetails (newSampleRate, newBlockSize); + ignoreUnused (success); } void AudioProcessor::setRateAndBufferSizeDetails (double newSampleRate, int newBlockSize) noexcept diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 836b09c7c9..28f79f5c6f 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -1466,7 +1466,8 @@ private: Component::SafePointer activeEditor; double currentSampleRate = 0; int blockSize = 0, latencySamples = 0; - bool suspended = false, nonRealtime = false; + bool suspended = false; + std::atomic nonRealtime { false }; ProcessingPrecision processingPrecision = singlePrecision; CriticalSection callbackLock, listenerLock, activeEditorLock; diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp index 8e44bb29e9..6127e4bead 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp @@ -103,15 +103,9 @@ void AudioProcessorEditor::setResizable (const bool shouldBeResizable, const boo if (shouldHaveCornerResizer != (resizableCorner != nullptr)) { if (shouldHaveCornerResizer) - { - resizableCorner.reset (new ResizableCornerComponent (this, constrainer)); - Component::addChildComponent (resizableCorner.get()); - resizableCorner->setAlwaysOnTop (true); - } + attachResizableCornerComponent(); else - { resizableCorner.reset(); - } } } @@ -146,6 +140,9 @@ void AudioProcessorEditor::setConstrainer (ComponentBoundsConstrainer* newConstr || newConstrainer->getMinimumHeight() != newConstrainer->getMaximumHeight()); attachConstrainer (newConstrainer); + + if (resizableCorner != nullptr) + attachResizableCornerComponent(); } } @@ -158,6 +155,14 @@ void AudioProcessorEditor::attachConstrainer (ComponentBoundsConstrainer* newCon } } +void AudioProcessorEditor::attachResizableCornerComponent() +{ + resizableCorner.reset (new ResizableCornerComponent (this, constrainer)); + Component::addChildComponent (resizableCorner.get()); + resizableCorner->setAlwaysOnTop (true); + editorResized (true); +} + void AudioProcessorEditor::setBoundsConstrained (Rectangle newBounds) { if (constrainer != nullptr) @@ -168,6 +173,12 @@ void AudioProcessorEditor::setBoundsConstrained (Rectangle newBounds) void AudioProcessorEditor::editorResized (bool wasResized) { + // The host needs to be able to rescale the plug-in editor and applying your own transform will + // obliterate it! If you want to scale the whole of your UI use Desktop::setGlobalScaleFactor(), + // or, for applying other transforms, consider putting the component you want to transform + // in a child of the editor and transform that instead. + jassert (getTransform() == hostScaleTransform); + if (wasResized) { bool resizerHidden = false; @@ -201,7 +212,9 @@ void AudioProcessorEditor::updatePeer() void AudioProcessorEditor::setScaleFactor (float newScale) { - setTransform (AffineTransform::scale (newScale)); + hostScaleTransform = AffineTransform::scale (newScale); + setTransform (hostScaleTransform); + editorResized (true); } diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h index d7f9282f53..31efce831e 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h @@ -200,6 +200,7 @@ private: void editorResized (bool wasResized); void updatePeer(); void attachConstrainer (ComponentBoundsConstrainer*); + void attachResizableCornerComponent(); //============================================================================== std::unique_ptr resizeListener; @@ -207,6 +208,7 @@ private: ComponentBoundsConstrainer defaultConstrainer; ComponentBoundsConstrainer* constrainer = {}; Component::SafePointer splashScreen; + AffineTransform hostScaleTransform; 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 1a016a9c42..082a574e6d 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp @@ -27,6 +27,14 @@ namespace juce { +static void updateOnMessageThread (AsyncUpdater& updater) +{ + if (MessageManager::getInstance()->isThisTheMessageThread()) + updater.handleAsyncUpdate(); + else + updater.triggerAsyncUpdate(); +} + template struct GraphRenderSequence { @@ -901,7 +909,7 @@ void AudioProcessorGraph::topologyChanged() sendChangeMessage(); if (isPrepared) - triggerAsyncUpdate(); + updateOnMessageThread (*this); } void AudioProcessorGraph::clear() @@ -1262,10 +1270,7 @@ void AudioProcessorGraph::prepareToPlay (double sampleRate, int estimatedSamples clearRenderingSequence(); - if (MessageManager::getInstance()->isThisTheMessageThread()) - handleAsyncUpdate(); - else - triggerAsyncUpdate(); + updateOnMessageThread (*this); } bool AudioProcessorGraph::supportsDoublePrecisionProcessing() const diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h index 5fd6dfa98d..bb28badf5a 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h @@ -229,8 +229,8 @@ public: added a processor to the graph, the graph owns it and will delete it later when it is no longer needed. - The optional nodeId parameter lets you specify an ID to use for the node, but - if the value is already in use, this new node will overwrite the old one. + The optional nodeId parameter lets you specify a unique ID to use for the node. + If the value is already in use, this method will fail and return an empty node. If this succeeds, it returns a pointer to the newly-created node. */ diff --git a/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp b/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp index f5cfdb258d..39ef895d1c 100644 --- a/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp +++ b/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp @@ -297,6 +297,8 @@ struct PluginSorter case KnownPluginList::sortByFormat: diff = first.pluginFormatName.compare (second.pluginFormatName); break; case KnownPluginList::sortByFileSystemLocation: diff = lastPathPart (first.fileOrIdentifier).compare (lastPathPart (second.fileOrIdentifier)); break; case KnownPluginList::sortByInfoUpdateTime: diff = compare (first.lastInfoUpdateTime, second.lastInfoUpdateTime); break; + case KnownPluginList::sortAlphabetically: + case KnownPluginList::defaultOrder: default: break; } diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp index 252dad8f14..c7527f2373 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp @@ -188,9 +188,9 @@ private: RangedAudioParameter& parameter; ListenerList listeners; - std::atomic unnormalisedValue{}; - std::atomic needsUpdate { true }; - bool listenersNeedCalling { true }, ignoreParameterChangedCallbacks { false }; + std::atomic unnormalisedValue { 0.0f }; + std::atomic needsUpdate { true }, listenersNeedCalling { true }; + bool ignoreParameterChangedCallbacks { false }; }; //============================================================================== @@ -531,7 +531,7 @@ struct AttachedControlBase : public AudioProcessorValueTreeState::Listener, AudioProcessorValueTreeState& state; String paramID; - float lastValue; + std::atomic lastValue; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AttachedControlBase) }; diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h index f06a70ba41..f594ca8e23 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h @@ -176,18 +176,18 @@ public: std::make_unique ("b", "Parameter B", 0, 5, 2) }) @endcode - To add parameters programatically you can use the iterator-based ParameterLayout - constructor: + To add parameters programatically you can call `add` repeatedly on a + ParameterLayout instance: @code AudioProcessorValueTreeState::ParameterLayout createParameterLayout() { - std::vector> params; + AudioProcessorValueTreeState::ParameterLayout layout; for (int i = 1; i < 9; ++i) - params.push_back (std::make_unique (String (i), String (i), 0, i, 0)); + layout.add (std::make_unique (String (i), String (i), 0, i, 0)); - return { params.begin(), params.end() }; + return layout; } YourAudioProcessor() @@ -424,7 +424,7 @@ public: const float unsnappedDefault; const bool metaParameter, automatable, discrete, boolean; - float lastValue = -1.0f; + std::atomic lastValue { -1.0f }; friend class AudioProcessorValueTreeState::ParameterAdapter; }; diff --git a/modules/juce_audio_utils/audio_cd/juce_AudioCDReader.h b/modules/juce_audio_utils/audio_cd/juce_AudioCDReader.h index 66a822f417..2a2912a3c3 100644 --- a/modules/juce_audio_utils/audio_cd/juce_AudioCDReader.h +++ b/modules/juce_audio_utils/audio_cd/juce_AudioCDReader.h @@ -67,7 +67,7 @@ public: //============================================================================== /** Destructor. */ - ~AudioCDReader(); + ~AudioCDReader() override; /** Implementation of the AudioFormatReader method. */ bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, diff --git a/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp b/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp index 6d289d114e..ccec9c1bf9 100644 --- a/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp @@ -220,7 +220,7 @@ private: { if (reader == nullptr && source != nullptr) if (auto* audioFileStream = source->createInputStream()) - reader.reset (owner.formatManagerToUse.createReaderFor (audioFileStream)); + reader.reset (owner.formatManagerToUse.createReaderFor (std::unique_ptr (audioFileStream))); } bool readNextBlock() diff --git a/modules/juce_audio_utils/juce_audio_utils.h b/modules/juce_audio_utils/juce_audio_utils.h index e346c70b4b..dd4f08dc86 100644 --- a/modules/juce_audio_utils/juce_audio_utils.h +++ b/modules/juce_audio_utils/juce_audio_utils.h @@ -24,6 +24,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -33,17 +34,17 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_audio_utils - vendor: juce - version: 5.4.5 - name: JUCE extra audio utility classes - description: Classes for audio-related GUI and miscellaneous tasks. - website: http://www.juce.com/juce - license: GPL/Commercial + ID: juce_audio_utils + vendor: juce + version: 5.4.7 + name: JUCE extra audio utility classes + description: Classes for audio-related GUI and miscellaneous tasks. + website: http://www.juce.com/juce + license: GPL/Commercial - dependencies: juce_gui_extra, juce_audio_processors, juce_audio_formats, juce_audio_devices - OSXFrameworks: CoreAudioKit DiscRecording - iOSFrameworks: CoreAudioKit + dependencies: juce_gui_extra, juce_audio_processors, juce_audio_formats, juce_audio_devices + OSXFrameworks: CoreAudioKit DiscRecording + iOSFrameworks: CoreAudioKit END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp b/modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp index c981ad769d..a2cf1c1db6 100644 --- a/modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp +++ b/modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp @@ -377,6 +377,7 @@ private: case AndroidBluetoothMidiInterface::paired: status = AndroidBluetoothMidiDevice::connected; break; + case AndroidBluetoothMidiInterface::unpaired: default: status = AndroidBluetoothMidiDevice::disconnected; } diff --git a/modules/juce_audio_utils/native/juce_mac_AudioCDBurner.mm b/modules/juce_audio_utils/native/juce_mac_AudioCDBurner.mm index 79382604e1..c66afc347e 100644 --- a/modules/juce_audio_utils/native/juce_mac_AudioCDBurner.mm +++ b/modules/juce_audio_utils/native/juce_mac_AudioCDBurner.mm @@ -275,7 +275,7 @@ struct OpenDiskDevice }; //============================================================================== -class AudioCDBurner::Pimpl : public Timer +class AudioCDBurner::Pimpl : private Timer { public: Pimpl (AudioCDBurner& b, int deviceIndex) : owner (b) @@ -288,22 +288,11 @@ public: } } - ~Pimpl() + ~Pimpl() override { stopTimer(); } - void timerCallback() override - { - const DiskState state = getDiskState(); - - if (state != lastState) - { - lastState = state; - owner.sendChangeMessage(); - } - } - DiskState getDiskState() const { if ([device->device isValid]) @@ -364,6 +353,17 @@ public: std::unique_ptr device; private: + void timerCallback() override + { + const DiskState state = getDiskState(); + + if (state != lastState) + { + lastState = state; + owner.sendChangeMessage(); + } + } + DiskState lastState; AudioCDBurner& owner; }; diff --git a/modules/juce_audio_utils/native/juce_mac_AudioCDReader.mm b/modules/juce_audio_utils/native/juce_mac_AudioCDReader.mm index 6268396bbf..6f02e3e988 100644 --- a/modules/juce_audio_utils/native/juce_mac_AudioCDReader.mm +++ b/modules/juce_audio_utils/native/juce_mac_AudioCDReader.mm @@ -140,7 +140,7 @@ AudioCDReader* AudioCDReader::createReaderForCD (const int index) } AudioCDReader::AudioCDReader (const File& volume) - : AudioFormatReader (0, "CD Audio"), + : AudioFormatReader (nullptr, "CD Audio"), volumeDir (volume), currentReaderTrack (-1) { @@ -202,9 +202,9 @@ bool AudioCDReader::readSamples (int** destSamples, int numDestChannels, int sta { reader = nullptr; - if (FileInputStream* const in = tracks [track].createInputStream()) + if (auto in = tracks [track].createInputStream()) { - BufferedInputStream* const bin = new BufferedInputStream (in, 65536, true); + BufferedInputStream* const bin = new BufferedInputStream (in.release(), 65536, true); AiffAudioFormat format; reader.reset (format.createReaderFor (bin, true)); diff --git a/modules/juce_audio_utils/players/juce_SoundPlayer.cpp b/modules/juce_audio_utils/players/juce_SoundPlayer.cpp index 9df3ff3b19..6b5c8c0c87 100644 --- a/modules/juce_audio_utils/players/juce_SoundPlayer.cpp +++ b/modules/juce_audio_utils/players/juce_SoundPlayer.cpp @@ -174,8 +174,8 @@ void SoundPlayer::play (const void* resourceData, size_t resourceSize) { if (resourceData != nullptr && resourceSize > 0) { - MemoryInputStream* mem = new MemoryInputStream (resourceData, resourceSize, false); - play (formatManager.createReaderFor (mem), true); + auto mem = std::make_unique (resourceData, resourceSize, false); + play (formatManager.createReaderFor (std::move (mem)), true); } } diff --git a/modules/juce_blocks_basics/blocks/juce_Block.cpp b/modules/juce_blocks_basics/blocks/juce_Block.cpp index 09f4d89fad..18dd021053 100644 --- a/modules/juce_blocks_basics/blocks/juce_Block.cpp +++ b/modules/juce_blocks_basics/blocks/juce_Block.cpp @@ -74,9 +74,15 @@ bool Block::isControlBlock (Block::Type type) || type == Block::Type::developerControlBlock; } +void Block::addProgramLoadedListener (ProgramLoadedListener* listener) { programLoadedListeners.add (listener); } +void Block::removeProgramLoadedListener (ProgramLoadedListener* listener) { programLoadedListeners.remove (listener); } + void Block::addDataInputPortListener (DataInputPortListener* listener) { dataInputPortListeners.add (listener); } void Block::removeDataInputPortListener (DataInputPortListener* listener) { dataInputPortListeners.remove (listener); } +void Block::addConfigItemListener (ConfigItemListener* listener) { configItemListeners.add (listener); } +void Block::removeConfigItemListener (ConfigItemListener* listener) { configItemListeners.remove (listener); } + void Block::addProgramEventListener (ProgramEventListener* listener) { programEventListeners.add (listener); } void Block::removeProgramEventListener (ProgramEventListener* listener) { programEventListeners.remove (listener); } @@ -85,7 +91,6 @@ bool Block::ConnectionPort::operator== (const ConnectionPort& other) const noexc bool Block::ConnectionPort::operator!= (const ConnectionPort& other) const noexcept { return ! operator== (other); } Block::Program::Program (Block& b) : block (b) {} -Block::Program::~Program() {} //============================================================================== TouchSurface::TouchSurface (Block& b) : block (b) {} diff --git a/modules/juce_blocks_basics/blocks/juce_Block.h b/modules/juce_blocks_basics/blocks/juce_Block.h index b4717c9401..8a539301dd 100644 --- a/modules/juce_blocks_basics/blocks/juce_Block.h +++ b/modules/juce_blocks_basics/blocks/juce_Block.h @@ -148,7 +148,10 @@ public: virtual float getMillimetersPerUnit() const = 0; /** A simple struct representing the area of a block. */ - struct BlockArea { int x, y, width, height; }; + struct BlockArea + { + int x, y, width, height; + }; /** Returns the area that this block covers within the layout of the group as a whole. The coordinates are in logical block units, and are relative to the origin, which is the master block's top-left corner. @@ -232,11 +235,8 @@ public: /** A program that can be loaded onto a block. */ struct Program { - /** Creates a Program for the corresponding LEDGrid. */ Program (Block&); - - /** Destructor. */ - virtual ~Program(); + virtual ~Program() = default; /** Returns the LittleFoot program to execute on the BLOCKS device. */ virtual String getLittleFootProgram() = 0; @@ -251,12 +251,32 @@ public: The supplied Program's lifetime will be managed by this class, so do not use the Program in other places in your code. + + Optional parameter to determine if program is set temporarily or saved + to flash as the default prgram./ */ - virtual Result setProgram (Program*) = 0; + enum class ProgramPersistency { setAsTemp, setAsDefault }; + virtual Result setProgram (std::unique_ptr, + ProgramPersistency persistency = ProgramPersistency::setAsTemp) = 0; /** Returns a pointer to the currently loaded program. */ virtual Program* getProgram() const = 0; + /** Listener interface to be informed of program loaded events*/ + struct ProgramLoadedListener + { + virtual ~ProgramLoadedListener() = default; + + /** Called whenever a program has been loaded. */ + virtual void handleProgramLoaded (Block&) = 0; + }; + + /** Adds a new listener for program load completions. */ + void addProgramLoadedListener (ProgramLoadedListener*); + + /** Removes a listener for program load completions. */ + void removeProgramLoadedListener (ProgramLoadedListener*); + //============================================================================== /** A message that can be sent to the currently loaded program. */ struct ProgramEventMessage @@ -287,10 +307,10 @@ public: }; /** Adds a new listener for custom program events from the block. */ - virtual void addProgramEventListener (ProgramEventListener*); + void addProgramEventListener (ProgramEventListener*); /** Removes a listener for custom program events from the block. */ - virtual void removeProgramEventListener (ProgramEventListener*); + void removeProgramEventListener (ProgramEventListener*); //============================================================================== /** Returns the overall memory of the block. */ @@ -308,6 +328,20 @@ public: /** Sets multiple bits on the littlefoot heap. */ virtual void setDataBits (uint32 startBit, uint32 numBits, uint32 value) = 0; + /** Sets a single, 32 bit or less, value on the littlefoot heap. */ + template + void setData (uint32 offset, Type value) + { + const auto numBytes = sizeof (Type); + + for (auto byte = numBytes; --byte > 0u;) + { + auto v = *reinterpret_cast (&value); + v = (v >> (numBytes - byte) * 8) & 0xFF; + setDataByte (offset + byte, uint8 (v)); + } + } + /** Gets a byte from the littlefoot heap. */ virtual uint8 getDataByte (size_t offset) = 0; @@ -332,7 +366,9 @@ public: options }; - ConfigMetaData() = default; + ConfigMetaData (uint32 itemIndex) + : item (itemIndex) + {} // Constructor to work around VS2015 bugs... ConfigMetaData (uint32 itemIndex, @@ -408,6 +444,24 @@ public: String group; }; + /** Listener interface to be informed of block config changes */ + struct ConfigItemListener + { + virtual ~ConfigItemListener() = default; + + /** Called whenever a config changes. */ + virtual void handleConfigItemChanged (Block&, const ConfigMetaData&, uint32 index) = 0; + + /*-* Callled following a config sync request*/ + virtual void handleConfigSyncEnded (Block&) = 0; + }; + + /** Adds a new listener for config item changes. */ + void addConfigItemListener (ConfigItemListener*); + + /** Removes a listener for config item changes. */ + void removeConfigItemListener (ConfigItemListener*); + /** Returns the maximum number of config items available */ virtual uint32 getMaxConfigIndex() = 0; @@ -455,12 +509,6 @@ public: virtual bool sendFirmwareUpdatePacket (const uint8* data, uint8 size, std::function packetAckCallback) = 0; - /** Provides a callback that will be called when a config changes. */ - virtual void setConfigChangedCallback (std::function) = 0; - - /** Provides a callback that will be called when a program has been loaded. */ - virtual void setProgramLoadedCallback (std::function programLoaded) = 0; - //============================================================================== /** Interface for objects listening to input data port. */ struct DataInputPortListener @@ -491,8 +539,10 @@ protected: Block (const String& serialNumberToUse); Block (const String& serial, const String& version, const String& name); + ListenerList programLoadedListeners; + ListenerList programEventListeners; + ListenerList configItemListeners; ListenerList dataInputPortListeners; - ListenerList programEventListeners; private: //============================================================================== diff --git a/modules/juce_blocks_basics/blocks/juce_BlockConfigManager.h b/modules/juce_blocks_basics/blocks/juce_BlockConfigManager.h index b314ce8ef1..2c5ec341b5 100644 --- a/modules/juce_blocks_basics/blocks/juce_BlockConfigManager.h +++ b/modules/juce_blocks_basics/blocks/juce_BlockConfigManager.h @@ -4,26 +4,18 @@ 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/ + JUCE is an open source library subject to commercial or open-source + licensing. - 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 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. - 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. + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. ============================================================================== */ @@ -279,7 +271,7 @@ struct BlockConfigManager if (getIndexForItem (item, itemIndex)) return configList[itemIndex].toConfigMetaData(); - return {}; + return { static_cast (item) }; } void resetConfigListActiveStatus() diff --git a/modules/juce_blocks_basics/juce_blocks_basics.cpp b/modules/juce_blocks_basics/juce_blocks_basics.cpp index 132dcfe06b..92c6b0ce0a 100644 --- a/modules/juce_blocks_basics/juce_blocks_basics.cpp +++ b/modules/juce_blocks_basics/juce_blocks_basics.cpp @@ -22,12 +22,6 @@ #include "juce_blocks_basics.h" -#if ! JUCE_HAS_CONSTEXPR - #ifndef JUCE_DEMO_RUNNER - #error "The juce_blocks_basics module requires a compiler that supports constexpr" - #endif -#else - #include namespace juce @@ -48,5 +42,3 @@ namespace juce #include "topology/juce_RuleBasedTopologySource.cpp" #include "visualisers/juce_DrumPadLEDProgram.cpp" #include "visualisers/juce_BitmapLEDProgram.cpp" - -#endif diff --git a/modules/juce_blocks_basics/juce_blocks_basics.h b/modules/juce_blocks_basics/juce_blocks_basics.h index aa8f3396ce..8f2c208068 100644 --- a/modules/juce_blocks_basics/juce_blocks_basics.h +++ b/modules/juce_blocks_basics/juce_blocks_basics.h @@ -20,6 +20,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -31,14 +32,14 @@ ID: juce_blocks_basics vendor: juce - version: 5.4.5 + version: 5.4.7 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 license: ISC minimumCppStandard: 14 - dependencies: juce_events juce_audio_devices + dependencies: juce_events juce_audio_devices END_JUCE_MODULE_DECLARATION @@ -51,12 +52,6 @@ #include #include -#if ! JUCE_HAS_CONSTEXPR - #ifndef JUCE_DEMO_RUNNER - #error "The juce_blocks_basics module requires a compiler that supports constexpr" - #endif -#else - namespace juce { class TouchSurface; @@ -88,5 +83,3 @@ namespace juce #include "littlefoot/juce_LittleFootRunner.h" #include "littlefoot/juce_LittleFootCompiler.h" } - -#endif diff --git a/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h b/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h index 174fa74e17..c4f864b525 100644 --- a/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h +++ b/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h @@ -87,6 +87,31 @@ struct Compiler return Program (compiledObjectCode.begin(), (uint32) compiledObjectCode.size()); } + static File resolveIncludePath (String include, Array searchPaths) + { + if (File::isAbsolutePath (include) && File (include).existsAsFile()) + return { include }; + + auto fileName = include.fromLastOccurrenceOf ("/", false, false); + + for (auto path : searchPaths) + { + if (path == File()) + continue; + + if (! path.isDirectory()) + path = path.getParentDirectory(); + + if (path.getChildFile (include).existsAsFile()) + return path.getChildFile (include); + + if (path.getChildFile (fileName).existsAsFile()) + return path.getChildFile (fileName); + } + + return {}; + } + /** After a successful call to compile(), this contains the bytecode generated. A littlefoot::Program object can be created directly from this array. */ @@ -522,27 +547,12 @@ private: return {}; } - if (File::isAbsolutePath (include) && File (include).existsAsFile()) - return { include }; + auto path = Compiler::resolveIncludePath (include, searchPaths); - auto fileName = include.fromLastOccurrenceOf ("/", false, false); + if (! path.existsAsFile()) + location.throwError ("File not found: " + include); - for (auto path : searchPaths) - { - if (path == File()) - continue; - - if (! path.isDirectory()) - path = path.getParentDirectory(); - - if (path.getChildFile (include).existsAsFile()) - return path.getChildFile (include); - - if (path.getChildFile (fileName).existsAsFile()) - return path.getChildFile (fileName); - } - - location.throwError ("File not found: " + include); + return path; } //TODO: should there be a max array size? diff --git a/modules/juce_blocks_basics/littlefoot/juce_LittleFootRunner.h b/modules/juce_blocks_basics/littlefoot/juce_LittleFootRunner.h index aca029fe8c..1e91ae4274 100644 --- a/modules/juce_blocks_basics/littlefoot/juce_LittleFootRunner.h +++ b/modules/juce_blocks_basics/littlefoot/juce_LittleFootRunner.h @@ -238,7 +238,7 @@ struct Program auto n = (uint16) size; for (uint32 i = 2; i < size; ++i) - n += (n * 2) + programStart[i]; + n = static_cast (n + (n * 2) + programStart[i]); return n; } @@ -336,7 +336,8 @@ struct Program #undef LITTLEFOOT_OP_INT16 #undef LITTLEFOOT_OP_INT32 - default: s << "???"; break; + case OpCode::endOfOpcodes: + default: s << "???"; break; } return s; @@ -370,8 +371,11 @@ struct Program #undef LITTLEFOOT_OP_INT16 #undef LITTLEFOOT_OP_INT32 - default: jassertfalse; return 0; + case OpCode::endOfOpcodes: + default: jassertfalse; break; } + + return 0; } //============================================================================== @@ -676,6 +680,7 @@ struct Runner switch (op) { LITTLEFOOT_OPCODES (LITTLEFOOT_PERFORM_OP, LITTLEFOOT_PERFORM_OP_INT8, LITTLEFOOT_PERFORM_OP_INT16, LITTLEFOOT_PERFORM_OP_INT32) + case OpCode::endOfOpcodes: default: setError (ErrorCode::unknownInstruction); break; } diff --git a/modules/juce_blocks_basics/protocol/juce_BitPackingUtilities.h b/modules/juce_blocks_basics/protocol/juce_BitPackingUtilities.h index fe2eadb4c2..f7807e1e9c 100644 --- a/modules/juce_blocks_basics/protocol/juce_BitPackingUtilities.h +++ b/modules/juce_blocks_basics/protocol/juce_BitPackingUtilities.h @@ -39,7 +39,7 @@ static uint8 calculatePacketChecksum (const uint8* data, uint32 size) noexcept uint8 checksum = (uint8) size; for (uint32 i = 0; i < size; ++i) - checksum += checksum * 2 + data[i]; + checksum = static_cast (checksum + (checksum * 2 + data[i])); return checksum & 0x7f; } @@ -181,7 +181,7 @@ struct Packed7BitArrayBuilder { const int bitsToDo = jmin (7 - bitsInCurrentByte, numBits); - data[bytesWritten] |= ((value & (uint32) ((1 << bitsToDo) - 1)) << bitsInCurrentByte); + data[bytesWritten] = static_cast (data[bytesWritten] | ((value & (uint32) ((1 << bitsToDo) - 1)) << bitsInCurrentByte)); value >>= bitsToDo; numBits -= bitsToDo; bitsInCurrentByte += bitsToDo; diff --git a/modules/juce_blocks_basics/protocol/juce_BlockModels.h b/modules/juce_blocks_basics/protocol/juce_BlockModels.h index 709697ad29..a42b6bb28c 100644 --- a/modules/juce_blocks_basics/protocol/juce_BlockModels.h +++ b/modules/juce_blocks_basics/protocol/juce_BlockModels.h @@ -345,14 +345,16 @@ static const char* getButtonNameForFunction (ControlButton::ButtonFunction fn) n 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"; + 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"; + + default: break; } jassertfalse; diff --git a/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp b/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp index 45dc0c07bb..8488c074da 100644 --- a/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp +++ b/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp @@ -30,7 +30,7 @@ struct BlockImplementation : public Block, { public: struct ControlButtonImplementation; - struct TouchSurfaceImsplementation; + struct TouchSurfaceImplementation; struct LEDGridImplementation; struct LEDRowImplementation; @@ -220,7 +220,10 @@ public: bool sendMessageToDevice (const PacketBuilder& builder) { if (detector != nullptr) + { + lastMessageSendTime = Time::getCurrentTime(); return detector->sendMessageToDevice (uid, builder); + } return false; } @@ -231,6 +234,11 @@ public: { return p.deviceControlMessage (commandID); }); } + void handleProgramEvent (const ProgramEventMessage& message) + { + programEventListeners.call ([&] (ProgramEventListener& l) { l.handleProgramEvent(*this, message); }); + } + void handleCustomMessage (Block::Timestamp, const int32* data) { ProgramEventMessage m; @@ -238,7 +246,7 @@ public: for (uint32 i = 0; i < BlocksProtocol::numProgramMessageInts; ++i) m.values[i] = data[i]; - programEventListeners.call ([&] (ProgramEventListener& l) { l.handleProgramEvent (*this, m); }); + handleProgramEvent (m); } static BlockImplementation* getFrom (Block* b) noexcept @@ -267,25 +275,37 @@ public: } //============================================================================== - Result setProgram (Program* newProgram) override + Result setProgram (std::unique_ptr newProgram, + ProgramPersistency persistency = ProgramPersistency::setAsTemp) override { - if (newProgram != nullptr && program.get() == newProgram) + auto doProgramsMatch = [&] { - jassertfalse; + if (program == nullptr || newProgram == nullptr) + return false; + + return program->getLittleFootProgram() == newProgram->getLittleFootProgram() + && program->getSearchPaths() == newProgram->getSearchPaths(); + }(); + + if (doProgramsMatch) + { + if (isProgramLoaded) + { + MessageManager::callAsync ([blockRef = Block::Ptr (this), this] + { + programLoadedListeners.call ([&] (ProgramLoadedListener& l) { l.handleProgramLoaded (*this); }); + }); + } + return Result::ok(); } - { - std::unique_ptr p (newProgram); - - if (program != nullptr - && newProgram != nullptr - && program->getLittleFootProgram() == newProgram->getLittleFootProgram()) - return Result::ok(); - - std::swap (program, p); - } + program = std::move (newProgram); + return loadProgram (persistency); + } + Result loadProgram (ProgramPersistency persistency) + { stopTimer(); programSize = 0; @@ -297,7 +317,34 @@ public: return Result::ok(); } - littlefoot::Compiler compiler; + auto res = compileProgram(); + + if (res.failed()) + return res; + + programSize = (uint32) compiler.compiledObjectCode.size(); + + remoteHeap.resetDataRangeToUnknown (0, remoteHeap.blockSize); + remoteHeap.clearTargetData(); + remoteHeap.sendChanges (*this, true); + + remoteHeap.resetDataRangeToUnknown (0, programSize); + remoteHeap.setBytes (0, compiler.compiledObjectCode.begin(), programSize); + remoteHeap.sendChanges (*this, true); + + this->resetConfigListActiveStatus(); + + const auto legacyProgramChangeConfigIndex = getMaxConfigIndex(); + handleConfigItemChanged ({ legacyProgramChangeConfigIndex }, legacyProgramChangeConfigIndex); + + shouldSaveProgramAsDefault = persistency == ProgramPersistency::setAsDefault; + startTimer (20); + + return Result::ok(); + } + + Result compileProgram() + { compiler.addNativeFunctions (PhysicalTopologySource::getStandardLittleFootFunctions()); const auto err = compiler.compile (program->getLittleFootProgram(), 512, program->getSearchPaths()); @@ -311,24 +358,6 @@ public: if (compiler.getCompiledProgram().getTotalSpaceNeeded() > getMemorySize()) return Result::fail ("Program too large!"); - const auto size = (size_t) compiler.compiledObjectCode.size(); - programSize = (uint32) size; - - remoteHeap.resetDataRangeToUnknown (0, remoteHeap.blockSize); - remoteHeap.clearTargetData(); - remoteHeap.sendChanges (*this, true); - - 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()); - - startTimer (20); - return Result::ok(); } @@ -356,8 +385,7 @@ public: if (shouldSaveProgramAsDefault) doSaveProgramAsDefault(); - if (programLoadedCallback != nullptr) - programLoadedCallback (*this); + programLoadedListeners.call([&] (ProgramLoadedListener& l) { l.handleProgramLoaded (*this); }); } else { @@ -447,14 +475,14 @@ public: config.handleConfigUpdateMessage (item, value, min, max); } - void handleConfigSetMessage(int32 item, int32 value) + void handleConfigSetMessage (int32 item, int32 value) { config.handleConfigSetMessage (item, value); } void pingFromDevice() { - lastPingReceiveTime = Time::getCurrentTime(); + lastMessageReceiveTime = Time::getCurrentTime(); } MIDIDeviceConnection* getDeviceConnection() @@ -508,11 +536,8 @@ public: remoteHeap.sendChanges (*this, false); - if (lastPingSendTime < Time::getCurrentTime() - getPingInterval()) - { - lastPingSendTime = Time::getCurrentTime(); + if (lastMessageSendTime < Time::getCurrentTime() - getPingInterval()) sendCommandMessage (BlocksProtocol::ping); - } } RelativeTime getPingInterval() @@ -521,6 +546,16 @@ public: } //============================================================================== + void handleConfigItemChanged (const ConfigMetaData& data, uint32 index) + { + configItemListeners.call([&] (ConfigItemListener& l) { l.handleConfigItemChanged (*this, data, index); }); + } + + void handleConfigSyncEnded() + { + configItemListeners.call([&] (ConfigItemListener& l) { l.handleConfigSyncEnded (*this); }); + } + int32 getLocalConfigValue (uint32 item) override { initialiseDeviceIndexAndConnection(); @@ -580,16 +615,6 @@ public: config.resetConfigListActiveStatus(); } - void setConfigChangedCallback (std::function configChanged) override - { - configChangedCallback = std::move (configChanged); - } - - void setProgramLoadedCallback (std::function programLoaded) override - { - programLoadedCallback = std::move (programLoaded); - } - bool setName (const String& newName) override { return buildAndSendPacket<128> ([&newName] (BlocksProtocol::HostPacketBuilder<128>& p) @@ -600,6 +625,12 @@ public: { buildAndSendPacket<32> ([] (BlocksProtocol::HostPacketBuilder<32>& p) { return p.addFactoryReset(); }); + + juce::Timer::callAfterDelay (5, [ref = WeakReference(this)] + { + if (ref != nullptr) + ref->blockReset(); + }); } void blockReset() override @@ -654,14 +685,12 @@ public: RemoteHeapType remoteHeap; WeakReference detector; - Time lastPingSendTime, lastPingReceiveTime; + Time lastMessageSendTime, lastMessageReceiveTime; BlockConfigManager config; - std::function configChangedCallback; - - std::function programLoadedCallback; private: + littlefoot::Compiler compiler; std::unique_ptr program; uint32 programSize = 0; @@ -1035,7 +1064,7 @@ public: { if (block.getProgram() == nullptr) { - auto err = block.setProgram (new DefaultLEDGridProgram (block)); + auto err = block.setProgram (std::make_unique (block)); if (err.failed()) { @@ -1116,6 +1145,7 @@ public: private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BlockImplementation) + JUCE_DECLARE_WEAK_REFERENCEABLE (BlockImplementation) }; } // namespace juce diff --git a/modules/juce_blocks_basics/topology/internal/juce_Detector.cpp b/modules/juce_blocks_basics/topology/internal/juce_Detector.cpp index 9a0df53d1c..8cf8de2c03 100644 --- a/modules/juce_blocks_basics/topology/internal/juce_Detector.cpp +++ b/modules/juce_blocks_basics/topology/internal/juce_Detector.cpp @@ -290,13 +290,10 @@ struct Detector : public ReferenceCountedObject, void notifyBlockOfConfigChange (BlockImpl& bi, uint32 item) { - if (auto configChangedCallback = bi.configChangedCallback) - { - if (item >= bi.getMaxConfigIndex()) - configChangedCallback (bi, {}, item); - else - configChangedCallback (bi, bi.getLocalConfigMetaData (item), item); - } + if (item >= bi.getMaxConfigIndex()) + bi.handleConfigItemChanged ({ item }, item); + else + bi.handleConfigItemChanged (bi.getLocalConfigMetaData (item), item); } void handleConfigSetMessage (Block::UID deviceID, int32 item, int32 value) @@ -311,7 +308,7 @@ struct Detector : public ReferenceCountedObject, void handleConfigFactorySyncEndMessage (Block::UID deviceID) { if (auto* bi = getBlockImplementationWithUID (deviceID)) - notifyBlockOfConfigChange (*bi, bi->getMaxConfigIndex()); + bi->handleConfigSyncEnded(); } void handleConfigFactorySyncResetMessage (Block::UID deviceID) @@ -574,6 +571,7 @@ private: case Block::ConnectionPort::DeviceEdge::east: return 1; case Block::ConnectionPort::DeviceEdge::south: return 2; case Block::ConnectionPort::DeviceEdge::west: return 3; + default: break; } jassertfalse; @@ -632,6 +630,8 @@ private: case 3: // left of me delta = { -theirBounds.width, (myBounds.height - (myOffset + 1)) - theirOffset }; break; + default: + break; } { @@ -674,6 +674,7 @@ private: case Block::ConnectionPort::DeviceEdge::south: return "south"; case Block::ConnectionPort::DeviceEdge::east: return "east"; case Block::ConnectionPort::DeviceEdge::west: return "west"; + default: break; } return {}; diff --git a/modules/juce_blocks_basics/topology/juce_BlockGraph.h b/modules/juce_blocks_basics/topology/juce_BlockGraph.h index c604139e26..989ec4e28b 100644 --- a/modules/juce_blocks_basics/topology/juce_BlockGraph.h +++ b/modules/juce_blocks_basics/topology/juce_BlockGraph.h @@ -27,6 +27,8 @@ namespace juce /** Represents traversal paths from master blocks and any connected blocks. + + @tags{Blocks} */ class BlockGraph { diff --git a/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h b/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h index fa1be4124a..04af1b5353 100644 --- a/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h +++ b/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h @@ -52,7 +52,7 @@ public: bool isActive() const override; /** This method will tell, if an other PhysicalTopologySource has locked the Midi connection */ - bool isLockedFromOutside() const; + bool isLockedFromOutside() const override; //============================================================================== /** For custom transport systems, this represents a connected device */ diff --git a/modules/juce_blocks_basics/topology/juce_RuleBasedTopologySource.h b/modules/juce_blocks_basics/topology/juce_RuleBasedTopologySource.h index 1e6baffbf0..3e5065ef9f 100644 --- a/modules/juce_blocks_basics/topology/juce_RuleBasedTopologySource.h +++ b/modules/juce_blocks_basics/topology/juce_RuleBasedTopologySource.h @@ -79,6 +79,8 @@ public: /** Returns true, if the TopologySource is currently trying to connect the block devices */ bool isActive() const override; + bool isLockedFromOutside() const override { return false; } + private: //============================================================================== struct Internal; diff --git a/modules/juce_blocks_basics/topology/juce_TopologySource.h b/modules/juce_blocks_basics/topology/juce_TopologySource.h index d7360ba5bf..6f4b0ff510 100644 --- a/modules/juce_blocks_basics/topology/juce_TopologySource.h +++ b/modules/juce_blocks_basics/topology/juce_TopologySource.h @@ -43,6 +43,9 @@ public: /** Returns true, if the TopologySource is currently trying to connect the block devices */ virtual bool isActive() const = 0; + /** Returns true if the topology is locked externally.*/ + virtual bool isLockedFromOutside() const = 0; + //============================================================================== /** Used to receive callbacks for topology changes */ struct Listener @@ -70,6 +73,12 @@ public: /** Invoke this to force touches-off on all physical devices. */ virtual void cancelAllActiveTouches() noexcept {} + /** Gets blocks from the current topology. */ + Block::Array getBlocks() const { return getCurrentTopology().blocks; } + + /**Gets a block with given uid from the current topology*/ + Block::Ptr getBlockWithUID (Block::UID uid) const { return getCurrentTopology().getBlockWithUID (uid); } + protected: //============================================================================== ListenerList listeners; diff --git a/modules/juce_box2d/box2d/Collision/b2DynamicTree.cpp b/modules/juce_box2d/box2d/Collision/b2DynamicTree.cpp index 7389fc0b2b..3287cf7cd5 100644 --- a/modules/juce_box2d/box2d/Collision/b2DynamicTree.cpp +++ b/modules/juce_box2d/box2d/Collision/b2DynamicTree.cpp @@ -642,6 +642,7 @@ void b2DynamicTree::ValidateMetrics(int32 index) const int32 height; height = 1 + b2Max(height1, height2); b2Assert(node->height == height); + juce::ignoreUnused (height); b2AABB aabb; aabb.Combine(m_nodes[child1].aabb, m_nodes[child2].aabb); diff --git a/modules/juce_box2d/box2d/Dynamics/b2Body.cpp b/modules/juce_box2d/box2d/Dynamics/b2Body.cpp index ce3f2ded11..e0f18b201a 100644 --- a/modules/juce_box2d/box2d/Dynamics/b2Body.cpp +++ b/modules/juce_box2d/box2d/Dynamics/b2Body.cpp @@ -224,6 +224,7 @@ void b2Body::DestroyFixture(b2Fixture* fixture) // You tried to remove a shape that is not attached to this body. b2Assert(found); + juce::ignoreUnused (found); // Destroy any contacts associated with the fixture. b2ContactEdge* edge = m_contactList; diff --git a/modules/juce_box2d/juce_box2d.cpp b/modules/juce_box2d/juce_box2d.cpp index 5673b384d9..0a550c4ee3 100644 --- a/modules/juce_box2d/juce_box2d.cpp +++ b/modules/juce_box2d/juce_box2d.cpp @@ -37,17 +37,23 @@ #if defined JUCE_CLANG #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wsign-conversion" #pragma clang diagnostic ignored "-Wfloat-conversion" #pragma clang diagnostic ignored "-Wcast-align" + #pragma clang diagnostic ignored "-Wswitch-enum" #if __has_warning("-Wzero-as-null-pointer-constant") #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #endif #elif defined JUCE_GCC #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wsign-conversion" + #pragma GCC diagnostic ignored "-Wfloat-conversion" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" + #pragma GCC diagnostic ignored "-Wswitch-enum" + #pragma GCC diagnostic ignored "-Wswitch-default" #endif #include diff --git a/modules/juce_box2d/juce_box2d.h b/modules/juce_box2d/juce_box2d.h index 5080c705f9..05c2153355 100644 --- a/modules/juce_box2d/juce_box2d.h +++ b/modules/juce_box2d/juce_box2d.h @@ -24,6 +24,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -33,15 +34,15 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_box2d - vendor: juce - version: 5.4.5 - name: JUCE wrapper for the Box2D physics engine - description: The Box2D physics engine and some utility classes. - website: http://www.juce.com/juce - license: GPL/Commercial + ID: juce_box2d + vendor: juce + version: 5.4.7 + name: JUCE wrapper for the Box2D physics engine + description: The Box2D physics engine and some utility classes. + website: http://www.juce.com/juce + license: GPL/Commercial - dependencies: juce_graphics + dependencies: juce_graphics END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_core/containers/juce_PropertySet.cpp b/modules/juce_core/containers/juce_PropertySet.cpp index fe3712721c..45f67eb5a4 100644 --- a/modules/juce_core/containers/juce_PropertySet.cpp +++ b/modules/juce_core/containers/juce_PropertySet.cpp @@ -115,7 +115,7 @@ std::unique_ptr PropertySet::getXmlValue (StringRef keyName) const return parseXML (getValue (keyName)); } -void PropertySet::setValue (const String& keyName, const var& v) +void PropertySet::setValue (StringRef keyName, const var& v) { jassert (keyName.isNotEmpty()); // shouldn't use an empty key name! @@ -148,7 +148,7 @@ void PropertySet::removeValue (StringRef keyName) } } -void PropertySet::setValue (const String& keyName, const XmlElement* xml) +void PropertySet::setValue (StringRef keyName, const XmlElement* xml) { setValue (keyName, xml == nullptr ? var() : var (xml->toString (XmlElement::TextFormat().singleLine().withoutHeader()))); diff --git a/modules/juce_core/containers/juce_PropertySet.h b/modules/juce_core/containers/juce_PropertySet.h index b14cabf5ca..be4a22b728 100644 --- a/modules/juce_core/containers/juce_PropertySet.h +++ b/modules/juce_core/containers/juce_PropertySet.h @@ -121,7 +121,7 @@ public: @param keyName the name of the property to set. (This mustn't be an empty string) @param value the new value to set it to */ - void setValue (const String& keyName, const var& value); + void setValue (StringRef keyName, const var& value); /** Sets a named property to an XML element. @@ -130,7 +130,7 @@ public: be set to an empty string @see getXmlValue */ - void setValue (const String& keyName, const XmlElement* xml); + void setValue (StringRef keyName, const XmlElement* xml); /** This copies all the values from a source PropertySet to this one. This won't remove any existing settings, it just adds any that it finds in the source set. diff --git a/modules/juce_core/containers/juce_SortedSet.h b/modules/juce_core/containers/juce_SortedSet.h index b3f7905ff9..69d7319d46 100644 --- a/modules/juce_core/containers/juce_SortedSet.h +++ b/modules/juce_core/containers/juce_SortedSet.h @@ -380,7 +380,7 @@ public: @param valueToRemove the object to try to remove @see remove, removeRange */ - void removeValue (const ElementType valueToRemove) noexcept + void removeValue (const ElementType& valueToRemove) noexcept { const ScopedLockType lock (getLock()); data.remove (indexOf (valueToRemove)); diff --git a/modules/juce_core/files/juce_File.cpp b/modules/juce_core/files/juce_File.cpp index 7041ecd886..a7eab140fc 100644 --- a/modules/juce_core/files/juce_File.cpp +++ b/modules/juce_core/files/juce_File.cpp @@ -726,22 +726,24 @@ bool File::startAsProcess (const String& parameters) const } //============================================================================== -FileInputStream* File::createInputStream() const +std::unique_ptr File::createInputStream() const { - std::unique_ptr fin (new FileInputStream (*this)); + auto fin = std::make_unique (*this); if (fin->openedOk()) - return fin.release(); + return fin; return nullptr; } -FileOutputStream* File::createOutputStream (size_t bufferSize) const +std::unique_ptr File::createOutputStream (size_t bufferSize) const { - std::unique_ptr out (new FileOutputStream (*this, bufferSize)); + auto fout = std::make_unique (*this, bufferSize); - return out->failedToOpen() ? nullptr - : out.release(); + if (fout->openedOk()) + return fout; + + return nullptr; } //============================================================================== @@ -753,8 +755,8 @@ bool File::appendData (const void* const dataToAppend, if (numberOfBytes == 0) return true; - FileOutputStream out (*this, 8192); - return out.openedOk() && out.write (dataToAppend, numberOfBytes); + FileOutputStream fout (*this, 8192); + return fout.openedOk() && fout.write (dataToAppend, numberOfBytes); } bool File::replaceWithData (const void* const dataToWrite, @@ -770,12 +772,12 @@ bool File::replaceWithData (const void* const dataToWrite, bool File::appendText (const String& text, bool asUnicode, bool writeHeaderBytes, const char* lineFeed) const { - FileOutputStream out (*this); + FileOutputStream fout (*this); - if (out.failedToOpen()) + if (fout.failedToOpen()) return false; - return out.writeText (text, asUnicode, writeHeaderBytes, lineFeed); + return fout.writeText (text, asUnicode, writeHeaderBytes, lineFeed); } bool File::replaceWithText (const String& textToWrite, bool asUnicode, bool writeHeaderBytes, const char* lineFeed) const diff --git a/modules/juce_core/files/juce_File.h b/modules/juce_core/files/juce_File.h index e52b138a75..de2e7fdaae 100644 --- a/modules/juce_core/files/juce_File.h +++ b/modules/juce_core/files/juce_File.h @@ -20,6 +20,14 @@ ============================================================================== */ +#if JUCE_MAC || JUCE_IOS + #if __LP64__ + using OSType = unsigned int; + #else + using OSType = unsigned long; + #endif +#endif + namespace juce { @@ -622,7 +630,7 @@ public: start of the file), or nullptr if the file can't be opened for some reason @see createOutputStream, loadFileAsData */ - FileInputStream* createInputStream() const; + std::unique_ptr createInputStream() const; /** Creates a stream to write to this file. @@ -655,7 +663,7 @@ public: end of the file), or nullptr if the file can't be opened for some reason @see createInputStream, appendData, appendText */ - FileOutputStream* createOutputStream (size_t bufferSize = 0x8000) const; + std::unique_ptr createOutputStream (size_t bufferSize = 0x8000) const; //============================================================================== /** Loads a file's contents into memory as a block of binary data. diff --git a/modules/juce_core/files/juce_FileInputStream.cpp b/modules/juce_core/files/juce_FileInputStream.cpp index 8f17e99c2d..e1226e7c14 100644 --- a/modules/juce_core/files/juce_FileInputStream.cpp +++ b/modules/juce_core/files/juce_FileInputStream.cpp @@ -89,63 +89,84 @@ struct FileInputStreamTests : public UnitTest void runTest() override { + beginTest ("Open stream non-existent file"); + { + auto tempFile = File::createTempFile (".txt"); + expect (! tempFile.exists()); + + FileInputStream stream (tempFile); + expect (stream.failedToOpen()); + } + + beginTest ("Open stream existing file"); + { + auto tempFile = File::createTempFile (".txt"); + tempFile.create(); + expect (tempFile.exists()); + + FileInputStream stream (tempFile); + expect (stream.openedOk()); + } + const MemoryBlock data ("abcdefghijklmnopqrstuvwxyz", 26); File f (File::createTempFile (".txt")); f.appendData (data.getData(), data.getSize()); FileInputStream stream (f); beginTest ("Read"); - - expectEquals (stream.getPosition(), (int64) 0); - expectEquals (stream.getTotalLength(), (int64) data.getSize()); - expectEquals (stream.getNumBytesRemaining(), stream.getTotalLength()); - expect (! stream.isExhausted()); - - size_t numBytesRead = 0; - MemoryBlock readBuffer (data.getSize()); - - while (numBytesRead < data.getSize()) { - numBytesRead += (size_t) stream.read (&readBuffer[numBytesRead], 3); + expectEquals (stream.getPosition(), (int64) 0); + expectEquals (stream.getTotalLength(), (int64) data.getSize()); + expectEquals (stream.getNumBytesRemaining(), stream.getTotalLength()); + expect (! stream.isExhausted()); - expectEquals (stream.getPosition(), (int64) numBytesRead); - expectEquals (stream.getNumBytesRemaining(), (int64) (data.getSize() - numBytesRead)); - expect (stream.isExhausted() == (numBytesRead == data.getSize())); + size_t numBytesRead = 0; + MemoryBlock readBuffer (data.getSize()); + + while (numBytesRead < data.getSize()) + { + numBytesRead += (size_t) stream.read (&readBuffer[numBytesRead], 3); + + expectEquals (stream.getPosition(), (int64) numBytesRead); + expectEquals (stream.getNumBytesRemaining(), (int64) (data.getSize() - numBytesRead)); + expect (stream.isExhausted() == (numBytesRead == data.getSize())); + } + + expectEquals (stream.getPosition(), (int64) data.getSize()); + expectEquals (stream.getNumBytesRemaining(), (int64) 0); + expect (stream.isExhausted()); + + expect (readBuffer == data); } - expectEquals (stream.getPosition(), (int64) data.getSize()); - expectEquals (stream.getNumBytesRemaining(), (int64) 0); - expect (stream.isExhausted()); - - expect (readBuffer == data); - beginTest ("Skip"); - - stream.setPosition (0); - expectEquals (stream.getPosition(), (int64) 0); - expectEquals (stream.getTotalLength(), (int64) data.getSize()); - expectEquals (stream.getNumBytesRemaining(), stream.getTotalLength()); - expect (! stream.isExhausted()); - - numBytesRead = 0; - const int numBytesToSkip = 5; - - while (numBytesRead < data.getSize()) { - stream.skipNextBytes (numBytesToSkip); - numBytesRead += numBytesToSkip; - numBytesRead = std::min (numBytesRead, data.getSize()); + stream.setPosition (0); + expectEquals (stream.getPosition(), (int64) 0); + expectEquals (stream.getTotalLength(), (int64) data.getSize()); + expectEquals (stream.getNumBytesRemaining(), stream.getTotalLength()); + expect (! stream.isExhausted()); - expectEquals (stream.getPosition(), (int64) numBytesRead); - expectEquals (stream.getNumBytesRemaining(), (int64) (data.getSize() - numBytesRead)); - expect (stream.isExhausted() == (numBytesRead == data.getSize())); + size_t numBytesRead = 0; + const int numBytesToSkip = 5; + + while (numBytesRead < data.getSize()) + { + stream.skipNextBytes (numBytesToSkip); + numBytesRead += numBytesToSkip; + numBytesRead = std::min (numBytesRead, data.getSize()); + + expectEquals (stream.getPosition(), (int64) numBytesRead); + expectEquals (stream.getNumBytesRemaining(), (int64) (data.getSize() - numBytesRead)); + expect (stream.isExhausted() == (numBytesRead == data.getSize())); + } + + expectEquals (stream.getPosition(), (int64) data.getSize()); + expectEquals (stream.getNumBytesRemaining(), (int64) 0); + expect (stream.isExhausted()); + + f.deleteFile(); } - - expectEquals (stream.getPosition(), (int64) data.getSize()); - expectEquals (stream.getNumBytesRemaining(), (int64) 0); - expect (stream.isExhausted()); - - f.deleteFile(); } }; diff --git a/modules/juce_core/files/juce_FileOutputStream.cpp b/modules/juce_core/files/juce_FileOutputStream.cpp index 8485283295..e66df5020e 100644 --- a/modules/juce_core/files/juce_FileOutputStream.cpp +++ b/modules/juce_core/files/juce_FileOutputStream.cpp @@ -23,8 +23,6 @@ namespace juce { -int64 juce_fileSetPosition (void* handle, int64 pos); - //============================================================================== FileOutputStream::FileOutputStream (const File& f, const size_t bufferSizeToUse) : file (f), diff --git a/modules/juce_core/javascript/juce_JSON.cpp b/modules/juce_core/javascript/juce_JSON.cpp index b083742974..b0b207cec5 100644 --- a/modules/juce_core/javascript/juce_JSON.cpp +++ b/modules/juce_core/javascript/juce_JSON.cpp @@ -126,6 +126,8 @@ struct JSONParser break; } + + default: break; } } diff --git a/modules/juce_core/juce_core.cpp b/modules/juce_core/juce_core.cpp index e3880a0f03..a6a2ef7665 100644 --- a/modules/juce_core/juce_core.cpp +++ b/modules/juce_core/juce_core.cpp @@ -48,7 +48,11 @@ #if JUCE_WINDOWS #include - #if ! JUCE_MINGW + #if JUCE_MINGW + #include + #include + #include + #else #pragma warning (push) #pragma warning (disable: 4091) #include @@ -59,12 +63,6 @@ #endif #endif - #if JUCE_MINGW - #include - #include - #include - #endif - #else #if JUCE_LINUX || JUCE_ANDROID #include @@ -141,7 +139,6 @@ #include "misc/juce_RuntimePermissions.cpp" #include "misc/juce_Result.cpp" #include "misc/juce_Uuid.cpp" -#include "misc/juce_StdFunctionCompat.cpp" #include "misc/juce_ConsoleApplication.cpp" #include "network/juce_MACAddress.cpp" #include "network/juce_NamedPipe.cpp" diff --git a/modules/juce_core/juce_core.h b/modules/juce_core/juce_core.h index b7b7aa991a..62d0dfa44b 100644 --- a/modules/juce_core/juce_core.h +++ b/modules/juce_core/juce_core.h @@ -30,19 +30,19 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_core - vendor: juce - version: 5.4.5 - 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 - license: ISC + ID: juce_core + vendor: juce + version: 5.4.7 + 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 + license: ISC dependencies: - OSXFrameworks: Cocoa IOKit - iOSFrameworks: Foundation - linuxLibs: rt dl pthread - mingwLibs: uuid wsock32 wininet version ole32 ws2_32 oleaut32 imm32 comdlg32 shlwapi rpcrt4 winmm + OSXFrameworks: Cocoa IOKit + iOSFrameworks: Foundation + linuxLibs: rt dl pthread + mingwLibs: uuid wsock32 wininet version ole32 ws2_32 oleaut32 imm32 comdlg32 shlwapi rpcrt4 winmm END_JUCE_MODULE_DECLARATION @@ -107,7 +107,7 @@ //============================================================================== /** Config: JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - In a Visual C++ build, this can be used to stop the required system libs being + In a Windows build, this can be used to stop the required system libs being automatically added to the link stage. */ #ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES diff --git a/modules/juce_core/maths/juce_BigInteger.cpp b/modules/juce_core/maths/juce_BigInteger.cpp index fae2e2f09f..45fcae53da 100644 --- a/modules/juce_core/maths/juce_BigInteger.cpp +++ b/modules/juce_core/maths/juce_BigInteger.cpp @@ -551,7 +551,7 @@ BigInteger& BigInteger::operator*= (const BigInteger& other) { auto uv = (uint64) totalValues[i + j] + (uint64) values[j] * (uint64) mValues[i] + (uint64) c; totalValues[i + j] = (uint32) uv; - c = uv >> 32; + c = static_cast (uv >> 32); } totalValues[i + n + 1] = c; diff --git a/modules/juce_core/maths/juce_MathsFunctions.h b/modules/juce_core/maths/juce_MathsFunctions.h index 452a03d6a8..13826a2377 100644 --- a/modules/juce_core/maths/juce_MathsFunctions.h +++ b/modules/juce_core/maths/juce_MathsFunctions.h @@ -91,33 +91,33 @@ using uint32 = unsigned int; /** Returns the larger of two values. */ template -JUCE_CONSTEXPR Type jmax (Type a, Type b) { return a < b ? b : a; } +constexpr Type jmax (Type a, Type b) { return a < b ? b : a; } /** Returns the larger of three values. */ template -JUCE_CONSTEXPR Type jmax (Type a, Type b, Type c) { return a < b ? (b < c ? c : b) : (a < c ? c : a); } +constexpr Type jmax (Type a, Type b, Type c) { return a < b ? (b < c ? c : b) : (a < c ? c : a); } /** Returns the larger of four values. */ template -JUCE_CONSTEXPR Type jmax (Type a, Type b, Type c, Type d) { return jmax (a, jmax (b, c, d)); } +constexpr Type jmax (Type a, Type b, Type c, Type d) { return jmax (a, jmax (b, c, d)); } /** Returns the smaller of two values. */ template -JUCE_CONSTEXPR Type jmin (Type a, Type b) { return b < a ? b : a; } +constexpr Type jmin (Type a, Type b) { return b < a ? b : a; } /** Returns the smaller of three values. */ template -JUCE_CONSTEXPR Type jmin (Type a, Type b, Type c) { return b < a ? (c < b ? c : b) : (c < a ? c : a); } +constexpr Type jmin (Type a, Type b, Type c) { return b < a ? (c < b ? c : b) : (c < a ? c : a); } /** Returns the smaller of four values. */ template -JUCE_CONSTEXPR Type jmin (Type a, Type b, Type c, Type d) { return jmin (a, jmin (b, c, d)); } +constexpr Type jmin (Type a, Type b, Type c, Type d) { return jmin (a, jmin (b, c, d)); } /** Remaps a normalised value (between 0 and 1) to a target range. This effectively returns (targetRangeMin + value0To1 * (targetRangeMax - targetRangeMin)). */ template -JUCE_CONSTEXPR Type jmap (Type value0To1, Type targetRangeMin, Type targetRangeMax) +constexpr Type jmap (Type value0To1, Type targetRangeMin, Type targetRangeMax) { return targetRangeMin + value0To1 * (targetRangeMax - targetRangeMin); } @@ -297,7 +297,7 @@ void ignoreUnused (Types&&...) noexcept {} @endcode */ template -JUCE_CONSTEXPR int numElementsInArray (Type (&)[N]) noexcept { return N; } +constexpr int numElementsInArray (Type (&)[N]) noexcept { return N; } //============================================================================== // Some useful maths functions that aren't always present with all compilers and build settings. @@ -327,8 +327,6 @@ inline float juce_hypot (float a, float b) noexcept #endif //============================================================================== -#if JUCE_HAS_CONSTEXPR - /** Commonly used mathematical constants @tags{Core} @@ -352,71 +350,29 @@ struct MathConstants static constexpr FloatType sqrt2 = static_cast (1.4142135623730950488L); }; -#else - -/** Commonly used mathematical constants - - @tags{Core} -*/ -template -struct MathConstants -{ - /** A predefined value for Pi */ - static const FloatType pi; - - /** A predefined value for 2 * Pi */ - static const FloatType twoPi; - - /** A predefined value for Pi / 2 */ - static const FloatType halfPi; - - /** A predefined value for Euler's number */ - static const FloatType euler; - - /** A predefined value for sqrt(2) */ - static const FloatType sqrt2; -}; - -template -const FloatType MathConstants::pi = static_cast (3.141592653589793238L); - -template -const FloatType MathConstants::twoPi = static_cast (2 * 3.141592653589793238L); - -template -const FloatType MathConstants::halfPi = static_cast (3.141592653589793238L / 2); - -template -const FloatType MathConstants::euler = static_cast (2.71828182845904523536L); - -template -const FloatType MathConstants::sqrt2 = static_cast (1.4142135623730950488L); - -#endif - #ifndef DOXYGEN /** A double-precision constant for pi. @deprecated This is deprecated in favour of MathConstants::pi. The reason is that "double_Pi" was a confusing name, and many people misused it, wrongly thinking it meant 2 * pi ! */ -const JUCE_CONSTEXPR double double_Pi = MathConstants::pi; +const constexpr double double_Pi = MathConstants::pi; /** A single-precision constant for pi. @deprecated This is deprecated in favour of MathConstants::pi. The reason is that "double_Pi" was a confusing name, and many people misused it, wrongly thinking it meant 2 * pi ! */ -const JUCE_CONSTEXPR float float_Pi = MathConstants::pi; +const constexpr float float_Pi = MathConstants::pi; #endif /** Converts an angle in degrees to radians. */ template -JUCE_CONSTEXPR FloatType degreesToRadians (FloatType degrees) noexcept { return degrees * (MathConstants::pi / FloatType (180)); } +constexpr FloatType degreesToRadians (FloatType degrees) noexcept { return degrees * (MathConstants::pi / FloatType (180)); } /** Converts an angle in radians to degrees. */ template -JUCE_CONSTEXPR FloatType radiansToDegrees (FloatType radians) noexcept { return radians * (FloatType (180) / MathConstants::pi); } +constexpr FloatType radiansToDegrees (FloatType radians) noexcept { return radians * (FloatType (180) / MathConstants::pi); } //============================================================================== @@ -529,7 +485,7 @@ unsigned int truncatePositiveToUnsignedInt (FloatType value) noexcept //============================================================================== /** Returns true if the specified integer is a power-of-two. */ template -JUCE_CONSTEXPR bool isPowerOfTwo (IntegerType value) +constexpr bool isPowerOfTwo (IntegerType value) { return (value & (value - 1)) == 0; } @@ -582,7 +538,7 @@ IntegerType negativeAwareModulo (IntegerType dividend, const IntegerType divisor /** Returns the square of its argument. */ template -inline JUCE_CONSTEXPR NumericType square (NumericType n) noexcept +inline constexpr NumericType square (NumericType n) noexcept { return n * n; } diff --git a/modules/juce_core/maths/juce_Range.h b/modules/juce_core/maths/juce_Range.h index fc22853df7..c4c5b6958c 100644 --- a/modules/juce_core/maths/juce_Range.h +++ b/modules/juce_core/maths/juce_Range.h @@ -41,22 +41,22 @@ class Range public: //============================================================================== /** Constructs an empty range. */ - JUCE_CONSTEXPR Range() = default; + constexpr Range() = default; /** Constructs a range with given start and end values. */ - JUCE_CONSTEXPR Range (const ValueType startValue, const ValueType endValue) noexcept + constexpr Range (const ValueType startValue, const ValueType endValue) noexcept : start (startValue), end (jmax (startValue, endValue)) { } /** Constructs a copy of another range. */ - JUCE_CONSTEXPR Range (const Range&) = default; + constexpr Range (const Range&) = default; /** Copies another range object. */ Range& operator= (const Range&) = default; /** Returns the range that lies between two positions (in either order). */ - JUCE_CONSTEXPR static Range between (const ValueType position1, const ValueType position2) noexcept + constexpr static Range between (const ValueType position1, const ValueType position2) noexcept { return position1 < position2 ? Range (position1, position2) : Range (position2, position1); @@ -70,23 +70,23 @@ public: } /** Returns a range with the specified start position and a length of zero. */ - JUCE_CONSTEXPR static Range emptyRange (const ValueType start) noexcept + constexpr static Range emptyRange (const ValueType start) noexcept { return Range (start, start); } //============================================================================== /** Returns the start of the range. */ - JUCE_CONSTEXPR inline ValueType getStart() const noexcept { return start; } + constexpr inline ValueType getStart() const noexcept { return start; } /** Returns the length of the range. */ - JUCE_CONSTEXPR inline ValueType getLength() const noexcept { return end - start; } + constexpr inline ValueType getLength() const noexcept { return end - start; } /** Returns the end of the range. */ - JUCE_CONSTEXPR inline ValueType getEnd() const noexcept { return end; } + constexpr inline ValueType getEnd() const noexcept { return end; } /** Returns true if the range has a length of zero. */ - JUCE_CONSTEXPR inline bool isEmpty() const noexcept { return start == end; } + constexpr inline bool isEmpty() const noexcept { return start == end; } //============================================================================== /** Changes the start position of the range, leaving the end position unchanged. @@ -104,13 +104,13 @@ public: If the new start position is higher than the current end of the range, the end point will be pushed along to equal it, returning an empty range at the new position. */ - JUCE_CONSTEXPR Range withStart (const ValueType newStart) const noexcept + constexpr Range withStart (const ValueType newStart) const noexcept { return Range (newStart, jmax (newStart, end)); } /** Returns a range with the same length as this one, but moved to have the given start position. */ - JUCE_CONSTEXPR Range movedToStartAt (const ValueType newStart) const noexcept + constexpr Range movedToStartAt (const ValueType newStart) const noexcept { return Range (newStart, end + (newStart - start)); } @@ -130,13 +130,13 @@ public: If the new end position is below the current start of the range, the start point will be pushed back to equal the new end point. */ - JUCE_CONSTEXPR Range withEnd (const ValueType newEnd) const noexcept + constexpr Range withEnd (const ValueType newEnd) const noexcept { return Range (jmin (start, newEnd), newEnd); } /** Returns a range with the same length as this one, but moved to have the given end position. */ - JUCE_CONSTEXPR Range movedToEndAt (const ValueType newEnd) const noexcept + constexpr Range movedToEndAt (const ValueType newEnd) const noexcept { return Range (start + (newEnd - end), newEnd); } @@ -152,7 +152,7 @@ public: /** Returns a range with the same start as this one, but a different length. Lengths less than zero are treated as zero. */ - JUCE_CONSTEXPR Range withLength (const ValueType newLength) const noexcept + constexpr Range withLength (const ValueType newLength) const noexcept { return Range (start, start + newLength); } @@ -161,7 +161,7 @@ public: given amount. @returns The returned range will be (start - amount, end + amount) */ - JUCE_CONSTEXPR Range expanded (ValueType amount) const noexcept + constexpr Range expanded (ValueType amount) const noexcept { return Range (start - amount, end + amount); } @@ -186,27 +186,27 @@ public: /** Returns a range that is equal to this one with an amount added to its start and end. */ - JUCE_CONSTEXPR Range operator+ (const ValueType amountToAdd) const noexcept + constexpr Range operator+ (const ValueType amountToAdd) const noexcept { return Range (start + amountToAdd, end + amountToAdd); } /** Returns a range that is equal to this one with the specified amount subtracted from its start and end. */ - JUCE_CONSTEXPR Range operator- (const ValueType amountToSubtract) const noexcept + constexpr Range operator- (const ValueType amountToSubtract) const noexcept { return Range (start - amountToSubtract, end - amountToSubtract); } - JUCE_CONSTEXPR bool operator== (Range other) const noexcept { return start == other.start && end == other.end; } - JUCE_CONSTEXPR bool operator!= (Range other) const noexcept { return start != other.start || end != other.end; } + constexpr bool operator== (Range other) const noexcept { return start == other.start && end == other.end; } + constexpr bool operator!= (Range other) const noexcept { return start != other.start || end != other.end; } //============================================================================== /** Returns true if the given position lies inside this range. When making this comparison, the start value is considered to be inclusive, and the end of the range exclusive. */ - JUCE_CONSTEXPR bool contains (const ValueType position) const noexcept + constexpr bool contains (const ValueType position) const noexcept { return start <= position && position < end; } @@ -218,34 +218,34 @@ public: } /** Returns true if the given range lies entirely inside this range. */ - JUCE_CONSTEXPR bool contains (Range other) const noexcept + constexpr bool contains (Range other) const noexcept { return start <= other.start && end >= other.end; } /** Returns true if the given range intersects this one. */ - JUCE_CONSTEXPR bool intersects (Range other) const noexcept + constexpr bool intersects (Range other) const noexcept { return other.start < end && start < other.end; } /** Returns the range that is the intersection of the two ranges, or an empty range with an undefined start position if they don't overlap. */ - JUCE_CONSTEXPR Range getIntersectionWith (Range other) const noexcept + constexpr Range getIntersectionWith (Range other) const noexcept { return Range (jmax (start, other.start), jmin (end, other.end)); } /** Returns the smallest range that contains both this one and the other one. */ - JUCE_CONSTEXPR Range getUnionWith (Range other) const noexcept + constexpr Range getUnionWith (Range other) const noexcept { return Range (jmin (start, other.start), jmax (end, other.end)); } /** Returns the smallest range that contains both this one and the given value. */ - JUCE_CONSTEXPR Range getUnionWith (const ValueType valueToInclude) const noexcept + constexpr Range getUnionWith (const ValueType valueToInclude) const noexcept { return Range (jmin (valueToInclude, start), jmax (valueToInclude, end)); diff --git a/modules/juce_core/memory/juce_ByteOrder.h b/modules/juce_core/memory/juce_ByteOrder.h index 95e28482fb..4c3bcb41ee 100644 --- a/modules/juce_core/memory/juce_ByteOrder.h +++ b/modules/juce_core/memory/juce_ByteOrder.h @@ -20,6 +20,10 @@ ============================================================================== */ +#if JUCE_MAC || JUCE_IOS + #include +#endif + namespace juce { @@ -34,10 +38,10 @@ class JUCE_API ByteOrder public: //============================================================================== /** Swaps the upper and lower bytes of a 16-bit integer. */ - JUCE_CONSTEXPR static uint16 swap (uint16 value) noexcept; + constexpr static uint16 swap (uint16 value) noexcept; /** Swaps the upper and lower bytes of a 16-bit integer. */ - JUCE_CONSTEXPR static int16 swap (int16 value) noexcept; + constexpr static int16 swap (int16 value) noexcept; /** Reverses the order of the 4 bytes in a 32-bit integer. */ static uint32 swap (uint32 value) noexcept; @@ -82,50 +86,50 @@ public: //============================================================================== /** Turns 4 bytes into a little-endian integer. */ - JUCE_CONSTEXPR static uint32 littleEndianInt (const void* bytes) noexcept; + constexpr static uint32 littleEndianInt (const void* bytes) noexcept; /** Turns 8 bytes into a little-endian integer. */ - JUCE_CONSTEXPR static uint64 littleEndianInt64 (const void* bytes) noexcept; + constexpr static uint64 littleEndianInt64 (const void* bytes) noexcept; /** Turns 2 bytes into a little-endian integer. */ - JUCE_CONSTEXPR static uint16 littleEndianShort (const void* bytes) noexcept; + constexpr static uint16 littleEndianShort (const void* bytes) noexcept; /** Converts 3 little-endian bytes into a signed 24-bit value (which is sign-extended to 32 bits). */ - JUCE_CONSTEXPR static int littleEndian24Bit (const void* bytes) noexcept; + constexpr static int littleEndian24Bit (const void* bytes) noexcept; /** Copies a 24-bit number to 3 little-endian bytes. */ static void littleEndian24BitToChars (int32 value, void* destBytes) noexcept; //============================================================================== /** Turns 4 bytes into a big-endian integer. */ - JUCE_CONSTEXPR static uint32 bigEndianInt (const void* bytes) noexcept; + constexpr static uint32 bigEndianInt (const void* bytes) noexcept; /** Turns 8 bytes into a big-endian integer. */ - JUCE_CONSTEXPR static uint64 bigEndianInt64 (const void* bytes) noexcept; + constexpr static uint64 bigEndianInt64 (const void* bytes) noexcept; /** Turns 2 bytes into a big-endian integer. */ - JUCE_CONSTEXPR static uint16 bigEndianShort (const void* bytes) noexcept; + constexpr static uint16 bigEndianShort (const void* bytes) noexcept; /** Converts 3 big-endian bytes into a signed 24-bit value (which is sign-extended to 32 bits). */ - JUCE_CONSTEXPR static int bigEndian24Bit (const void* bytes) noexcept; + constexpr static int bigEndian24Bit (const void* bytes) noexcept; /** Copies a 24-bit number to 3 big-endian bytes. */ static void bigEndian24BitToChars (int32 value, void* destBytes) noexcept; //============================================================================== /** Constructs a 16-bit integer from its constituent bytes, in order of significance. */ - JUCE_CONSTEXPR static uint16 makeInt (uint8 leastSig, uint8 mostSig) noexcept; + constexpr static uint16 makeInt (uint8 leastSig, uint8 mostSig) noexcept; /** Constructs a 32-bit integer from its constituent bytes, in order of significance. */ - JUCE_CONSTEXPR static uint32 makeInt (uint8 leastSig, uint8 byte1, uint8 byte2, uint8 mostSig) noexcept; + constexpr static uint32 makeInt (uint8 leastSig, uint8 byte1, uint8 byte2, uint8 mostSig) noexcept; /** Constructs a 64-bit integer from its constituent bytes, in order of significance. */ - JUCE_CONSTEXPR static uint64 makeInt (uint8 leastSig, uint8 byte1, uint8 byte2, uint8 byte3, - uint8 byte4, uint8 byte5, uint8 byte6, uint8 mostSig) noexcept; + constexpr static uint64 makeInt (uint8 leastSig, uint8 byte1, uint8 byte2, uint8 byte3, + uint8 byte4, uint8 byte5, uint8 byte6, uint8 mostSig) noexcept; //============================================================================== /** Returns true if the current CPU is big-endian. */ - JUCE_CONSTEXPR static bool isBigEndian() noexcept + constexpr static bool isBigEndian() noexcept { #if JUCE_LITTLE_ENDIAN return false; @@ -140,8 +144,8 @@ private: //============================================================================== -JUCE_CONSTEXPR inline uint16 ByteOrder::swap (uint16 v) noexcept { return static_cast ((v << 8) | (v >> 8)); } -JUCE_CONSTEXPR inline int16 ByteOrder::swap (int16 v) noexcept { return static_cast (swap (static_cast (v))); } +constexpr inline uint16 ByteOrder::swap (uint16 v) noexcept { return static_cast ((v << 8) | (v >> 8)); } +constexpr inline int16 ByteOrder::swap (int16 v) noexcept { return static_cast (swap (static_cast (v))); } inline int32 ByteOrder::swap (int32 v) noexcept { return static_cast (swap (static_cast (v))); } inline int64 ByteOrder::swap (int64 v) noexcept { return static_cast (swap (static_cast (v))); } inline float ByteOrder::swap (float v) noexcept { union { uint32 asUInt; float asFloat; } n; n.asFloat = v; n.asUInt = swap (n.asUInt); return n.asFloat; } @@ -178,41 +182,41 @@ inline uint64 ByteOrder::swap (uint64 value) noexcept #endif } -JUCE_CONSTEXPR inline uint16 ByteOrder::makeInt (uint8 b0, uint8 b1) noexcept +constexpr inline uint16 ByteOrder::makeInt (uint8 b0, uint8 b1) noexcept { return static_cast (static_cast (b0) | (static_cast (b1) << 8)); } -JUCE_CONSTEXPR inline uint32 ByteOrder::makeInt (uint8 b0, uint8 b1, uint8 b2, uint8 b3) noexcept +constexpr inline uint32 ByteOrder::makeInt (uint8 b0, uint8 b1, uint8 b2, uint8 b3) noexcept { return static_cast (b0) | (static_cast (b1) << 8) | (static_cast (b2) << 16) | (static_cast (b3) << 24); } -JUCE_CONSTEXPR inline uint64 ByteOrder::makeInt (uint8 b0, uint8 b1, uint8 b2, uint8 b3, uint8 b4, uint8 b5, uint8 b6, uint8 b7) noexcept +constexpr inline uint64 ByteOrder::makeInt (uint8 b0, uint8 b1, uint8 b2, uint8 b3, uint8 b4, uint8 b5, uint8 b6, uint8 b7) noexcept { return static_cast (b0) | (static_cast (b1) << 8) | (static_cast (b2) << 16) | (static_cast (b3) << 24) | (static_cast (b4) << 32) | (static_cast (b5) << 40) | (static_cast (b6) << 48) | (static_cast (b7) << 56); } -JUCE_CONSTEXPR inline uint16 ByteOrder::littleEndianShort (const void* bytes) noexcept { return makeInt (static_cast (bytes)[0], static_cast (bytes)[1]); } -JUCE_CONSTEXPR inline uint32 ByteOrder::littleEndianInt (const void* bytes) noexcept { return makeInt (static_cast (bytes)[0], static_cast (bytes)[1], +constexpr inline uint16 ByteOrder::littleEndianShort (const void* bytes) noexcept { return makeInt (static_cast (bytes)[0], static_cast (bytes)[1]); } +constexpr inline uint32 ByteOrder::littleEndianInt (const void* bytes) noexcept { return makeInt (static_cast (bytes)[0], static_cast (bytes)[1], static_cast (bytes)[2], static_cast (bytes)[3]); } -JUCE_CONSTEXPR inline uint64 ByteOrder::littleEndianInt64 (const void* bytes) noexcept { return makeInt (static_cast (bytes)[0], static_cast (bytes)[1], +constexpr inline uint64 ByteOrder::littleEndianInt64 (const void* bytes) noexcept { return makeInt (static_cast (bytes)[0], static_cast (bytes)[1], static_cast (bytes)[2], static_cast (bytes)[3], static_cast (bytes)[4], static_cast (bytes)[5], static_cast (bytes)[6], static_cast (bytes)[7]); } -JUCE_CONSTEXPR inline uint16 ByteOrder::bigEndianShort (const void* bytes) noexcept { return makeInt (static_cast (bytes)[1], static_cast (bytes)[0]); } -JUCE_CONSTEXPR inline uint32 ByteOrder::bigEndianInt (const void* bytes) noexcept { return makeInt (static_cast (bytes)[3], static_cast (bytes)[2], +constexpr inline uint16 ByteOrder::bigEndianShort (const void* bytes) noexcept { return makeInt (static_cast (bytes)[1], static_cast (bytes)[0]); } +constexpr inline uint32 ByteOrder::bigEndianInt (const void* bytes) noexcept { return makeInt (static_cast (bytes)[3], static_cast (bytes)[2], static_cast (bytes)[1], static_cast (bytes)[0]); } -JUCE_CONSTEXPR inline uint64 ByteOrder::bigEndianInt64 (const void* bytes) noexcept { return makeInt (static_cast (bytes)[7], static_cast (bytes)[6], +constexpr inline uint64 ByteOrder::bigEndianInt64 (const void* bytes) noexcept { return makeInt (static_cast (bytes)[7], static_cast (bytes)[6], static_cast (bytes)[5], static_cast (bytes)[4], static_cast (bytes)[3], static_cast (bytes)[2], static_cast (bytes)[1], static_cast (bytes)[0]); } -JUCE_CONSTEXPR inline int32 ByteOrder::littleEndian24Bit (const void* bytes) noexcept { return (int32) ((((uint32) static_cast (bytes)[2]) << 16) | (((uint32) static_cast (bytes)[1]) << 8) | ((uint32) static_cast (bytes)[0])); } -JUCE_CONSTEXPR inline int32 ByteOrder::bigEndian24Bit (const void* bytes) noexcept { return (int32) ((((uint32) static_cast (bytes)[0]) << 16) | (((uint32) static_cast (bytes)[1]) << 8) | ((uint32) static_cast (bytes)[2])); } +constexpr inline int32 ByteOrder::littleEndian24Bit (const void* bytes) noexcept { return (int32) ((((uint32) static_cast (bytes)[2]) << 16) | (((uint32) static_cast (bytes)[1]) << 8) | ((uint32) static_cast (bytes)[0])); } +constexpr inline int32 ByteOrder::bigEndian24Bit (const void* bytes) noexcept { return (int32) ((((uint32) static_cast (bytes)[0]) << 16) | (((uint32) static_cast (bytes)[1]) << 8) | ((uint32) static_cast (bytes)[2])); } inline void ByteOrder::littleEndian24BitToChars (int32 value, void* destBytes) noexcept { static_cast (destBytes)[0] = (uint8) value; static_cast (destBytes)[1] = (uint8) (value >> 8); static_cast (destBytes)[2] = (uint8) (value >> 16); } inline void ByteOrder::bigEndian24BitToChars (int32 value, void* destBytes) noexcept { static_cast (destBytes)[0] = (uint8) (value >> 16); static_cast (destBytes)[1] = (uint8) (value >> 8); static_cast (destBytes)[2] = (uint8) value; } diff --git a/modules/juce_core/memory/juce_OptionalScopedPointer.h b/modules/juce_core/memory/juce_OptionalScopedPointer.h index 1c21885e4f..325bb0258a 100644 --- a/modules/juce_core/memory/juce_OptionalScopedPointer.h +++ b/modules/juce_core/memory/juce_OptionalScopedPointer.h @@ -49,7 +49,8 @@ public: OptionalScopedPointer just holds a normal pointer to the object, and won't delete it. */ OptionalScopedPointer (ObjectType* objectToHold, bool takeOwnership) - : object (objectToHold), shouldDelete (takeOwnership) + : object (objectToHold), + shouldDelete (takeOwnership) { } @@ -61,9 +62,21 @@ public: The flag to indicate whether or not to delete the managed object is also copied from the source object. */ - OptionalScopedPointer (OptionalScopedPointer& objectToTransferFrom) - : object (objectToTransferFrom.release()), - shouldDelete (objectToTransferFrom.shouldDelete) + OptionalScopedPointer (OptionalScopedPointer&& other) noexcept + : object (std::move (other.object)), + shouldDelete (std::move (other.shouldDelete)) + { + } + + /** Takes ownership of the object owned by `ptr`. */ + explicit OptionalScopedPointer (std::unique_ptr&& ptr) noexcept + : OptionalScopedPointer (ptr.release(), true) + { + } + + /** Points to the same object as `ref`, but does not take ownership. */ + explicit OptionalScopedPointer (ObjectType& ref) noexcept + : OptionalScopedPointer (std::addressof (ref), false) { } @@ -75,15 +88,10 @@ public: The ownership flag that says whether or not to delete the managed object is also copied from the source object. */ - OptionalScopedPointer& operator= (OptionalScopedPointer& objectToTransferFrom) + OptionalScopedPointer& operator= (OptionalScopedPointer&& other) noexcept { - if (object != objectToTransferFrom.object) - { - reset(); - object.reset (objectToTransferFrom.object.release()); - } - - shouldDelete = objectToTransferFrom.shouldDelete; + swapWith (other); + other.reset(); return *this; } @@ -91,23 +99,23 @@ public: takeOwnership flag that was specified when the object was first passed into an OptionalScopedPointer constructor. */ - ~OptionalScopedPointer() + ~OptionalScopedPointer() noexcept { reset(); } //============================================================================== /** Returns the object that this pointer is managing. */ - inline operator ObjectType*() const noexcept { return object.get(); } + operator ObjectType*() const noexcept { return object.get(); } /** Returns the object that this pointer is managing. */ - inline ObjectType* get() const noexcept { return object.get(); } + ObjectType* get() const noexcept { return object.get(); } /** Returns the object that this pointer is managing. */ - inline ObjectType& operator*() const noexcept { return *object; } + ObjectType& operator*() const noexcept { return *object; } /** Lets you access methods and properties of the object that this pointer is holding. */ - inline ObjectType* operator->() const noexcept { return object.get(); } + ObjectType* operator->() const noexcept { return object.get(); } //============================================================================== /** Removes the current object from this OptionalScopedPointer without deleting it. @@ -118,7 +126,7 @@ public: /** Resets this pointer to null, possibly deleting the object that it holds, if it has ownership of it. */ - void reset() + void reset() noexcept { if (! shouldDelete) object.release(); @@ -170,8 +178,8 @@ public: */ void swapWith (OptionalScopedPointer& other) noexcept { - object.swapWith (other.object); - std::swap (shouldDelete, other.shouldDelete); + std::swap (other.object, object); + std::swap (other.shouldDelete, shouldDelete); } private: diff --git a/modules/juce_core/memory/juce_SharedResourcePointer.h b/modules/juce_core/memory/juce_SharedResourcePointer.h index 998fd68a3f..eb7d1f4450 100644 --- a/modules/juce_core/memory/juce_SharedResourcePointer.h +++ b/modules/juce_core/memory/juce_SharedResourcePointer.h @@ -116,12 +116,10 @@ public: /** Returns the shared object. */ SharedObjectType& get() const noexcept { return *sharedObject; } - /** Returns the object that this pointer references. - The pointer returned may be a nullptr, of course. - */ + /** Returns the object that this pointer references. */ SharedObjectType& getObject() const noexcept { return *sharedObject; } - /** Returns the shared object. */ + /** Returns the shared object pointer. */ SharedObjectType* operator->() const noexcept { return sharedObject; } /** Returns the number of SharedResourcePointers that are currently holding the shared object. */ diff --git a/modules/juce_core/misc/juce_ConsoleApplication.h b/modules/juce_core/misc/juce_ConsoleApplication.h index bc46c51440..a6440177bc 100644 --- a/modules/juce_core/misc/juce_ConsoleApplication.h +++ b/modules/juce_core/misc/juce_ConsoleApplication.h @@ -32,6 +32,8 @@ namespace juce main() function to parse. @see ConsoleApplication + + @tags{Core} */ struct ArgumentList { @@ -50,6 +52,8 @@ struct ArgumentList //============================================================================== /** One of the arguments in an ArgumentList. + + @tags{Core} */ struct Argument { @@ -226,13 +230,18 @@ struct ArgumentList @endcode @see ArgumentList + + @tags{Core} */ struct ConsoleApplication { //============================================================================== /** Represents a command that can be executed if its command-line arguments are matched. + @see ConsoleApplication::addCommand(), ConsoleApplication::findAndRunCommand() + + @tags{Core} */ struct Command { diff --git a/modules/juce_core/misc/juce_StdFunctionCompat.cpp b/modules/juce_core/misc/juce_StdFunctionCompat.cpp deleted file mode 100644 index ece1e5ec97..0000000000 --- a/modules/juce_core/misc/juce_StdFunctionCompat.cpp +++ /dev/null @@ -1,284 +0,0 @@ -/* - ============================================================================== - - 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. - - ============================================================================== -*/ - -namespace juce -{ - -#if JUCE_UNIT_TESTS - -namespace FunctionTestsHelpers -{ - static void incrementArgument (int& x) { x++; } - static double multiply (double x, double a) noexcept { return a * x; } - - struct BigData - { - BigData() - { - for (auto i = 0; i < bigDataSize; ++i) - content[i] = i + 1; - } - - int sum() const - { - int result = 0; - for (auto i = 0; i < bigDataSize; ++i) - result += content[i]; - - return result; - } - - static const int bigDataSize = 32, - bigDataSum = bigDataSize * (bigDataSize + 1) / 2; - int content[bigDataSize]; - }; - - struct FunctionObject - { - FunctionObject() = default; - - FunctionObject (const FunctionObject& other) - { - bigData.reset (new BigData (*other.bigData)); - } - - int operator()(int i) const { return bigData->sum() + i; } - - std::unique_ptr bigData { new BigData() }; - - JUCE_LEAK_DETECTOR (FunctionObject) - }; - - struct BigFunctionObject - { - BigFunctionObject() = default; - - BigFunctionObject (const BigFunctionObject& other) - { - bigData.reset (new BigData (*other.bigData)); - } - - int operator()(int i) const { return bigData->sum() + i; } - - std::unique_ptr bigData { new BigData() }; - - int stackUsage[32]; - - JUCE_LEAK_DETECTOR (BigFunctionObject) - }; -} - -class FunctionTests : public UnitTest -{ -public: - FunctionTests() - : UnitTest ("Function", UnitTestCategories::function) - {} - - void runTest() override - { - FunctionTestsHelpers::BigData bigData; - - { - beginTest ("Functions"); - - std::function f1 (FunctionTestsHelpers::incrementArgument); - - auto x = 0; - f1 (x); - expectEquals (x, 1); - - std::function f2 (FunctionTestsHelpers::multiply); - expectEquals (6.0, f2 (2.0, 3.0)); - } - - { - beginTest ("Function objects"); - - std::function f1 = FunctionTestsHelpers::FunctionObject(); - expectEquals (f1 (5), FunctionTestsHelpers::BigData::bigDataSum + 5); - - std::function f2 { FunctionTestsHelpers::BigFunctionObject() }; - expectEquals (f2 (5), FunctionTestsHelpers::BigData::bigDataSum + 5); - } - - { - beginTest ("Lambdas"); - - std::function fStack ([] { return 3; }); - expectEquals (fStack(), 3); - - std::function fHeap ([=] { return bigData.sum(); }); - expectEquals (fHeap(), FunctionTestsHelpers::BigData::bigDataSum); - } - - { - beginTest ("Boolean"); - - std::function f1; - - if (f1) - expect (false); - - std::function f2 ([]() { return 3; }); - - if (! f2) - expect (false); - } - - std::function fEmpty; - - std::function fStack ([] { return 3; }); - - std::function fHeap ([=] { return bigData.sum(); }); - - { - beginTest ("copy constructor"); - - std::function f1 (fStack); - expectEquals (f1(), 3); - - std::function f2 (fHeap); - expectEquals (f2(), FunctionTestsHelpers::BigData::bigDataSum); - - std::function f3 (fEmpty); - if (f3) - expect (false); - } - - { - beginTest ("assignment"); - - std::function f1; - f1 = fStack; - expectEquals (f1(), 3); - - std::function f2; - f2 = fHeap; - expectEquals (f2(), FunctionTestsHelpers::BigData::bigDataSum); - - f1 = fHeap; - expectEquals (f1(), FunctionTestsHelpers::BigData::bigDataSum); - - f2 = fStack; - expectEquals (f2(), 3); - - f1 = fEmpty; - if (f1) - expect (false); - } - - { - beginTest ("move constructor"); - - std::unique_ptr> fStackTmp (new std::function (fStack)); - std::function f1 (std::move (*fStackTmp)); - - fStackTmp.reset(); - expectEquals (f1(), 3); - - std::unique_ptr> fHeapTmp (new std::function (fHeap)); - std::function f2 (std::move (*fHeapTmp)); - if (*fHeapTmp) - expect (false); - - fHeapTmp.reset(); - expectEquals (f2(), FunctionTestsHelpers::BigData::bigDataSum); - - std::unique_ptr> fEmptyTmp (new std::function()); - std::function f3 (std::move (*fEmptyTmp)); - fEmptyTmp.reset(); - if (f3) - expect (false); - } - - { - beginTest ("move assignment"); - - std::function f1 (fHeap); - std::unique_ptr> fStackTmp (new std::function (fStack)); - f1 = std::move (*fStackTmp); - - fStackTmp.reset(); - expectEquals (f1(), 3); - - std::function f2 (fStack); - std::unique_ptr> fHeapTmp (new std::function (fHeap)); - f2 = std::move (*fHeapTmp); - if (*fHeapTmp) - expect (false); - - fHeapTmp.reset(); - expectEquals (f2(), FunctionTestsHelpers::BigData::bigDataSum); - - std::function f3 (fHeap); - std::unique_ptr> fEmptyTmp (new std::function()); - f3 = std::move (*fEmptyTmp); - fEmptyTmp.reset(); - if (f3) - expect (false); - } - - { - beginTest ("nullptr"); - - std::function f1 (nullptr); - if (f1) - expect (false); - - std::function f2 ([]() { return 11; }); - f2 = nullptr; - if (f2) - expect (false); - } - - { - beginTest ("Swap"); - - std::function f1; - std::function f2 (fStack); - f2.swap (f1); - expectEquals (f1(), 3); - if (f2) - expect (false); - - std::function f3 (fHeap); - f3.swap (f1); - expectEquals (f3(), 3); - expectEquals (f1(), FunctionTestsHelpers::BigData::bigDataSum); - } - } -}; - -static FunctionTests functionTests; - -#endif - -} // namespace juce diff --git a/modules/juce_core/misc/juce_StdFunctionCompat.h b/modules/juce_core/misc/juce_StdFunctionCompat.h deleted file mode 100644 index 94c65f4a3c..0000000000 --- a/modules/juce_core/misc/juce_StdFunctionCompat.h +++ /dev/null @@ -1,206 +0,0 @@ -/* - ============================================================================== - - 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. - - ============================================================================== -*/ - -namespace std -{ - /** - This class provides an alternative to std::function that is compatible - with OS X 10.6 and earlier. This will only be used in OS X versions 10.6 - and earlier and the Projucer live build. - - @tags{Core} - */ - template - class function; - - #ifndef DOXYGEN - template - class function - { - public: - /** Creates an empty function. */ - function() noexcept {} - - /** Creates an empty function. */ - function (decltype (nullptr)) noexcept {} - - /** Creates a function targeting the provided Functor. */ - template - function (Functor f) - { - functorHolderHelper = getFunctorStorage (sizeof (FunctorHolder)); - new (functorHolderHelper) FunctorHolder (f); - } - - /** Copy constructor. */ - function (function const& other) - { - copy (other); - } - - /** Move constructor */ - function (function&& other) - { - move (other); - } - - /** Destructor. */ - ~function() - { - release(); - } - - /** Replaces the contents of this function with the contents of another. */ - function& operator= (function const& other) - { - release(); - copy (other); - - return *this; - } - - /** Moves the contents of another function into this one. */ - function& operator= (function&& other) - { - release(); - move (other); - - return *this; - } - - /** Allows conditional expressions to test if this function is empty. */ - explicit operator bool() const noexcept - { - return functorHolderHelper != nullptr; - } - - /** Swaps the contents of this function with another. After this operation the - two functions will be pointing at each other's targets. */ - void swap (function& other) - { - function tmp (*this); - *this = other; - other = tmp; - } - - /** Invokes the target of this function. */ - Result operator() (Arguments... args) const - { - return (*functorHolderHelper) (std::forward (args)...); - } - - bool operator== (decltype (nullptr)) const noexcept { return (functorHolderHelper == nullptr); } - bool operator!= (decltype (nullptr)) const noexcept { return (functorHolderHelper != nullptr); } - - private: - //============================================================================== - template - struct FunctorHolderBase - { - virtual ~FunctorHolderBase() {} - virtual int getSize() const noexcept = 0; - virtual void copy (void*) const = 0; - virtual ReturnType operator()(Args...) = 0; - }; - - template - struct FunctorHolder : FunctorHolderBase - { - FunctorHolder (Functor func) : f (func) {} - - int getSize() const noexcept override final - { - return sizeof (*this); - } - - void copy (void* destination) const override final - { - new (destination) FunctorHolder (f); - } - - ReturnType operator()(Args... args) override final - { - return f (std::forward (args)...); - } - - Functor f; - }; - - FunctorHolderBase* getFunctorStorage (int size) - { - return reinterpret_cast*> - (size > functorHolderStackSize ? new char [static_cast (size)] - : &(stackFunctorStorage[0])); - } - - void copy (function const& other) - { - if (other.functorHolderHelper != nullptr) - { - functorHolderHelper = getFunctorStorage (other.functorHolderHelper->getSize()); - other.functorHolderHelper->copy (functorHolderHelper); - } - } - - void move (function& other) - { - if (other.functorHolderHelper != nullptr) - { - if (other.functorHolderHelper->getSize() > functorHolderStackSize) - { - functorHolderHelper = other.functorHolderHelper; - } - else - { - std::copy (other.stackFunctorStorage, other.stackFunctorStorage + functorHolderStackSize, - stackFunctorStorage); - functorHolderHelper = reinterpret_cast*> (&(stackFunctorStorage[0])); - } - - other.functorHolderHelper = nullptr; - } - } - - void release() - { - if (functorHolderHelper != nullptr) - { - functorHolderHelper->~FunctorHolderBase(); - functorHolderHelper = nullptr; - } - } - - static const int functorHolderStackSize = 24; - char stackFunctorStorage[functorHolderStackSize]; - - FunctorHolderBase* functorHolderHelper = nullptr; - }; - #endif -} diff --git a/modules/juce_core/native/java/README.txt b/modules/juce_core/native/java/README.txt index d7cf93cc91..31a69fd282 100644 --- a/modules/juce_core/native/java/README.txt +++ b/modules/juce_core/native/java/README.txt @@ -9,30 +9,31 @@ required for the Java source code you wish to compile. 2. If you are creating byte-code for new .java files, move the new files into the native/javacore/app folder of the module, or create one if it doesn't exist. Remember that .java files need to be in nested sub-folders which -resemble their package, i.e. a Java class com.roli.juce.HelloWorld.java -should be in the module's native/javacore/app/com/roli/juce folder. -If you wish to modify existing .java files in the JUCE modules then just rename -native/java to native/javacore. +resemble their package, i.e. a Java class com.roli.juce.HelloWorld.java should +be in the module's native/javacore/app/com/roli/juce folder. If you wish to +modify existing .java files in the JUCE modules then just rename native/java to +native/javacore. -3. Build your project with AS and run. The app will now use the source code in -the folder created in step 2 so you can debug your Java code this way. +3. Build your project with Android Studio and run. The app will now use the +source code in the folder created in step 2 so you can debug your Java code +this way. 4. Once everything is working rebuild your app in release mode. 5. Go to your app's Builds/Android folder. Inside there you will find -build/intermediates/javac/release_Release/compileRelease_ReleaseJavaWithJavac/classes. +build/intermediates/javac/release_Release/compileRelease_ReleaseJavaWithJavac/classes. Inside of that folder, you will find all your Java byte-code compiled classes. Remove any classes that you are not interested in (typically you'll find -Java.class, JuceApp.class and JuceSharingContentProvider.class which you will -probably want to remove). +Java.class and JuceApp.class which you will probably want to remove). -6. Inside of build/intermediates/javac/release_Release/compileRelease_ReleaseJavaWithJavac/classes +6. Inside of +build/intermediates/javac/release_Release/compileRelease_ReleaseJavaWithJavac/classes execute the following dx command: /build-tools//dx --dex --verbose --min-sdk-version= --output /tmp/JavaDexByteCode.dex . (Replace with the minimal sdk version you used in step 1.) - + 7. gzip the output: gzip /tmp/JavaDexByteCode.dex diff --git a/modules/juce_core/native/java/app/com/roli/juce/FragmentOverlay.java b/modules/juce_core/native/java/app/com/roli/juce/FragmentOverlay.java index 4b4a419197..fd80e7902e 100644 --- a/modules/juce_core/native/java/app/com/roli/juce/FragmentOverlay.java +++ b/modules/juce_core/native/java/app/com/roli/juce/FragmentOverlay.java @@ -1,3 +1,25 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import android.app.DialogFragment; diff --git a/modules/juce_core/native/java/app/com/roli/juce/JuceHTTPStream.java b/modules/juce_core/native/java/app/com/roli/juce/JuceHTTPStream.java index 887a66c2a9..d14b1591c9 100644 --- a/modules/juce_core/native/java/app/com/roli/juce/JuceHTTPStream.java +++ b/modules/juce_core/native/java/app/com/roli/juce/JuceHTTPStream.java @@ -1,3 +1,25 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import java.lang.Runnable; diff --git a/modules/juce_core/native/javacore/app/com/roli/juce/JuceApp.java b/modules/juce_core/native/javacore/app/com/roli/juce/JuceApp.java index bad3737895..4b070034f4 100644 --- a/modules/juce_core/native/javacore/app/com/roli/juce/JuceApp.java +++ b/modules/juce_core/native/javacore/app/com/roli/juce/JuceApp.java @@ -1,3 +1,25 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import com.roli.juce.Java; diff --git a/modules/juce_core/native/javacore/init/com/roli/juce/Java.java b/modules/juce_core/native/javacore/init/com/roli/juce/Java.java index 3e3ccee0cb..989cad14ec 100644 --- a/modules/juce_core/native/javacore/init/com/roli/juce/Java.java +++ b/modules/juce_core/native/javacore/init/com/roli/juce/Java.java @@ -1,13 +1,35 @@ -package com.roli.juce; - -import android.content.Context; - -public class Java -{ - static - { - System.loadLibrary ("juce_jni"); - } - - public native static void initialiseJUCE (Context appContext); +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + +package com.roli.juce; + +import android.content.Context; + +public class Java +{ + static + { + System.loadLibrary ("juce_jni"); + } + + public native static void initialiseJUCE (Context appContext); } diff --git a/modules/juce_core/native/juce_BasicNativeHeaders.h b/modules/juce_core/native/juce_BasicNativeHeaders.h index f9281e1f9b..69d5561e56 100644 --- a/modules/juce_core/native/juce_BasicNativeHeaders.h +++ b/modules/juce_core/native/juce_BasicNativeHeaders.h @@ -82,6 +82,12 @@ #define NSAlertStyleInformational NSInformationalAlertStyle #define NSEventTypeTabletPoint NSTabletPoint #define NSEventTypeTabletProximity NSTabletProximity + #define NSEventTypeFlagsChanged NSFlagsChanged + #define NSEventTypeAppKitDefined NSAppKitDefined + #define NSEventTypeSystemDefined NSSystemDefined + #define NSEventTypeApplicationDefined NSApplicationDefined + #define NSEventTypePeriodic NSPeriodic + #define NSEventTypeSmartMagnify NSEventTypeSmartMagnify #endif #import #include @@ -176,7 +182,7 @@ #pragma warning (4: 4511 4512 4100) #endif - #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + #if ! JUCE_MINGW && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES #pragma comment (lib, "kernel32.lib") #pragma comment (lib, "user32.lib") #pragma comment (lib, "wininet.lib") diff --git a/modules/juce_core/native/juce_android_JNIHelpers.cpp b/modules/juce_core/native/juce_android_JNIHelpers.cpp index d9eb263303..cb9f5b0599 100644 --- a/modules/juce_core/native/juce_android_JNIHelpers.cpp +++ b/modules/juce_core/native/juce_android_JNIHelpers.cpp @@ -1,24 +1,24 @@ /* - ============================================================================== + ============================================================================== - This file is part of the JUCE library. - Copyright (c) 2017 - ROLI Ltd. + 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. + 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. + 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. + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. - ============================================================================== - */ + ============================================================================== +*/ namespace juce { diff --git a/modules/juce_core/native/juce_android_Misc.cpp b/modules/juce_core/native/juce_android_Misc.cpp index 8ad39bed56..4bc0d7a5bb 100644 --- a/modules/juce_core/native/juce_android_Misc.cpp +++ b/modules/juce_core/native/juce_android_Misc.cpp @@ -25,7 +25,20 @@ namespace juce void Logger::outputDebugString (const String& text) { - __android_log_print (ANDROID_LOG_INFO, "JUCE", "%s", text.toUTF8().getAddress()); + char* data = text.toUTF8().getAddress(); + const size_t length = CharPointer_UTF8::getBytesRequiredFor (text.getCharPointer()); + const size_t chunkSize = 1023; + + size_t position = 0; + size_t numToRead = jmin (chunkSize, length); + + while (numToRead > 0) + { + __android_log_print (ANDROID_LOG_INFO, "JUCE", "%s", data + position); + + position += numToRead; + numToRead = jmin (chunkSize, length - position); + } } } // namespace juce diff --git a/modules/juce_core/native/juce_android_Network.cpp b/modules/juce_core/native/juce_android_Network.cpp index 8808d1707e..b7e56de626 100644 --- a/modules/juce_core/native/juce_android_Network.cpp +++ b/modules/juce_core/native/juce_android_Network.cpp @@ -554,7 +554,7 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl) }; -URL::DownloadTask* URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool shouldUsePost) +std::unique_ptr URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool shouldUsePost) { return URL::DownloadTask::createFallbackDownloader (*this, targetLocation, extraHeaders, listener, shouldUsePost); } diff --git a/modules/juce_core/native/juce_curl_Network.cpp b/modules/juce_core/native/juce_curl_Network.cpp index 27430b6550..127fff9571 100644 --- a/modules/juce_core/native/juce_curl_Network.cpp +++ b/modules/juce_core/native/juce_curl_Network.cpp @@ -642,7 +642,7 @@ public: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl) }; -URL::DownloadTask* URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool shouldUsePost) +std::unique_ptr URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool shouldUsePost) { return URL::DownloadTask::createFallbackDownloader (*this, targetLocation, extraHeaders, listener, shouldUsePost); } diff --git a/modules/juce_core/native/juce_linux_Files.cpp b/modules/juce_core/native/juce_linux_Files.cpp index c51a97e6a2..e794447c3e 100644 --- a/modules/juce_core/native/juce_linux_Files.cpp +++ b/modules/juce_core/native/juce_linux_Files.cpp @@ -136,7 +136,8 @@ File File::getSpecialLocation (const SpecialLocationType type) case invokedExecutableFile: if (juce_argv != nullptr && juce_argc > 0) return File (CharPointer_UTF8 (juce_argv[0])); - // deliberate fall-through... + // Falls through + JUCE_FALLTHROUGH case currentExecutableFile: case currentApplicationFile: @@ -144,6 +145,7 @@ File File::getSpecialLocation (const SpecialLocationType type) return juce_getExecutableFile(); #endif // deliberate fall-through if this is not a shared-library + JUCE_FALLTHROUGH case hostApplicationPath: { diff --git a/modules/juce_core/native/juce_linux_Network.cpp b/modules/juce_core/native/juce_linux_Network.cpp index 61e6f3a3f5..0f4d02a4e7 100644 --- a/modules/juce_core/native/juce_linux_Network.cpp +++ b/modules/juce_core/native/juce_linux_Network.cpp @@ -576,7 +576,7 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl) }; -URL::DownloadTask* URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool shouldUsePost) +std::unique_ptr URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool shouldUsePost) { return URL::DownloadTask::createFallbackDownloader (*this, targetLocation, extraHeaders, listener, shouldUsePost); } diff --git a/modules/juce_core/native/juce_mac_ClangBugWorkaround.h b/modules/juce_core/native/juce_mac_ClangBugWorkaround.h index 0eac3a315e..eb02c1710e 100644 --- a/modules/juce_core/native/juce_mac_ClangBugWorkaround.h +++ b/modules/juce_core/native/juce_mac_ClangBugWorkaround.h @@ -20,10 +20,10 @@ ============================================================================== */ - -// This hack is a workaround for a bug (?) in Apple's 10.11 SDK headers -// which cause some configurations of Clang to throw out a spurious error.. #if JUCE_PROJUCER_LIVE_BUILD && (defined (__APPLE_CPP__) || defined(__APPLE_CC__)) + + // This hack is a workaround for a bug (?) in Apple's 10.11 SDK headers + // which cause some configurations of Clang to throw out a spurious error.. #include #undef CF_OPTIONS #define CF_OPTIONS(_type, _name) _type _name; enum @@ -33,93 +33,9 @@ #define _Nullable #define _Nonnull - // In later versions of libc++ these methods are defined in the functional header, - // which we don't compile in the live-build engine, so we'll define them here - #if defined (_LIBCPP_VERSION) && _LIBCPP_VERSION >= 7000 - #include - - namespace std { inline namespace __1 { - template - pair<_ForwardIterator1, _ForwardIterator1> _LIBCPP_CONSTEXPR_AFTER_CXX11 - __search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, - _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred, - forward_iterator_tag, forward_iterator_tag) - { - if (__first2 == __last2) - return make_pair(__first1, __first1); // Everything matches an empty sequence - while (true) - { - // Find first element in sequence 1 that matchs *__first2, with a mininum of loop checks - while (true) - { - if (__first1 == __last1) // return __last1 if no element matches *__first2 - return make_pair(__last1, __last1); - if (__pred(*__first1, *__first2)) - break; - ++__first1; - } - // *__first1 matches *__first2, now match elements after here - _ForwardIterator1 __m1 = __first1; - _ForwardIterator2 __m2 = __first2; - while (true) - { - if (++__m2 == __last2) // If pattern exhausted, __first1 is the answer (works for 1 element pattern) - return make_pair(__first1, __m1); - if (++__m1 == __last1) // Otherwise if source exhaused, pattern not found - return make_pair(__last1, __last1); - if (!__pred(*__m1, *__m2)) // if there is a mismatch, restart with a new __first1 - { - ++__first1; - break; - } // else there is a match, check next elements - } - } - } - - template - _LIBCPP_CONSTEXPR_AFTER_CXX11 - pair<_RandomAccessIterator1, _RandomAccessIterator1> - __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, - _RandomAccessIterator2 __first2, _RandomAccessIterator2 __last2, _BinaryPredicate __pred, - random_access_iterator_tag, random_access_iterator_tag) - { - typedef typename iterator_traits<_RandomAccessIterator1>::difference_type _D1; - typedef typename iterator_traits<_RandomAccessIterator2>::difference_type _D2; - // Take advantage of knowing source and pattern lengths. Stop short when source is smaller than pattern - const _D2 __len2 = __last2 - __first2; - if (__len2 == 0) - return make_pair(__first1, __first1); - const _D1 __len1 = __last1 - __first1; - if (__len1 < __len2) - return make_pair(__last1, __last1); - const _RandomAccessIterator1 __s = __last1 - (__len2 - 1); // Start of pattern match can't go beyond here - - while (true) - { - while (true) - { - if (__first1 == __s) - return make_pair(__last1, __last1); - if (__pred(*__first1, *__first2)) - break; - ++__first1; - } - - _RandomAccessIterator1 __m1 = __first1; - _RandomAccessIterator2 __m2 = __first2; - while (true) - { - if (++__m2 == __last2) - return make_pair(__first1, __first1 + __len2); - ++__m1; // no need to check range on __m1 because __s guarantees we have enough source - if (!__pred(*__m1, *__m2)) - { - ++__first1; - break; - } - } - } - } - } } - #endif + // A workaround for compiling the 10.15 headers with an older compiler version + #undef API_UNAVAILABLE_BEGIN + #define API_UNAVAILABLE_BEGIN(...) + #undef API_UNAVAILABLE_END + #define API_UNAVAILABLE_END #endif diff --git a/modules/juce_core/native/juce_mac_Files.mm b/modules/juce_core/native/juce_mac_Files.mm index 5303121112..73ed29f4ea 100644 --- a/modules/juce_core/native/juce_mac_Files.mm +++ b/modules/juce_core/native/juce_mac_Files.mm @@ -203,6 +203,7 @@ File File::getSpecialLocation (const SpecialLocationType type) if (juce_argv != nullptr && juce_argc > 0) return File::getCurrentWorkingDirectory().getChildFile (String (juce_argv[0])); // deliberate fall-through... + JUCE_FALLTHROUGH case currentExecutableFile: return juce_getExecutableFile(); diff --git a/modules/juce_core/native/juce_mac_Network.mm b/modules/juce_core/native/juce_mac_Network.mm index d86baf45b6..deb95d147b 100644 --- a/modules/juce_core/native/juce_mac_Network.mm +++ b/modules/juce_core/native/juce_mac_Network.mm @@ -192,11 +192,11 @@ public: while (numBytes > 0) { - const int available = jmin (numBytes, (int) [data length]); + const ScopedLock sl (dataLock); + auto available = jmin (numBytes, (int) [data length]); if (available > 0) { - const ScopedLock sl (dataLock); [data getBytes: dest length: (NSUInteger) available]; [data replaceBytesInRange: NSMakeRange (0, (NSUInteger) available) withBytes: nil length: 0]; @@ -209,6 +209,7 @@ public: if (hasFailed || hasFinished) break; + const ScopedUnlock ul (dataLock); Thread::sleep (1); } } @@ -647,12 +648,12 @@ struct BackgroundDownloadTask : public URL::DownloadTask HashMap BackgroundDownloadTask::activeSessions; -URL::DownloadTask* URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool usePostRequest) +std::unique_ptr URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool usePostRequest) { std::unique_ptr downloadTask (new BackgroundDownloadTask (*this, targetLocation, extraHeaders, listener, usePostRequest)); if (downloadTask->initOK() && downloadTask->connect()) - return downloadTask.release(); + return downloadTask; return nullptr; } @@ -662,7 +663,7 @@ void URL::DownloadTask::juce_iosURLSessionNotify (const String& identifier) BackgroundDownloadTask::invokeNotify (identifier); } #else -URL::DownloadTask* URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool usePost) +std::unique_ptr URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool usePost) { return URL::DownloadTask::createFallbackDownloader (*this, targetLocation, extraHeaders, listener, usePost); } @@ -747,11 +748,11 @@ public: while (numBytes > 0) { - const int available = jmin (numBytes, (int) [data length]); + const ScopedLock sl (dataLock); + auto available = jmin (numBytes, (int) [data length]); if (available > 0) { - const ScopedLock sl (dataLock); [data getBytes: dest length: (NSUInteger) available]; [data replaceBytesInRange: NSMakeRange (0, (NSUInteger) available) withBytes: nil length: 0]; @@ -764,6 +765,7 @@ public: if (hasFailed || hasFinished) break; + const ScopedUnlock sul (dataLock); Thread::sleep (1); } } @@ -928,7 +930,7 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (URLConnectionState) }; -URL::DownloadTask* URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool shouldUsePost) +std::unique_ptr URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool shouldUsePost) { return URL::DownloadTask::createFallbackDownloader (*this, targetLocation, extraHeaders, listener, shouldUsePost); } diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h index 5d30962c43..420e7fcf04 100644 --- a/modules/juce_core/native/juce_posix_SharedCode.h +++ b/modules/juce_core/native/juce_posix_SharedCode.h @@ -415,7 +415,7 @@ int64 juce_fileSetPosition (void* handle, int64 pos) void FileInputStream::openHandle() { - auto f = open (file.getFullPathName().toUTF8(), O_RDONLY, 00644); + auto f = open (file.getFullPathName().toUTF8(), O_RDONLY); if (f != -1) fileHandle = fdToVoidPointer (f); @@ -452,7 +452,7 @@ void FileOutputStream::openHandle() { if (file.exists()) { - auto f = open (file.getFullPathName().toUTF8(), O_RDWR, 00644); + auto f = open (file.getFullPathName().toUTF8(), O_RDWR); if (f != -1) { @@ -475,7 +475,7 @@ void FileOutputStream::openHandle() } else { - auto f = open (file.getFullPathName().toUTF8(), O_RDWR + O_CREAT, 00644); + auto f = open (file.getFullPathName().toUTF8(), O_RDWR | O_CREAT, 00644); if (f != -1) fileHandle = fdToVoidPointer (f); @@ -543,8 +543,12 @@ void MemoryMappedFile::openInternal (const File& file, AccessMode mode, bool exc range.setStart (range.getStart() - (range.getStart() % pageSize)); } - fileHandle = open (file.getFullPathName().toUTF8(), - mode == readWrite ? (O_CREAT + O_RDWR) : O_RDONLY, 00644); + auto filename = file.getFullPathName().toUTF8(); + + if (mode == readWrite) + fileHandle = open (filename, O_CREAT | O_RDWR, 00644); + else + fileHandle = open (filename, O_RDONLY); if (fileHandle != -1) { diff --git a/modules/juce_core/native/juce_win32_Network.cpp b/modules/juce_core/native/juce_win32_Network.cpp index 34640f8f06..9bea1a9284 100644 --- a/modules/juce_core/native/juce_win32_Network.cpp +++ b/modules/juce_core/native/juce_win32_Network.cpp @@ -636,7 +636,7 @@ bool JUCE_CALLTYPE Process::openEmailWithAttachments (const String& targetEmailA return mapiSendMail (0, 0, &message, MAPI_DIALOG | MAPI_LOGON_UI, 0) == SUCCESS_SUCCESS; } -URL::DownloadTask* URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool shouldUsePost) +std::unique_ptr URL::downloadToFile (const File& targetLocation, String extraHeaders, DownloadTask::Listener* listener, bool shouldUsePost) { return URL::DownloadTask::createFallbackDownloader (*this, targetLocation, extraHeaders, listener, shouldUsePost); } diff --git a/modules/juce_core/native/juce_win32_SystemStats.cpp b/modules/juce_core/native/juce_win32_SystemStats.cpp index 5c74c207e6..bbdd2586dc 100644 --- a/modules/juce_core/native/juce_win32_SystemStats.cpp +++ b/modules/juce_core/native/juce_win32_SystemStats.cpp @@ -23,7 +23,7 @@ namespace juce { -#if ! JUCE_MINGW +#if JUCE_MSVC #pragma intrinsic (__cpuid) #pragma intrinsic (__rdtsc) #endif @@ -41,7 +41,7 @@ void Logger::outputDebugString (const String& text) //============================================================================== -#if JUCE_MINGW +#if JUCE_MINGW || JUCE_CLANG static void callCPUID (int result[4], uint32 type) { uint32 la = result[0], lb = result[1], lc = result[2], ld = result[3]; diff --git a/modules/juce_core/network/juce_IPAddress.cpp b/modules/juce_core/network/juce_IPAddress.cpp index 35b34431c5..e4f1f8966b 100644 --- a/modules/juce_core/network/juce_IPAddress.cpp +++ b/modules/juce_core/network/juce_IPAddress.cpp @@ -90,10 +90,10 @@ IPAddress::IPAddress (uint16 a1, uint16 a2, uint16 a3, uint16 a4, IPAddress::IPAddress (uint32 n) noexcept : isIPv6 (false) { - address[0] = (n >> 24); - address[1] = (n >> 16) & 255; - address[2] = (n >> 8) & 255; - address[3] = (n & 255); + address[0] = static_cast (n >> 24); + address[1] = static_cast ((n >> 16) & 255); + address[2] = static_cast ((n >> 8) & 255); + address[3] = static_cast ((n & 255)); zeroUnusedBytes (address); } diff --git a/modules/juce_core/network/juce_Socket.cpp b/modules/juce_core/network/juce_Socket.cpp index 1e28be5a61..e8df43b96e 100644 --- a/modules/juce_core/network/juce_Socket.cpp +++ b/modules/juce_core/network/juce_Socket.cpp @@ -265,7 +265,7 @@ namespace SocketHelpers break; } - bytesRead += bytesThisTime; + bytesRead = static_cast (bytesRead + bytesThisTime); if (! blockUntilSpecifiedAmountHasArrived) break; diff --git a/modules/juce_core/network/juce_URL.cpp b/modules/juce_core/network/juce_URL.cpp index 56f2a3cecb..b9ef16b0a6 100644 --- a/modules/juce_core/network/juce_URL.cpp +++ b/modules/juce_core/network/juce_URL.cpp @@ -26,13 +26,13 @@ namespace juce struct FallbackDownloadTask : public URL::DownloadTask, public Thread { - FallbackDownloadTask (FileOutputStream* outputStreamToUse, + FallbackDownloadTask (std::unique_ptr outputStreamToUse, size_t bufferSizeToUse, - WebInputStream* streamToUse, + std::unique_ptr streamToUse, URL::DownloadTask::Listener* listenerToUse) : Thread ("DownloadTask thread"), - fileStream (outputStreamToUse), - stream (streamToUse), + fileStream (std::move (outputStreamToUse)), + stream (std::move (streamToUse)), bufferSize (bufferSizeToUse), buffer (bufferSize), listener (listenerToUse) @@ -110,22 +110,25 @@ void URL::DownloadTask::Listener::progress (DownloadTask*, int64, int64) {} URL::DownloadTask::Listener::~Listener() {} //============================================================================== -URL::DownloadTask* URL::DownloadTask::createFallbackDownloader (const URL& urlToUse, - const File& targetFileToUse, - const String& extraHeadersToUse, - Listener* listenerToUse, - bool usePostRequest) +std::unique_ptr URL::DownloadTask::createFallbackDownloader (const URL& urlToUse, + const File& targetFileToUse, + const String& extraHeadersToUse, + Listener* listenerToUse, + bool usePostRequest) { const size_t bufferSize = 0x8000; targetFileToUse.deleteFile(); - if (auto outputStream = std::unique_ptr (targetFileToUse.createOutputStream (bufferSize))) + if (auto outputStream = targetFileToUse.createOutputStream (bufferSize)) { - std::unique_ptr stream (new WebInputStream (urlToUse, usePostRequest)); + auto stream = std::make_unique (urlToUse, usePostRequest); stream->withExtraHeaders (extraHeadersToUse); if (stream->connect (nullptr)) - return new FallbackDownloadTask (outputStream.release(), bufferSize, stream.release(), listenerToUse); + return std::make_unique (std::move (outputStream), + bufferSize, + std::move (stream), + listenerToUse); } return nullptr; @@ -655,21 +658,21 @@ private: #endif //============================================================================== -InputStream* URL::createInputStream (bool usePostCommand, - OpenStreamProgressCallback* progressCallback, - void* progressCallbackContext, - String headers, - int timeOutMs, - StringPairArray* responseHeaders, - int* statusCode, - int numRedirectsToFollow, - String httpRequestCmd) const +std::unique_ptr URL::createInputStream (bool usePostCommand, + OpenStreamProgressCallback* progressCallback, + void* progressCallbackContext, + String headers, + int timeOutMs, + StringPairArray* responseHeaders, + int* statusCode, + int numRedirectsToFollow, + String httpRequestCmd) const { if (isLocalFile()) { #if JUCE_IOS // We may need to refresh the embedded bookmark. - return new iOSFileStreamWrapper (const_cast(*this)); + return std::make_unique> (const_cast(*this)); #else return getLocalFile().createInputStream(); #endif @@ -717,27 +720,29 @@ InputStream* URL::createInputStream (bool usePostCommand, if (! success || wi->isError()) return nullptr; - return wi.release(); + // Older GCCs complain about binding unique_ptr&& to unique_ptr + // if we just `return wi` here. + return std::unique_ptr (std::move (wi)); } #if JUCE_ANDROID OutputStream* juce_CreateContentURIOutputStream (const URL&); #endif -OutputStream* URL::createOutputStream() const +std::unique_ptr URL::createOutputStream() const { if (isLocalFile()) { #if JUCE_IOS // We may need to refresh the embedded bookmark. - return new iOSFileStreamWrapper (const_cast (*this)); + return std::make_unique> (const_cast (*this)); #else - return new FileOutputStream (getLocalFile()); + return std::make_unique (getLocalFile()); #endif } #if JUCE_ANDROID - return juce_CreateContentURIOutputStream (*this); + return std::unique_ptr (juce_CreateContentURIOutputStream (*this)); #else return nullptr; #endif diff --git a/modules/juce_core/network/juce_URL.h b/modules/juce_core/network/juce_URL.h index 6e60882222..aa671cb381 100644 --- a/modules/juce_core/network/juce_URL.h +++ b/modules/juce_core/network/juce_URL.h @@ -340,22 +340,22 @@ public: @returns an input stream that the caller must delete, or a null pointer if there was an error trying to open it. */ - InputStream* createInputStream (bool doPostLikeRequest, - OpenStreamProgressCallback* progressCallback = nullptr, - void* progressCallbackContext = nullptr, - String extraHeaders = {}, - int connectionTimeOutMs = 0, - StringPairArray* responseHeaders = nullptr, - int* statusCode = nullptr, - int numRedirectsToFollow = 5, - String httpRequestCmd = {}) const; + std::unique_ptr createInputStream (bool doPostLikeRequest, + OpenStreamProgressCallback* progressCallback = nullptr, + void* progressCallbackContext = nullptr, + String extraHeaders = {}, + int connectionTimeOutMs = 0, + StringPairArray* responseHeaders = nullptr, + int* statusCode = nullptr, + int numRedirectsToFollow = 5, + String httpRequestCmd = {}) const; /** Attempts to open an output stream to a URL for writing This method can only be used for certain scheme types such as local files and content:// URIs on Android. */ - OutputStream* createOutputStream() const; + std::unique_ptr createOutputStream() const; //============================================================================== /** Represents a download task. @@ -415,7 +415,7 @@ public: private: friend class URL; - static DownloadTask* createFallbackDownloader (const URL&, const File&, const String&, Listener*, bool); + static std::unique_ptr createFallbackDownloader (const URL&, const File&, const String&, Listener*, bool); public: #if JUCE_IOS @@ -436,10 +436,10 @@ public: using a native OS background network task. Such tasks automatically deal with network re-connections and continuing your download while your app is suspended. */ - DownloadTask* downloadToFile (const File& targetLocation, - String extraHeaders = String(), - DownloadTask::Listener* listener = nullptr, - bool usePostCommand = false); + std::unique_ptr downloadToFile (const File& targetLocation, + String extraHeaders = String(), + DownloadTask::Listener* listener = nullptr, + bool usePostCommand = false); //============================================================================== /** Tries to download the entire contents of this URL into a binary data block. diff --git a/modules/juce_core/streams/juce_FileInputSource.cpp b/modules/juce_core/streams/juce_FileInputSource.cpp index feb4081a8d..ed58508afb 100644 --- a/modules/juce_core/streams/juce_FileInputSource.cpp +++ b/modules/juce_core/streams/juce_FileInputSource.cpp @@ -34,12 +34,12 @@ FileInputSource::~FileInputSource() InputStream* FileInputSource::createInputStream() { - return file.createInputStream(); + return file.createInputStream().release(); } InputStream* FileInputSource::createInputStreamFor (const String& relatedItemPath) { - return file.getSiblingFile (relatedItemPath).createInputStream(); + return file.getSiblingFile (relatedItemPath).createInputStream().release(); } int64 FileInputSource::hashCode() const diff --git a/modules/juce_core/streams/juce_MemoryInputStream.cpp b/modules/juce_core/streams/juce_MemoryInputStream.cpp index cd7aa09e4d..61e8e89f75 100644 --- a/modules/juce_core/streams/juce_MemoryInputStream.cpp +++ b/modules/juce_core/streams/juce_MemoryInputStream.cpp @@ -49,6 +49,7 @@ MemoryInputStream::MemoryInputStream (MemoryBlock&& source) : internalCopy (std::move (source)) { data = internalCopy.getData(); + dataSize = internalCopy.getSize(); } MemoryInputStream::~MemoryInputStream() diff --git a/modules/juce_core/streams/juce_URLInputSource.cpp b/modules/juce_core/streams/juce_URLInputSource.cpp index 0ecddbb9f4..e4b5105c9c 100644 --- a/modules/juce_core/streams/juce_URLInputSource.cpp +++ b/modules/juce_core/streams/juce_URLInputSource.cpp @@ -39,7 +39,7 @@ URLInputSource::~URLInputSource() InputStream* URLInputSource::createInputStream() { - return u.createInputStream (false); + return u.createInputStream (false).release(); } InputStream* URLInputSource::createInputStreamFor (const String& relatedItemPath) @@ -48,7 +48,7 @@ InputStream* URLInputSource::createInputStreamFor (const String& relatedItemPath auto parent = sub.containsChar (L'/') ? sub.upToLastOccurrenceOf ("/", false, false) : String (); - return u.withNewSubPath (parent).getChildURL (relatedItemPath).createInputStream (false); + return u.withNewSubPath (parent).getChildURL (relatedItemPath).createInputStream (false).release(); } int64 URLInputSource::hashCode() const diff --git a/modules/juce_core/system/juce_CompilerSupport.h b/modules/juce_core/system/juce_CompilerSupport.h index 42712c73fd..3d08a7ec72 100644 --- a/modules/juce_core/system/juce_CompilerSupport.h +++ b/modules/juce_core/system/juce_CompilerSupport.h @@ -38,10 +38,6 @@ #error "JUCE requires that GCC has C++11 compatibility enabled" #endif - #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 - #define JUCE_HAS_CONSTEXPR 1 - #endif - #ifndef JUCE_EXCEPTIONS_DISABLED #if ! __EXCEPTIONS #define JUCE_EXCEPTIONS_DISABLED 1 @@ -61,8 +57,6 @@ #error "JUCE requires Clang 3.3 or later" #endif - #define JUCE_HAS_CONSTEXPR 1 - #ifndef JUCE_COMPILER_SUPPORTS_ARC #define JUCE_COMPILER_SUPPORTS_ARC 1 #endif @@ -86,8 +80,6 @@ #error "JUCE requires Visual Studio 2015 or later" #endif - #define JUCE_HAS_CONSTEXPR 1 - #ifndef JUCE_EXCEPTIONS_DISABLED #if ! _CPPUNWIND #define JUCE_EXCEPTIONS_DISABLED 1 @@ -105,12 +97,6 @@ #endif //============================================================================== -#if JUCE_HAS_CONSTEXPR - #define JUCE_CONSTEXPR constexpr -#else - #define JUCE_CONSTEXPR -#endif - #if (! JUCE_MSVC) && (! JUCE_CXX14_IS_AVAILABLE) namespace std { @@ -122,6 +108,7 @@ namespace std } #endif +//============================================================================== #if ! DOXYGEN // These are old flags that are now supported on all compatible build targets #define JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL 1 @@ -129,4 +116,5 @@ namespace std #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1 #define JUCE_COMPILER_SUPPORTS_NOEXCEPT 1 #define JUCE_DELETED_FUNCTION = delete + #define JUCE_CONSTEXPR constexpr #endif diff --git a/modules/juce_core/system/juce_PlatformDefs.h b/modules/juce_core/system/juce_PlatformDefs.h index 1701582c94..0c2201cd27 100644 --- a/modules/juce_core/system/juce_PlatformDefs.h +++ b/modules/juce_core/system/juce_PlatformDefs.h @@ -92,6 +92,26 @@ namespace juce #define JUCE_ANALYZER_NORETURN #endif +/** Used to silence Wimplicit-fallthrough on Clang and GCC where available + as there are a few places in the codebase where we need to do this + deliberately and want to ignore the warning. +*/ +#if JUCE_CLANG + #if __has_cpp_attribute(clang::fallthrough) + #define JUCE_FALLTHROUGH [[clang::fallthrough]]; + #else + #define JUCE_FALLTHROUGH + #endif +#elif JUCE_GCC + #if __GNUC__ >= 7 + #define JUCE_FALLTHROUGH [[gnu::fallthrough]]; + #else + #define JUCE_FALLTHROUGH + #endif +#else + #define JUCE_FALLTHROUGH +#endif + //============================================================================== #if JUCE_MSVC && ! DOXYGEN #define JUCE_BLOCK_WITH_FORCED_SEMICOLON(x) \ diff --git a/modules/juce_core/system/juce_StandardHeader.h b/modules/juce_core/system/juce_StandardHeader.h index 9239d6b9b5..8149085443 100644 --- a/modules/juce_core/system/juce_StandardHeader.h +++ b/modules/juce_core/system/juce_StandardHeader.h @@ -29,7 +29,7 @@ */ #define JUCE_MAJOR_VERSION 5 #define JUCE_MINOR_VERSION 4 -#define JUCE_BUILDNUMBER 5 +#define JUCE_BUILDNUMBER 7 /** Current JUCE version number. @@ -120,11 +120,6 @@ #undef minor #undef KeyPress -// Include a replacement for std::function -#if JUCE_PROJUCER_LIVE_BUILD - #include "../misc/juce_StdFunctionCompat.h" -#endif - //============================================================================== // DLL building settings on Windows #if JUCE_MSVC diff --git a/modules/juce_core/system/juce_TargetPlatform.h b/modules/juce_core/system/juce_TargetPlatform.h index 4b9228d99d..1b48e4dfca 100644 --- a/modules/juce_core/system/juce_TargetPlatform.h +++ b/modules/juce_core/system/juce_TargetPlatform.h @@ -69,7 +69,8 @@ #define JUCE_LINUX 1 #elif defined (__APPLE_CPP__) || defined (__APPLE_CC__) #define CF_EXCLUDE_CSTD_HEADERS 1 - #include // (needed to find out what platform we're using) + #include // (needed to find out what platform we're using) + #include #include "../native/juce_mac_ClangBugWorkaround.h" #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR diff --git a/modules/juce_core/text/juce_CharPointer_UTF8.h b/modules/juce_core/text/juce_CharPointer_UTF8.h index 09b86325ca..8df23f7021 100644 --- a/modules/juce_core/text/juce_CharPointer_UTF8.h +++ b/modules/juce_core/text/juce_CharPointer_UTF8.h @@ -124,7 +124,7 @@ public: while ((static_cast (n) & bit) != 0 && bit > 0x8) { ++data; - bit >>= 1; + bit = static_cast (bit >> 1); } } diff --git a/modules/juce_core/text/juce_CharacterFunctions.h b/modules/juce_core/text/juce_CharacterFunctions.h index 53bc814656..dfa314eac1 100644 --- a/modules/juce_core/text/juce_CharacterFunctions.h +++ b/modules/juce_core/text/juce_CharacterFunctions.h @@ -149,8 +149,8 @@ public: #if JUCE_MINGW bool isNegative = false; #else - JUCE_CONSTEXPR const int maxSignificantDigits = 17 + 1; // An additional digit for rounding - JUCE_CONSTEXPR const int bufferSize = maxSignificantDigits + 7 + 1; // -.E-XXX and a trailing null-terminator + constexpr const int maxSignificantDigits = 17 + 1; // An additional digit for rounding + constexpr const int bufferSize = maxSignificantDigits + 7 + 1; // -.E-XXX and a trailing null-terminator char buffer[(size_t) bufferSize] = {}; char* currentCharacter = &(buffer[0]); #endif @@ -166,9 +166,12 @@ public: #else *currentCharacter++ = '-'; #endif - // Fall-through.. + JUCE_FALLTHROUGH case '+': c = *++text; + break; + default: + break; } switch (c) @@ -184,6 +187,9 @@ public: if ((text[1] == 'n' || text[1] == 'N') && (text[2] == 'f' || text[2] == 'F')) return std::numeric_limits::infinity(); break; + + default: + break; } #if JUCE_MINGW @@ -194,7 +200,7 @@ public: int exponent = 0, decPointIndex = 0, digit = 0; int lastDigit = 0, numSignificantDigits = 0; bool digitsFound = false; - JUCE_CONSTEXPR const int maxSignificantDigits = 17 + 1; + constexpr const int maxSignificantDigits = 17 + 1; for (;;) { @@ -274,7 +280,7 @@ public: switch (*++text) { - case '-': negativeExponent = true; // fall-through.. + case '-': negativeExponent = true; JUCE_FALLTHROUGH case '+': ++text; } @@ -359,8 +365,9 @@ public: switch (*++text) { - case '-': parsedExponentIsPositive = false; // Fall-through.. - case '+': ++text; + case '-': parsedExponentIsPositive = false; JUCE_FALLTHROUGH + case '+': ++text; break; + default: break; } int exponent = 0; diff --git a/modules/juce_core/text/juce_String.cpp b/modules/juce_core/text/juce_String.cpp index 1681c2c216..77f01787d3 100644 --- a/modules/juce_core/text/juce_String.cpp +++ b/modules/juce_core/text/juce_String.cpp @@ -393,7 +393,7 @@ namespace NumberToStringConverters do { - *--t = '0' + (char) (v % 10); + *--t = static_cast ('0' + (char) (v % 10)); v /= 10; } while (v > 0); @@ -1912,7 +1912,7 @@ static String hexToString (Type v) do { *--t = hexDigits [(int) (v & 15)]; - v >>= 4; + v = static_cast (v >> 4); } while (v != 0); diff --git a/modules/juce_core/text/juce_String.h b/modules/juce_core/text/juce_String.h index 3a5a52d2d7..430b5b37fa 100644 --- a/modules/juce_core/text/juce_String.h +++ b/modules/juce_core/text/juce_String.h @@ -20,6 +20,20 @@ ============================================================================== */ +#if JUCE_MAC || JUCE_IOS + // Annoyingly we can only forward-declare a typedef by forward-declaring the + // aliased type + #if __has_attribute(objc_bridge) + #define JUCE_CF_BRIDGED_TYPE(T) __attribute__((objc_bridge(T))) + #else + #define JUCE_CF_BRIDGED_TYPE(T) + #endif + + typedef const struct JUCE_CF_BRIDGED_TYPE(NSString) __CFString * CFStringRef; + + #undef JUCE_CF_BRIDGED_TYPE +#endif + namespace juce { diff --git a/modules/juce_core/threads/juce_Process.h b/modules/juce_core/threads/juce_Process.h index 726fa19384..bc868ef7bf 100644 --- a/modules/juce_core/threads/juce_Process.h +++ b/modules/juce_core/threads/juce_Process.h @@ -133,7 +133,7 @@ public: static void JUCE_CALLTYPE setCurrentModuleInstanceHandle (void* newHandle) noexcept; #endif - #if JUCE_MAC || DOXYGEN + #if (JUCE_MAC && JUCE_MODULE_AVAILABLE_juce_gui_basics) || DOXYGEN //============================================================================== /** OSX ONLY - Shows or hides the OSX dock icon for this app. */ static void setDockIconVisible (bool isVisible); diff --git a/modules/juce_core/time/juce_PerformanceCounter.cpp b/modules/juce_core/time/juce_PerformanceCounter.cpp index 5e15212d0e..13d62f2f9b 100644 --- a/modules/juce_core/time/juce_PerformanceCounter.cpp +++ b/modules/juce_core/time/juce_PerformanceCounter.cpp @@ -114,7 +114,7 @@ void PerformanceCounter::printStatistics() { const String desc (getStatisticsAndReset().toString()); - Logger::outputDebugString (desc); + Logger::writeToLog (desc); appendToFile (outputFile, desc); } diff --git a/modules/juce_core/xml/juce_XmlElement.cpp b/modules/juce_core/xml/juce_XmlElement.cpp index 1e3bdd4b29..7191a2d747 100644 --- a/modules/juce_core/xml/juce_XmlElement.cpp +++ b/modules/juce_core/xml/juce_XmlElement.cpp @@ -237,7 +237,7 @@ namespace XmlOutputFunctions outputStream << (char) character; break; } - // Note: Deliberate fall-through here! + JUCE_FALLTHROUGH default: outputStream << "&#" << ((int) character) << ';'; break; diff --git a/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp b/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp index 8551f2c9a6..70d1e368f8 100644 --- a/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp +++ b/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp @@ -92,7 +92,7 @@ private: { case Z_STREAM_END: finished = true; - // Deliberate fall-through.. + JUCE_FALLTHROUGH case Z_OK: { data += dataSize - stream.avail_in; diff --git a/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp b/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp index 624c4b1a70..43045c457a 100644 --- a/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp +++ b/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp @@ -36,6 +36,10 @@ namespace zlibNamespace #pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wshadow" #pragma clang diagnostic ignored "-Wdeprecated-register" + #pragma clang diagnostic ignored "-Wswitch-enum" + #if __has_warning ("-Wimplicit-fallthrough") + #pragma clang diagnostic ignored "-Wimplicit-fallthrough" + #endif #if __has_warning("-Wzero-as-null-pointer-constant") #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #endif @@ -50,6 +54,12 @@ namespace zlibNamespace #pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" + #pragma GCC diagnostic ignored "-Wswitch-enum" + #pragma GCC diagnostic ignored "-Wswitch-default" + #pragma GCC diagnostic ignored "-Wredundant-decls" + #if __GNUC__ >= 7 + #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" + #endif #endif #undef OS_CODE @@ -151,7 +161,7 @@ public: { case Z_STREAM_END: finished = true; - // deliberate fall-through + JUCE_FALLTHROUGH case Z_OK: data += dataSize - stream.avail_in; dataSize = (z_uInt) stream.avail_in; @@ -166,7 +176,7 @@ public: case Z_DATA_ERROR: case Z_MEM_ERROR: error = true; - + JUCE_FALLTHROUGH default: break; } diff --git a/modules/juce_core/zip/juce_ZipFile.cpp b/modules/juce_core/zip/juce_ZipFile.cpp index 4c4922553b..863db0596e 100644 --- a/modules/juce_core/zip/juce_ZipFile.cpp +++ b/modules/juce_core/zip/juce_ZipFile.cpp @@ -541,7 +541,7 @@ private: { if (stream == nullptr) { - stream.reset (file.createInputStream()); + stream = file.createInputStream(); if (stream == nullptr) return false; @@ -577,7 +577,7 @@ private: target.writeInt ((int) checksum); target.writeInt ((int) (uint32) compressedSize); target.writeInt ((int) (uint32) uncompressedSize); - target.writeShort ((short) storedPathname.toUTF8().sizeInBytes() - 1); + target.writeShort (static_cast (storedPathname.toUTF8().sizeInBytes() - 1)); target.writeShort (0); // extra field length } diff --git a/modules/juce_cryptography/encryption/juce_BlowFish.cpp b/modules/juce_cryptography/encryption/juce_BlowFish.cpp index fb4fa22e53..38a1431411 100644 --- a/modules/juce_cryptography/encryption/juce_BlowFish.cpp +++ b/modules/juce_cryptography/encryption/juce_BlowFish.cpp @@ -338,7 +338,7 @@ bool BlowFish::apply (void* data, size_t size, void (BlowFish::*op) (uint32&, ui int BlowFish::pad (void* data, size_t size, size_t bufferSize) noexcept { // add padding according to https://tools.ietf.org/html/rfc2898#section-6.1.1 - const uint8 paddingSize = 8u - (size % 8u); + const uint8 paddingSize = static_cast (8u - (size % 8u)); auto n = size + paddingSize; if (n > bufferSize) diff --git a/modules/juce_cryptography/hashing/juce_Whirlpool.cpp b/modules/juce_cryptography/hashing/juce_Whirlpool.cpp index 7365fe76e0..478081ff3a 100644 --- a/modules/juce_cryptography/hashing/juce_Whirlpool.cpp +++ b/modules/juce_cryptography/hashing/juce_Whirlpool.cpp @@ -93,7 +93,7 @@ private: bufferBits = bufferPos = 0; } - buffer[bufferPos] = (uint8_t) (b << (8 - bufferRem)); + buffer[bufferPos] = static_cast (b << (8 - bufferRem)); bufferBits += bufferRem; numBits -= 8; @@ -103,7 +103,7 @@ private: if (numBits > 0) { b = (source[sourcePos] << sourceGap) & 0xff; - buffer[bufferPos] |= (b >> bufferRem); + buffer[bufferPos] = static_cast (buffer[bufferPos] | (b >> bufferRem)); } else { @@ -126,7 +126,7 @@ private: bufferBits = bufferPos = 0; } - buffer[bufferPos] = (uint8_t) (b << (8 - bufferRem)); + buffer[bufferPos] = static_cast (b << (8 - bufferRem)); bufferBits += numBits; } } @@ -134,7 +134,8 @@ private: void finalize (uint8_t* result) noexcept { // append a '1'-bit - buffer[bufferPos++] |= 0x80u >> (bufferBits & 7); + buffer[bufferPos] = static_cast (buffer[bufferPos] | (0x80u >> (bufferBits & 7))); + bufferPos++; // pad with zero bits to complete (N*(64*8) - (32*8)) bits if (bufferPos > 32) diff --git a/modules/juce_cryptography/juce_cryptography.h b/modules/juce_cryptography/juce_cryptography.h index 86d5ca36c6..f27c836923 100644 --- a/modules/juce_cryptography/juce_cryptography.h +++ b/modules/juce_cryptography/juce_cryptography.h @@ -24,6 +24,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -33,15 +34,15 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_cryptography - vendor: juce - version: 5.4.5 - name: JUCE cryptography classes - description: Classes for various basic cryptography functions, including RSA, Blowfish, MD5, SHA, etc. - website: http://www.juce.com/juce - license: GPL/Commercial + ID: juce_cryptography + vendor: juce + version: 5.4.7 + name: JUCE cryptography classes + description: Classes for various basic cryptography functions, including RSA, Blowfish, MD5, SHA, etc. + website: http://www.juce.com/juce + license: GPL/Commercial - dependencies: juce_core + dependencies: juce_core END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp b/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp index 39b85dc6a4..b9e29ea6dc 100644 --- a/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp +++ b/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp @@ -29,13 +29,13 @@ namespace juce namespace PropertyFileConstants { - JUCE_CONSTEXPR static const int magicNumber = (int) ByteOrder::makeInt ('P', 'R', 'O', 'P'); - JUCE_CONSTEXPR static const int magicNumberCompressed = (int) ByteOrder::makeInt ('C', 'P', 'R', 'P'); + constexpr static const int magicNumber = (int) ByteOrder::makeInt ('P', 'R', 'O', 'P'); + constexpr static const int magicNumberCompressed = (int) ByteOrder::makeInt ('C', 'P', 'R', 'P'); - JUCE_CONSTEXPR static const char* const fileTag = "PROPERTIES"; - JUCE_CONSTEXPR static const char* const valueTag = "VALUE"; - JUCE_CONSTEXPR static const char* const nameAttribute = "name"; - JUCE_CONSTEXPR static const char* const valueAttribute = "val"; + constexpr static const char* const fileTag = "PROPERTIES"; + constexpr static const char* const valueTag = "VALUE"; + constexpr static const char* const nameAttribute = "name"; + constexpr static const char* const valueAttribute = "val"; } //============================================================================== diff --git a/modules/juce_data_structures/juce_data_structures.h b/modules/juce_data_structures/juce_data_structures.h index 85ec23f541..1def8be23b 100644 --- a/modules/juce_data_structures/juce_data_structures.h +++ b/modules/juce_data_structures/juce_data_structures.h @@ -24,6 +24,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -33,15 +34,15 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_data_structures - vendor: juce - version: 5.4.5 - name: JUCE data model helper classes - description: Classes for undo/redo management, and smart data structures. - website: http://www.juce.com/juce - license: GPL/Commercial + ID: juce_data_structures + vendor: juce + version: 5.4.7 + name: JUCE data model helper classes + description: Classes for undo/redo management, and smart data structures. + website: http://www.juce.com/juce + license: GPL/Commercial - dependencies: juce_events + dependencies: juce_events END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_data_structures/values/juce_ValueTreeSynchroniser.cpp b/modules/juce_data_structures/values/juce_ValueTreeSynchroniser.cpp index 68cca2682f..ddc4003729 100644 --- a/modules/juce_data_structures/values/juce_ValueTreeSynchroniser.cpp +++ b/modules/juce_data_structures/values/juce_ValueTreeSynchroniser.cpp @@ -229,6 +229,9 @@ bool ValueTreeSynchroniser::applyChange (ValueTree& root, const void* data, size break; } + case ValueTreeSynchroniserHelpers::fullSync: + break; + default: jassertfalse; // Seem to have received some corrupt data? break; diff --git a/modules/juce_data_structures/values/juce_ValueWithDefault.h b/modules/juce_data_structures/values/juce_ValueWithDefault.h index f3b58d39ac..50ae3274d0 100644 --- a/modules/juce_data_structures/values/juce_ValueWithDefault.h +++ b/modules/juce_data_structures/values/juce_ValueWithDefault.h @@ -31,7 +31,7 @@ namespace juce /** This class acts as a wrapper around a property inside a ValueTree. - If the property inside the ValueTree is missing or empty the ValueWithDefault will automatically + If the property inside the ValueTree is missing the ValueWithDefault will automatically return a default value, which can be specified when initialising the ValueWithDefault. @tags{DataStructures} @@ -89,7 +89,7 @@ public: } //============================================================================== - /** Returns the current value of the property. If the property does not exist or is empty, + /** Returns the current value of the property. If the property does not exist this returns the default value. */ var get() const noexcept diff --git a/modules/juce_dsp/frequency/juce_Convolution.cpp b/modules/juce_dsp/frequency/juce_Convolution.cpp index 3288651c06..fb2a721367 100644 --- a/modules/juce_dsp/frequency/juce_Convolution.cpp +++ b/modules/juce_dsp/frequency/juce_Convolution.cpp @@ -95,7 +95,7 @@ struct ConvolutionEngine numInputSegments = (blockSize > 128 ? numSegments : 3 * numSegments); - FFTobject.reset (new FFT (roundToInt (std::log2 (FFTSize)))); + FFTobject = std::make_unique (roundToInt (std::log2 (FFTSize))); bufferInput.setSize (1, static_cast (FFTSize)); bufferOutput.setSize (1, static_cast (FFTSize * 2)); @@ -643,6 +643,7 @@ struct Convolution::Pimpl : private Thread } break; + case ChangeRequest::numChangeRequestTypes: case ChangeRequest::changeIgnore: break; @@ -802,13 +803,11 @@ private: { if (currentInfo.sourceType == SourceType::sourceBinaryData) { - if (! (copyAudioStreamInAudioBuffer (new MemoryInputStream (currentInfo.sourceData, (size_t) currentInfo.sourceDataSize, false)))) - return; + copyAudioStreamInAudioBuffer (std::make_unique (currentInfo.sourceData, (size_t) currentInfo.sourceDataSize, false)); } else if (currentInfo.sourceType == SourceType::sourceAudioFile) { - if (! (copyAudioStreamInAudioBuffer (new FileInputStream (currentInfo.fileImpulseResponse)))) - return; + copyAudioStreamInAudioBuffer (std::make_unique (currentInfo.fileImpulseResponse)); } else if (currentInfo.sourceType == SourceType::sourceAudioBuffer) { @@ -846,11 +845,11 @@ private: /** Converts the data from an audio file into a stereo audio buffer of floats, and performs resampling if necessary. */ - bool copyAudioStreamInAudioBuffer (InputStream* stream) + bool copyAudioStreamInAudioBuffer (std::unique_ptr stream) { AudioFormatManager manager; manager.registerBasicFormats(); - std::unique_ptr formatReader (manager.createReaderFor (stream)); + std::unique_ptr formatReader (manager.createReaderFor (std::move (stream))); if (formatReader != nullptr) { diff --git a/modules/juce_dsp/frequency/juce_Windowing.cpp b/modules/juce_dsp/frequency/juce_Windowing.cpp index 6a2c62e375..e01137ec87 100644 --- a/modules/juce_dsp/frequency/juce_Windowing.cpp +++ b/modules/juce_dsp/frequency/juce_Windowing.cpp @@ -145,6 +145,7 @@ void WindowingFunction::fillWindowingTables (FloatType* samples, size } break; + case numWindowingMethods: default: jassertfalse; break; @@ -175,15 +176,16 @@ const char* WindowingFunction::getWindowingMethodName (WindowingMetho { switch (type) { - case rectangular: return "Rectangular"; - case triangular: return "Triangular"; - case hann: return "Hann"; - case hamming: return "Hamming"; - case blackman: return "Blackman"; - case blackmanHarris: return "Blackman-Harris"; - case flatTop: return "Flat Top"; - case kaiser: return "Kaiser"; - default: jassertfalse; return ""; + case rectangular: return "Rectangular"; + case triangular: return "Triangular"; + case hann: return "Hann"; + case hamming: return "Hamming"; + case blackman: return "Blackman"; + case blackmanHarris: return "Blackman-Harris"; + case flatTop: return "Flat Top"; + case kaiser: return "Kaiser"; + case numWindowingMethods: + default: jassertfalse; return ""; } } diff --git a/modules/juce_dsp/juce_dsp.cpp b/modules/juce_dsp/juce_dsp.cpp index 0d61a417e0..fd014ad2da 100644 --- a/modules/juce_dsp/juce_dsp.cpp +++ b/modules/juce_dsp/juce_dsp.cpp @@ -35,12 +35,6 @@ #include "juce_dsp.h" -#if ! JUCE_HAS_CONSTEXPR - #ifndef JUCE_DEMO_RUNNER - #error "The juce_dsp module requires a compiler that supports constexpr" - #endif -#else - #ifndef JUCE_USE_VDSP_FRAMEWORK #define JUCE_USE_VDSP_FRAMEWORK 1 #endif @@ -92,6 +86,5 @@ #include "containers/juce_AudioBlock_test.cpp" #include "frequency/juce_FFT_test.cpp" #include "processors/juce_FIRFilter_test.cpp" -#endif - + #include "processors/juce_ProcessorChain_test.cpp" #endif diff --git a/modules/juce_dsp/juce_dsp.h b/modules/juce_dsp/juce_dsp.h index 68abb03ea5..982e691681 100644 --- a/modules/juce_dsp/juce_dsp.h +++ b/modules/juce_dsp/juce_dsp.h @@ -36,7 +36,7 @@ ID: juce_dsp vendor: juce - version: 5.4.5 + version: 5.4.7 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 @@ -59,12 +59,6 @@ #include #include -#if ! JUCE_HAS_CONSTEXPR - #ifndef JUCE_DEMO_RUNNER - #error "The juce_dsp module requires a compiler that supports constexpr" - #endif -#else - #if defined(_M_X64) || defined(__amd64__) || defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP == 2) #if defined(_M_X64) || defined(__amd64__) @@ -271,5 +265,3 @@ namespace juce #include "frequency/juce_Convolution.h" #include "frequency/juce_Windowing.h" #include "filter_design/juce_FilterDesign.h" - -#endif diff --git a/modules/juce_dsp/native/juce_fallback_SIMDNativeOps.h b/modules/juce_dsp/native/juce_fallback_SIMDNativeOps.h index e45b32e6c7..9c117c9a91 100644 --- a/modules/juce_dsp/native/juce_fallback_SIMDNativeOps.h +++ b/modules/juce_dsp/native/juce_fallback_SIMDNativeOps.h @@ -115,7 +115,7 @@ struct SIMDFallbackOps auto retval = static_cast (0); for (size_t i = 0; i < n; ++i) - retval += a.s[i]; + retval = static_cast (retval + a.s[i]); return retval; } diff --git a/modules/juce_dsp/processors/juce_Bias.h b/modules/juce_dsp/processors/juce_Bias.h index a279f61793..aa5d298163 100644 --- a/modules/juce_dsp/processors/juce_Bias.h +++ b/modules/juce_dsp/processors/juce_Bias.h @@ -90,7 +90,7 @@ public: //============================================================================== /** Returns the result of processing a single sample. */ template - SampleType processSample (SampleType inputSample) const noexcept + SampleType processSample (SampleType inputSample) noexcept { return inputSample + bias.getNextValue(); } diff --git a/modules/juce_dsp/processors/juce_Oversampling.cpp b/modules/juce_dsp/processors/juce_Oversampling.cpp index 06cc7298be..2fabc75fd1 100644 --- a/modules/juce_dsp/processors/juce_Oversampling.cpp +++ b/modules/juce_dsp/processors/juce_Oversampling.cpp @@ -39,7 +39,7 @@ struct Oversampling::OversamplingStage virtual ~OversamplingStage() {} //============================================================================== - virtual SampleType getLatencyInSamples() = 0; + virtual SampleType getLatencyInSamples() const = 0; virtual void initProcessing (size_t maximumNumberOfSamplesBeforeOversampling) { @@ -78,7 +78,7 @@ struct OversamplingDummy : public Oversampling::OversamplingStage OversamplingDummy (size_t numChans) : ParentType (numChans, 1) {} //============================================================================== - SampleType getLatencyInSamples() override + SampleType getLatencyInSamples() const override { return 0; } @@ -139,7 +139,7 @@ struct Oversampling2TimesEquirippleFIR : public Oversampling::Overs } //============================================================================== - SampleType getLatencyInSamples() override + SampleType getLatencyInSamples() const override { return static_cast (coefficientsUp.getFilterOrder() + coefficientsDown.getFilterOrder()) * 0.5f; } @@ -300,7 +300,7 @@ struct Oversampling2TimesPolyphaseIIR : public Oversampling::Oversa } //============================================================================== - SampleType getLatencyInSamples() override + SampleType getLatencyInSamples() const override { return latency; } @@ -629,7 +629,7 @@ void Oversampling::clearOversamplingStages() //============================================================================== template -SampleType Oversampling::getLatencyInSamples() noexcept +SampleType Oversampling::getLatencyInSamples() const noexcept { auto latency = static_cast (0); size_t order = 1; @@ -644,7 +644,7 @@ SampleType Oversampling::getLatencyInSamples() noexcept } template -size_t Oversampling::getOversamplingFactor() noexcept +size_t Oversampling::getOversamplingFactor() const noexcept { return factorOversampling; } diff --git a/modules/juce_dsp/processors/juce_Oversampling.h b/modules/juce_dsp/processors/juce_Oversampling.h index 10c715a010..a218f6f0cd 100644 --- a/modules/juce_dsp/processors/juce_Oversampling.h +++ b/modules/juce_dsp/processors/juce_Oversampling.h @@ -105,10 +105,10 @@ public: Note: The latency might not be integer, so you might need to round its value or to compensate it properly in your processing code. */ - SampleType getLatencyInSamples() noexcept; + SampleType getLatencyInSamples() const noexcept; /** Returns the current oversampling factor. */ - size_t getOversamplingFactor() noexcept; + size_t getOversamplingFactor() const noexcept; //============================================================================== /** Must be called before any processing, to set the buffer sizes of the internal diff --git a/modules/juce_dsp/processors/juce_ProcessorChain.h b/modules/juce_dsp/processors/juce_ProcessorChain.h index 71fbb23a8e..546fe7c074 100644 --- a/modules/juce_dsp/processors/juce_ProcessorChain.h +++ b/modules/juce_dsp/processors/juce_ProcessorChain.h @@ -29,109 +29,129 @@ namespace juce namespace dsp { +//============================================================================== #ifndef DOXYGEN -namespace ProcessorHelpers // Internal helper classes used in building the ProcessorChain +/** The contents of this namespace are used to implement ProcessorChain and should + not be used elsewhere. Their interfaces (and existence) are liable to change! +*/ +namespace detail { - template - struct AccessHelper + template + constexpr void forEachInTuple (Fn&& fn, Tuple&& tuple, std::index_sequence) + noexcept (noexcept (std::initializer_list { (fn (std::get (tuple), Ix), 0)... })) { - template - static auto& get (ProcessorType& a) noexcept { return AccessHelper::get (a.processors); } + (void) std::initializer_list { ((void) fn (std::get (tuple), Ix), 0)... }; + } - template - static const auto& get (const ProcessorType& a) noexcept { return AccessHelper::get (a.processors); } + template + using TupleIndexSequence = std::make_index_sequence>>::value>; - template - static void setBypassed (ProcessorType& a, bool bypassed) { AccessHelper::setBypassed (a.processors, bypassed); } - }; - - template <> - struct AccessHelper<0> + template + constexpr void forEachInTuple (Fn&& fn, Tuple&& tuple) + noexcept (noexcept (forEachInTuple (std::forward (fn), std::forward (tuple), TupleIndexSequence{}))) { - template - static auto& get (ProcessorType& a) noexcept { return a.getProcessor(); } + forEachInTuple (std::forward (fn), std::forward (tuple), TupleIndexSequence{}); + } +} +#endif - template - static const auto& get (const ProcessorType& a) noexcept { return a.getProcessor(); } +/** 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 +class ProcessorChain +{ +public: + /** Get a reference to the processor at index `Index`. */ + template auto& get() noexcept { return std::get (processors); } - template - static void setBypassed (ProcessorType& a, bool bypassed) { a.isBypassed = bypassed; } - }; + /** Get a reference to the processor at index `Index`. */ + template const auto& get() const noexcept { return std::get (processors); } - //============================================================================== - template - struct ChainElement + /** Set the processor at index `Index` to be bypassed or enabled. */ + template + void setBypassed (bool b) noexcept { bypassed[(size_t) Index] = b; } + + /** Query whether the processor at index `Index` is bypassed. */ + template + bool isBypassed() const noexcept { return bypassed[(size_t) Index]; } + + /** Prepare all inner processors with the provided `ProcessSpec`. */ + void prepare (const ProcessSpec& spec) { - void prepare (const ProcessSpec& spec) + detail::forEachInTuple ([&] (auto& proc, size_t) { proc.prepare (spec); }, processors); + } + + /** Reset all inner processors. */ + void reset() + { + detail::forEachInTuple ([] (auto& proc, size_t) { proc.reset(); }, processors); + } + + /** Process `context` through all inner processors in sequence. */ + template + void process (const ProcessContext& context) noexcept + { + detail::forEachInTuple ([&] (auto& proc, size_t index) noexcept { - processor.prepare (spec); - } - - template - void process (const ProcessContext& context) noexcept - { - if (context.usesSeparateInputAndOutputBlocks() && ! isFirst) + if (context.usesSeparateInputAndOutputBlocks() && index != 0) { jassert (context.getOutputBlock().getNumChannels() == context.getInputBlock().getNumChannels()); ProcessContextReplacing replacingContext (context.getOutputBlock()); - replacingContext.isBypassed = (isBypassed || context.isBypassed); + replacingContext.isBypassed = (bypassed[index] || context.isBypassed); - processor.process (replacingContext); + proc.process (replacingContext); } else { ProcessContext contextCopy (context); - contextCopy.isBypassed = (isBypassed || context.isBypassed); + contextCopy.isBypassed = (bypassed[index] || context.isBypassed); - processor.process (contextCopy); + proc.process (contextCopy); } - } + }, processors); + } - void reset() - { - processor.reset(); - } +private: + std::tuple processors; + std::array bypassed { {} }; +}; - bool isBypassed = false; - Processor processor; - - Processor& getProcessor() noexcept { return processor; } - const Processor& getProcessor() const noexcept { return processor; } - Subclass& getThis() noexcept { return *static_cast (this); } - const Subclass& getThis() const noexcept { return *static_cast (this); } - - template auto& get() noexcept { return AccessHelper::get (getThis()); } - template const auto& get() const noexcept { return AccessHelper::get (getThis()); } - template void setBypassed (bool bypassed) noexcept { AccessHelper::setBypassed (getThis(), bypassed); } - }; - - //============================================================================== - template - struct ChainBase : public ChainElement> - { - using Base = ChainElement>; - - template - void process (const ProcessContext& context) noexcept { Base::process (context); processors.process (context); } - void prepare (const ProcessSpec& spec) { Base::prepare (spec); processors.prepare (spec); } - void reset() { Base::reset(); processors.reset(); } - - ChainBase processors; - }; - - template - struct ChainBase : public ChainElement> {}; -} -#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. +/** Non-member equivalent of ProcessorChain::get which avoids awkward + member template syntax. */ -template -using ProcessorChain = ProcessorHelpers::ChainBase; +template +inline auto& get (ProcessorChain& chain) noexcept +{ + return chain.template get(); +} + +/** Non-member equivalent of ProcessorChain::get which avoids awkward + member template syntax. +*/ +template +inline auto& get (const ProcessorChain& chain) noexcept +{ + return chain.template get(); +} + +/** Non-member equivalent of ProcessorChain::setBypassed which avoids awkward + member template syntax. +*/ +template +inline void setBypassed (ProcessorChain& chain, bool bypassed) noexcept +{ + chain.template setBypassed (bypassed); +} + +/** Non-member equivalent of ProcessorChain::isBypassed which avoids awkward + member template syntax. +*/ +template +inline bool isBypassed (const ProcessorChain& chain) noexcept +{ + return chain.template isBypassed(); +} } // namespace dsp } // namespace juce diff --git a/modules/juce_dsp/processors/juce_ProcessorChain_test.cpp b/modules/juce_dsp/processors/juce_ProcessorChain_test.cpp new file mode 100644 index 0000000000..69100ddecf --- /dev/null +++ b/modules/juce_dsp/processors/juce_ProcessorChain_test.cpp @@ -0,0 +1,142 @@ +/* + ============================================================================== + + 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 juce +{ +namespace dsp +{ + +class ProcessorChainTest : public UnitTest +{ + template + struct MockProcessor + { + void prepare (const ProcessSpec&) noexcept { isPrepared = true; } + void reset() noexcept { isReset = true; } + + template + void process (const Context& context) noexcept + { + bufferWasClear = context.getInputBlock().getSample (0, 0) == 0; + + if (! context.isBypassed) + context.getOutputBlock().add (AddValue); + } + + bool isPrepared = false; + bool isReset = false; + bool bufferWasClear = false; + }; + +public: + ProcessorChainTest() + : UnitTest ("ProcessorChain", UnitTestCategories::dsp) {} + + void runTest() override + { + beginTest ("After calling setBypass, processor is bypassed"); + { + ProcessorChain, MockProcessor<2>> chain; + + setBypassed<0> (chain, true); + expect (isBypassed<0> (chain)); + setBypassed<0> (chain, false); + expect (! isBypassed<0> (chain)); + + setBypassed<1> (chain, true); + expect (isBypassed<1> (chain)); + setBypassed<1> (chain, false); + expect (! isBypassed<1> (chain)); + } + + beginTest ("After calling prepare, all processors are prepared"); + { + ProcessorChain, MockProcessor<2>> chain; + + expect (! get<0> (chain).isPrepared); + expect (! get<1> (chain).isPrepared); + + chain.prepare (ProcessSpec{}); + + expect (get<0> (chain).isPrepared); + expect (get<1> (chain).isPrepared); + } + + beginTest ("After calling reset, all processors are reset"); + { + ProcessorChain, MockProcessor<2>> chain; + + expect (! get<0> (chain).isReset); + expect (! get<1> (chain).isReset); + + chain.reset(); + + expect (get<0> (chain).isReset); + expect (get<1> (chain).isReset); + } + + beginTest ("After calling process, all processors contribute to processing"); + { + ProcessorChain, MockProcessor<2>> chain; + + AudioBuffer buffer (1, 1); + AudioBlock block (buffer); + ProcessContextReplacing context (block); + + block.clear(); + chain.process (context); + expectEquals (buffer.getSample (0, 0), 3.0f); + expect (get<0> (chain).bufferWasClear); + expect (! get<1> (chain).bufferWasClear); + + setBypassed<0> (chain, true); + block.clear(); + chain.process (context); + expectEquals (buffer.getSample (0, 0), 2.0f); + expect (get<0> (chain).bufferWasClear); + expect (get<1> (chain).bufferWasClear); + + setBypassed<1> (chain, true); + block.clear(); + chain.process (context); + expectEquals (buffer.getSample (0, 0), 0.0f); + expect (get<0> (chain).bufferWasClear); + expect (get<1> (chain).bufferWasClear); + + setBypassed<0> (chain, false); + block.clear(); + chain.process (context); + expectEquals (buffer.getSample (0, 0), 1.0f); + expect (get<0> (chain).bufferWasClear); + expect (! get<1> (chain).bufferWasClear); + } + } +}; + +static ProcessorChainTest processorChainUnitTest; + +} // namespace dsp +} // namespace juce diff --git a/modules/juce_events/interprocess/juce_NetworkServiceDiscovery.cpp b/modules/juce_events/interprocess/juce_NetworkServiceDiscovery.cpp index f2ddcc5c4a..efa0b1a6fd 100644 --- a/modules/juce_events/interprocess/juce_NetworkServiceDiscovery.cpp +++ b/modules/juce_events/interprocess/juce_NetworkServiceDiscovery.cpp @@ -67,11 +67,20 @@ void NetworkServiceDiscovery::Advertiser::run() void NetworkServiceDiscovery::Advertiser::sendBroadcast() { - auto localAddress = IPAddress::getLocalAddress(); - message.setAttribute ("address", localAddress.toString()); - auto broadcastAddress = IPAddress::getInterfaceBroadcastAddress (localAddress); - auto data = message.toString (XmlElement::TextFormat().singleLine().withoutHeader()); - socket.write (broadcastAddress.toString(), broadcastPort, data.toRawUTF8(), (int) data.getNumBytesAsUTF8()); + static IPAddress local = IPAddress::local(); + + for (auto& address : IPAddress::getAllAddresses()) + { + if (address == local) + continue; + + message.setAttribute ("address", address.toString()); + + auto broadcastAddress = IPAddress::getInterfaceBroadcastAddress (address); + auto data = message.toString (XmlElement::TextFormat().singleLine().withoutHeader()); + + socket.write (broadcastAddress.toString(), broadcastPort, data.toRawUTF8(), (int) data.getNumBytesAsUTF8()); + } } //============================================================================== diff --git a/modules/juce_events/interprocess/juce_NetworkServiceDiscovery.h b/modules/juce_events/interprocess/juce_NetworkServiceDiscovery.h index ffe7d3507d..5c1fdcd81f 100644 --- a/modules/juce_events/interprocess/juce_NetworkServiceDiscovery.h +++ b/modules/juce_events/interprocess/juce_NetworkServiceDiscovery.h @@ -28,6 +28,8 @@ namespace juce Contains classes that implement a simple protocol for broadcasting the availability and location of a discoverable service on the local network, and for maintaining a list of known services. + + @tags{Events} */ struct NetworkServiceDiscovery { @@ -36,6 +38,8 @@ struct NetworkServiceDiscovery To use, simply create an instance of an Advertiser and it'll broadcast until you delete it. + + @tags{Events} */ struct Advertiser : private Thread { @@ -68,7 +72,10 @@ struct NetworkServiceDiscovery //============================================================================== /** Contains information about a service that has been found on the network. + @see AvailableServiceList, Advertiser + + @tags{Events} */ struct Service { @@ -87,7 +94,10 @@ struct NetworkServiceDiscovery Just create an instance of AvailableServiceList and it will start listening - you can register a callback with its onChange member to find out when services appear/disappear, and you can call getServices() to find out the current list. + @see Service, Advertiser + + @tags{Events} */ struct AvailableServiceList : private Thread, private AsyncUpdater diff --git a/modules/juce_events/juce_events.h b/modules/juce_events/juce_events.h index ffa611ffa3..07b3ef549c 100644 --- a/modules/juce_events/juce_events.h +++ b/modules/juce_events/juce_events.h @@ -20,6 +20,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -29,15 +30,15 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_events - vendor: juce - version: 5.4.5 - 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 - license: ISC + ID: juce_events + vendor: juce + version: 5.4.7 + 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 + license: ISC - dependencies: juce_core + dependencies: juce_core END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_events/messages/juce_MessageManager.cpp b/modules/juce_events/messages/juce_MessageManager.cpp index 726554a9e5..0729932afd 100644 --- a/modules/juce_events/messages/juce_MessageManager.cpp +++ b/modules/juce_events/messages/juce_MessageManager.cpp @@ -453,7 +453,6 @@ void MessageManagerLock::exitSignalSent() } //============================================================================== -JUCE_API void JUCE_CALLTYPE initialiseJuce_GUI(); JUCE_API void JUCE_CALLTYPE initialiseJuce_GUI() { JUCE_AUTORELEASEPOOL @@ -462,7 +461,6 @@ JUCE_API void JUCE_CALLTYPE initialiseJuce_GUI() } } -JUCE_API void JUCE_CALLTYPE shutdownJuce_GUI(); JUCE_API void JUCE_CALLTYPE shutdownJuce_GUI() { JUCE_AUTORELEASEPOOL diff --git a/modules/juce_events/native/juce_linux_Messaging.cpp b/modules/juce_events/native/juce_linux_Messaging.cpp index 49b32b991f..1ef5c5f7f4 100644 --- a/modules/juce_events/native/juce_linux_Messaging.cpp +++ b/modules/juce_events/native/juce_linux_Messaging.cpp @@ -114,13 +114,22 @@ struct InternalRunLoop public: InternalRunLoop() { - fdReadCallbacks.reserve (8); + fdReadCallbacks.reserve (16); } void registerFdCallback (int fd, std::function&& cb, short eventMask) { const ScopedLock sl (lock); + if (shouldDeferModifyingReadCallbacks) + { + deferredReadCallbackModifications.emplace_back ([this, fd, cb, eventMask]() mutable + { + registerFdCallback (fd, std::move (cb), eventMask); + }); + return; + } + fdReadCallbacks.push_back ({ fd, std::move (cb) }); pfds.push_back ({ fd, eventMask, 0 }); } @@ -129,6 +138,12 @@ public: { const ScopedLock sl (lock); + if (shouldDeferModifyingReadCallbacks) + { + deferredReadCallbackModifications.emplace_back ([this, fd] { unregisterFdCallback (fd); }); + return; + } + { auto removePredicate = [=] (const std::pair>& cb) { return cb.first == fd; }; @@ -166,7 +181,23 @@ public: { if (fdAndCallback.first == fd) { - fdAndCallback.second (fd); + { + ScopedValueSetter insideFdReadCallback (shouldDeferModifyingReadCallbacks, true); + fdAndCallback.second (fd); + } + + if (! deferredReadCallbackModifications.empty()) + { + for (auto& deferredRegisterEvent : deferredReadCallbackModifications) + deferredRegisterEvent(); + + deferredReadCallbackModifications.clear(); + + // elements may have been removed from the fdReadCallbacks/pfds array so we really need + // to call poll again + return true; + } + eventWasSent = true; } } @@ -188,6 +219,9 @@ private: std::vector>> fdReadCallbacks; std::vector pfds; + + bool shouldDeferModifyingReadCallbacks = false; + std::vector> deferredReadCallbackModifications; }; JUCE_IMPLEMENT_SINGLETON (InternalRunLoop) diff --git a/modules/juce_graphics/colour/juce_Colour.cpp b/modules/juce_graphics/colour/juce_Colour.cpp index c9634ec9c0..2ea7d09a52 100644 --- a/modules/juce_graphics/colour/juce_Colour.cpp +++ b/modules/juce_graphics/colour/juce_Colour.cpp @@ -145,7 +145,10 @@ bool Colour::operator!= (const Colour& other) const noexcept { return argb.ge //============================================================================== Colour::Colour (const uint32 col) noexcept - : argb ((col >> 24) & 0xff, (col >> 16) & 0xff, (col >> 8) & 0xff, col & 0xff) + : argb (static_cast ((col >> 24) & 0xff), + static_cast ((col >> 16) & 0xff), + static_cast ((col >> 8) & 0xff), + static_cast (col & 0xff)) { } diff --git a/modules/juce_graphics/colour/juce_Colour.h b/modules/juce_graphics/colour/juce_Colour.h index 8117e9aee2..5032ac72ce 100644 --- a/modules/juce_graphics/colour/juce_Colour.h +++ b/modules/juce_graphics/colour/juce_Colour.h @@ -131,11 +131,10 @@ public: */ Colour (PixelAlpha alpha) noexcept; - /** Creates a colour using floating point hue, saturation and brightness values, and an 8-bit alpha. + /** Creates a colour using floating point hue, saturation, brightness and alpha values. - The floating point values must be between 0.0 and 1.0. - An alpha of 0x00 is completely transparent, alpha of 0xff is opaque. - Values outside the valid range will be clipped. + All values must be between 0.0 and 1.0. + Numbers outside the valid range will be clipped. */ static Colour fromHSV (float hue, float saturation, diff --git a/modules/juce_graphics/geometry/juce_AffineTransform.cpp b/modules/juce_graphics/geometry/juce_AffineTransform.cpp index 588253f091..ceb15deb6a 100644 --- a/modules/juce_graphics/geometry/juce_AffineTransform.cpp +++ b/modules/juce_graphics/geometry/juce_AffineTransform.cpp @@ -236,9 +236,46 @@ bool AffineTransform::isOnlyTranslation() const noexcept && mat11 == 1.0f; } +float AffineTransform::getDeterminant() const noexcept +{ + return (mat00 * mat11) - (mat01 * mat10); +} + float AffineTransform::getScaleFactor() const noexcept { return (std::abs (mat00) + std::abs (mat11)) / 2.0f; } + +//============================================================================== +//============================================================================== +#if JUCE_UNIT_TESTS + +class AffineTransformTests : public UnitTest +{ +public: + AffineTransformTests() + : UnitTest ("AffineTransform", UnitTestCategories::maths) + {} + + void runTest() override + { + beginTest ("Determinant"); + { + constexpr float scale1 = 1.5f, scale2 = 1.3f; + + auto transform = AffineTransform::scale (scale1) + .followedBy (AffineTransform::rotation (degreesToRadians (72.0f))) + .followedBy (AffineTransform::translation (100.0f, 20.0f)) + .followedBy (AffineTransform::scale (scale2)); + + expect (approximatelyEqual (std::sqrt (std::abs (transform.getDeterminant())), scale1 * scale2)); + } + } +}; + +static AffineTransformTests timeTests; + +#endif + } // namespace juce diff --git a/modules/juce_graphics/geometry/juce_AffineTransform.h b/modules/juce_graphics/geometry/juce_AffineTransform.h index 06452d4990..66b87d378a 100644 --- a/modules/juce_graphics/geometry/juce_AffineTransform.h +++ b/modules/juce_graphics/geometry/juce_AffineTransform.h @@ -264,11 +264,23 @@ public: */ float getTranslationY() const noexcept { return mat12; } - /** Returns the approximate scale factor by which lengths will be transformed. + /** Returns the determinant of the transform. */ + float getDeterminant() const noexcept; + + /** This method has been deprecated. + + You can calculate the scale factor using: + @code + std::sqrt (std::abs (AffineTransform::getDeterminant())) + @endcode + + This method produces incorrect values for transforms containing rotations. + + Returns the approximate scale factor by which lengths will be transformed. Obviously a length may be scaled by entirely different amounts depending on its direction, so this is only appropriate as a rough guide. */ - float getScaleFactor() const noexcept; + JUCE_DEPRECATED (float getScaleFactor() const noexcept); /* A ready-to-use identity transform - now deprecated. @deprecated If you need an identity transform, just use AffineTransform() or {}. diff --git a/modules/juce_graphics/geometry/juce_Point.h b/modules/juce_graphics/geometry/juce_Point.h index 3bf9c26606..e87906bb65 100644 --- a/modules/juce_graphics/geometry/juce_Point.h +++ b/modules/juce_graphics/geometry/juce_Point.h @@ -43,101 +43,101 @@ class Point { public: /** Creates a point at the origin */ - JUCE_CONSTEXPR Point() = default; + constexpr Point() = default; /** Creates a copy of another point. */ - JUCE_CONSTEXPR Point (const Point&) = default; + constexpr Point (const Point&) = default; /** Creates a point from an (x, y) position. */ - JUCE_CONSTEXPR Point (ValueType initialX, ValueType initialY) noexcept : x (initialX), y (initialY) {} + constexpr Point (ValueType initialX, ValueType initialY) noexcept : x (initialX), y (initialY) {} //============================================================================== /** Copies this point from another one. */ Point& operator= (const Point&) = default; - JUCE_CONSTEXPR inline bool operator== (Point other) const noexcept { return x == other.x && y == other.y; } - JUCE_CONSTEXPR inline bool operator!= (Point other) const noexcept { return x != other.x || y != other.y; } + constexpr inline bool operator== (Point other) const noexcept { return x == other.x && y == other.y; } + constexpr inline bool operator!= (Point other) const noexcept { return x != other.x || y != other.y; } /** Returns true if the point is (0, 0). */ - JUCE_CONSTEXPR bool isOrigin() const noexcept { return x == ValueType() && y == ValueType(); } + constexpr bool isOrigin() const noexcept { return x == ValueType() && y == ValueType(); } /** Returns true if the coordinates are finite values. */ - JUCE_CONSTEXPR inline bool isFinite() const noexcept { return juce_isfinite(x) && juce_isfinite(y); } + constexpr inline bool isFinite() const noexcept { return juce_isfinite(x) && juce_isfinite(y); } /** Returns the point's x coordinate. */ - JUCE_CONSTEXPR inline ValueType getX() const noexcept { return x; } + constexpr inline ValueType getX() const noexcept { return x; } /** Returns the point's y coordinate. */ - JUCE_CONSTEXPR inline ValueType getY() const noexcept { return y; } + constexpr inline ValueType getY() const noexcept { return y; } /** Sets the point's x coordinate. */ - inline void setX (ValueType newX) noexcept { x = newX; } + inline void setX (ValueType newX) noexcept { x = newX; } /** Sets the point's y coordinate. */ - inline void setY (ValueType newY) noexcept { y = newY; } + inline void setY (ValueType newY) noexcept { y = newY; } /** Returns a point which has the same Y position as this one, but a new X. */ - JUCE_CONSTEXPR Point withX (ValueType newX) const noexcept { return Point (newX, y); } + constexpr Point withX (ValueType newX) const noexcept { return Point (newX, y); } /** Returns a point which has the same X position as this one, but a new Y. */ - JUCE_CONSTEXPR Point withY (ValueType newY) const noexcept { return Point (x, newY); } + constexpr Point withY (ValueType newY) const noexcept { return Point (x, newY); } /** Changes the point's x and y coordinates. */ - void setXY (ValueType newX, ValueType newY) noexcept { x = newX; y = newY; } + void setXY (ValueType newX, ValueType newY) noexcept { x = newX; y = newY; } /** Adds a pair of coordinates to this value. */ - void addXY (ValueType xToAdd, ValueType yToAdd) noexcept { x += xToAdd; y += yToAdd; } + void addXY (ValueType xToAdd, ValueType yToAdd) noexcept { x += xToAdd; y += yToAdd; } //============================================================================== /** Returns a point with a given offset from this one. */ - JUCE_CONSTEXPR Point translated (ValueType deltaX, ValueType deltaY) const noexcept { return Point (x + deltaX, y + deltaY); } + constexpr Point translated (ValueType deltaX, ValueType deltaY) const noexcept { return Point (x + deltaX, y + deltaY); } /** Adds two points together */ - JUCE_CONSTEXPR Point operator+ (Point other) const noexcept { return Point (x + other.x, y + other.y); } + constexpr Point operator+ (Point other) const noexcept { return Point (x + other.x, y + other.y); } /** Adds another point's coordinates to this one */ - Point& operator+= (Point other) noexcept { x += other.x; y += other.y; return *this; } + Point& operator+= (Point other) noexcept { x += other.x; y += other.y; return *this; } /** Subtracts one points from another */ - JUCE_CONSTEXPR Point operator- (Point other) const noexcept { return Point (x - other.x, y - other.y); } + constexpr Point operator- (Point other) const noexcept { return Point (x - other.x, y - other.y); } /** Subtracts another point's coordinates to this one */ - Point& operator-= (Point other) noexcept { x -= other.x; y -= other.y; return *this; } + Point& operator-= (Point other) noexcept { x -= other.x; y -= other.y; return *this; } /** Multiplies two points together */ template - JUCE_CONSTEXPR Point operator* (Point other) const noexcept { return Point ((ValueType) (x * other.x), (ValueType) (y * other.y)); } + constexpr Point operator* (Point other) const noexcept { return Point ((ValueType) (x * other.x), (ValueType) (y * other.y)); } /** Multiplies another point's coordinates to this one */ template - Point& operator*= (Point other) noexcept { *this = *this * other; return *this; } + Point& operator*= (Point other) noexcept { *this = *this * other; return *this; } /** Divides one point by another */ template - JUCE_CONSTEXPR Point operator/ (Point other) const noexcept { return Point ((ValueType) (x / other.x), (ValueType) (y / other.y)); } + constexpr Point operator/ (Point other) const noexcept { return Point ((ValueType) (x / other.x), (ValueType) (y / other.y)); } /** Divides this point's coordinates by another */ template - Point& operator/= (Point other) noexcept { *this = *this / other; return *this; } + Point& operator/= (Point other) noexcept { *this = *this / other; return *this; } /** Returns a point whose coordinates are multiplied by a given scalar value. */ template - JUCE_CONSTEXPR Point operator* (FloatType multiplier) const noexcept { return Point ((ValueType) (x * multiplier), (ValueType) (y * multiplier)); } + constexpr Point operator* (FloatType multiplier) const noexcept { return Point ((ValueType) (x * multiplier), (ValueType) (y * multiplier)); } /** Returns a point whose coordinates are divided by a given scalar value. */ template - JUCE_CONSTEXPR Point operator/ (FloatType divisor) const noexcept { return Point ((ValueType) (x / divisor), (ValueType) (y / divisor)); } + constexpr Point operator/ (FloatType divisor) const noexcept { return Point ((ValueType) (x / divisor), (ValueType) (y / divisor)); } /** Multiplies the point's coordinates by a scalar value. */ template - Point& operator*= (FloatType multiplier) noexcept { x = (ValueType) (x * multiplier); y = (ValueType) (y * multiplier); return *this; } + Point& operator*= (FloatType multiplier) noexcept { x = (ValueType) (x * multiplier); y = (ValueType) (y * multiplier); return *this; } /** Divides the point's coordinates by a scalar value. */ template - Point& operator/= (FloatType divisor) noexcept { x = (ValueType) (x / divisor); y = (ValueType) (y / divisor); return *this; } + Point& operator/= (FloatType divisor) noexcept { x = (ValueType) (x / divisor); y = (ValueType) (y / divisor); return *this; } /** Returns the inverse of this point. */ - JUCE_CONSTEXPR Point operator-() const noexcept { return Point (-x, -y); } + constexpr Point operator-() const noexcept { return Point (-x, -y); } //============================================================================== /** This type will be double if the Point's type is double, otherwise it will be float. */ @@ -145,16 +145,16 @@ public: //============================================================================== /** Returns the straight-line distance between this point and the origin. */ - ValueType getDistanceFromOrigin() const noexcept { return juce_hypot (x, y); } + ValueType getDistanceFromOrigin() const noexcept { return juce_hypot (x, y); } /** Returns the straight-line distance between this point and another one. */ - ValueType getDistanceFrom (Point other) const noexcept { return juce_hypot (x - other.x, y - other.y); } + ValueType getDistanceFrom (Point other) const noexcept { return juce_hypot (x - other.x, y - other.y); } /** Returns the square of the straight-line distance between this point and the origin. */ - JUCE_CONSTEXPR ValueType getDistanceSquaredFromOrigin() const noexcept { return x * x + y * y; } + constexpr ValueType getDistanceSquaredFromOrigin() const noexcept { return x * x + y * y; } /** Returns the square of the straight-line distance between this point and another one. */ - JUCE_CONSTEXPR ValueType getDistanceSquaredFrom (Point other) const noexcept { return (*this - other).getDistanceSquaredFromOrigin(); } + constexpr ValueType getDistanceSquaredFrom (Point other) const noexcept { return (*this - other).getDistanceSquaredFromOrigin(); } /** Returns the angle from this point to another one. @@ -200,7 +200,7 @@ public: } /** Returns the dot-product of two points (x1 * x2 + y1 * y2). */ - JUCE_CONSTEXPR FloatType getDotProduct (Point other) const noexcept { return x * other.x + y * other.y; } + constexpr FloatType getDotProduct (Point other) const noexcept { return x * other.x + y * other.y; } //============================================================================== /** Uses a transform to change the point's coordinates. @@ -219,16 +219,16 @@ public: //============================================================================== /** Casts this point to a Point object. */ - JUCE_CONSTEXPR Point toInt() const noexcept { return Point (static_cast (x), static_cast (y)); } + constexpr Point toInt() const noexcept { return Point (static_cast (x), static_cast (y)); } /** Casts this point to a Point object. */ - JUCE_CONSTEXPR Point toFloat() const noexcept { return Point (static_cast (x), static_cast (y)); } + constexpr Point toFloat() const noexcept { return Point (static_cast (x), static_cast (y)); } /** Casts this point to a Point object. */ - JUCE_CONSTEXPR Point toDouble() const noexcept { return Point (static_cast (x), static_cast (y)); } + constexpr Point toDouble() const noexcept { return Point (static_cast (x), static_cast (y)); } /** Casts this point to a Point object using roundToInt() to convert the values. */ - JUCE_CONSTEXPR Point roundToInt() const noexcept { return Point (juce::roundToInt (x), juce::roundToInt (y)); } + constexpr Point roundToInt() const noexcept { return Point (juce::roundToInt (x), juce::roundToInt (y)); } /** Returns the point as a string in the form "x, y". */ String toString() const { return String (x) + ", " + String (y); } diff --git a/modules/juce_graphics/geometry/juce_Rectangle.h b/modules/juce_graphics/geometry/juce_Rectangle.h index 6c833c9766..5c9e2203a6 100644 --- a/modules/juce_graphics/geometry/juce_Rectangle.h +++ b/modules/juce_graphics/geometry/juce_Rectangle.h @@ -751,10 +751,11 @@ public: switch (inside) { - case 1 + 2 + 8: w = r - otherR; pos.x = otherR; return true; - case 1 + 2 + 4: h = b - otherB; pos.y = otherB; return true; - case 2 + 4 + 8: w = other.pos.x - pos.x; return true; - case 1 + 4 + 8: h = other.pos.y - pos.y; return true; + case 1 + 2 + 8: w = r - otherR; pos.x = otherR; return true; + case 1 + 2 + 4: h = b - otherB; pos.y = otherB; return true; + case 2 + 4 + 8: w = other.pos.x - pos.x; return true; + case 1 + 4 + 8: h = other.pos.y - pos.y; return true; + default: break; } return false; diff --git a/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp b/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp index 413e519e34..9f09dc4c9b 100644 --- a/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp +++ b/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp @@ -44,6 +44,10 @@ namespace jpeglibNamespace #pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wdeprecated-register" #pragma clang diagnostic ignored "-Wcast-align" + #pragma clang diagnostic ignored "-Wswitch-enum" + #if __has_warning ("-Wimplicit-fallthrough") + #pragma clang diagnostic ignored "-Wimplicit-fallthrough" + #endif #if __has_warning("-Wzero-as-null-pointer-constant") #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #endif @@ -57,8 +61,13 @@ namespace jpeglibNamespace #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" + #pragma GCC diagnostic ignored "-Wswitch-enum" + #pragma GCC diagnostic ignored "-Wswitch-default" #if __GNUC__ > 5 #pragma GCC diagnostic ignored "-Wshift-negative-value" + #if __GNUC__ >= 7 + #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" + #endif #endif #endif diff --git a/modules/juce_graphics/image_formats/juce_PNGLoader.cpp b/modules/juce_graphics/image_formats/juce_PNGLoader.cpp index 8afd94f287..2ecc6fef17 100644 --- a/modules/juce_graphics/image_formats/juce_PNGLoader.cpp +++ b/modules/juce_graphics/image_formats/juce_PNGLoader.cpp @@ -66,6 +66,9 @@ namespace pnglibNamespace #if JUCE_CLANG #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wsign-conversion" + #if __has_warning ("-Wimplicit-fallthrough") + #pragma clang diagnostic ignored "-Wimplicit-fallthrough" + #endif #if __has_warning("-Wzero-as-null-pointer-constant") #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #endif @@ -78,6 +81,9 @@ namespace pnglibNamespace #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" + #if __GNUC__ >= 7 + #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" + #endif #endif #undef check diff --git a/modules/juce_graphics/images/juce_Image.cpp b/modules/juce_graphics/images/juce_Image.cpp index b3ac8fe8fa..6c49f083f8 100644 --- a/modules/juce_graphics/images/juce_Image.cpp +++ b/modules/juce_graphics/images/juce_Image.cpp @@ -426,6 +426,7 @@ Colour Image::BitmapData::getPixelColour (int x, int y) const noexcept case Image::ARGB: return Colour ( ((const PixelARGB*) pixel)->getUnpremultiplied()); case Image::RGB: return Colour (*((const PixelRGB*) pixel)); case Image::SingleChannel: return Colour (*((const PixelAlpha*) pixel)); + case Image::UnknownFormat: default: jassertfalse; break; } @@ -444,6 +445,7 @@ void Image::BitmapData::setPixelColour (int x, int y, Colour colour) const noexc case Image::ARGB: ((PixelARGB*) pixel)->set (col); break; case Image::RGB: ((PixelRGB*) pixel)->set (col); break; case Image::SingleChannel: ((PixelAlpha*) pixel)->set (col); break; + case Image::UnknownFormat: default: jassertfalse; break; } } @@ -521,6 +523,7 @@ static void performPixelOp (const Image::BitmapData& data, const PixelOperation& case Image::ARGB: PixelIterator ::iterate (data, pixelOp); break; case Image::RGB: PixelIterator ::iterate (data, pixelOp); break; case Image::SingleChannel: PixelIterator::iterate (data, pixelOp); break; + case Image::UnknownFormat: default: jassertfalse; break; } } @@ -660,7 +663,7 @@ void Image::moveImageSection (int dx, int dy, auto dst = destData.getPixelPointer (dx - minX, dy - minY); auto src = destData.getPixelPointer (sx - minX, sy - minY); - auto lineSize = (size_t) (destData.pixelStride * w); + auto lineSize = (size_t) destData.pixelStride * (size_t) w; if (dy > sy) { diff --git a/modules/juce_graphics/juce_graphics.h b/modules/juce_graphics/juce_graphics.h index 87d08424f9..054be147d3 100644 --- a/modules/juce_graphics/juce_graphics.h +++ b/modules/juce_graphics/juce_graphics.h @@ -24,6 +24,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -33,18 +34,18 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_graphics - vendor: juce - version: 5.4.5 - name: JUCE graphics classes - description: Classes for 2D vector graphics, image loading/saving, font handling, etc. - website: http://www.juce.com/juce - license: GPL/Commercial + ID: juce_graphics + vendor: juce + version: 5.4.7 + name: JUCE graphics classes + description: Classes for 2D vector graphics, image loading/saving, font handling, etc. + website: http://www.juce.com/juce + license: GPL/Commercial - dependencies: juce_events - OSXFrameworks: Cocoa QuartzCore - iOSFrameworks: CoreGraphics CoreImage CoreText QuartzCore - linuxPackages: x11 xinerama xext freetype2 + dependencies: juce_events + OSXFrameworks: Cocoa QuartzCore + iOSFrameworks: CoreGraphics CoreImage CoreText QuartzCore + linuxPackages: x11 xinerama xext freetype2 END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_graphics/native/juce_RenderingHelpers.h b/modules/juce_graphics/native/juce_RenderingHelpers.h index 0d1ce924a8..d194f638ab 100644 --- a/modules/juce_graphics/native/juce_RenderingHelpers.h +++ b/modules/juce_graphics/native/juce_RenderingHelpers.h @@ -96,7 +96,7 @@ public: float getPhysicalPixelScaleFactor() const noexcept { - return isOnlyTranslated ? 1.0f : std::abs (complexTransform.getScaleFactor()); + return isOnlyTranslated ? 1.0f : std::sqrt (std::abs (complexTransform.getDeterminant())); } void moveOriginInDeviceSpace (Point delta) noexcept @@ -1426,6 +1426,8 @@ namespace EdgeTableFillers if (tiledFill) { TransformedImageFill r (destData, srcData, transform, alpha, quality); iter.iterate (r); } else { TransformedImageFill r (destData, srcData, transform, alpha, quality); iter.iterate (r); } break; + case Image::SingleChannel: + case Image::UnknownFormat: default: if (tiledFill) { TransformedImageFill r (destData, srcData, transform, alpha, quality); iter.iterate (r); } else { TransformedImageFill r (destData, srcData, transform, alpha, quality); iter.iterate (r); } @@ -1434,6 +1436,7 @@ namespace EdgeTableFillers break; case Image::RGB: + { switch (srcData.pixelFormat) { case Image::ARGB: @@ -1444,13 +1447,18 @@ namespace EdgeTableFillers if (tiledFill) { TransformedImageFill r (destData, srcData, transform, alpha, quality); iter.iterate (r); } else { TransformedImageFill r (destData, srcData, transform, alpha, quality); iter.iterate (r); } break; + case Image::SingleChannel: + case Image::UnknownFormat: default: if (tiledFill) { TransformedImageFill r (destData, srcData, transform, alpha, quality); iter.iterate (r); } else { TransformedImageFill r (destData, srcData, transform, alpha, quality); iter.iterate (r); } break; } break; + } + case Image::SingleChannel: + case Image::UnknownFormat: default: switch (srcData.pixelFormat) { @@ -1462,6 +1470,8 @@ namespace EdgeTableFillers if (tiledFill) { TransformedImageFill r (destData, srcData, transform, alpha, quality); iter.iterate (r); } else { TransformedImageFill r (destData, srcData, transform, alpha, quality); iter.iterate (r); } break; + case Image::SingleChannel: + case Image::UnknownFormat: default: if (tiledFill) { TransformedImageFill r (destData, srcData, transform, alpha, quality); iter.iterate (r); } else { TransformedImageFill r (destData, srcData, transform, alpha, quality); iter.iterate (r); } @@ -1487,6 +1497,8 @@ namespace EdgeTableFillers if (tiledFill) { ImageFill r (destData, srcData, alpha, x, y); iter.iterate (r); } else { ImageFill r (destData, srcData, alpha, x, y); iter.iterate (r); } break; + case Image::SingleChannel: + case Image::UnknownFormat: default: if (tiledFill) { ImageFill r (destData, srcData, alpha, x, y); iter.iterate (r); } else { ImageFill r (destData, srcData, alpha, x, y); iter.iterate (r); } @@ -1505,6 +1517,8 @@ namespace EdgeTableFillers if (tiledFill) { ImageFill r (destData, srcData, alpha, x, y); iter.iterate (r); } else { ImageFill r (destData, srcData, alpha, x, y); iter.iterate (r); } break; + case Image::SingleChannel: + case Image::UnknownFormat: default: if (tiledFill) { ImageFill r (destData, srcData, alpha, x, y); iter.iterate (r); } else { ImageFill r (destData, srcData, alpha, x, y); iter.iterate (r); } @@ -1512,6 +1526,8 @@ namespace EdgeTableFillers } break; + case Image::SingleChannel: + case Image::UnknownFormat: default: switch (srcData.pixelFormat) { @@ -1523,6 +1539,8 @@ namespace EdgeTableFillers if (tiledFill) { ImageFill r (destData, srcData, alpha, x, y); iter.iterate (r); } else { ImageFill r (destData, srcData, alpha, x, y); iter.iterate (r); } break; + case Image::SingleChannel: + case Image::UnknownFormat: default: if (tiledFill) { ImageFill r (destData, srcData, alpha, x, y); iter.iterate (r); } else { ImageFill r (destData, srcData, alpha, x, y); iter.iterate (r); } @@ -2589,6 +2607,8 @@ public: { case Image::ARGB: EdgeTableFillers::renderSolidFill (iter, destData, colour, replaceContents, (PixelARGB*) nullptr); break; case Image::RGB: EdgeTableFillers::renderSolidFill (iter, destData, colour, replaceContents, (PixelRGB*) nullptr); break; + case Image::SingleChannel: + case Image::UnknownFormat: default: EdgeTableFillers::renderSolidFill (iter, destData, colour, replaceContents, (PixelAlpha*) nullptr); break; } } @@ -2606,6 +2626,8 @@ public: { case Image::ARGB: EdgeTableFillers::renderGradient (iter, destData, gradient, trans, lookupTable, numLookupEntries, isIdentity, (PixelARGB*) nullptr); break; case Image::RGB: EdgeTableFillers::renderGradient (iter, destData, gradient, trans, lookupTable, numLookupEntries, isIdentity, (PixelRGB*) nullptr); break; + case Image::SingleChannel: + case Image::UnknownFormat: default: EdgeTableFillers::renderGradient (iter, destData, gradient, trans, lookupTable, numLookupEntries, isIdentity, (PixelAlpha*) nullptr); break; } } diff --git a/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm b/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm index 26aeb8a2c5..3f87574eaa 100644 --- a/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm +++ b/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm @@ -28,10 +28,13 @@ namespace juce { //============================================================================== -class CoreGraphicsImage : public ImagePixelData +// This class has been renamed from CoreGraphicsImage to avoid a symbol +// collision in Pro Tools 2019.12 and possibly 2020 depending on the Pro Tools +// release schedule. +class CoreGraphicsPixelData : public ImagePixelData { public: - CoreGraphicsImage (const Image::PixelFormat format, int w, int h, bool clearImage) + CoreGraphicsPixelData (const Image::PixelFormat format, int w, int h, bool clearImage) : ImagePixelData (format, w, h) { pixelStride = format == Image::RGB ? 3 : ((format == Image::ARGB) ? 4 : 1); @@ -57,7 +60,7 @@ public: CGColorSpaceRelease (colourSpace); } - ~CoreGraphicsImage() override + ~CoreGraphicsPixelData() override { freeCachedImageRef(); CGContextRelease (context); @@ -86,7 +89,7 @@ public: ImagePixelData::Ptr clone() override { - auto im = new CoreGraphicsImage (pixelFormat, width, height, false); + auto im = new CoreGraphicsPixelData (pixelFormat, width, height, false); memcpy (im->imageDataHolder->data, imageDataHolder->data, (size_t) (lineStride * height)); return *im; } @@ -96,7 +99,7 @@ public: //============================================================================== static CGImageRef getCachedImageRef (const Image& juceImage, CGColorSpaceRef colourSpace) { - auto cgim = dynamic_cast (juceImage.getPixelData()); + auto cgim = dynamic_cast (juceImage.getPixelData()); if (cgim != nullptr && cgim->cachedImageRef != nullptr) { @@ -127,7 +130,7 @@ public: { auto* imageDataContainer = [](const Image& img) -> HeapBlockContainer::Ptr* { - if (auto* cgim = dynamic_cast (img.getPixelData())) + if (auto* cgim = dynamic_cast (img.getPixelData())) return new HeapBlockContainer::Ptr (cgim->imageDataHolder); return nullptr; @@ -183,12 +186,12 @@ private: #endif } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CoreGraphicsImage) + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CoreGraphicsPixelData) }; ImagePixelData::Ptr NativeImageType::create (Image::PixelFormat format, int width, int height, bool clearImage) const { - return *new CoreGraphicsImage (format == Image::RGB ? Image::ARGB : format, width, height, clearImage); + return *new CoreGraphicsPixelData (format == Image::RGB ? Image::ARGB : format, width, height, clearImage); } //============================================================================== @@ -326,7 +329,7 @@ void CoreGraphicsContext::clipToImageAlpha (const Image& sourceImage, const Affi if (sourceImage.getFormat() != Image::SingleChannel) singleChannelImage = sourceImage.convertedToFormat (Image::SingleChannel); - CGImageRef image = CoreGraphicsImage::createImage (singleChannelImage, greyColourSpace, true); + CGImageRef image = CoreGraphicsPixelData::createImage (singleChannelImage, greyColourSpace, true); flip(); auto t = AffineTransform::verticalFlip (sourceImage.getHeight()).followedBy (transform); @@ -524,7 +527,7 @@ void CoreGraphicsContext::drawImage (const Image& sourceImage, const AffineTrans auto colourSpace = sourceImage.getFormat() == Image::PixelFormat::SingleChannel ? greyColourSpace : rgbColourSpace; - CGImageRef image = CoreGraphicsImage::getCachedImageRef (sourceImage, colourSpace); + CGImageRef image = CoreGraphicsPixelData::getCachedImageRef (sourceImage, colourSpace); CGContextSaveGState (context); CGContextSetAlpha (context, state->fillType.getOpacity()); @@ -887,8 +890,8 @@ Image juce_loadWithCoreImage (InputStream& input) (int) CGImageGetHeight (loadedImage), hasAlphaChan)); - auto cgImage = dynamic_cast (image.getPixelData()); - jassert (cgImage != nullptr); // if USE_COREGRAPHICS_RENDERING is set, the CoreGraphicsImage class should have been used. + auto cgImage = dynamic_cast (image.getPixelData()); + jassert (cgImage != nullptr); // if USE_COREGRAPHICS_RENDERING is set, the CoreGraphicsPixelData class should have been used. CGContextDrawImage (cgImage->context, convertToCGRect (image.getBounds()), loadedImage); CGContextFlush (cgImage->context); @@ -912,7 +915,7 @@ Image juce_loadWithCoreImage (InputStream& input) Image juce_createImageFromCIImage (CIImage*, int, int); Image juce_createImageFromCIImage (CIImage* im, int w, int h) { - auto cgImage = new CoreGraphicsImage (Image::ARGB, w, h, false); + auto cgImage = new CoreGraphicsPixelData (Image::ARGB, w, h, false); CIContext* cic = [CIContext contextWithCGContext: cgImage->context options: nil]; [cic drawImage: im inRect: CGRectMake (0, 0, w, h) fromRect: CGRectMake (0, 0, w, h)]; @@ -924,12 +927,12 @@ Image juce_createImageFromCIImage (CIImage* im, int w, int h) CGImageRef juce_createCoreGraphicsImage (const Image& juceImage, CGColorSpaceRef colourSpace, const bool mustOutliveSource) { - return CoreGraphicsImage::createImage (juceImage, colourSpace, mustOutliveSource); + return CoreGraphicsPixelData::createImage (juceImage, colourSpace, mustOutliveSource); } CGContextRef juce_getImageContext (const Image& image) { - if (auto cgi = dynamic_cast (image.getPixelData())) + if (auto cgi = dynamic_cast (image.getPixelData())) return cgi->context; jassertfalse; diff --git a/modules/juce_graphics/native/juce_mac_Fonts.mm b/modules/juce_graphics/native/juce_mac_Fonts.mm index 12b4e25dd9..484a5d3efb 100644 --- a/modules/juce_graphics/native/juce_mac_Fonts.mm +++ b/modules/juce_graphics/native/juce_mac_Fonts.mm @@ -189,6 +189,7 @@ namespace CoreTextTypeLayout { case AttributedString::none: return kCTLineBreakByClipping; case AttributedString::byChar: return kCTLineBreakByCharWrapping; + case AttributedString::byWord: default: return kCTLineBreakByWordWrapping; } } @@ -199,6 +200,7 @@ namespace CoreTextTypeLayout { case AttributedString::rightToLeft: return kCTWritingDirectionRightToLeft; case AttributedString::leftToRight: return kCTWritingDirectionLeftToRight; + case AttributedString::natural: default: return kCTWritingDirectionNatural; } } @@ -584,10 +586,24 @@ public: CFRelease (numberRef); } - // The implementation of at least one overridden function needs to be outside - // of the class definition to avoid spurious warning messages when dynamically - // loading libraries at runtime on macOS... - ~OSXTypeface() override; + ~OSXTypeface() override + { + if (attributedStringAtts != nullptr) + CFRelease (attributedStringAtts); + + if (fontRef != nullptr) + { + #if JUCE_MAC && defined (MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 + if (dataCopy.getSize() != 0) + CTFontManagerUnregisterGraphicsFont (fontRef, nullptr); + #endif + + CGFontRelease (fontRef); + } + + if (ctFontRef != nullptr) + CFRelease (ctFontRef); + } float getAscent() const override { return ascent; } float getDescent() const override { return 1.0f - ascent; } @@ -717,25 +733,6 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OSXTypeface) }; -OSXTypeface::~OSXTypeface() -{ - if (attributedStringAtts != nullptr) - CFRelease (attributedStringAtts); - - if (fontRef != nullptr) - { - #if JUCE_MAC && defined (MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 - if (dataCopy.getSize() != 0) - CTFontManagerUnregisterGraphicsFont (fontRef, nullptr); - #endif - - CGFontRelease (fontRef); - } - - if (ctFontRef != nullptr) - CFRelease (ctFontRef); -} - CTFontRef getCTFontFromTypeface (const Font& f) { if (auto* tf = dynamic_cast (f.getTypeface())) diff --git a/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp b/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp index 3913247b69..be79b6d41f 100644 --- a/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp +++ b/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp @@ -580,7 +580,7 @@ void Direct2DLowLevelGraphicsContext::addTransform (const AffineTransform& trans float Direct2DLowLevelGraphicsContext::getPhysicalPixelScaleFactor() { - return currentState->transform.getScaleFactor(); + return std::sqrt (std::abs (currentState->transform.getDeterminant())); } bool Direct2DLowLevelGraphicsContext::clipToRectangle (const Rectangle& r) diff --git a/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp b/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp index 6e8facbcb0..cc2b4f8a31 100644 --- a/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp +++ b/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp @@ -48,13 +48,13 @@ namespace DirectWriteTypeLayout return ComBaseClassHelper::QueryInterface (refId, result); } - JUCE_COMRESULT IsPixelSnappingDisabled (void* /*clientDrawingContext*/, BOOL* isDisabled) override + JUCE_COMRESULT IsPixelSnappingDisabled (void* /*clientDrawingContext*/, BOOL* isDisabled) noexcept override { *isDisabled = FALSE; return S_OK; } - JUCE_COMRESULT GetCurrentTransform (void*, DWRITE_MATRIX* matrix) override + JUCE_COMRESULT GetCurrentTransform (void*, DWRITE_MATRIX* matrix) noexcept override { matrix->m11 = 1.0f; matrix->m12 = 0.0f; matrix->m21 = 0.0f; matrix->m22 = 1.0f; @@ -62,30 +62,30 @@ namespace DirectWriteTypeLayout return S_OK; } - JUCE_COMRESULT GetPixelsPerDip (void*, FLOAT* pixelsPerDip) override + JUCE_COMRESULT GetPixelsPerDip (void*, FLOAT* pixelsPerDip) noexcept override { *pixelsPerDip = 1.0f; return S_OK; } - JUCE_COMRESULT DrawUnderline (void*, FLOAT, FLOAT, DWRITE_UNDERLINE const*, IUnknown*) override + JUCE_COMRESULT DrawUnderline (void*, FLOAT, FLOAT, DWRITE_UNDERLINE const*, IUnknown*) noexcept override { return E_NOTIMPL; } - JUCE_COMRESULT DrawStrikethrough (void*, FLOAT, FLOAT, DWRITE_STRIKETHROUGH const*, IUnknown*) override + JUCE_COMRESULT DrawStrikethrough (void*, FLOAT, FLOAT, DWRITE_STRIKETHROUGH const*, IUnknown*) noexcept override { return E_NOTIMPL; } - JUCE_COMRESULT DrawInlineObject (void*, FLOAT, FLOAT, IDWriteInlineObject*, BOOL, BOOL, IUnknown*) override + JUCE_COMRESULT DrawInlineObject (void*, FLOAT, FLOAT, IDWriteInlineObject*, BOOL, BOOL, IUnknown*) noexcept override { return E_NOTIMPL; } JUCE_COMRESULT DrawGlyphRun (void* clientDrawingContext, FLOAT baselineOriginX, FLOAT baselineOriginY, DWRITE_MEASURING_MODE, DWRITE_GLYPH_RUN const* glyphRun, DWRITE_GLYPH_RUN_DESCRIPTION const* runDescription, - IUnknown* clientDrawingEffect) override + IUnknown* clientDrawingEffect) noexcept override { auto layout = static_cast (clientDrawingContext); @@ -207,7 +207,7 @@ namespace DirectWriteTypeLayout DWRITE_FONT_METRICS dwFontMetrics; dwFontFace->GetMetrics (&dwFontMetrics); - const float totalHeight = (float) (std::abs (dwFontMetrics.ascent) + std::abs (dwFontMetrics.descent)); + const float totalHeight = (float) (dwFontMetrics.ascent + dwFontMetrics.descent); return dwFontMetrics.designUnitsPerEm / totalHeight; } diff --git a/modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp b/modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp index b4d53b44b3..7ffea03a56 100644 --- a/modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp +++ b/modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp @@ -285,7 +285,7 @@ private: { PathGeometrySink() : ComBaseClassHelper (0) {} - void __stdcall AddBeziers (const D2D1_BEZIER_SEGMENT* beziers, UINT beziersCount) override + void __stdcall AddBeziers (const D2D1_BEZIER_SEGMENT* beziers, UINT beziersCount) noexcept override { for (UINT i = 0; i < beziersCount; ++i) path.cubicTo (convertPoint (beziers[i].point1), @@ -293,30 +293,30 @@ private: convertPoint (beziers[i].point3)); } - void __stdcall AddLines (const D2D1_POINT_2F* points, UINT pointsCount) override + void __stdcall AddLines (const D2D1_POINT_2F* points, UINT pointsCount) noexcept override { for (UINT i = 0; i < pointsCount; ++i) path.lineTo (convertPoint (points[i])); } - void __stdcall BeginFigure (D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN) override + void __stdcall BeginFigure (D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN) noexcept override { path.startNewSubPath (convertPoint (startPoint)); } - void __stdcall EndFigure (D2D1_FIGURE_END figureEnd) override + void __stdcall EndFigure (D2D1_FIGURE_END figureEnd) noexcept override { if (figureEnd == D2D1_FIGURE_END_CLOSED) path.closeSubPath(); } - void __stdcall SetFillMode (D2D1_FILL_MODE fillMode) override + void __stdcall SetFillMode (D2D1_FILL_MODE fillMode) noexcept override { path.setUsingNonZeroWinding (fillMode == D2D1_FILL_MODE_WINDING); } - void __stdcall SetSegmentFlags (D2D1_PATH_SEGMENT) override {} - JUCE_COMRESULT Close() override { return S_OK; } + void __stdcall SetSegmentFlags (D2D1_PATH_SEGMENT) noexcept override {} + JUCE_COMRESULT Close() noexcept override { return S_OK; } Path path; diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index d7734de4d2..67d6445dec 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -1300,7 +1300,8 @@ float Component::getApproximateScaleFactorForComponent (Component* targetCompone transform = transform.scaled (target->getDesktopScaleFactor()); } - return (transform.getScaleFactor() / Desktop::getInstance().getGlobalScaleFactor()); + auto transformScale = std::sqrt (std::abs (transform.getDeterminant())); + return transformScale / Desktop::getInstance().getGlobalScaleFactor(); } //============================================================================== diff --git a/modules/juce_gui_basics/drawables/juce_SVGParser.cpp b/modules/juce_gui_basics/drawables/juce_SVGParser.cpp index d425a89308..cdaec0206e 100644 --- a/modules/juce_gui_basics/drawables/juce_SVGParser.cpp +++ b/modules/juce_gui_basics/drawables/juce_SVGParser.cpp @@ -1024,7 +1024,8 @@ private: float getStrokeWidth (const String& strokeWidth) const noexcept { - return transform.getScaleFactor() * getCoordLength (strokeWidth, viewBoxW); + auto transformScale = std::sqrt (std::abs (transform.getDeterminant())); + return transformScale * getCoordLength (strokeWidth, viewBoxW); } PathStrokeType getStrokeFor (const XmlPath& xml) const @@ -1197,7 +1198,7 @@ private: auto linkedFile = originalFile.getParentDirectory().getChildFile (link); if (linkedFile.existsAsFile()) - inputStream.reset (linkedFile.createInputStream()); + inputStream = linkedFile.createInputStream(); } if (inputStream != nullptr) diff --git a/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp b/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp index ac2c443096..c2befcbb3e 100644 --- a/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp @@ -27,7 +27,7 @@ namespace juce { -#if JUCE_IOS || JUCE_ANDROID +#if JUCE_CONTENT_SHARING //============================================================================== class ContentSharer::PrepareImagesThread : private Thread { @@ -154,7 +154,7 @@ ContentSharer::~ContentSharer() { clearSingletonInstance(); } void ContentSharer::shareFiles (const Array& files, std::function callbackToUse) { - #if JUCE_IOS || JUCE_ANDROID + #if JUCE_CONTENT_SHARING startNewShare (callbackToUse); pimpl->shareFiles (files); #else @@ -168,7 +168,7 @@ void ContentSharer::shareFiles (const Array& files, #endif } -#if JUCE_IOS || JUCE_ANDROID +#if JUCE_CONTENT_SHARING void ContentSharer::startNewShare (std::function callbackToUse) { // You should not start another sharing operation before the previous one is finished. @@ -192,7 +192,7 @@ void ContentSharer::startNewShare (std::function call void ContentSharer::shareText (const String& text, std::function callbackToUse) { - #if JUCE_IOS || JUCE_ANDROID + #if JUCE_CONTENT_SHARING startNewShare (callbackToUse); pimpl->shareText (text); #else @@ -210,7 +210,7 @@ void ContentSharer::shareImages (const Array& images, std::function callbackToUse, ImageFileFormat* imageFileFormatToUse) { - #if JUCE_IOS || JUCE_ANDROID + #if JUCE_CONTENT_SHARING startNewShare (callbackToUse); prepareImagesThread.reset (new PrepareImagesThread (*this, images, imageFileFormatToUse)); #else @@ -224,7 +224,7 @@ void ContentSharer::shareImages (const Array& images, #endif } -#if JUCE_IOS || JUCE_ANDROID +#if JUCE_CONTENT_SHARING void ContentSharer::filesToSharePrepared() { Array urls; @@ -242,7 +242,7 @@ void ContentSharer::filesToSharePrepared() void ContentSharer::shareData (const MemoryBlock& mb, std::function callbackToUse) { - #if JUCE_IOS || JUCE_ANDROID + #if JUCE_CONTENT_SHARING startNewShare (callbackToUse); prepareDataThread.reset (new PrepareDataThread (*this, mb)); #else @@ -262,7 +262,7 @@ void ContentSharer::sharingFinished (bool succeeded, const String& errorDescript String error (errorDescription); - #if JUCE_IOS || JUCE_ANDROID + #if JUCE_CONTENT_SHARING pimpl.reset(); #endif diff --git a/modules/juce_gui_basics/filebrowser/juce_ContentSharer.h b/modules/juce_gui_basics/filebrowser/juce_ContentSharer.h index a486c2b3cb..2b48b33571 100644 --- a/modules/juce_gui_basics/filebrowser/juce_ContentSharer.h +++ b/modules/juce_gui_basics/filebrowser/juce_ContentSharer.h @@ -110,7 +110,7 @@ private: std::function callback; - #if JUCE_IOS || JUCE_ANDROID + #if JUCE_CONTENT_SHARING struct Pimpl { virtual ~Pimpl() {} diff --git a/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp index f1a3c300cb..351d4b5b0a 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp @@ -27,8 +27,6 @@ namespace juce { -Image juce_createIconForFile (const File&); - //============================================================================== class FileListTreeItem : public TreeViewItem, private TimeSliceClient, @@ -118,8 +116,7 @@ public: { removeSubContentsList(); - OptionalScopedPointer newPointer (newList, canDeleteList); - subContentsList = newPointer; + subContentsList = OptionalScopedPointer (newList, canDeleteList); newList->addChangeListener (this); } diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp index 478dd37f7a..48cbe1845c 100644 --- a/modules/juce_gui_basics/juce_gui_basics.cpp +++ b/modules/juce_gui_basics/juce_gui_basics.cpp @@ -71,25 +71,21 @@ #include #endif - #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + #if JUCE_MINGW + #include + #elif ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES #pragma comment(lib, "vfw32.lib") #pragma comment(lib, "imm32.lib") - #endif - #if JUCE_OPENGL - #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + #if JUCE_OPENGL #pragma comment(lib, "OpenGL32.Lib") #pragma comment(lib, "GlU32.Lib") #endif - #endif - #if JUCE_DIRECT2D && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - #pragma comment (lib, "Dwrite.lib") - #pragma comment (lib, "D2d1.lib") - #endif - - #if JUCE_MINGW - #include + #if JUCE_DIRECT2D + #pragma comment (lib, "Dwrite.lib") + #pragma comment (lib, "D2d1.lib") + #endif #endif //============================================================================== @@ -267,10 +263,8 @@ namespace juce #include "misc/juce_JUCESplashScreen.cpp" #include "layout/juce_FlexBox.cpp" -#if JUCE_HAS_CONSTEXPR - #include "layout/juce_GridItem.cpp" - #include "layout/juce_Grid.cpp" -#endif +#include "layout/juce_GridItem.cpp" +#include "layout/juce_Grid.cpp" #if JUCE_IOS || JUCE_WINDOWS #include "native/juce_MultiTouchMapper.h" @@ -287,7 +281,11 @@ namespace juce #include "native/juce_ios_UIViewComponentPeer.mm" #include "native/juce_ios_Windowing.mm" #include "native/juce_ios_FileChooser.mm" - #include "native/juce_ios_ContentSharer.cpp" + + #if JUCE_CONTENT_SHARING + #include "native/juce_ios_ContentSharer.cpp" + #endif + #else #include "native/juce_mac_NSViewComponentPeer.mm" #include "native/juce_mac_Windowing.mm" @@ -327,6 +325,9 @@ namespace juce #include "native/juce_android_Windowing.cpp" #include "native/juce_common_MimeTypes.cpp" #include "native/juce_android_FileChooser.cpp" - #include "native/juce_android_ContentSharer.cpp" + + #if JUCE_CONTENT_SHARING + #include "native/juce_android_ContentSharer.cpp" + #endif #endif diff --git a/modules/juce_gui_basics/juce_gui_basics.h b/modules/juce_gui_basics/juce_gui_basics.h index e6c0b74afd..9133d8da93 100644 --- a/modules/juce_gui_basics/juce_gui_basics.h +++ b/modules/juce_gui_basics/juce_gui_basics.h @@ -24,6 +24,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -33,18 +34,18 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_gui_basics - vendor: juce - version: 5.4.5 - name: JUCE GUI core classes - description: Basic user-interface components and related classes. - website: http://www.juce.com/juce - license: GPL/Commercial + ID: juce_gui_basics + vendor: juce + version: 5.4.7 + name: JUCE GUI core classes + description: Basic user-interface components and related classes. + website: http://www.juce.com/juce + license: GPL/Commercial - dependencies: juce_graphics juce_data_structures - OSXFrameworks: Cocoa Carbon QuartzCore - iOSFrameworks: UIKit MobileCoreServices - linuxPackages: x11 xinerama xext + dependencies: juce_graphics juce_data_structures + OSXFrameworks: Cocoa Carbon QuartzCore + iOSFrameworks: UIKit MobileCoreServices + linuxPackages: x11 xinerama xext END_JUCE_MODULE_DECLARATION @@ -158,9 +159,7 @@ namespace juce class Displays; class FlexBox; - #if JUCE_HAS_CONSTEXPR - class Grid; - #endif + class Grid; } #include "mouse/juce_MouseCursor.h" @@ -304,7 +303,5 @@ namespace juce #include "layout/juce_FlexItem.h" #include "layout/juce_FlexBox.h" -#if JUCE_HAS_CONSTEXPR - #include "layout/juce_GridItem.h" - #include "layout/juce_Grid.h" -#endif +#include "layout/juce_GridItem.h" +#include "layout/juce_Grid.h" diff --git a/modules/juce_gui_basics/keyboard/juce_KeyPress.h b/modules/juce_gui_basics/keyboard/juce_KeyPress.h index d9ed426631..22bfccdf61 100644 --- a/modules/juce_gui_basics/keyboard/juce_KeyPress.h +++ b/modules/juce_gui_basics/keyboard/juce_KeyPress.h @@ -135,7 +135,7 @@ public: //============================================================================== /** Converts a textual key description to a KeyPress. - This attempts to decode a textual version of a keypress, e.g. "CTRL + C" or "SPACE". + This attempts to decode a textual version of a keypress, e.g. "ctrl + c" or "spacebar". This isn't designed to cope with any kind of input, but should be given the strings that are created by the getTextDescription() method. @@ -148,7 +148,7 @@ public: /** Creates a textual description of the key combination. - e.g. "CTRL + C" or "DELETE". + e.g. "ctrl + c" or "delete". To store a keypress in a file, use this method, along with createFromDescription() to retrieve it later. diff --git a/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp b/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp index 9306a1c88e..bdfc4f5fa6 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp +++ b/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp @@ -176,8 +176,8 @@ public: void paint (Graphics& g) override { g.setOpacity (1.0f); - g.drawImageTransformed (image, AffineTransform::scale (getWidth() / (float) image.getWidth(), - getHeight() / (float) image.getHeight()), false); + g.drawImageTransformed (image, AffineTransform::scale (getWidth() / (float) jmax (1, image.getWidth()), + getHeight() / (float) jmax (1, image.getHeight())), false); } private: diff --git a/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp b/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp index 685c79fef9..30ca8151a3 100644 --- a/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp +++ b/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp @@ -255,10 +255,13 @@ public: void mouseDrag (const MouseEvent& e) override { - ConcertinaPanel& panel = getPanel(); - panel.setLayout (dragStartSizes.withMovedPanel (panel.holders.indexOf (this), - mouseDownY + e.getDistanceFromDragStartY(), - panel.getHeight()), false); + if (e.mouseWasDraggedSinceMouseDown()) + { + auto& panel = getPanel(); + panel.setLayout (dragStartSizes.withMovedPanel (panel.holders.indexOf (this), + mouseDownY + e.getDistanceFromDragStartY(), + panel.getHeight()), false); + } } void mouseDoubleClick (const MouseEvent&) override diff --git a/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h b/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h index 4939336dc1..b598ad1a27 100644 --- a/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h +++ b/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h @@ -105,7 +105,7 @@ public: }; //============================================================================== - /** Creates a Zone from a combination of the flags in \enum Zones. */ + /** Creates a Zone from a combination of the flags in zoneFlags. */ explicit Zone (int zoneFlags) noexcept; Zone() noexcept; diff --git a/modules/juce_gui_basics/layout/juce_SidePanel.cpp b/modules/juce_gui_basics/layout/juce_SidePanel.cpp index e674a52d33..04a10dbb47 100644 --- a/modules/juce_gui_basics/layout/juce_SidePanel.cpp +++ b/modules/juce_gui_basics/layout/juce_SidePanel.cpp @@ -245,7 +245,7 @@ void SidePanel::componentMovedOrResized (Component& component, bool wasMoved, bo Rectangle SidePanel::calculateBoundsInParent (Component& parentComp) const { - auto parentBounds = parentComp.getBounds(); + auto parentBounds = parentComp.getLocalBounds(); if (isOnLeft) { diff --git a/modules/juce_gui_basics/layout/juce_TabbedComponent.cpp b/modules/juce_gui_basics/layout/juce_TabbedComponent.cpp index 437c497dfa..8d52d773e7 100644 --- a/modules/juce_gui_basics/layout/juce_TabbedComponent.cpp +++ b/modules/juce_gui_basics/layout/juce_TabbedComponent.cpp @@ -86,7 +86,6 @@ struct TabbedComponent::ButtonBar : public TabbedButtonBar JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ButtonBar) }; - //============================================================================== TabbedComponent::TabbedComponent (TabbedButtonBar::Orientation orientation) { diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp index 1818f73f99..d71d6e6d67 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -2143,6 +2143,7 @@ void LookAndFeel_V2::createTabButtonShape (TabBarButton& button, Path& p, bool / p.lineTo (-overhang, -overhang); break; + case TabbedButtonBar::TabsAtTop: default: p.startNewSubPath (0.0f, h); p.lineTo (indent, 0.0f); diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp index 582d6da58b..cf871d118e 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp @@ -55,7 +55,10 @@ struct HeaderItemComponent : public PopupMenu::CustomComponent setName (name); } - void paint (Graphics& g) override; + void paint (Graphics& g) override + { + getLookAndFeel().drawPopupMenuSectionHeader (g, getLocalBounds(), getName()); + } void getIdealSize (int& idealWidth, int& idealHeight) override { @@ -94,7 +97,13 @@ struct ItemComponent : public Component addMouseListener (&parent, false); } - ~ItemComponent() override; + ~ItemComponent() override + { + if (customComp != nullptr) + setItem (*customComp, nullptr); + + removeChildComponent (customComp.get()); + } void getIdealSize (int& idealWidth, int& idealHeight, const int standardItemHeight) { @@ -220,9 +229,9 @@ struct MenuWindow : public Component setOpaque (lf.findColour (PopupMenu::backgroundColourId).isOpaque() || ! Desktop::canUseSemiTransparentWindows()); - for (size_t i = 0; i < menu.items.size(); ++i) + for (int i = 0; i < menu.items.size(); ++i) { - auto& item = menu.items[i]; + auto& item = menu.items.getReference (i); if (i + 1 < menu.items.size() || ! item.isSeparator) items.add (new ItemComponent (item, options.getStandardItemHeight(), *this)); @@ -264,7 +273,13 @@ struct MenuWindow : public Component getMouseState (Desktop::getInstance().getMainMouseSource()); // forces creation of a mouse source watcher for the main mouse } - ~MenuWindow() override; + ~MenuWindow() override + { + getActiveWindows().removeFirstMatchingValue (this); + Desktop::getInstance().removeGlobalMouseListener (this); + activeSubMenu.reset(); + items.clear(); + } //============================================================================== void paint (Graphics& g) override @@ -400,7 +415,7 @@ struct MenuWindow : public Component if (showSubMenuFor (currentChild)) { if (isSubMenuVisible()) - activeSubMenu->selectNextItem (1); + activeSubMenu->selectNextItem (0); } else if (componentAttachedTo != nullptr) { @@ -595,7 +610,7 @@ struct MenuWindow : public Component if (relativeTo != nullptr) targetPoint = relativeTo->localPointToGlobal (targetPoint); - auto parentArea = Desktop::getInstance().getDisplays().findDisplayForPoint (targetPoint) + auto parentArea = Desktop::getInstance().getDisplays().findDisplayForPoint (targetPoint * scaleFactor) #if JUCE_MAC || JUCE_ANDROID .userArea; #else @@ -998,7 +1013,14 @@ public: startTimerHz (20); } - void handleMouseEvent (const MouseEvent& e); + void handleMouseEvent (const MouseEvent& e) + { + if (! window.windowIsStillValid()) + return; + + startTimerHz (20); + handleMousePosition (e.getScreenPosition()); + } void timerCallback() override { @@ -1228,7 +1250,11 @@ struct NormalComponentWrapper : public PopupMenu::CustomComponent addAndMakeVisible (comp); } - void getIdealSize (int& idealWidth, int& idealHeight) override; + void getIdealSize (int& idealWidth, int& idealHeight) override + { + idealWidth = width; + idealHeight = height; + } void resized() override { @@ -1243,49 +1269,7 @@ struct NormalComponentWrapper : public PopupMenu::CustomComponent }; -// The following implementations are outside of the class definitions to avoid spurious -// warning messages when dynamically loading libraries at runtime on macOS -void PopupMenu::HelperClasses::HeaderItemComponent::paint (Graphics& g) -{ - getLookAndFeel().drawPopupMenuSectionHeader (g, getLocalBounds(), getName()); -} - -PopupMenu::HelperClasses::ItemComponent::~ItemComponent() -{ - if (customComp != nullptr) - setItem (*customComp, nullptr); - - removeChildComponent (customComp.get()); -} - -PopupMenu::HelperClasses::MenuWindow::~MenuWindow() -{ - getActiveWindows().removeFirstMatchingValue (this); - Desktop::getInstance().removeGlobalMouseListener (this); - activeSubMenu.reset(); - items.clear(); -} - -void PopupMenu::HelperClasses::MouseSourceState::handleMouseEvent (const MouseEvent& e) -{ - if (! window.windowIsStillValid()) - return; - - startTimerHz (20); - handleMousePosition (e.getScreenPosition()); -} - -void PopupMenu::HelperClasses::NormalComponentWrapper::getIdealSize (int& idealWidth, int& idealHeight) -{ - idealWidth = width; - idealHeight = height; -} - //============================================================================== -PopupMenu::PopupMenu() -{ -} - PopupMenu::PopupMenu (const PopupMenu& other) : items (other.items), lookAndFeel (other.lookAndFeel) @@ -1459,7 +1443,7 @@ void PopupMenu::addItem (Item newItem) || newItem.isSeparator || newItem.isSectionHeader || newItem.subMenu != nullptr); - items.push_back (std::move (newItem)); + items.add (std::move (newItem)); } void PopupMenu::addItem (String itemText, std::function action) @@ -1608,7 +1592,7 @@ void PopupMenu::addSubMenu (String subMenuName, PopupMenu subMenu, bool isActive void PopupMenu::addSeparator() { - if (items.size() > 0 && ! items.back().isSeparator) + if (items.size() > 0 && ! items.getLast().isSeparator) { Item i; i.isSeparator = true; @@ -1713,11 +1697,11 @@ PopupMenu::Options PopupMenu::Options::withPreferredPopupDirection (PopupDirecti Component* PopupMenu::createWindow (const Options& options, ApplicationCommandManager** managerOfChosenCommand) const { - return items.empty() ? nullptr - : new HelperClasses::MenuWindow (*this, nullptr, options, - ! options.getTargetScreenArea().isEmpty(), - ModifierKeys::currentModifiers.isAnyMouseButtonDown(), - managerOfChosenCommand); + return items.isEmpty() ? nullptr + : new HelperClasses::MenuWindow (*this, nullptr, options, + ! options.getTargetScreenArea().isEmpty(), + ModifierKeys::currentModifiers.isAnyMouseButtonDown(), + managerOfChosenCommand); } //============================================================================== @@ -1985,7 +1969,7 @@ bool PopupMenu::MenuItemIterator::next() if (index.size() == 0 || menus.getLast()->items.size() == 0) return false; - currentItem = const_cast (&(menus.getLast()->items[(size_t) index.getLast()])); + currentItem = const_cast (&(menus.getLast()->items.getReference (index.getLast()))); if (searchRecursively && currentItem->subMenu != nullptr) { diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.h b/modules/juce_gui_basics/menus/juce_PopupMenu.h index 60bedebfb7..360488f4c4 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.h +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.h @@ -82,7 +82,7 @@ class JUCE_API PopupMenu public: //============================================================================== /** Creates an empty popup menu. */ - PopupMenu(); + PopupMenu() = default; /** Creates a copy of another menu. */ PopupMenu (const PopupMenu&); @@ -820,7 +820,7 @@ private: friend struct HelperClasses; friend class MenuBarComponent; - std::vector items; + Array items; WeakReference lookAndFeel; Component* createWindow (const Options&, ApplicationCommandManager**) const; diff --git a/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp b/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp index 185dda53c7..cff272c08d 100644 --- a/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp +++ b/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp @@ -482,6 +482,7 @@ void DragAndDropContainer::startDragging (const var& sourceDescription, } } + dragImageComponent->sourceDetails.localPosition = sourceComponent->getLocalPoint (nullptr, lastMouseDown); dragImageComponent->updateLocation (false, lastMouseDown); #if JUCE_WINDOWS diff --git a/modules/juce_gui_basics/native/java/app/com/roli/juce/ComponentPeerView.java b/modules/juce_gui_basics/native/java/app/com/roli/juce/ComponentPeerView.java index 9a43aa5ecd..21a10c42f4 100644 --- a/modules/juce_gui_basics/native/java/app/com/roli/juce/ComponentPeerView.java +++ b/modules/juce_gui_basics/native/java/app/com/roli/juce/ComponentPeerView.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import android.app.Activity; diff --git a/modules/juce_gui_basics/native/java/app/com/roli/juce/JuceContentProviderCursor.java b/modules/juce_gui_basics/native/java/app/com/roli/juce/JuceContentProviderCursor.java new file mode 100644 index 0000000000..4e7fc41bfd --- /dev/null +++ b/modules/juce_gui_basics/native/java/app/com/roli/juce/JuceContentProviderCursor.java @@ -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. + + ============================================================================== +*/ + +package com.roli.juce; + +import android.database.Cursor; +import android.database.MatrixCursor; + +import java.lang.String; + +public final class JuceContentProviderCursor extends MatrixCursor +{ + public JuceContentProviderCursor (long hostToUse, String[] columnNames) + { + super (columnNames); + + host = hostToUse; + } + + @Override + public void close () + { + super.close (); + + contentSharerCursorClosed (host); + } + + private native void contentSharerCursorClosed (long host); + + private long host; +} diff --git a/modules/juce_gui_basics/native/java/app/com/roli/juce/JuceContentProviderFileObserver.java b/modules/juce_gui_basics/native/java/app/com/roli/juce/JuceContentProviderFileObserver.java new file mode 100644 index 0000000000..4be6b0984d --- /dev/null +++ b/modules/juce_gui_basics/native/java/app/com/roli/juce/JuceContentProviderFileObserver.java @@ -0,0 +1,50 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + +package com.roli.juce; + +import android.os.FileObserver; + +import java.lang.String; + +public final class JuceContentProviderFileObserver extends FileObserver +{ + public JuceContentProviderFileObserver (long hostToUse, String path, int mask) + { + super (path, mask); + + host = hostToUse; + } + + public void onEvent (int event, String path) + { + contentSharerFileObserverEvent (host, event, path); + } + + private long host; + + private native void contentSharerFileObserverEvent (long host, int event, String path); +} diff --git a/modules/juce_gui_basics/native/javaopt/app/com/roli/juce/JuceActivity.java b/modules/juce_gui_basics/native/javaopt/app/com/roli/juce/JuceActivity.java index c8db5f74aa..ac611754f3 100644 --- a/modules/juce_gui_basics/native/javaopt/app/com/roli/juce/JuceActivity.java +++ b/modules/juce_gui_basics/native/javaopt/app/com/roli/juce/JuceActivity.java @@ -1,20 +1,46 @@ -package com.roli.juce; - -import android.app.Activity; -import android.content.Intent; - -//============================================================================== -public class JuceActivity extends Activity -{ - //============================================================================== - private native void appNewIntent (Intent intent); - - @Override - protected void onNewIntent (Intent intent) - { - super.onNewIntent(intent); - setIntent(intent); - - appNewIntent (intent); - } -} \ No newline at end of file +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + +package com.roli.juce; + +import android.app.Activity; +import android.content.Intent; + +//============================================================================== +public class JuceActivity extends Activity +{ + //============================================================================== + private native void appNewIntent (Intent intent); + + @Override + protected void onNewIntent (Intent intent) + { + super.onNewIntent(intent); + setIntent(intent); + + appNewIntent (intent); + } +} diff --git a/modules/juce_gui_basics/native/javacore/app/com/roli/juce/JuceSharingContentProvider.java b/modules/juce_gui_basics/native/javaopt/app/com/roli/juce/JuceSharingContentProvider.java similarity index 63% rename from modules/juce_gui_basics/native/javacore/app/com/roli/juce/JuceSharingContentProvider.java rename to modules/juce_gui_basics/native/javaopt/app/com/roli/juce/JuceSharingContentProvider.java index bcf0718aa9..c127cb34b5 100644 --- a/modules/juce_gui_basics/native/javacore/app/com/roli/juce/JuceSharingContentProvider.java +++ b/modules/juce_gui_basics/native/javaopt/app/com/roli/juce/JuceSharingContentProvider.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import android.content.ContentProvider; @@ -16,52 +42,10 @@ public final class JuceSharingContentProvider extends ContentProvider { private Object lock = new Object (); - private native Cursor contentSharerQuery (Uri uri, String[] projection, String selection, - String[] selectionArgs, String sortOrder); + private native Cursor contentSharerQuery (Uri uri, String[] projection); private native AssetFileDescriptor contentSharerOpenFile (Uri uri, String mode); private native String[] contentSharerGetStreamTypes (Uri uri, String mimeTypeFilter); - public final class ProviderFileObserver extends FileObserver - { - public ProviderFileObserver (long hostToUse, String path, int mask) - { - super (path, mask); - - host = hostToUse; - } - - public void onEvent (int event, String path) - { - contentSharerFileObserverEvent (host, event, path); - } - - private long host; - - private native void contentSharerFileObserverEvent (long host, int event, String path); - } - - public final class ProviderCursor extends MatrixCursor - { - ProviderCursor (long hostToUse, String[] columnNames) - { - super (columnNames); - - host = hostToUse; - } - - @Override - public void close () - { - super.close (); - - contentSharerCursorClosed (host); - } - - private native void contentSharerCursorClosed (long host); - - private long host; - } - @Override public boolean onCreate () { @@ -74,7 +58,7 @@ public final class JuceSharingContentProvider extends ContentProvider { synchronized (lock) { - return contentSharerQuery (url, projection, selection, selectionArgs, sortOrder); + return contentSharerQuery (url, projection); } } diff --git a/modules/juce_gui_basics/native/juce_android_ContentSharer.cpp b/modules/juce_gui_basics/native/juce_android_ContentSharer.cpp index 6773956c44..f2bb1cfb3b 100644 --- a/modules/juce_gui_basics/native/juce_android_ContentSharer.cpp +++ b/modules/juce_gui_basics/native/juce_android_ContentSharer.cpp @@ -27,60 +27,46 @@ namespace juce { //============================================================================== -// This byte-code is generated from native/javacore/app/com/roli/juce/JuceSharingContentProvider.java with min sdk version 16 +// This byte-code is generated from native/java/app/com/roli/juce/JuceContentProviderCursor.java with min sdk version 16 // See juce_core/native/java/README.txt on how to generate this byte-code. -static const uint8 javaJuceSharingContentProvider[] = -{31,139,8,8,96,160,247,93,0,3,74,97,118,97,68,101,120,66,121,116,101,67,111,100,101,46,100,101,120,0,149,151,93,108,20,85,20, -199,207,157,153,157,253,236,178,91,170,20,145,178,229,83,80,216,242,165,96,5,11,45,72,183,91,139,161,52,218,190,56,221,157,148, -129,221,153,101,102,118,133,23,2,106,162,209,196,24,125,64,19,73,48,33,106,140,15,36,26,227,131,49,152,24,163,241,65,77,148,248, -160,209,152,152,24,193,68,227,131,6,37,241,127,63,118,219,173,197,232,194,111,238,185,231,156,123,238,185,231,222,153,206, -148,237,19,137,190,173,219,105,239,208,216,231,67,47,106,177,200,154,39,135,207,172,189,226,63,113,230,173,189,99,175,63,244, -123,185,131,168,70,68,39,38,182,117,146,250,157,79,17,141,146,212,223,4,46,48,34,110,252,3,109,4,237,103,26,209,82,222,71,171, -163,189,132,203,80,156,40,103,16,125,111,18,253,4,126,6,191,129,107,224,58,232,137,18,245,130,53,96,3,216,2,14,131,6,120,25,188, -11,190,1,191,128,100,140,104,19,112,192,235,224,50,184,6,110,193,28,187,192,3,192,6,117,240,52,120,6,60,15,206,130,115,224, -101,240,10,120,3,188,9,222,6,159,128,175,192,183,224,42,136,38,136,214,129,33,48,5,60,240,8,56,5,206,130,87,193,69,240,54,120, -31,124,12,62,5,95,130,31,192,21,240,43,248,19,24,73,162,197,96,57,88,5,242,224,78,176,27,12,131,7,65,9,56,224,56,56,9,78,129, -199,192,83,0,101,37,148,142,16,138,208,37,148,159,176,45,148,6,139,64,6,100,73,238,193,98,208,165,246,229,102,176,4,116,147, -220,143,91,193,106,176,134,228,190,240,223,195,168,189,166,228,10,228,152,154,235,4,100,148,65,236,231,105,165,71,233,233,89,200, -248,47,108,252,23,83,50,247,143,170,60,94,48,229,92,205,3,179,92,201,231,249,62,43,249,53,200,43,148,124,17,242,42,37,191,11, -121,165,146,63,130,220,171,228,47,32,231,148,252,181,41,215,177,120,78,14,93,42,135,4,170,181,85,212,42,69,247,137,122,201,126, -82,245,83,168,214,157,196,215,28,19,99,13,172,176,143,248,154,22,137,190,9,253,58,17,51,45,250,9,81,105,222,74,125,2,255,214, -171,120,36,218,36,109,16,109,156,238,17,241,101,220,20,42,113,187,104,53,186,67,180,58,109,20,45,163,77,202,190,89,180,81,218, -34,90,131,182,171,252,250,213,184,93,162,53,105,183,26,191,71,237,253,1,177,231,49,149,151,172,185,169,106,193,247,171,15,157, -109,50,61,113,94,178,170,70,77,251,0,236,35,202,158,82,118,109,142,253,32,236,211,202,206,245,157,144,187,83,179,114,111,74, -158,201,13,41,238,31,17,250,231,146,114,142,41,198,168,150,211,104,128,38,53,126,66,117,120,242,179,118,46,41,207,137,151,209, -225,127,8,91,89,235,139,146,198,210,34,119,83,248,92,104,197,208,97,53,104,32,50,169,105,136,17,129,149,231,117,49,41,215,121, -8,241,107,227,113,210,54,167,17,139,137,92,222,73,202,181,214,50,60,183,149,168,79,45,195,207,253,84,198,16,59,25,17,167,154, -232,189,164,90,7,246,155,199,229,249,125,152,148,117,24,239,53,104,57,171,245,165,104,139,145,162,30,150,197,222,247,176,117, -34,183,152,152,39,78,186,170,212,103,173,56,89,68,150,119,211,229,57,58,77,100,133,103,86,83,151,153,157,239,251,121,243,117, -252,203,124,166,26,115,37,41,239,233,241,45,24,163,241,49,131,145,20,237,128,159,155,225,51,165,88,143,150,101,157,184,222,118, -189,3,215,117,76,222,227,89,17,167,19,126,188,202,140,174,183,205,221,48,121,5,111,60,119,68,172,33,158,154,173,89,206,160,182, -223,29,243,250,59,230,245,121,55,138,168,89,220,161,186,144,179,226,94,213,148,28,17,109,151,208,102,91,122,93,84,47,218,58, -151,89,209,231,232,170,205,170,216,252,126,202,42,61,151,155,177,179,202,175,139,204,123,28,215,9,119,19,27,38,99,184,88,44,82, -132,95,139,196,10,180,162,80,47,217,135,142,88,190,227,206,12,122,110,104,187,225,65,223,107,56,101,219,223,116,212,106,88, -196,138,164,193,85,231,254,102,81,252,168,183,104,185,101,223,115,202,249,146,28,146,159,55,180,159,86,220,200,101,194,170,212, -237,160,159,214,255,195,193,183,131,252,158,32,176,195,253,78,197,30,178,131,146,239,212,66,15,177,150,182,92,203,86,104,77, -91,129,157,31,172,251,129,215,54,77,203,52,106,133,190,115,162,233,144,109,57,184,118,152,63,236,59,115,195,121,65,158,207,53, -54,29,216,126,131,103,221,59,215,116,208,242,75,118,101,126,50,59,139,37,175,154,247,189,138,147,63,138,210,229,111,92,191,213, -77,161,153,203,189,255,127,104,123,122,27,254,115,128,126,90,89,44,91,149,134,115,44,111,185,174,23,90,161,227,185,249,125,110, -169,226,5,220,187,98,5,216,131,158,5,124,134,93,23,25,75,123,239,2,246,81,187,58,173,28,248,54,118,22,249,41,201,87,44,119, -38,63,54,125,212,46,133,237,186,67,33,207,174,159,210,237,197,160,174,133,86,72,108,130,244,137,97,156,184,137,2,25,19,5,33,225, -236,77,20,113,112,39,138,5,28,92,126,29,38,54,73,139,167,22,152,37,105,149,74,118,16,236,175,88,51,1,69,248,98,109,74,150, -188,74,189,234,222,111,85,237,128,150,170,195,198,171,214,204,101,144,187,149,169,167,205,52,55,173,125,13,168,105,89,155,253, -62,59,196,164,182,85,29,63,89,67,220,155,218,140,99,53,219,229,1,168,179,77,253,64,221,246,79,146,89,182,43,118,104,83,196,22, -97,151,204,216,225,66,39,141,210,51,237,83,68,209,231,18,25,71,188,32,164,56,191,142,123,135,177,66,211,113,145,104,72,70,197, -43,29,35,163,106,5,199,40,93,117,170,54,119,71,212,16,149,53,170,94,25,67,93,84,129,98,158,59,136,184,200,33,234,185,114,113, -29,30,82,110,221,124,240,104,174,192,168,89,225,17,74,212,124,143,239,45,14,0,69,142,203,101,224,118,173,87,144,71,128,229,72, -75,71,75,220,227,163,254,113,212,54,28,243,203,124,246,240,136,19,144,201,175,171,251,200,172,215,202,124,118,189,238,59,252, -82,161,72,131,63,21,200,20,77,64,155,244,3,219,215,71,211,27,119,109,164,187,40,154,222,53,73,203,140,3,219,7,118,72,213,42,173, -111,32,154,158,196,147,24,38,178,244,194,208,190,104,154,30,99,90,97,39,20,14,205,176,2,250,227,90,97,20,205,16,156,168,170, -21,238,22,166,134,20,138,58,254,116,108,156,26,193,147,119,36,50,178,103,104,223,126,97,157,50,10,163,34,150,214,193,70,186,83, -90,90,91,107,100,239,94,114,75,83,88,166,45,98,35,183,106,221,137,238,36,105,26,195,159,238,103,115,145,211,167,141,75,49,237, -81,141,76,246,93,140,171,53,174,142,157,57,109,60,30,103,80,39,216,133,56,49,35,110,104,73,232,46,9,93,147,69,236,199,56,99,127, -129,139,9,198,62,0,95,129,171,224,124,146,177,31,193,75,41,249,110,75,234,89,222,108,155,223,30,252,57,223,252,254,208,105, -246,27,196,160,217,239,16,222,54,191,69,76,154,253,30,209,51,82,230,127,207,88,78,190,75,15,64,54,115,82,207,223,161,88,70,190, -103,139,119,228,156,156,151,127,191,232,202,159,191,243,24,57,57,31,127,47,34,53,86,188,123,101,100,174,252,91,233,111,138,244, -241,33,100,13,0,0,0,0}; +static const uint8 javaJuceContentProviderCursor[] = +{ 31,139,8,8,138,122,94,94,0,3,74,117,99,101,67,111,110,116,101,110,116,80,114,111,118,105,100,101,114,67,117,114,115,111,114, +46,100,101,120,0,117,147,177,111,211,64,20,198,223,157,157,148,150,52,184,144,1,6,32,160,46,29,138,43,209,178,132,34,80,144,42, +89,6,85,10,164,82,59,93,109,211,184,77,124,145,237,68,17,98,0,4,91,6,6,38,38,64,133,153,255,0,33,133,255,131,137,149,133,177,3, +223,229,206,37,18,194,210,207,247,222,229,189,239,157,206,95,194,104,180,176,118,115,131,142,7,95,175,127,216,250,229,236,28, +61,169,85,222,124,219,126,234,140,155,159,157,142,184,107,17,245,137,104,212,94,63,79,230,121,207,137,28,210,251,37,240,5,216, +96,2,24,248,109,246,79,76,190,140,215,9,184,15,222,129,143,224,19,248,14,126,130,37,232,213,192,69,112,25,92,3,183,192,38,240, +64,4,142,192,144,107,61,203,204,83,51,230,205,106,153,179,149,77,252,10,133,115,38,30,35,62,99,226,183,136,33,67,139,211,179, +233,46,165,185,64,106,159,79,115,126,154,51,170,152,124,201,212,21,191,171,103,108,130,18,78,163,194,103,92,207,239,215,137,238, +209,46,238,171,138,9,122,202,107,174,207,42,29,134,218,22,42,250,107,232,98,213,127,116,237,105,110,83,249,118,156,196,249,29, +98,30,93,241,6,65,212,148,73,30,37,249,118,42,135,113,24,165,205,65,154,201,244,198,161,24,10,186,234,139,36,76,101,28,186,161, +200,197,190,200,34,247,129,200,211,120,164,139,26,180,226,7,178,231,166,178,27,187,135,144,114,255,171,215,32,214,38,222,246, +200,106,123,62,2,159,46,236,249,106,134,219,21,201,129,219,130,104,114,208,160,82,208,149,89,68,103,3,217,29,244,146,135,162, +23,101,116,41,208,130,173,142,72,11,185,166,42,11,201,238,200,44,167,121,245,126,36,31,163,209,206,59,113,70,21,126,174,50,87, +221,92,165,26,97,217,197,69,112,92,14,127,241,220,158,112,254,146,147,197,126,240,69,115,55,108,102,45,188,199,103,252,87,120, +98,98,214,89,31,22,94,44,207,248,145,213,117,191,242,36,115,254,122,134,215,181,190,242,169,101,106,212,119,165,186,238,157,126, +115,71,199,234,127,240,7,124,122,243,207,64,3,0,0,0,0 }; + +// This byte-code is generated from native/java/app/com/roli/juce/JuceContentProviderFileObserver.java with min sdk version 16 +// See juce_core/native/java/README.txt on how to generate this byte-code. +static const uint8 javaJuceContentProviderFileObserver[] = +{ 31,139,8,8,123,122,94,94,0,3,74,117,99,101,67,111,110,116,101,110,116,80,114,111,118,105,100,101,114,70,105,108,101,79,98,115, +101,114,118,101,114,46,100,101,120,0,133,147,205,107,19,65,24,198,223,249,72,98,91,93,210,84,4,17,36,130,130,32,186,145,218, +131,196,10,197,47,18,22,44,166,6,41,120,216,38,75,119,107,186,19,118,215,144,131,5,45,61,148,158,188,244,164,71,65,241,212,163, +40,138,136,224,213,91,253,3,60,250,7,120,211,103,118,166,116,61,25,248,205,251,206,251,206,60,59,59,251,164,31,140,39,27,179, +115,116,110,243,212,238,147,208,189,112,245,227,236,183,157,19,103,216,220,215,223,91,251,175,247,249,88,16,13,137,104,220,189, +82,35,251,251,193,137,142,147,169,151,193,103,32,117,29,48,112,132,153,121,149,153,121,3,195,121,236,89,68,220,3,239,192,7, +240,9,252,4,127,64,3,253,155,224,14,240,192,61,240,0,60,4,27,96,11,236,128,93,240,2,188,2,111,185,209,231,246,249,37,123,158,138, +62,131,157,111,99,193,132,205,159,35,159,180,249,75,228,83,54,127,131,92,64,201,201,181,68,254,142,34,87,53,245,163,121,36, +154,46,68,110,239,66,216,248,197,22,202,80,212,181,61,110,206,50,108,16,45,148,150,113,119,78,222,209,207,123,111,123,157,58, +250,75,156,248,101,199,234,201,124,47,179,239,99,114,153,119,14,222,177,124,45,138,163,236,58,177,22,177,54,157,109,63,238,5, +55,84,156,5,113,182,152,168,81,212,15,146,219,209,32,184,187,146,6,201,40,72,46,173,249,35,159,78,122,126,220,79,84,212,119,85, +234,22,219,77,114,189,158,90,119,19,53,136,220,53,72,185,255,209,107,82,205,211,146,238,192,143,87,221,78,150,68,241,106,147, +88,151,68,183,229,145,236,182,205,232,181,80,192,112,186,103,164,58,161,159,252,43,116,107,132,50,149,130,60,200,80,165,25,77, +232,113,73,221,79,3,146,235,126,250,136,42,42,54,203,228,208,207,66,146,89,24,165,52,37,170,51,211,21,103,254,34,213,184,51, +83,113,150,113,69,156,17,103,207,158,202,239,156,109,226,251,177,95,184,172,99,246,187,176,66,60,240,44,47,248,86,20,188,43,11, +254,45,209,161,135,203,116,232,99,86,55,251,181,151,89,213,172,209,30,227,117,163,175,253,45,236,26,237,1,170,155,189,185,63, +170,38,215,255,159,191,29,121,169,41,120,3,0,0,0,0 }; //============================================================================== #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD, CALLBACK) \ @@ -127,7 +113,6 @@ public: : owner (ownerToUse), cursor (GlobalRef (LocalRef (env->NewObject (JuceContentProviderCursor, JuceContentProviderCursor.constructor, - contentProvider.get(), reinterpret_cast (this), resultColumns.get())))) { @@ -156,13 +141,13 @@ private: //============================================================================== #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD, CALLBACK) \ METHOD (addRow, "addRow", "([Ljava/lang/Object;)V") \ - METHOD (constructor, "", "(Lcom/roli/juce/JuceSharingContentProvider;J[Ljava/lang/String;)V") \ + METHOD (constructor, "", "(J[Ljava/lang/String;)V") \ CALLBACK (contentSharerCursorClosed, "contentSharerCursorClosed", "(J)V") \ - DECLARE_JNI_CLASS (JuceContentProviderCursor, "com/roli/juce/JuceSharingContentProvider$ProviderCursor") + DECLARE_JNI_CLASS_WITH_BYTECODE (JuceContentProviderCursor, "com/roli/juce/JuceContentProviderCursor", 16, javaJuceContentProviderCursor, sizeof (javaJuceContentProviderCursor)) #undef JNI_CLASS_MEMBERS - static void JNICALL contentSharerCursorClosed(JNIEnv*, jobject, jlong host) + static void JNICALL contentSharerCursorClosed (JNIEnv*, jobject, jlong host) { if (auto* myself = reinterpret_cast (host)) myself->cursorClosed(); @@ -190,7 +175,6 @@ public: filepath (filepathToUse), fileObserver (GlobalRef (LocalRef (env->NewObject (JuceContentProviderFileObserver, JuceContentProviderFileObserver.constructor, - contentProvider.get(), reinterpret_cast (this), javaString (filepath).get(), open | access | closeWrite | closeNoWrite)))) @@ -244,12 +228,12 @@ private: //============================================================================== #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD, CALLBACK) \ - METHOD (constructor, "", "(Lcom/roli/juce/JuceSharingContentProvider;JLjava/lang/String;I)V") \ + METHOD (constructor, "", "(JLjava/lang/String;I)V") \ METHOD (startWatching, "startWatching", "()V") \ METHOD (stopWatching, "stopWatching", "()V") \ CALLBACK (contentSharerFileObserverEvent, "contentSharerFileObserverEvent", "(JILjava/lang/String;)V") \ - DECLARE_JNI_CLASS (JuceContentProviderFileObserver, "com/roli/juce/JuceSharingContentProvider$ProviderFileObserver") + DECLARE_JNI_CLASS_WITH_BYTECODE (JuceContentProviderFileObserver, "com/roli/juce/JuceContentProviderFileObserver", 16, javaJuceContentProviderFileObserver, sizeof (javaJuceContentProviderFileObserver)) #undef JNI_CLASS_MEMBERS static void JNICALL contentSharerFileObserverEvent (JNIEnv*, jobject /*fileObserver*/, jlong host, int event, jstring path) @@ -550,11 +534,8 @@ public: } jobject query (const LocalRef& contentProvider, const LocalRef& uri, - const LocalRef& projection, const LocalRef& selection, - const LocalRef& selectionArgs, const LocalRef& sortOrder) + const LocalRef& projection) { - ignoreUnused (selection, selectionArgs, sortOrder); - StringArray requestedColumns = javaStringArrayToJuce (projection); StringArray supportedColumns = getSupportedColumns(); @@ -804,6 +785,48 @@ private: return assetFileDescriptors.getReference (assetFileDescriptors.size() - 1).get(); } + StringArray filterMimeTypes (const StringArray& mimeTypes, const String& filter) + { + String filterToUse (filter.removeCharacters ("*")); + + if (filterToUse.isEmpty() || filterToUse == "/") + return mimeTypes; + + StringArray result; + + for (const auto& type : mimeTypes) + if (String (type).contains (filterToUse)) + result.add (type); + + return result; + } + + String getCommonMimeType (const StringArray& mimeTypes) + { + if (mimeTypes.isEmpty()) + return "*/*"; + + auto commonMime = mimeTypes[0]; + bool lookForCommonGroup = false; + + for (int i = 1; i < mimeTypes.size(); ++i) + { + if (mimeTypes[i] == commonMime) + continue; + + if (! lookForCommonGroup) + { + lookForCommonGroup = true; + commonMime = commonMime.upToFirstOccurrenceOf ("/", true, false); + } + + if (! mimeTypes[i].startsWith (commonMime)) + return "*/*"; + } + + return lookForCommonGroup ? commonMime + "*" : commonMime; + } + ContentSharer& owner; String packageName; String uriBase; @@ -829,26 +852,19 @@ private: //============================================================================== #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD, CALLBACK) \ - CALLBACK (contentSharerQuery, "contentSharerQuery", "(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;") \ + CALLBACK (contentSharerQuery, "contentSharerQuery", "(Landroid/net/Uri;[Ljava/lang/String;)Landroid/database/Cursor;") \ CALLBACK (contentSharerOpenFile, "contentSharerOpenFile", "(Landroid/net/Uri;Ljava/lang/String;)Landroid/content/res/AssetFileDescriptor;") \ CALLBACK (contentSharerGetStreamTypes, "contentSharerGetStreamTypes", "(Landroid/net/Uri;Ljava/lang/String;)[Ljava/lang/String;") \ - - DECLARE_JNI_CLASS_WITH_BYTECODE (JuceSharingContentProvider, "com/roli/juce/JuceSharingContentProvider", 16, javaJuceSharingContentProvider, sizeof (javaJuceSharingContentProvider)) + DECLARE_JNI_CLASS_WITH_MIN_SDK (JuceSharingContentProvider, "com/roli/juce/JuceSharingContentProvider", 16) #undef JNI_CLASS_MEMBERS - static jobject JNICALL contentSharerQuery (JNIEnv*, jobject contentProvider, jobject uri, jobjectArray projection, - jobject selection, jobjectArray selectionArgs, jobject sortOrder) + static jobject JNICALL contentSharerQuery (JNIEnv*, jobject contentProvider, jobject uri, jobjectArray projection) { if (auto *pimpl = (ContentSharer::ContentSharerNativeImpl *) ContentSharer::getInstance ()->pimpl.get ()) return pimpl->query (LocalRef (static_cast (contentProvider)), LocalRef (static_cast (uri)), - LocalRef ( - static_cast (projection)), - LocalRef (static_cast (selection)), - LocalRef ( - static_cast (selectionArgs)), - LocalRef (static_cast (sortOrder))); + LocalRef (static_cast (projection))); return nullptr; } diff --git a/modules/juce_gui_basics/native/juce_android_Windowing.cpp b/modules/juce_gui_basics/native/juce_android_Windowing.cpp index 7b1d1ec598..57c7acbff9 100644 --- a/modules/juce_gui_basics/native/juce_android_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_android_Windowing.cpp @@ -196,8 +196,6 @@ static const uint8 javaComponentPeerView[] = extern void juce_firebaseRemoteMessageSendError (void*, void*); #endif -extern void juce_contentSharingCompleted (int); - //============================================================================== #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD, CALLBACK) \ METHOD (create, "", "(II)V") diff --git a/modules/juce_gui_basics/native/juce_common_MimeTypes.cpp b/modules/juce_gui_basics/native/juce_common_MimeTypes.cpp index c4ba4610dc..921f55d9b8 100644 --- a/modules/juce_gui_basics/native/juce_common_MimeTypes.cpp +++ b/modules/juce_gui_basics/native/juce_common_MimeTypes.cpp @@ -45,48 +45,6 @@ static StringArray getMimeTypesForFileExtension (const String& fileExtension) return result; } -static StringArray filterMimeTypes (const StringArray& mimeTypes, const String& filter) -{ - String filterToUse (filter.removeCharacters ("*")); - - if (filterToUse.isEmpty() || filterToUse == "/") - return mimeTypes; - - StringArray result; - - for (const auto& type : mimeTypes) - if (String (type).contains (filterToUse)) - result.add (type); - - return result; -} - -static String getCommonMimeType (const StringArray& mimeTypes) -{ - if (mimeTypes.isEmpty()) - return "*/*"; - - auto commonMime = mimeTypes[0]; - bool lookForCommonGroup = false; - - for (int i = 1; i < mimeTypes.size(); ++i) - { - if (mimeTypes[i] == commonMime) - continue; - - if (! lookForCommonGroup) - { - lookForCommonGroup = true; - commonMime = commonMime.upToFirstOccurrenceOf ("/", true, false); - } - - if (! mimeTypes[i].startsWith (commonMime)) - return "*/*"; - } - - return lookForCommonGroup ? commonMime + "*" : commonMime; -} - //============================================================================== MimeTypeTableEntry MimeTypeTableEntry::table[641] = { 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 51068ad455..c607d06da6 100644 --- a/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp @@ -998,6 +998,7 @@ namespace PixmapHelpers GC gc = XCreateGC (display, pixmap, 0, nullptr); XPutImage (display, pixmap, gc, ximage, 0, 0, 0, 0, width, height); XFreeGC (display, gc); + XFree (ximage); return pixmap; } @@ -1757,7 +1758,7 @@ public: case XK_Delete: case XK_Insert: keyPressed = true; - keyCode = (keyCode & 0xff) | Keys::extendedKeyModifier; + keyCode = static_cast ((keyCode & 0xff) | Keys::extendedKeyModifier); break; case XK_Tab: @@ -1777,7 +1778,7 @@ public: if (sym >= XK_F1 && sym <= XK_F35) { keyPressed = true; - keyCode = (sym & 0xff) | Keys::extendedKeyModifier; + keyCode = static_cast ((sym & 0xff) | Keys::extendedKeyModifier); } break; } @@ -2436,9 +2437,9 @@ private: const int keybit = (1 << (keycode & 7)); if (press) - Keys::keyStates [keybyte] |= keybit; + Keys::keyStates[keybyte] = static_cast (Keys::keyStates[keybyte] | keybit); else - Keys::keyStates [keybyte] &= ~keybit; + Keys::keyStates[keybyte] = static_cast (Keys::keyStates[keybyte] & ~keybit); } static void updateKeyModifiers (int status) noexcept @@ -3508,7 +3509,7 @@ JUCE_API void JUCE_CALLTYPE Process::hide() {} void Desktop::setKioskComponent (Component* comp, bool enableOrDisable, bool /* allowMenusAndBars */) { if (enableOrDisable) - comp->setBounds (getDisplays().getMainDisplay().totalArea); + comp->setBounds (getDisplays().findDisplayForRect (comp->getScreenBounds()).totalArea); } void Desktop::allowedOrientationsChanged() {} @@ -4044,6 +4045,8 @@ void MouseCursor::deleteMouseCursor (void* cursorHandle, bool) if (auto display = xDisplay.display) { ScopedXLock xlock (display); + + cursorMap.erase ((Cursor) cursorHandle); XFreeCursor (display, (Cursor) cursorHandle); } } @@ -4093,6 +4096,7 @@ void* MouseCursor::createStandardMouseCursor (MouseCursor::StandardCursorType ty return CustomMouseCursorInfo (ImageFileFormat::loadFrom (copyCursorData, copyCursorSize), { 1, 3 }).create(); } + case NumStandardCursorTypes: default: jassertfalse; return None; @@ -4112,16 +4116,18 @@ void MouseCursor::showInWindow (ComponentPeer* peer) const { ScopedXDisplay xDisplay; - if (cursorHandle != nullptr && xDisplay.display != cursorMap[(Cursor) getHandle()]) + auto cursor = (Cursor) getHandle(); + auto cursorDisplay = cursorMap[cursor]; + + if (cursorHandle != nullptr && xDisplay.display != cursorDisplay) { - auto oldHandle = (Cursor) getHandle(); + cursorMap.erase (cursor); + XFreeCursor (cursorDisplay, cursor); if (auto* customInfo = cursorHandle->getCustomInfo()) cursorHandle->setHandle (customInfo->create()); else cursorHandle->setHandle (createStandardMouseCursor (cursorHandle->getType())); - - cursorMap.erase (oldHandle); } lp->showMouseCursor ((Cursor) getHandle()); diff --git a/modules/juce_gui_basics/native/juce_mac_MouseCursor.mm b/modules/juce_gui_basics/native/juce_mac_MouseCursor.mm index 1f295c604c..43ae2c7f30 100644 --- a/modules/juce_gui_basics/native/juce_mac_MouseCursor.mm +++ b/modules/juce_gui_basics/native/juce_mac_MouseCursor.mm @@ -144,6 +144,7 @@ void* MouseCursor::createStandardMouseCursor (MouseCursor::StandardCursorType ty case UpDownLeftRightResizeCursor: return MouseCursorHelpers::fromHIServices ("move"); + case NumStandardCursorTypes: default: jassertfalse; break; diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index 278904f2ef..a08985d20d 100644 --- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -997,7 +997,7 @@ public: } //============================================================================== - bool sendModalInputAttemptIfBlocked() + bool isBlockedByModalComponent() { if (auto* modal = Component::getCurrentlyModalComponent()) { @@ -1005,7 +1005,6 @@ public: && (! getComponent().isParentOf (modal)) && getComponent().isCurrentlyBlockedByAnotherModalComponent()) { - modal->inputAttemptWhenModal(); return true; } } @@ -1013,14 +1012,21 @@ public: return false; } + void sendModalInputAttemptIfBlocked() + { + if (isBlockedByModalComponent()) + if (auto* modal = Component::getCurrentlyModalComponent()) + modal->inputAttemptWhenModal(); + } + bool canBecomeKeyWindow() { - return (getStyleFlags() & juce::ComponentPeer::windowIgnoresKeyPresses) == 0; + return component.isVisible() && (getStyleFlags() & juce::ComponentPeer::windowIgnoresKeyPresses) == 0; } bool canBecomeMainWindow() { - return dynamic_cast (&component) != nullptr; + return component.isVisible() && dynamic_cast (&component) != nullptr; } bool worksWhenModal() const @@ -1068,11 +1074,13 @@ public: void liveResizingStart() { - if (constrainer != nullptr) - { - constrainer->resizeStart(); - isFirstLiveResize = true; - } + if (constrainer == nullptr) + return; + + constrainer->resizeStart(); + isFirstLiveResize = true; + + setFullScreenSizeConstraints (*constrainer); } void liveResizingEnd() @@ -1081,37 +1089,34 @@ public: constrainer->resizeEnd(); } - NSRect constrainRect (NSRect r) + NSRect constrainRect (const NSRect r) { - if (constrainer != nullptr && ! isKioskMode()) + if (constrainer == nullptr || isKioskMode()) + return r; + + const auto scale = getComponent().getDesktopScaleFactor(); + + auto pos = ScalingHelpers::unscaledScreenPosToScaled (scale, convertToRectInt (flippedScreenRect (r))); + const auto original = ScalingHelpers::unscaledScreenPosToScaled (scale, convertToRectInt (flippedScreenRect ([window frame]))); + + const auto screenBounds = Desktop::getInstance().getDisplays().getTotalBounds (true); + + const bool inLiveResize = [window inLiveResize]; + + if (! inLiveResize || isFirstLiveResize) { - auto scale = getComponent().getDesktopScaleFactor(); + isFirstLiveResize = false; - auto pos = ScalingHelpers::unscaledScreenPosToScaled (scale, convertToRectInt (flippedScreenRect (r))); - auto original = ScalingHelpers::unscaledScreenPosToScaled (scale, convertToRectInt (flippedScreenRect ([window frame]))); - - auto screenBounds = Desktop::getInstance().getDisplays().getTotalBounds (true); - - const bool inLiveResize = [window inLiveResize]; - - if (! inLiveResize || isFirstLiveResize) - { - isFirstLiveResize = false; - - isStretchingTop = (pos.getY() != original.getY() && pos.getBottom() == original.getBottom()); - isStretchingLeft = (pos.getX() != original.getX() && pos.getRight() == original.getRight()); - isStretchingBottom = (pos.getY() == original.getY() && pos.getBottom() != original.getBottom()); - isStretchingRight = (pos.getX() == original.getX() && pos.getRight() != original.getRight()); - } - - constrainer->checkBounds (pos, original, screenBounds, - isStretchingTop, isStretchingLeft, isStretchingBottom, isStretchingRight); - - pos = ScalingHelpers::scaledScreenPosToUnscaled (scale, pos); - r = flippedScreenRect (makeNSRect (pos)); + isStretchingTop = (pos.getY() != original.getY() && pos.getBottom() == original.getBottom()); + isStretchingLeft = (pos.getX() != original.getX() && pos.getRight() == original.getRight()); + isStretchingBottom = (pos.getY() == original.getY() && pos.getBottom() != original.getBottom()); + isStretchingRight = (pos.getX() == original.getX() && pos.getRight() != original.getRight()); } - return r; + constrainer->checkBounds (pos, original, screenBounds, + isStretchingTop, isStretchingLeft, isStretchingBottom, isStretchingRight); + + return flippedScreenRect (makeNSRect (ScalingHelpers::scaledScreenPosToUnscaled (scale, pos))); } static void showArrowCursorIfNeeded() @@ -1519,6 +1524,26 @@ private: case NSEventTypeTabletProximity: break; + case NSEventTypeFlagsChanged: + case NSEventTypeAppKitDefined: + case NSEventTypeSystemDefined: + case NSEventTypeApplicationDefined: + case NSEventTypePeriodic: + case NSEventTypeGesture: + case NSEventTypeMagnify: + case NSEventTypeSwipe: + case NSEventTypeRotate: + case NSEventTypeBeginGesture: + case NSEventTypeEndGesture: + case NSEventTypeSmartMagnify: + case NSEventTypeQuickLook: + case NSEventTypePressure: + #if defined (MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12 + case NSEventTypeDirectTouch: + #if defined (MAC_OS_X_VERSION_10_15) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_15 + case NSEventTypeChangeMode: + #endif + #endif default: return false; } @@ -1557,6 +1582,13 @@ private: return true; } + void setFullScreenSizeConstraints (const ComponentBoundsConstrainer& c) + { + const auto minSize = NSMakeSize (static_cast (c.getMinimumWidth()), + 0.0f); + [window setMinFullScreenContentSize: minSize]; + } + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NSViewComponentPeer) }; @@ -1982,7 +2014,7 @@ private: return owner != nullptr && owner->canBecomeKeyWindow() - && ! owner->sendModalInputAttemptIfBlocked(); + && ! owner->isBlockedByModalComponent(); } static BOOL canBecomeMainWindow (id self, SEL) @@ -1991,7 +2023,7 @@ private: return owner != nullptr && owner->canBecomeMainWindow() - && ! owner->sendModalInputAttemptIfBlocked(); + && ! owner->isBlockedByModalComponent(); } static void becomeKeyWindow (id self, SEL) @@ -1999,7 +2031,17 @@ private: sendSuperclassMessage (self, @selector (becomeKeyWindow)); if (auto* owner = getOwner (self)) - owner->becomeKeyWindow(); + { + if (owner->canBecomeKeyWindow()) + { + owner->becomeKeyWindow(); + return; + } + + // this fixes a bug causing hidden windows to sometimes become visible when the app regains focus + if (! owner->getComponent().isVisible()) + [(NSWindow*) self orderOut: nil]; + } } static BOOL windowShouldClose (id self, SEL, id /*window*/) @@ -2176,7 +2218,8 @@ void Desktop::setKioskComponent (Component* kioskComp, bool shouldBeEnabled, boo [NSApp setPresentationOptions: (allowMenusAndBars ? (NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar) : (NSApplicationPresentationHideDock | NSApplicationPresentationHideMenuBar))]; - kioskComp->setBounds (Desktop::getInstance().getDisplays().getMainDisplay().totalArea); + + kioskComp->setBounds (getDisplays().findDisplayForRect (kioskComp->getScreenBounds()).totalArea); peer->becomeKeyWindow(); } else diff --git a/modules/juce_gui_basics/native/juce_win32_DragAndDrop.cpp b/modules/juce_gui_basics/native/juce_win32_DragAndDrop.cpp index 46d0778978..1b0ff1e621 100644 --- a/modules/juce_gui_basics/native/juce_win32_DragAndDrop.cpp +++ b/modules/juce_gui_basics/native/juce_win32_DragAndDrop.cpp @@ -125,8 +125,8 @@ namespace DragAndDropHelpers class JuceDataObject : public ComBaseClassHelper { public: - JuceDataObject (JuceDropSource* s, const FORMATETC* f, const STGMEDIUM* m) - : dropSource (s), format (f), medium (m) + JuceDataObject (const FORMATETC* f, const STGMEDIUM* m) + : format (f), medium (m) { } @@ -203,7 +203,6 @@ namespace DragAndDropHelpers JUCE_COMRESULT EnumDAdvise (IEnumSTATDATA**) { return OLE_E_ADVISENOTSUPPORTED; } private: - JuceDropSource* const dropSource; const FORMATETC* const format; const STGMEDIUM* const medium; @@ -255,7 +254,7 @@ namespace DragAndDropHelpers OleInitialize (0); auto source = new JuceDropSource(); - auto data = new JuceDataObject (source, &format, &medium); + auto data = new JuceDataObject (&format, &medium); DWORD effect; DoDragDrop (data, source, whatToDo, &effect); diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index b9c217e8a5..173074fd56 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -56,7 +56,7 @@ extern void juce_repeatLastProcessPriority(); extern void juce_checkCurrentlyFocusedTopLevelWindow(); // in juce_TopLevelWindow.cpp extern bool juce_isRunningInWine(); -using CheckEventBlockedByModalComps = bool (*)(const MSG&); +using CheckEventBlockedByModalComps = bool (*) (const MSG&); extern CheckEventBlockedByModalComps isEventBlockedByModalComps; static bool shouldDeactivateTitleBar = true; @@ -276,10 +276,10 @@ extern void* getUser32Function (const char*); #endif //============================================================================== -typedef BOOL (WINAPI* RegisterTouchWindowFunc) (HWND, ULONG); -typedef BOOL (WINAPI* GetTouchInputInfoFunc) (HTOUCHINPUT, UINT, TOUCHINPUT*, int); -typedef BOOL (WINAPI* CloseTouchInputHandleFunc) (HTOUCHINPUT); -typedef BOOL (WINAPI* GetGestureInfoFunc) (HGESTUREINFO, GESTUREINFO*); +using RegisterTouchWindowFunc = BOOL (WINAPI*) (HWND, ULONG); +using GetTouchInputInfoFunc = BOOL (WINAPI*) (HTOUCHINPUT, UINT, TOUCHINPUT*, int); +using CloseTouchInputHandleFunc = BOOL (WINAPI*) (HTOUCHINPUT); +using GetGestureInfoFunc = BOOL (WINAPI*) (HGESTUREINFO, GESTUREINFO*); static RegisterTouchWindowFunc registerTouchWindow = nullptr; static GetTouchInputInfoFunc getTouchInputInfo = nullptr; @@ -304,9 +304,9 @@ static bool canUseMultiTouch() } //============================================================================== -typedef BOOL (WINAPI* GetPointerTypeFunc) (UINT32, POINTER_INPUT_TYPE*); -typedef BOOL (WINAPI* GetPointerTouchInfoFunc) (UINT32, POINTER_TOUCH_INFO*); -typedef BOOL (WINAPI* GetPointerPenInfoFunc) (UINT32, POINTER_PEN_INFO*); +using GetPointerTypeFunc = BOOL (WINAPI*) (UINT32, POINTER_INPUT_TYPE*); +using GetPointerTouchInfoFunc = BOOL (WINAPI*) (UINT32, POINTER_TOUCH_INFO*); +using GetPointerPenInfoFunc = BOOL (WINAPI*) (UINT32, POINTER_PEN_INFO*); static GetPointerTypeFunc getPointerTypeFunction = nullptr; static GetPointerTouchInfoFunc getPointerTouchInfo = nullptr; @@ -326,17 +326,17 @@ static void checkForPointerAPI() } //============================================================================== -typedef BOOL (WINAPI* SetProcessDPIAwareFunc) (); -typedef BOOL (WINAPI* SetProcessDPIAwarenessContextFunc) (DPI_AWARENESS_CONTEXT); -typedef BOOL (WINAPI* SetProcessDPIAwarenessFunc) (DPI_Awareness); -typedef DPI_AWARENESS_CONTEXT (WINAPI* SetThreadDPIAwarenessContextFunc) (DPI_AWARENESS_CONTEXT); -typedef HRESULT (WINAPI* GetDPIForMonitorFunc) (HMONITOR, Monitor_DPI_Type, UINT*, UINT*); -typedef UINT (WINAPI* GetDPIForWindowFunc) (HWND); -typedef HRESULT (WINAPI* GetProcessDPIAwarenessFunc) (HANDLE, DPI_Awareness*); -typedef DPI_AWARENESS_CONTEXT (WINAPI* GetWindowDPIAwarenessContextFunc) (HWND); -typedef DPI_AWARENESS_CONTEXT (WINAPI* GetThreadDPIAwarenessContextFunc) (); -typedef DPI_Awareness (WINAPI* GetAwarenessFromDpiAwarenessContextFunc) (DPI_AWARENESS_CONTEXT); -typedef BOOL (WINAPI* EnableNonClientDPIScalingFunc) (HWND); +using SetProcessDPIAwareFunc = BOOL (WINAPI*) (); +using SetProcessDPIAwarenessContextFunc = BOOL (WINAPI*) (DPI_AWARENESS_CONTEXT); +using SetProcessDPIAwarenessFunc = BOOL (WINAPI*) (DPI_Awareness); +using SetThreadDPIAwarenessContextFunc = DPI_AWARENESS_CONTEXT (WINAPI*) (DPI_AWARENESS_CONTEXT); +using GetDPIForWindowFunc = UINT (WINAPI*) (HWND); +using GetDPIForMonitorFunc = HRESULT (WINAPI*) (HMONITOR, Monitor_DPI_Type, UINT*, UINT*); +using GetProcessDPIAwarenessFunc = HRESULT (WINAPI*) (HANDLE, DPI_Awareness*); +using GetWindowDPIAwarenessContextFunc = DPI_AWARENESS_CONTEXT (WINAPI*) (HWND); +using GetThreadDPIAwarenessContextFunc = DPI_AWARENESS_CONTEXT (WINAPI*) (); +using GetAwarenessFromDpiAwarenessContextFunc = DPI_Awareness (WINAPI*) (DPI_AWARENESS_CONTEXT); +using EnableNonClientDPIScalingFunc = BOOL (WINAPI*) (HWND); static SetProcessDPIAwareFunc setProcessDPIAware = nullptr; static SetProcessDPIAwarenessContextFunc setProcessDPIAwarenessContext = nullptr; @@ -359,10 +359,8 @@ static void setDPIAwareness() hasCheckedForDPIAwareness = true; - #if ! JUCE_WIN_PER_MONITOR_DPI_AWARE if (! JUCEApplicationBase::isStandaloneApp()) return; - #endif HMODULE shcoreModule = GetModuleHandleA ("SHCore.dll"); @@ -374,16 +372,11 @@ static void setDPIAwareness() getDPIForWindow = (GetDPIForWindowFunc) getUser32Function ("GetDpiForWindow"); getProcessDPIAwareness = (GetProcessDPIAwarenessFunc) GetProcAddress (shcoreModule, "GetProcessDpiAwareness"); getWindowDPIAwarenessContext = (GetWindowDPIAwarenessContextFunc) getUser32Function ("GetWindowDpiAwarenessContext"); + setThreadDPIAwarenessContext = (SetThreadDPIAwarenessContextFunc) getUser32Function ("SetThreadDpiAwarenessContext"); getThreadDPIAwarenessContext = (GetThreadDPIAwarenessContextFunc) getUser32Function ("GetThreadDpiAwarenessContext"); getAwarenessFromDPIAwarenessContext = (GetAwarenessFromDpiAwarenessContextFunc) getUser32Function ("GetAwarenessFromDpiAwarenessContext"); - setThreadDPIAwarenessContext = (SetThreadDPIAwarenessContextFunc) getUser32Function ("SetThreadDpiAwarenessContext"); setProcessDPIAwareness = (SetProcessDPIAwarenessFunc) GetProcAddress (shcoreModule, "SetProcessDpiAwareness"); - - // Only set the DPI awareness context of the process if we are a standalone app - if (! JUCEApplicationBase::isStandaloneApp()) - return; - - setProcessDPIAwarenessContext = (SetProcessDPIAwarenessContextFunc) getUser32Function ("SetProcessDpiAwarenessContext"); + setProcessDPIAwarenessContext = (SetProcessDPIAwarenessContextFunc) getUser32Function ("SetProcessDpiAwarenessContext"); if (setProcessDPIAwarenessContext != nullptr && SUCCEEDED (setProcessDPIAwarenessContext (DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2))) @@ -404,9 +397,6 @@ static void setDPIAwareness() return; } - if (! JUCEApplicationBase::isStandaloneApp()) - return; - // fallback for pre Windows 8.1 - equivalent to Process_System_DPI_Aware setProcessDPIAware = (SetProcessDPIAwareFunc) getUser32Function ("SetProcessDPIAware"); @@ -414,7 +404,7 @@ static void setDPIAwareness() setProcessDPIAware(); } -static bool isPerMonitorDPIAwareProcess() +static inline bool isPerMonitorDPIAwareProcess() { #if JUCE_WIN_PER_MONITOR_DPI_AWARE static bool dpiAware = []() -> bool @@ -436,7 +426,7 @@ static bool isPerMonitorDPIAwareProcess() #endif } -static bool isPerMonitorDPIAwareWindow (HWND h) +static inline bool isPerMonitorDPIAwareWindow (HWND h) { #if JUCE_WIN_PER_MONITOR_DPI_AWARE jassert (h != nullptr); @@ -453,7 +443,7 @@ static bool isPerMonitorDPIAwareWindow (HWND h) #endif } -static bool isPerMonitorDPIAwareThread() +static inline bool isPerMonitorDPIAwareThread() { #if JUCE_WIN_PER_MONITOR_DPI_AWARE setDPIAwareness(); @@ -491,7 +481,7 @@ static double getGlobalDPI() ScopedDPIAwarenessDisabler::~ScopedDPIAwarenessDisabler() { if (previousContext != nullptr) - setThreadDPIAwarenessContext ((DPI_AWARENESS_CONTEXT)previousContext); + setThreadDPIAwarenessContext ((DPI_AWARENESS_CONTEXT) previousContext); } #endif @@ -533,13 +523,66 @@ static Point convertPhysicalScreenPointToLogical (const Point& p, HWND return p; } -static double getScaleFactorForWindow (HWND h) +JUCE_API double getScaleFactorForWindow (HWND h) { - if (isPerMonitorDPIAwareWindow (h) && getDPIForWindow != nullptr) - return (double) getDPIForWindow (h) / USER_DEFAULT_SCREEN_DPI; + // NB. Using a local function here because we need to call this method from the plug-in wrappers + // which don't load the DPI-awareness functions on startup + static GetDPIForWindowFunc localGetDPIForWindow = nullptr; + + static bool hasChecked = false; + + if (! hasChecked) + { + hasChecked = true; + + if (localGetDPIForWindow == nullptr) + localGetDPIForWindow = (GetDPIForWindowFunc) getUser32Function ("GetDpiForWindow"); + } + + if (localGetDPIForWindow != nullptr) + return (double) localGetDPIForWindow (h) / USER_DEFAULT_SCREEN_DPI; return 1.0; -} + } + +#if JUCE_WIN_PER_MONITOR_DPI_AWARE + JUCE_API void setThreadDPIAwarenessForWindow (HWND nativeWindow) + { + // NB. Using local functions here because we need to call this method from the plug-in wrappers + // which don't load the DPI-awareness functions on startup + static SetThreadDPIAwarenessContextFunc localSetThreadDPIAwarenessContext = nullptr; + static GetWindowDPIAwarenessContextFunc localGetWindowDPIAwarenessContext = nullptr; + static GetThreadDPIAwarenessContextFunc localGetThreadDPIAwarenessContext = nullptr; + static GetAwarenessFromDpiAwarenessContextFunc localGetAwarenessFromDPIAwarenessContext = nullptr; + + static bool hasChecked = false; + static bool loadedOK = false; + + if (! hasChecked) + { + hasChecked = true; + + localSetThreadDPIAwarenessContext = (SetThreadDPIAwarenessContextFunc) getUser32Function ("SetThreadDpiAwarenessContext"); + localGetWindowDPIAwarenessContext = (GetWindowDPIAwarenessContextFunc) getUser32Function ("GetWindowDpiAwarenessContext"); + localGetThreadDPIAwarenessContext = (GetThreadDPIAwarenessContextFunc) getUser32Function ("GetThreadDpiAwarenessContext"); + localGetAwarenessFromDPIAwarenessContext = (GetAwarenessFromDpiAwarenessContextFunc) getUser32Function ("GetAwarenessFromDpiAwarenessContext"); + + loadedOK = (localSetThreadDPIAwarenessContext != nullptr && localGetWindowDPIAwarenessContext != nullptr + && localGetThreadDPIAwarenessContext != nullptr && localGetAwarenessFromDPIAwarenessContext != nullptr); + } + + if (loadedOK) + { + auto dpiAwareWindow = localGetAwarenessFromDPIAwarenessContext (localGetWindowDPIAwarenessContext (nativeWindow)) == DPI_Awareness::DPI_Awareness_Per_Monitor_Aware; + auto dpiAwareThread = localGetAwarenessFromDPIAwarenessContext (localGetThreadDPIAwarenessContext()) == DPI_Awareness::DPI_Awareness_Per_Monitor_Aware; + + if (dpiAwareWindow && ! dpiAwareThread) + localSetThreadDPIAwarenessContext (DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE); + else if (! dpiAwareWindow && dpiAwareThread) + localSetThreadDPIAwarenessContext (DPI_AWARENESS_CONTEXT_UNAWARE); + } + } +#endif //============================================================================== static void setWindowPos (HWND hwnd, Rectangle bounds, UINT flags, bool adjustTopLeft = false) @@ -558,32 +601,12 @@ static void setWindowPos (HWND hwnd, Rectangle bounds, UINT flags, bool adj static RECT getWindowRect (HWND hwnd) { - RECT r; - GetWindowRect (hwnd, &r); - #if JUCE_WIN_PER_MONITOR_DPI_AWARE - auto windowDPIAware = isPerMonitorDPIAwareWindow (hwnd); - auto threadDPIAware = isPerMonitorDPIAwareThread(); - - // If these don't match then we need to convert the RECT returned from GetWindowRect() as it depends - // on the DPI awareness of the calling thread - if (windowDPIAware != threadDPIAware) - { - if (! windowDPIAware) - { - // Thread is per-monitor DPI aware so RECT needs to be converted from physical to logical for - // the DPI unaware window - return RECTFromRectangle (Desktop::getInstance().getDisplays().physicalToLogical (rectangleFromRECT (r))); - } - else if (! threadDPIAware) - { - // Thread is DPI unaware so RECT needs to be converted from logical to physical for the per-monitor - // DPI aware window - return RECTFromRectangle (Desktop::getInstance().getDisplays().logicalToPhysical (rectangleFromRECT (r))); - } - } + setThreadDPIAwarenessForWindow (hwnd); #endif + RECT r; + GetWindowRect (hwnd, &r); return r; } @@ -595,13 +618,14 @@ static void setWindowZOrder (HWND hwnd, HWND insertAfter) //============================================================================== double Desktop::getDefaultMasterScale() { - if (! JUCEApplicationBase::isStandaloneApp()) + if (! JUCEApplicationBase::isStandaloneApp() + #if JUCE_WIN_PER_MONITOR_DPI_AWARE + || isPerMonitorDPIAwareProcess() + #endif + ) + { return 1.0; - - #if JUCE_WIN_PER_MONITOR_DPI_AWARE - if (isPerMonitorDPIAwareProcess()) - return 1.0; - #endif + } return getGlobalDPI() / USER_DEFAULT_SCREEN_DPI; } @@ -1222,10 +1246,10 @@ private: HMODULE h = {}; }; - typedef HRESULT (WINAPI* RoInitializeFuncPtr) (int); - typedef HRESULT (WINAPI* RoGetActivationFactoryFuncPtr) (HSTRING, REFIID, void**); - typedef HRESULT (WINAPI* WindowsCreateStringFuncPtr) (LPCWSTR,UINT32, HSTRING*); - typedef HRESULT (WINAPI* WindowsDeleteStringFuncPtr) (HSTRING); + using RoInitializeFuncPtr = HRESULT (WINAPI*) (int); + using RoGetActivationFactoryFuncPtr = HRESULT (WINAPI*) (HSTRING, REFIID, void**); + using WindowsCreateStringFuncPtr = HRESULT (WINAPI*) (LPCWSTR,UINT32, HSTRING*); + using WindowsDeleteStringFuncPtr = HRESULT (WINAPI*) (HSTRING); ComBaseModule comBaseDLL; ComSmartPtr viewSettingsInterop; @@ -2241,7 +2265,7 @@ private: } } - void setIcon (const Image& newIcon) + void setIcon (const Image& newIcon) override { if (auto hicon = IconConverters::createHICONFromImage (newIcon, TRUE, 0, 0)) { @@ -2257,7 +2281,7 @@ private: void setMessageFilter() { - typedef BOOL (WINAPI* ChangeWindowMessageFilterExFunc) (HWND, UINT, DWORD, PVOID); + using ChangeWindowMessageFilterExFunc = BOOL (WINAPI*) (HWND, UINT, DWORD, PVOID); if (auto changeMessageFilter = (ChangeWindowMessageFilterExFunc) getUser32Function ("ChangeWindowMessageFilterEx")) { @@ -3395,7 +3419,8 @@ private: forceDisplayUpdate(); if (fullScreen && ! isMinimised()) - setWindowPos (hwnd, ScalingHelpers::scaledScreenPosToUnscaled (component, Desktop::getInstance().getDisplays().findDisplayForRect (component.getScreenBounds()).userArea), + setWindowPos (hwnd, ScalingHelpers::scaledScreenPosToUnscaled (component, Desktop::getInstance().getDisplays() + .findDisplayForRect (component.getScreenBounds()).userArea), SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_NOSENDCHANGING); } @@ -3706,6 +3731,7 @@ private: case WM_DISPLAYCHANGE: InvalidateRect (h, 0, 0); // intentional fall-through... + JUCE_FALLTHROUGH case WM_SETTINGCHANGE: // note the fall-through in the previous case! doSettingChange(); break; @@ -4073,28 +4099,6 @@ JUCE_API ComponentPeer* createNonRepaintingEmbeddedWindowsPeer (Component& compo (HWND) parentHWND, true); } -JUCE_API bool shouldScaleGLWindow (void* hwnd) -{ - return isPerMonitorDPIAwareWindow ((HWND) hwnd); -} - -#if JUCE_WIN_PER_MONITOR_DPI_AWARE - JUCE_API void setProcessDPIAwarenessIfNecessary (void* hwnd) - { - if (getProcessDPIAwareness == nullptr) - return; - - DPI_Awareness context; - getProcessDPIAwareness (0, &context); - - if (isPerMonitorDPIAwareWindow ((HWND) hwnd) && context != DPI_Awareness::DPI_Awareness_Per_Monitor_Aware - && setProcessDPIAwareness != nullptr) - { - setProcessDPIAwareness (DPI_Awareness::DPI_Awareness_Per_Monitor_Aware); - } - } -#endif - JUCE_IMPLEMENT_SINGLETON (HWNDComponentPeer::WindowClassHolder) //============================================================================== @@ -4451,7 +4455,7 @@ void Desktop::setKioskComponent (Component* kioskModeComp, bool enableOrDisable, tlw->setUsingNativeTitleBar (! enableOrDisable); if (enableOrDisable) - kioskModeComp->setBounds (getDisplays().getMainDisplay().totalArea); + kioskModeComp->setBounds (getDisplays().findDisplayForRect (kioskModeComp->getScreenBounds()).totalArea); } void Desktop::allowedOrientationsChanged() {} @@ -4543,16 +4547,6 @@ void Displays::findDisplays (float masterScale) { setDPIAwareness(); - #if JUCE_WIN_PER_MONITOR_DPI_AWARE - DPI_AWARENESS_CONTEXT prevContext = nullptr; - - if (setThreadDPIAwarenessContext != nullptr && getAwarenessFromDPIAwarenessContext != nullptr && getThreadDPIAwarenessContext != nullptr - && getAwarenessFromDPIAwarenessContext (getThreadDPIAwarenessContext()) != DPI_Awareness::DPI_Awareness_Per_Monitor_Aware) - { - prevContext = setThreadDPIAwarenessContext (DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE); - } - #endif - Array monitors; EnumDisplayMonitors (0, 0, &enumMonitorsProc, (LPARAM) &monitors); @@ -4600,10 +4594,6 @@ void Displays::findDisplays (float masterScale) #if JUCE_WIN_PER_MONITOR_DPI_AWARE updateToLogical(); - - // Reset the DPI awareness context if it was overridden earlier - if (prevContext != nullptr) - setThreadDPIAwarenessContext (prevContext); #else for (auto& d : displays) { @@ -4651,8 +4641,8 @@ void* CustomMouseCursorInfo::create() const { im = im.rescaled (maxW, maxH); - hotspotX = (hotspotX * maxW) / image.getWidth(); - hotspotY = (hotspotY * maxH) / image.getHeight(); + hotspotX = (hotspotX * maxW) / juce::jmax (1, image.getWidth()); + hotspotY = (hotspotY * maxH) / juce::jmax (1, image.getHeight()); } return IconConverters::createHICONFromImage (im, FALSE, hotspotX, hotspotY); diff --git a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp index aacb50bd06..5cc2a07e70 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp +++ b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp @@ -33,12 +33,10 @@ struct MarkerListScope : public Expression::Scope Expression getSymbolValue (const String& symbol) const override { - switch (RelativeCoordinate::StandardStrings::getTypeOf (symbol)) - { - case RelativeCoordinate::StandardStrings::width: return Expression ((double) component.getWidth()); - case RelativeCoordinate::StandardStrings::height: return Expression ((double) component.getHeight()); - default: break; - } + auto type = RelativeCoordinate::StandardStrings::getTypeOf (symbol); + + if (type == RelativeCoordinate::StandardStrings::width) return Expression ((double) component.getWidth()); + if (type == RelativeCoordinate::StandardStrings::height) return Expression ((double) component.getHeight()); MarkerList* list; @@ -116,6 +114,8 @@ Expression RelativeCoordinatePositionerBase::ComponentScope::getSymbolValue (con case RelativeCoordinate::StandardStrings::height: return Expression ((double) component.getHeight()); case RelativeCoordinate::StandardStrings::right: return Expression ((double) component.getRight()); case RelativeCoordinate::StandardStrings::bottom: return Expression ((double) component.getBottom()); + case RelativeCoordinate::StandardStrings::parent: + case RelativeCoordinate::StandardStrings::unknown: default: break; } @@ -180,6 +180,8 @@ public: positioner.registerComponentListener (component); break; + case RelativeCoordinate::StandardStrings::parent: + case RelativeCoordinate::StandardStrings::unknown: default: if (auto* parent = component.getParentComponent()) { diff --git a/modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp b/modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp index 574be97676..3579ce4175 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp +++ b/modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp @@ -52,6 +52,11 @@ namespace RelativeRectangleHelpers case RelativeCoordinate::StandardStrings::right: case RelativeCoordinate::StandardStrings::top: case RelativeCoordinate::StandardStrings::bottom: return false; + case RelativeCoordinate::StandardStrings::width: + case RelativeCoordinate::StandardStrings::height: + case RelativeCoordinate::StandardStrings::parent: + case RelativeCoordinate::StandardStrings::unknown: + default: break; } @@ -127,6 +132,10 @@ public: case RelativeCoordinate::StandardStrings::top: return rect.top.getExpression(); case RelativeCoordinate::StandardStrings::right: return rect.right.getExpression(); case RelativeCoordinate::StandardStrings::bottom: return rect.bottom.getExpression(); + case RelativeCoordinate::StandardStrings::width: + case RelativeCoordinate::StandardStrings::height: + case RelativeCoordinate::StandardStrings::parent: + case RelativeCoordinate::StandardStrings::unknown: default: break; } diff --git a/modules/juce_gui_basics/widgets/juce_ListBox.cpp b/modules/juce_gui_basics/widgets/juce_ListBox.cpp index 75c4545ddf..7d7a9833f6 100644 --- a/modules/juce_gui_basics/widgets/juce_ListBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ListBox.cpp @@ -723,7 +723,7 @@ bool ListBox::keyPressed (const KeyPress& key) if (multiple) selectRangeOfRows (lastRowSelected, lastRowSelected + 1); else - selectRow (jmin (totalItems - 1, jmax (0, lastRowSelected) + 1)); + selectRow (jmin (totalItems - 1, jmax (0, lastRowSelected + 1))); } else if (key.isKeyCode (KeyPress::pageUpKey)) { diff --git a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp index 1049dbe404..38cb57454f 100644 --- a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp +++ b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp @@ -728,9 +728,10 @@ private: int selectedStyle = 0; switch (bar.getStyle()) { - case Toolbar::iconsOnly: selectedStyle = 1; break; - case Toolbar::iconsWithText: selectedStyle = 2; break; - case Toolbar::textOnly: selectedStyle = 3; break; + case Toolbar::iconsOnly: selectedStyle = 1; break; + case Toolbar::iconsWithText: selectedStyle = 2; break; + case Toolbar::textOnly: selectedStyle = 3; break; + default: break; } styleBox.setSelectedId (selectedStyle); @@ -757,6 +758,7 @@ private: case 1: toolbar.setStyle (Toolbar::iconsOnly); break; case 2: toolbar.setStyle (Toolbar::iconsWithText); break; case 3: toolbar.setStyle (Toolbar::textOnly); break; + default: break; } palette.resized(); // to make it update the styles diff --git a/modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniserFunctions.h b/modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniserFunctions.h index 6fce1baa79..1bef1a2908 100644 --- a/modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniserFunctions.h +++ b/modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniserFunctions.h @@ -616,8 +616,8 @@ struct CppTokeniserFunctions charsOnLine += 2; break; } - // deliberate fall-through... + JUCE_FALLTHROUGH default: if (c >= 32 && c < 127 && ! (lastWasHexEscapeCode // (have to avoid following a hex escape sequence with a valid hex digit) diff --git a/modules/juce_gui_extra/embedding/juce_ScopedDPIAwarenessDisabler.h b/modules/juce_gui_extra/embedding/juce_ScopedDPIAwarenessDisabler.h index 0b928019dd..4894cb1370 100644 --- a/modules/juce_gui_extra/embedding/juce_ScopedDPIAwarenessDisabler.h +++ b/modules/juce_gui_extra/embedding/juce_ScopedDPIAwarenessDisabler.h @@ -41,6 +41,8 @@ namespace juce You shouldn't use this unless you really know what you are doing and are dealing with native HWNDs. + + @tags{GUI} */ class JUCE_API ScopedDPIAwarenessDisabler { diff --git a/modules/juce_gui_extra/juce_gui_extra.h b/modules/juce_gui_extra/juce_gui_extra.h index 2236105167..7aaf5555f8 100644 --- a/modules/juce_gui_extra/juce_gui_extra.h +++ b/modules/juce_gui_extra/juce_gui_extra.h @@ -24,6 +24,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -33,16 +34,16 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_gui_extra - vendor: juce - version: 5.4.5 - name: JUCE extended GUI classes - description: Miscellaneous GUI classes for specialised tasks. - website: http://www.juce.com/juce - license: GPL/Commercial + ID: juce_gui_extra + vendor: juce + version: 5.4.7 + name: JUCE extended GUI classes + description: Miscellaneous GUI classes for specialised tasks. + website: http://www.juce.com/juce + license: GPL/Commercial - dependencies: juce_gui_basics - OSXFrameworks: WebKit + dependencies: juce_gui_basics + OSXFrameworks: WebKit END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_gui_extra/native/java/app/com/roli/juce/JuceWebView.java b/modules/juce_gui_extra/native/java/app/com/roli/juce/JuceWebView.java index a94815728e..cac5a85ab0 100644 --- a/modules/juce_gui_extra/native/java/app/com/roli/juce/JuceWebView.java +++ b/modules/juce_gui_extra/native/java/app/com/roli/juce/JuceWebView.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import android.graphics.Bitmap; diff --git a/modules/juce_gui_extra/native/javaopt/app/com/roli/juce/JuceFirebaseInstanceIdService.java b/modules/juce_gui_extra/native/javaopt/app/com/roli/juce/JuceFirebaseInstanceIdService.java index 9988249dba..443f7d4a1e 100644 --- a/modules/juce_gui_extra/native/javaopt/app/com/roli/juce/JuceFirebaseInstanceIdService.java +++ b/modules/juce_gui_extra/native/javaopt/app/com/roli/juce/JuceFirebaseInstanceIdService.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import com.google.firebase.iid.*; diff --git a/modules/juce_gui_extra/native/javaopt/app/com/roli/juce/JuceFirebaseMessagingService.java b/modules/juce_gui_extra/native/javaopt/app/com/roli/juce/JuceFirebaseMessagingService.java index 945440e54c..8923eb0c0a 100644 --- a/modules/juce_gui_extra/native/javaopt/app/com/roli/juce/JuceFirebaseMessagingService.java +++ b/modules/juce_gui_extra/native/javaopt/app/com/roli/juce/JuceFirebaseMessagingService.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import com.google.firebase.messaging.*; diff --git a/modules/juce_gui_extra/native/juce_linux_XEmbedComponent.cpp b/modules/juce_gui_extra/native/juce_linux_XEmbedComponent.cpp index d1c0ae7151..d4395c29b5 100644 --- a/modules/juce_gui_extra/native/juce_linux_XEmbedComponent.cpp +++ b/modules/juce_gui_extra/native/juce_linux_XEmbedComponent.cpp @@ -480,6 +480,9 @@ private: if (wantsFocus) owner.moveKeyboardFocusToSibling (false); break; + + default: + break; } } @@ -500,6 +503,9 @@ private: MessageManager::callAsync ([this] {componentMovedOrResized (owner, true, true);}); return true; + + default: + break; } } else if (e.xany.window == host && host != 0) @@ -536,6 +542,9 @@ private: return true; } break; + + default: + break; } } diff --git a/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp b/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp index afdc0b634a..8e01c69646 100644 --- a/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp +++ b/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp @@ -153,12 +153,12 @@ private: { EventHandler (WebBrowserComponent& w) : ComponentMovementWatcher (&w), owner (w) {} - JUCE_COMRESULT GetTypeInfoCount (UINT*) { return E_NOTIMPL; } - JUCE_COMRESULT GetTypeInfo (UINT, LCID, ITypeInfo**) { return E_NOTIMPL; } - JUCE_COMRESULT GetIDsOfNames (REFIID, LPOLESTR*, UINT, LCID, DISPID*) { return E_NOTIMPL; } + JUCE_COMRESULT GetTypeInfoCount (UINT*) override { return E_NOTIMPL; } + JUCE_COMRESULT GetTypeInfo (UINT, LCID, ITypeInfo**) override { return E_NOTIMPL; } + JUCE_COMRESULT GetIDsOfNames (REFIID, LPOLESTR*, UINT, LCID, DISPID*) override { return E_NOTIMPL; } JUCE_COMRESULT Invoke (DISPID dispIdMember, REFIID /*riid*/, LCID /*lcid*/, WORD /*wFlags*/, DISPPARAMS* pDispParams, - VARIANT* /*pVarResult*/, EXCEPINFO* /*pExcepInfo*/, UINT* /*puArgErr*/) + VARIANT* /*pVarResult*/, EXCEPINFO* /*pExcepInfo*/, UINT* /*puArgErr*/) override { if (dispIdMember == DISPID_BEFORENAVIGATE2) { diff --git a/modules/juce_opengl/juce_opengl.cpp b/modules/juce_opengl/juce_opengl.cpp index e3e96e8cda..b9ad3502d0 100644 --- a/modules/juce_opengl/juce_opengl.cpp +++ b/modules/juce_opengl/juce_opengl.cpp @@ -48,7 +48,7 @@ #elif JUCE_WINDOWS #include - #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + #if ! JUCE_MINGW && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES #pragma comment(lib, "OpenGL32.Lib") #endif diff --git a/modules/juce_opengl/juce_opengl.h b/modules/juce_opengl/juce_opengl.h index 19f67c98c3..f056ceb861 100644 --- a/modules/juce_opengl/juce_opengl.h +++ b/modules/juce_opengl/juce_opengl.h @@ -24,6 +24,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -33,19 +34,19 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_opengl - vendor: juce - version: 5.4.5 - name: JUCE OpenGL classes - description: Classes for rendering OpenGL in a JUCE window. - website: http://www.juce.com/juce - license: GPL/Commercial + ID: juce_opengl + vendor: juce + version: 5.4.7 + name: JUCE OpenGL classes + description: Classes for rendering OpenGL in a JUCE window. + website: http://www.juce.com/juce + license: GPL/Commercial - dependencies: juce_gui_extra - OSXFrameworks: OpenGL - iOSFrameworks: OpenGLES - linuxLibs: GL - mingwLibs: opengl32 + dependencies: juce_gui_extra + OSXFrameworks: OpenGL + iOSFrameworks: OpenGLES + linuxLibs: GL + mingwLibs: opengl32 END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_opengl/native/java/app/com/roli/juce/JuceOpenGLView.java b/modules/juce_opengl/native/java/app/com/roli/juce/JuceOpenGLView.java index 727c97e2b6..a9f71bb76f 100644 --- a/modules/juce_opengl/native/java/app/com/roli/juce/JuceOpenGLView.java +++ b/modules/juce_opengl/native/java/app/com/roli/juce/JuceOpenGLView.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import android.content.Context; diff --git a/modules/juce_opengl/native/juce_OpenGL_win32.h b/modules/juce_opengl/native/juce_OpenGL_win32.h index 95c2dd68e3..a86b2f6f9f 100644 --- a/modules/juce_opengl/native/juce_OpenGL_win32.h +++ b/modules/juce_opengl/native/juce_OpenGL_win32.h @@ -28,16 +28,9 @@ namespace juce { extern ComponentPeer* createNonRepaintingEmbeddedWindowsPeer (Component&, void* parent); -extern bool shouldScaleGLWindow (void* hwnd); - -#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client && JucePlugin_Build_VST - bool juce_shouldDoubleScaleNativeGLWindow(); -#else - bool juce_shouldDoubleScaleNativeGLWindow() { return false; } -#endif #if JUCE_WIN_PER_MONITOR_DPI_AWARE - void setProcessDPIAwarenessIfNecessary (void*); + extern void setThreadDPIAwarenessForWindow (HWND); #endif //============================================================================== @@ -106,7 +99,7 @@ public: bool initialiseOnRenderThread (OpenGLContext& c) { #if JUCE_WIN_PER_MONITOR_DPI_AWARE - setProcessDPIAwarenessIfNecessary (nativeWindow->getNativeHandle()); + setThreadDPIAwarenessForWindow ((HWND) nativeWindow->getNativeHandle()); #endif context = &c; @@ -157,12 +150,12 @@ public: struct Locker { Locker (NativeContext&) {} }; - double getWindowScaleFactor (const Rectangle& screenBounds) + HWND getNativeHandle() { - if (nativeWindow != nullptr && shouldScaleGLWindow (nativeWindow->getNativeHandle())) - return Desktop::getInstance().getDisplays().findDisplayForRect (screenBounds).scale; + if (nativeWindow != nullptr) + return (HWND) nativeWindow->getNativeHandle(); - return Desktop::getInstance().getGlobalScaleFactor(); + return nullptr; } private: @@ -205,9 +198,6 @@ private: { auto newScale = peer->getPlatformScaleFactor(); - if (juce_shouldDoubleScaleNativeGLWindow()) - newScale *= newScale; - if (! approximatelyEqual (newScale, nativeScaleFactor)) { nativeScaleFactor = newScale; @@ -238,9 +228,6 @@ private: safeComponent = Component::SafePointer (&component); nativeScaleFactor = peer->getPlatformScaleFactor(); - if (juce_shouldDoubleScaleNativeGLWindow()) - nativeScaleFactor *= nativeScaleFactor; - startTimer (50); #endif diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp index b6257456be..de094a58f3 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp @@ -66,6 +66,10 @@ private: #endif +#if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + extern JUCE_API double getScaleFactorForWindow (HWND); +#endif + //============================================================================== class OpenGLContext::CachedImage : public CachedComponentImage, private ThreadPoolJob @@ -292,14 +296,16 @@ public: { if (auto* peer = component.getPeer()) { - #if JUCE_WINDOWS - auto newScale = nativeContext->getWindowScaleFactor (component.getTopLevelComponent()->getScreenBounds()); - #else - auto newScale = Desktop::getInstance().getDisplays().findDisplayForRect (component.getTopLevelComponent()->getScreenBounds()).scale; - #endif - auto localBounds = component.getLocalBounds(); - auto newArea = peer->getComponent().getLocalArea (&component, localBounds).withZeroOrigin() * newScale; + auto displayScale = Desktop::getInstance().getDisplays().findDisplayForRect (component.getTopLevelComponent()->getScreenBounds()).scale; + + auto newArea = peer->getComponent().getLocalArea (&component, localBounds).withZeroOrigin() * displayScale; + + #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + auto newScale = getScaleFactorForWindow (nativeContext->getNativeHandle()); + #else + auto newScale = displayScale; + #endif if (scale != newScale || viewportArea != newArea) { diff --git a/modules/juce_opengl/opengl/juce_OpenGLTexture.cpp b/modules/juce_opengl/opengl/juce_OpenGLTexture.cpp index 8cc0acf58f..15d84126fd 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLTexture.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLTexture.cpp @@ -137,6 +137,7 @@ void OpenGLTexture::loadImage (const Image& image) case Image::ARGB: Flipper ::flip (dataCopy, srcData.data, srcData.lineStride, imageW, imageH); break; case Image::RGB: Flipper ::flip (dataCopy, srcData.data, srcData.lineStride, imageW, imageH); break; case Image::SingleChannel: Flipper::flip (dataCopy, srcData.data, srcData.lineStride, imageW, imageH); break; + case Image::UnknownFormat: default: break; } diff --git a/modules/juce_osc/juce_osc.h b/modules/juce_osc/juce_osc.h index e4edc3d90e..4372e1eccc 100644 --- a/modules/juce_osc/juce_osc.h +++ b/modules/juce_osc/juce_osc.h @@ -24,6 +24,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -33,15 +34,15 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_osc - vendor: juce - version: 5.4.5 - name: JUCE OSC classes - description: Open Sound Control implementation. - website: http://www.juce.com/juce - license: GPL/Commercial + ID: juce_osc + vendor: juce + version: 5.4.7 + name: JUCE OSC classes + description: Open Sound Control implementation. + website: http://www.juce.com/juce + license: GPL/Commercial - dependencies: juce_core, juce_events + dependencies: juce_core, juce_events END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_osc/osc/juce_OSCAddress.cpp b/modules/juce_osc/osc/juce_OSCAddress.cpp index f9c17ea94b..f7b66ab9d6 100644 --- a/modules/juce_osc/osc/juce_OSCAddress.cpp +++ b/modules/juce_osc/osc/juce_OSCAddress.cpp @@ -175,6 +175,7 @@ namespace break; } // else = special case: fall through to default and treat '!' as a non-special character. + JUCE_FALLTHROUGH default: set.add (c); diff --git a/modules/juce_osc/osc/juce_OSCBundle.h b/modules/juce_osc/osc/juce_OSCBundle.h index a569da7ae0..23ed8d04b9 100644 --- a/modules/juce_osc/osc/juce_OSCBundle.h +++ b/modules/juce_osc/osc/juce_OSCBundle.h @@ -64,7 +64,7 @@ public: An OSCBundle Element contains either one OSCMessage or one OSCBundle. */ - class Element + class JUCE_API Element { public: //============================================================================== diff --git a/modules/juce_product_unlocking/in_app_purchases/juce_InAppPurchases.h b/modules/juce_product_unlocking/in_app_purchases/juce_InAppPurchases.h index 38d2176768..8f710dde2d 100644 --- a/modules/juce_product_unlocking/in_app_purchases/juce_InAppPurchases.h +++ b/modules/juce_product_unlocking/in_app_purchases/juce_InAppPurchases.h @@ -200,9 +200,9 @@ public: @param productIdentifier The product identifier. - @param upgradeOrDowngradeFromSubscriptionsWithProductIdentifier (Android only) specifies the subscription that will be replaced by - the one being purchased now. Used only when buying a subscription - that is an upgrade or downgrade from another. + @param upgradeOrDowngradeFromSubscriptionWithProductIdentifier (Android only) specifies the subscription that will be replaced by + the one being purchased now. Used only when buying a subscription + that is an upgrade or downgrade from another. @param creditForUnusedSubscription (Android only) controls whether a user should be credited for any unused subscription time on the product that is being upgraded or downgraded. diff --git a/modules/juce_product_unlocking/juce_product_unlocking.h b/modules/juce_product_unlocking/juce_product_unlocking.h index 6f6875078d..9de315160a 100644 --- a/modules/juce_product_unlocking/juce_product_unlocking.h +++ b/modules/juce_product_unlocking/juce_product_unlocking.h @@ -24,6 +24,7 @@ ============================================================================== */ + /******************************************************************************* The block below describes the properties of this module, and is read by the Projucer to automatically generate project code that uses it. @@ -33,15 +34,15 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_product_unlocking - vendor: juce - version: 5.4.5 - name: JUCE Online marketplace support - description: Classes for online product authentication - website: http://www.juce.com/juce - license: GPL/Commercial + ID: juce_product_unlocking + vendor: juce + version: 5.4.7 + name: JUCE Online marketplace support + description: Classes for online product authentication + website: http://www.juce.com/juce + license: GPL/Commercial - dependencies: juce_cryptography juce_core, juce_events + dependencies: juce_cryptography juce_core, juce_events END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_product_unlocking/juce_product_unlocking.mm b/modules/juce_product_unlocking/juce_product_unlocking.mm index 2f1f3c9899..621a90fac7 100644 --- a/modules/juce_product_unlocking/juce_product_unlocking.mm +++ b/modules/juce_product_unlocking/juce_product_unlocking.mm @@ -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 diff --git a/modules/juce_product_unlocking/native/javaopt/app/com/roli/juce/JuceBillingClient.java b/modules/juce_product_unlocking/native/javaopt/app/com/roli/juce/JuceBillingClient.java index ad63f5ba6e..415f9918c1 100644 --- a/modules/juce_product_unlocking/native/javaopt/app/com/roli/juce/JuceBillingClient.java +++ b/modules/juce_product_unlocking/native/javaopt/app/com/roli/juce/JuceBillingClient.java @@ -1,8 +1,34 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import com.android.billingclient.api.*; -public class JuceBillingClient implements PurchasesUpdatedListener { +public class JuceBillingClient implements PurchasesUpdatedListener, BillingClientStateListener { private native void skuDetailsQueryCallback(long host, java.util.List skuDetails); private native void purchasesListQueryCallback(long host, java.util.List purchases); private native void purchaseCompletedCallback(long host, Purchase purchase, int responseCode); @@ -16,7 +42,7 @@ public class JuceBillingClient implements PurchasesUpdatedListener { .setListener(this) .build(); - billingClient.startConnection(null); + billingClient.startConnection(this); } public void endConnection() { @@ -127,6 +153,18 @@ public class JuceBillingClient implements PurchasesUpdatedListener { } } + @Override + public void onBillingServiceDisconnected() + { + + } + + @Override + public void onBillingSetupFinished(BillingResult billingResult) + { + + } + private void executeOnBillingClientConnection(Runnable runnable) { if (billingClient.isReady()) { runnable.run(); @@ -162,7 +200,12 @@ public class JuceBillingClient implements PurchasesUpdatedListener { @Override public void run() { AcknowledgePurchaseParams acknowledgePurchaseParams = AcknowledgePurchaseParams.newBuilder().setPurchaseToken(purchase.getPurchaseToken()).build(); - billingClient.acknowledgePurchase(acknowledgePurchaseParams, null); + billingClient.acknowledgePurchase(acknowledgePurchaseParams, new AcknowledgePurchaseResponseListener() { + @Override + public void onAcknowledgePurchaseResponse(BillingResult billingResult) { + + } + }); } }); } diff --git a/modules/juce_product_unlocking/native/juce_ios_InAppPurchases.cpp b/modules/juce_product_unlocking/native/juce_ios_InAppPurchases.cpp index 3d66bd0600..1bf303e243 100644 --- a/modules/juce_product_unlocking/native/juce_ios_InAppPurchases.cpp +++ b/modules/juce_product_unlocking/native/juce_ios_InAppPurchases.cpp @@ -100,7 +100,7 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver [download retain]; } - ~DownloadImpl() + ~DownloadImpl() override { [download release]; } @@ -112,7 +112,7 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver int64 getContentLength() const override { return download.contentLength; } Status getStatus() const override { return SKDownloadStateToDownloadStatus (download.downloadState); } #else - int64 getContentLength() const override { return [download.contentLength longLongValue]; } + int64 getContentLength() const override { return download.expectedContentLength; } Status getStatus() const override { return SKDownloadStateToDownloadStatus (download.state); } #endif @@ -180,7 +180,7 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver //============================================================================== Pimpl (InAppPurchases& p) : owner (p) { [[SKPaymentQueue defaultQueue] addTransactionObserver: delegate.get()]; } - ~Pimpl() noexcept { [[SKPaymentQueue defaultQueue] removeTransactionObserver: delegate.get()]; } + ~Pimpl() noexcept override { [[SKPaymentQueue defaultQueue] removeTransactionObserver: delegate.get()]; } //============================================================================== bool isInAppPurchasesSupported() const { return true; } @@ -567,7 +567,8 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver #endif // TODO: use juce URL here - auto storeRequest = [NSMutableURLRequest requestWithURL: [NSURL URLWithString: nsStringLiteral (storeURL)]]; + auto* urlPtr = [NSURL URLWithString: nsStringLiteral (storeURL)]; + auto storeRequest = [NSMutableURLRequest requestWithURL: urlPtr]; [storeRequest setHTTPMethod: nsStringLiteral ("POST")]; [storeRequest setHTTPBody: requestData]; diff --git a/modules/juce_video/juce_video.cpp b/modules/juce_video/juce_video.cpp index bec17ed285..c3f89fc16f 100644 --- a/modules/juce_video/juce_video.cpp +++ b/modules/juce_video/juce_video.cpp @@ -45,24 +45,24 @@ #import //============================================================================== -#elif JUCE_MSVC +#elif JUCE_WINDOWS && ! JUCE_MINGW /* 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 #include - #if JUCE_USE_CAMERA && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - #pragma comment (lib, "Strmiids.lib") - #pragma comment (lib, "wmvcore.lib") - #endif - - #if JUCE_MEDIAFOUNDATION && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - #pragma comment (lib, "mfuuid.lib") - #endif - - #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES #pragma comment (lib, "strmiids.lib") + + #if JUCE_USE_CAMERA + #pragma comment (lib, "Strmiids.lib") + #pragma comment (lib, "wmvcore.lib") + #endif + + #if JUCE_MEDIAFOUNDATION + #pragma comment (lib, "mfuuid.lib") + #endif #endif #endif diff --git a/modules/juce_video/juce_video.h b/modules/juce_video/juce_video.h index dc1fd76092..a871101322 100644 --- a/modules/juce_video/juce_video.h +++ b/modules/juce_video/juce_video.h @@ -34,17 +34,17 @@ BEGIN_JUCE_MODULE_DECLARATION - ID: juce_video - vendor: juce - version: 5.4.5 - 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 + ID: juce_video + vendor: juce + version: 5.4.7 + 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_gui_extra - OSXFrameworks: AVKit AVFoundation CoreMedia - iOSFrameworks: AVKit AVFoundation CoreMedia + dependencies: juce_gui_extra + OSXFrameworks: AVKit AVFoundation CoreMedia + iOSFrameworks: AVKit AVFoundation CoreMedia END_JUCE_MODULE_DECLARATION diff --git a/modules/juce_video/native/java/app/com/roli/juce/CameraCaptureSessionCaptureCallback.java b/modules/juce_video/native/java/app/com/roli/juce/CameraCaptureSessionCaptureCallback.java index 8fdd9d67b0..0991a18d4c 100644 --- a/modules/juce_video/native/java/app/com/roli/juce/CameraCaptureSessionCaptureCallback.java +++ b/modules/juce_video/native/java/app/com/roli/juce/CameraCaptureSessionCaptureCallback.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import android.hardware.camera2.CameraCaptureSession; diff --git a/modules/juce_video/native/java/app/com/roli/juce/CameraCaptureSessionStateCallback.java b/modules/juce_video/native/java/app/com/roli/juce/CameraCaptureSessionStateCallback.java index b800f60277..cfa22181a1 100644 --- a/modules/juce_video/native/java/app/com/roli/juce/CameraCaptureSessionStateCallback.java +++ b/modules/juce_video/native/java/app/com/roli/juce/CameraCaptureSessionStateCallback.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import android.hardware.camera2.CameraCaptureSession; diff --git a/modules/juce_video/native/java/app/com/roli/juce/CameraDeviceStateCallback.java b/modules/juce_video/native/java/app/com/roli/juce/CameraDeviceStateCallback.java index 49cb45b786..07d6465dac 100644 --- a/modules/juce_video/native/java/app/com/roli/juce/CameraDeviceStateCallback.java +++ b/modules/juce_video/native/java/app/com/roli/juce/CameraDeviceStateCallback.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import android.hardware.camera2.CameraDevice; diff --git a/modules/juce_video/native/java/app/com/roli/juce/JuceOrientationEventListener.java b/modules/juce_video/native/java/app/com/roli/juce/JuceOrientationEventListener.java index 3d0c396793..d255b4c6fb 100644 --- a/modules/juce_video/native/java/app/com/roli/juce/JuceOrientationEventListener.java +++ b/modules/juce_video/native/java/app/com/roli/juce/JuceOrientationEventListener.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import android.view.OrientationEventListener; diff --git a/modules/juce_video/native/java/app/com/roli/juce/MediaControllerCallback.java b/modules/juce_video/native/java/app/com/roli/juce/MediaControllerCallback.java index a0f8ce37ff..db6426222a 100644 --- a/modules/juce_video/native/java/app/com/roli/juce/MediaControllerCallback.java +++ b/modules/juce_video/native/java/app/com/roli/juce/MediaControllerCallback.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import android.media.session.MediaController; diff --git a/modules/juce_video/native/java/app/com/roli/juce/MediaSessionCallback.java b/modules/juce_video/native/java/app/com/roli/juce/MediaSessionCallback.java index 882ae07157..69d376d3a0 100644 --- a/modules/juce_video/native/java/app/com/roli/juce/MediaSessionCallback.java +++ b/modules/juce_video/native/java/app/com/roli/juce/MediaSessionCallback.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import android.media.session.MediaSession; diff --git a/modules/juce_video/native/java/app/com/roli/juce/SystemVolumeObserver.java b/modules/juce_video/native/java/app/com/roli/juce/SystemVolumeObserver.java index 86df1a9f30..03d02dbde3 100644 --- a/modules/juce_video/native/java/app/com/roli/juce/SystemVolumeObserver.java +++ b/modules/juce_video/native/java/app/com/roli/juce/SystemVolumeObserver.java @@ -1,3 +1,29 @@ +/* + ============================================================================== + + 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. + + ============================================================================== +*/ + package com.roli.juce; import android.database.ContentObserver; diff --git a/modules/juce_video/native/juce_android_CameraDevice.h b/modules/juce_video/native/juce_android_CameraDevice.h index ae1aa9e594..7ca79a4e88 100644 --- a/modules/juce_video/native/juce_android_CameraDevice.h +++ b/modules/juce_video/native/juce_android_CameraDevice.h @@ -1325,6 +1325,7 @@ private: return (cameraSensorOrientation + 180) % 360; } break; + case Desktop::allOrientations: default: return 0; } diff --git a/modules/juce_video/native/juce_android_Video.h b/modules/juce_video/native/juce_android_Video.h index 5b64a881ca..0c97e7cf5d 100644 --- a/modules/juce_video/native/juce_android_Video.h +++ b/modules/juce_video/native/juce_android_Video.h @@ -4,20 +4,22 @@ This file is part of the JUCE library. Copyright (c) 2018 - 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 + JUCE is an open source library subject to commercial or open-source + licensing. - Details of these licenses can be found at: www.gnu.org/licenses + 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 2018). - 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. + 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). - To release a closed-source product which uses JUCE, commercial licenses are - available: visit www.juce.com for more information. + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. ============================================================================== */ diff --git a/modules/juce_video/native/juce_mac_Video.h b/modules/juce_video/native/juce_mac_Video.h index 0d2d771ebe..dc0cad7053 100644 --- a/modules/juce_video/native/juce_mac_Video.h +++ b/modules/juce_video/native/juce_mac_Video.h @@ -4,20 +4,22 @@ This file is part of the JUCE library. Copyright (c) 2018 - 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 + JUCE is an open source library subject to commercial or open-source + licensing. - Details of these licenses can be found at: www.gnu.org/licenses + 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 2018). - 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. + 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). - To release a closed-source product which uses JUCE, commercial licenses are - available: visit www.juce.com for more information. + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. ============================================================================== */ @@ -394,8 +396,11 @@ private: notifyOwnerPreparationFinished (url, Result::fail (errorMessage), nullptr); return; } + + case AVKeyValueStatusUnknown: + case AVKeyValueStatusLoading: default: - {} + break; } }