From: IOhannes m zmölnig Date: Wed, 20 Jan 2021 08:34:12 +0000 (+0100) Subject: New upstream version 6.0.7~ds0 X-Git-Tag: archive/raspbian/6.1.5_ds0-1+rpi1^2~18^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=89a9e1c0912cf208fc23faaceafc617d3bf21bc1;p=juce.git New upstream version 6.0.7~ds0 --- diff --git a/BREAKING-CHANGES.txt b/BREAKING-CHANGES.txt index 51ef929c..8b3cdcbf 100644 --- a/BREAKING-CHANGES.txt +++ b/BREAKING-CHANGES.txt @@ -1,6 +1,51 @@ JUCE breaking changes ===================== +Version 6.0.6 +============= + +Change +------ +The name of `OperatingSystemType::MacOSX_11_0` was changed to +`OperatingSystemType::MacOS_11`. + +Possible Issues +--------------- +Code using the old name will not build until it is updated to use the new name. + +Workaround +---------- +Update code using the old name to use the new name instead. + +Rationale +--------- +Newer versions of macOS have dropped the "X" naming. Minor version updates are +also less significant now than they were for the X-series. + + +Change +------ +Xcode projects generated using the Projucer will now use the "New Build System" +instead of the "Legacy Build System" by default. + +Possible Issues +--------------- +Xcode 10.0 - 10.2 has some known issues when using the new build system such as +JUCE modules not rebuilding correctly when modified, issue and file navigation +not working, and breakpoints not being reliably set or hit. + +Workaround +---------- +If you are using an affected version of Xcode then you can enable the "Use +Legacy Build System" setting in the Projucer Xcode exporter to go back to the +previous behaviour. + +Rationale +--------- +The legacy build system has issues building arm64 binaries for Apple silicon +and will eventually be removed altogether. + + Version 6.0.5 ============= diff --git a/CMakeLists.txt b/CMakeLists.txt index f4b68732..07ae7158 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ cmake_minimum_required(VERSION 3.12) -project(JUCE VERSION 6.0.5 LANGUAGES C CXX) +project(JUCE VERSION 6.0.7 LANGUAGES C CXX) set_property(GLOBAL PROPERTY USE_FOLDERS YES) diff --git a/ChangeList.txt b/ChangeList.txt index 3ba03f38..6b0c2428 100644 --- a/ChangeList.txt +++ b/ChangeList.txt @@ -3,6 +3,18 @@ This file just lists the more notable headline features. For more detailed info about minor changes and bugfixes, please see the git log! +Version 6.0.7 + - Fixed a macOS drawing issue + - Updated the DemoRunner bundle ID + +Version 6.0.6 + - Moved to the new CoreMIDI API on supported platforms + - Added support for the "New Build System" in Xcode + - Made the audio format readers more robust + - Improved the HiResTimer implementation + - Fixed a VST3 program parameter issue + - Updated to Oboe 1.5 on Android + Version 6.0.5 - Added more support for styling PopupMenus - Fixed some race conditions in the IPC and name named pipe classes diff --git a/README.md b/README.md index 60af0f08..8e4098ae 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Version 3.15 or higher is required for plugin projects, and strongly recommended for other project types. To use CMake, you will need to install it, either from your system package manager or from the [official download page](https://cmake.org/download/). For comprehensive documentation on JUCE's -CMake API, see the [JUCE CMake documentation](/docs/CMake API.md). For examples +CMake API, see the [JUCE CMake documentation](/docs/CMake%20API.md). For examples which may be useful as starting points for new CMake projects, see the [CMake examples directory](/examples/CMake). @@ -60,7 +60,8 @@ of the target you wish to build. - __macOS/iOS__: macOS 10.11 and Xcode 7.3.1 - __Windows__: Windows 8.1 and Visual Studio 2015 64-bit -- __Linux__: GCC 4.8 +- __Linux__: GCC 4.8 (for a full list of dependencies, see +[here](/docs/Linux%20Dependencies.md)). - __Android__: Android Studio on Windows, macOS or Linux #### Deployment Targets diff --git a/docs/CMake API.md b/docs/CMake API.md index 5328f44c..86907215 100644 --- a/docs/CMake API.md +++ b/docs/CMake API.md @@ -412,11 +412,13 @@ attributes directly to these creation functions, rather than adding them later. - `PLUGIN_MANUFACTURER_CODE` - A four-character unique ID for your company. For AU compatibility, this must contain at least - one upper-case letter. + one upper-case letter. GarageBand 10.3 requires the first letter to be upper-case, and the + remaining letters to be lower-case. - `PLUGIN_CODE` - - A four-character unique ID for your plugin. For AU compatibility, this must contain at least - one upper-case letter. + - A four-character unique ID for your plugin. For AU compatibility, this must contain exactly one + upper-case letter. GarageBand 10.3 requires the first letter to be upper-case, and the remaining + letters to be lower-case. - `DESCRIPTION` - A short description of your plugin. diff --git a/docs/Linux Dependencies.md b/docs/Linux Dependencies.md new file mode 100644 index 00000000..107bce18 --- /dev/null +++ b/docs/Linux Dependencies.md @@ -0,0 +1,58 @@ +# JUCE Dependencies on Linux + +Below is a list of the current dependencies required to build JUCE projects on +Ubuntu, separated by module. Where the dependency is optional, the preprocessor +flag used to disable it is noted. + +This has been tested on Ubuntu 16.04 LTS (Xenial Xerus), 18.04 LTS (Bionic +Beaver), and 20.04 LTS (Focal Fossa). Packages may differ in name or not be +available on other distrubutions. + +## Compiler +A C++ compiler is required. JUCE has been tested thoroughly with Clang and GCC: + + sudo apt update + sudo apt install clang + +or + + sudo apt update + sudo apt install g++ + +## Packages + +#### juce_audio_devices +- libasound2-dev +- libjack-jackd2-dev (unless `JUCE_JACK=0`) + +#### juce_core +- libcurl4-openssl-dev (unless `JUCE_USE_CURL=0`) + +#### juce_graphics +- libfreetype6-dev (unless `JUCE_USE_FREETYPE=0`) + +#### juce_gui_basics +- libx11-dev +- libxcomposite-dev +- libxcursor-dev (unless `JUCE_USE_XCURSOR=0`) +- libxext-dev +- libxinerama-dev (unless `JUCE_USE_XINERAMA=0`) +- libxrandr-dev (unless `JUCE_USE_XRANDR=0`) +- libxrender-dev (unless `JUCE_USE_XRENDER=0`) + +#### juce_gui_extra +- webkit2gtk-4.0 (unless `JUCE_WEB_BROWSER=0`) + +#### juce_opengl +- libglu1-mesa-dev +- mesa-common-dev + +The full command is as follows: + + sudo apt update + sudo apt install libasound2-dev libjack-jackd2-dev \ + libcurl4-openssl-dev \ + libfreetype6-dev \ + libx11-dev libxcomposite-dev libxcursor-dev libxcursor-dev libxext-dev libxinerama-dev libxrandr-dev libxrender-dev \ + libwebkit2gtk-4.0-dev \ + libglu1-mesa-dev mesa-common-dev diff --git a/examples/Assets/DSPDemos_Common.h b/examples/Assets/DSPDemos_Common.h index 589d597b..5bb3d966 100644 --- a/examples/Assets/DSPDemos_Common.h +++ b/examples/Assets/DSPDemos_Common.h @@ -587,37 +587,42 @@ private: { audioFileReader.stop(); - if (fileChooser == nullptr) + if (fileChooser != nullptr) + return; + + SafePointer safeThis (this); + + if (! RuntimePermissions::isGranted (RuntimePermissions::readExternalStorage)) { - SafePointer safeThis (this); + RuntimePermissions::request (RuntimePermissions::readExternalStorage, + [safeThis] (bool granted) mutable + { + if (granted) + safeThis->openFile(); + }); + return; + } - if (! RuntimePermissions::isGranted (RuntimePermissions::readExternalStorage)) - { - RuntimePermissions::request (RuntimePermissions::readExternalStorage, - [safeThis] (bool granted) mutable - { - if (granted) - safeThis->openFile(); - }); - return; - } + fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif")); - fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif")); + fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles, + [safeThis] (const FileChooser& fc) mutable + { + if (safeThis == nullptr) + return; - fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles, - [safeThis] (const FileChooser& fc) mutable + if (fc.getURLResults().size() > 0) { - if (safeThis != nullptr && fc.getURLResults().size() > 0) - { - auto u = fc.getURLResult(); - - if (! safeThis->audioFileReader.loadURL (u)) - NativeMessageBox::showOkCancelBox (AlertWindow::WarningIcon, "Error loading file", "Unable to load audio file", nullptr, nullptr); - else - safeThis->thumbnailComp.setCurrentURL (u); - } - }, nullptr); - } + auto u = fc.getURLResult(); + + if (! safeThis->audioFileReader.loadURL (u)) + NativeMessageBox::showOkCancelBox (AlertWindow::WarningIcon, "Error loading file", "Unable to load audio file", nullptr, nullptr); + else + safeThis->thumbnailComp.setCurrentURL (u); + } + + safeThis->fileChooser = nullptr; + }, nullptr); } void changeListenerCallback (ChangeBroadcaster*) override diff --git a/examples/CMake/AudioPlugin/CMakeLists.txt b/examples/CMake/AudioPlugin/CMakeLists.txt index 645d5ece..c808704e 100644 --- a/examples/CMake/AudioPlugin/CMakeLists.txt +++ b/examples/CMake/AudioPlugin/CMakeLists.txt @@ -49,7 +49,8 @@ juce_add_plugin(AudioPluginExample # EDITOR_WANTS_KEYBOARD_FOCUS TRUE/FALSE # Does the editor need keyboard focus? # COPY_PLUGIN_AFTER_BUILD TRUE/FALSE # Should the plugin be installed to a default location after building? PLUGIN_MANUFACTURER_CODE Juce # A four-character manufacturer id with at least one upper-case character - PLUGIN_CODE Dem0 # A unique four-character plugin id with at least one upper-case character + PLUGIN_CODE Dem0 # A unique four-character plugin id with exactly one upper-case character + # GarageBand 10.3 requires the first letter to be upper-case, and the remaining letters to be lower-case FORMATS AU VST3 Standalone # The formats to build. Other valid formats are: AAX Unity VST AU AUv3 PRODUCT_NAME "Audio Plugin Example") # The name of the final executable, which can differ from the target name diff --git a/examples/CMake/AudioPlugin/PluginProcessor.cpp b/examples/CMake/AudioPlugin/PluginProcessor.cpp index 31394624..0dd5ac2a 100644 --- a/examples/CMake/AudioPlugin/PluginProcessor.cpp +++ b/examples/CMake/AudioPlugin/PluginProcessor.cpp @@ -105,6 +105,8 @@ bool AudioPluginAudioProcessor::isBusesLayoutSupported (const BusesLayout& layou #else // This is the place where you check if the layout is supported. // In this template code we only support mono or stereo. + // Some plugin hosts, such as certain GarageBand versions, will only + // load plugins that support stereo bus layouts. if (layouts.getMainOutputChannelSet() != juce::AudioChannelSet::mono() && layouts.getMainOutputChannelSet() != juce::AudioChannelSet::stereo()) return false; diff --git a/examples/DemoRunner/Builds/Android/app/CMakeLists.txt b/examples/DemoRunner/Builds/Android/app/CMakeLists.txt index c3fb7461..b517aa27 100644 --- a/examples/DemoRunner/Builds/Android/app/CMakeLists.txt +++ b/examples/DemoRunner/Builds/Android/app/CMakeLists.txt @@ -12,7 +12,7 @@ add_subdirectory (${OBOE_DIR} ./oboe) 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/rmsl/juce/JuceActivity\"" "-DJUCE_CONTENT_SHARING=1" "-DJUCE_ANDROID_GL_ES_VERSION_3_0=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=6.0.5" "-DJUCE_APP_VERSION_HEX=0x60005") +add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=23" "-DJUCE_PUSH_NOTIFICATIONS=1" "-DJUCE_PUSH_NOTIFICATIONS_ACTIVITY=\"com/rmsl/juce/JuceActivity\"" "-DJUCE_CONTENT_SHARING=1" "-DJUCE_ANDROID_GL_ES_VERSION_3_0=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=6.0.7" "-DJUCE_APP_VERSION_HEX=0x60007") include_directories( AFTER "../../../JuceLibraryCode" @@ -23,9 +23,9 @@ include_directories( AFTER enable_language(ASM) if(JUCE_BUILD_CONFIGURATION MATCHES "DEBUG") - add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_blocks_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=6.0.5" "-DJUCE_APP_VERSION_HEX=0x60005" "-DDEBUG=1" "-D_DEBUG=1") + add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_blocks_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=6.0.7" "-DJUCE_APP_VERSION_HEX=0x60007" "-DDEBUG=1" "-D_DEBUG=1") elseif(JUCE_BUILD_CONFIGURATION MATCHES "RELEASE") - add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_blocks_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=6.0.5" "-DJUCE_APP_VERSION_HEX=0x60005" "-DNDEBUG=1") + add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_blocks_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=6.0.7" "-DJUCE_APP_VERSION_HEX=0x60007" "-DNDEBUG=1") else() message( FATAL_ERROR "No matching build-configuration found." ) endif() @@ -138,6 +138,27 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.cpp" "../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h" "../../../../../modules/juce_audio_devices/audio_io/juce_SystemAudioVolume.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPacket.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPackets.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConversion.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConverters.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPDispatcher.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPFactory.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPIterator.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToBytestreamTranslator.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPProtocols.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPReceiver.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPTests.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.h" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.h" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" @@ -212,6 +233,8 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResampler.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.h" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.cpp" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.cpp" @@ -220,6 +243,8 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.h" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.cpp" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.cpp" @@ -264,7 +289,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/native/juce_linux_JackAudio.cpp" "../../../../../modules/juce_audio_devices/native/juce_linux_Midi.cpp" "../../../../../modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp" - "../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp" + "../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.mm" "../../../../../modules/juce_audio_devices/native/juce_MidiDataConcatenator.h" "../../../../../modules/juce_audio_devices/native/juce_win32_ASIO.cpp" "../../../../../modules/juce_audio_devices/native/juce_win32_DirectSound.cpp" @@ -1895,6 +1920,27 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/ set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/juce_SystemAudioVolume.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPacket.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPackets.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConversion.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConverters.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPDispatcher.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPFactory.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPIterator.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToBytestreamTranslator.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPProtocols.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPReceiver.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPTests.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1969,6 +2015,8 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/native/ob set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResampler.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1977,6 +2025,8 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/native/ob set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -2021,7 +2071,7 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/native/ju set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_linux_JackAudio.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_linux_Midi.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.mm" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_MidiDataConcatenator.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_win32_ASIO.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_win32_DirectSound.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/examples/DemoRunner/Builds/Android/app/build.gradle b/examples/DemoRunner/Builds/Android/app/build.gradle index 555995ee..ac71218b 100644 --- a/examples/DemoRunner/Builds/Android/app/build.gradle +++ b/examples/DemoRunner/Builds/Android/app/build.gradle @@ -18,7 +18,7 @@ android { } defaultConfig { - applicationId "com.rmsl.juce.demorunner" + applicationId "com.rmsl.jucedemorunner" minSdkVersion 23 targetSdkVersion 29 externalNativeBuild { diff --git a/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml b/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml index 0400955b..8c7426bf 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml +++ b/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - diff --git a/examples/DemoRunner/Builds/Android/app/src/main/assets/DSPDemos_Common.h b/examples/DemoRunner/Builds/Android/app/src/main/assets/DSPDemos_Common.h index 589d597b..5bb3d966 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/assets/DSPDemos_Common.h +++ b/examples/DemoRunner/Builds/Android/app/src/main/assets/DSPDemos_Common.h @@ -587,37 +587,42 @@ private: { audioFileReader.stop(); - if (fileChooser == nullptr) + if (fileChooser != nullptr) + return; + + SafePointer safeThis (this); + + if (! RuntimePermissions::isGranted (RuntimePermissions::readExternalStorage)) { - SafePointer safeThis (this); + RuntimePermissions::request (RuntimePermissions::readExternalStorage, + [safeThis] (bool granted) mutable + { + if (granted) + safeThis->openFile(); + }); + return; + } - if (! RuntimePermissions::isGranted (RuntimePermissions::readExternalStorage)) - { - RuntimePermissions::request (RuntimePermissions::readExternalStorage, - [safeThis] (bool granted) mutable - { - if (granted) - safeThis->openFile(); - }); - return; - } + fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif")); - fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif")); + fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles, + [safeThis] (const FileChooser& fc) mutable + { + if (safeThis == nullptr) + return; - fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles, - [safeThis] (const FileChooser& fc) mutable + if (fc.getURLResults().size() > 0) { - if (safeThis != nullptr && fc.getURLResults().size() > 0) - { - auto u = fc.getURLResult(); - - if (! safeThis->audioFileReader.loadURL (u)) - NativeMessageBox::showOkCancelBox (AlertWindow::WarningIcon, "Error loading file", "Unable to load audio file", nullptr, nullptr); - else - safeThis->thumbnailComp.setCurrentURL (u); - } - }, nullptr); - } + auto u = fc.getURLResult(); + + if (! safeThis->audioFileReader.loadURL (u)) + NativeMessageBox::showOkCancelBox (AlertWindow::WarningIcon, "Error loading file", "Unable to load audio file", nullptr, nullptr); + else + safeThis->thumbnailComp.setCurrentURL (u); + } + + safeThis->fileChooser = nullptr; + }, nullptr); } void changeListenerCallback (ChangeBroadcaster*) override diff --git a/examples/DemoRunner/Builds/LinuxMakefile/Makefile b/examples/DemoRunner/Builds/LinuxMakefile/Makefile index 25af0ad2..3d5c2cac 100644 --- a/examples/DemoRunner/Builds/LinuxMakefile/Makefile +++ b/examples/DemoRunner/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_blocks_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.0.5" "-DJUCE_APP_VERSION_HEX=0x60005" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_blocks_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.0.7" "-DJUCE_APP_VERSION_HEX=0x60007" $(shell pkg-config --cflags alsa freetype2 libcurl 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 := DemoRunner @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_blocks_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.0.5" "-DJUCE_APP_VERSION_HEX=0x60005" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_blocks_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.0.7" "-DJUCE_APP_VERSION_HEX=0x60007" $(shell pkg-config --cflags alsa freetype2 libcurl 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 := DemoRunner diff --git a/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj b/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj index 3119b616..4b917a39 100644 --- a/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj +++ b/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj @@ -937,7 +937,7 @@ "DEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_analytics=1", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", @@ -967,8 +967,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=6.0.5", - "JUCE_APP_VERSION_HEX=0x60005", + "JUCE_APP_VERSION=6.0.7", + "JUCE_APP_VERSION_HEX=0x60007", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -980,8 +980,8 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; @@ -989,13 +989,14 @@ INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); 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.rmsl.juce.demorunner; + PRODUCT_BUNDLE_IDENTIFIER = com.rmsl.jucedemorunner; PRODUCT_NAME = "DemoRunner"; USE_HEADERMAP = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL; VALID_ARCHS = "i386 x86_64 arm64 arm64e"; }; name = Debug; @@ -1017,7 +1018,7 @@ "NDEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_analytics=1", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", @@ -1047,8 +1048,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=6.0.5", - "JUCE_APP_VERSION_HEX=0x60005", + "JUCE_APP_VERSION=6.0.7", + "JUCE_APP_VERSION_HEX=0x60007", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -1060,8 +1061,8 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; @@ -1070,13 +1071,14 @@ LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); 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.rmsl.juce.demorunner; + PRODUCT_BUNDLE_IDENTIFIER = com.rmsl.jucedemorunner; PRODUCT_NAME = "DemoRunner"; USE_HEADERMAP = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL; VALID_ARCHS = "i386 x86_64 arm64 arm64e"; }; name = Release; @@ -1285,7 +1287,7 @@ AC6F0E9A0809A184B2C2B7DE = { isa = PBXProject; buildConfigurationList = 80E8AD1971F52B06F4D28891; - attributes = { LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { 291E01DCBE746A376DBFA4D1 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1230; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { 291E01DCBE746A376DBFA4D1 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 91A9A0FE9DF4F4E10009EEC7; diff --git a/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f2e3cbe8..00000000 --- a/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - BuildSystemType - Original - DisableBuildSystemDeprecationWarning - - - diff --git a/examples/DemoRunner/Builds/MacOSX/Info-App.plist b/examples/DemoRunner/Builds/MacOSX/Info-App.plist index e1e764e8..1965f00d 100644 --- a/examples/DemoRunner/Builds/MacOSX/Info-App.plist +++ b/examples/DemoRunner/Builds/MacOSX/Info-App.plist @@ -12,7 +12,7 @@ CFBundleIconFile Icon.icns CFBundleIdentifier - com.rmsl.juce.demorunner + com.rmsl.jucedemorunner CFBundleName DemoRunner CFBundleDisplayName @@ -22,9 +22,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 6.0.5 + 6.0.7 CFBundleVersion - 6.0.5 + 6.0.7 NSHumanReadableCopyright Copyright (c) 2020 - Raw Material Software Limited NSHighResolutionCapable diff --git a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj index d0bb5195..81be88b2 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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.0.5;JUCE_APP_VERSION_HEX=0x60005;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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.0.7;JUCE_APP_VERSION_HEX=0x60007;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 NotUsing @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.0.5;JUCE_APP_VERSION_HEX=0x60005;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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.0.7;JUCE_APP_VERSION_HEX=0x60007;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 NotUsing @@ -270,6 +270,21 @@ true + + true + + + true + + + true + + + true + + + true + true @@ -366,6 +381,9 @@ true + + true + true @@ -378,6 +396,9 @@ true + + true + true @@ -453,9 +474,6 @@ true - - true - true @@ -2516,6 +2534,22 @@ + + + + + + + + + + + + + + + + @@ -2558,10 +2592,12 @@ + + diff --git a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters index b6b19dd2..9310341a 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters @@ -53,6 +53,9 @@ {BF23FC10-1D57-2A9B-706F-6DD8A7B593D4} + + {386862D5-4DCC-A4B3-5642-60A201E303EF} + {092EFC17-7C95-7E04-0ACA-0D61A462EE81} @@ -709,6 +712,21 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -805,6 +823,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -817,6 +838,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -892,7 +916,7 @@ JUCE Modules\juce_audio_devices\native - + JUCE Modules\juce_audio_devices\native @@ -3228,6 +3252,54 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -3354,6 +3426,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -3366,6 +3441,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph diff --git a/examples/DemoRunner/Builds/VisualStudio2015/resources.rc b/examples/DemoRunner/Builds/VisualStudio2015/resources.rc index c99123eb..04cd390a 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2015/resources.rc @@ -9,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6,0,5,0 +FILEVERSION 6,0,7,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -18,9 +18,9 @@ BEGIN VALUE "CompanyName", "Raw Material Software Limited\0" VALUE "LegalCopyright", "Copyright (c) 2020 - Raw Material Software Limited\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "6.0.5\0" + VALUE "FileVersion", "6.0.7\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "6.0.5\0" + VALUE "ProductVersion", "6.0.7\0" END END diff --git a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj index 847d9cc2..4472b572 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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.0.5;JUCE_APP_VERSION_HEX=0x60005;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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.0.7;JUCE_APP_VERSION_HEX=0x60007;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 NotUsing @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.0.5;JUCE_APP_VERSION_HEX=0x60005;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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.0.7;JUCE_APP_VERSION_HEX=0x60007;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 NotUsing @@ -270,6 +270,21 @@ true + + true + + + true + + + true + + + true + + + true + true @@ -366,6 +381,9 @@ true + + true + true @@ -378,6 +396,9 @@ true + + true + true @@ -453,9 +474,6 @@ true - - true - true @@ -2516,6 +2534,22 @@ + + + + + + + + + + + + + + + + @@ -2558,10 +2592,12 @@ + + diff --git a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters index defaafed..62774310 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters @@ -53,6 +53,9 @@ {BF23FC10-1D57-2A9B-706F-6DD8A7B593D4} + + {386862D5-4DCC-A4B3-5642-60A201E303EF} + {092EFC17-7C95-7E04-0ACA-0D61A462EE81} @@ -709,6 +712,21 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -805,6 +823,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -817,6 +838,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -892,7 +916,7 @@ JUCE Modules\juce_audio_devices\native - + JUCE Modules\juce_audio_devices\native @@ -3228,6 +3252,54 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -3354,6 +3426,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -3366,6 +3441,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph diff --git a/examples/DemoRunner/Builds/VisualStudio2017/resources.rc b/examples/DemoRunner/Builds/VisualStudio2017/resources.rc index c99123eb..04cd390a 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2017/resources.rc @@ -9,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6,0,5,0 +FILEVERSION 6,0,7,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -18,9 +18,9 @@ BEGIN VALUE "CompanyName", "Raw Material Software Limited\0" VALUE "LegalCopyright", "Copyright (c) 2020 - Raw Material Software Limited\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "6.0.5\0" + VALUE "FileVersion", "6.0.7\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "6.0.5\0" + VALUE "ProductVersion", "6.0.7\0" END END diff --git a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj index 24f24df2..cba3bf54 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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.0.5;JUCE_APP_VERSION_HEX=0x60005;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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.0.7;JUCE_APP_VERSION_HEX=0x60007;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 NotUsing @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.0.5;JUCE_APP_VERSION_HEX=0x60005;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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.0.7;JUCE_APP_VERSION_HEX=0x60007;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 NotUsing @@ -270,6 +270,21 @@ true + + true + + + true + + + true + + + true + + + true + true @@ -366,6 +381,9 @@ true + + true + true @@ -378,6 +396,9 @@ true + + true + true @@ -453,9 +474,6 @@ true - - true - true @@ -2516,6 +2534,22 @@ + + + + + + + + + + + + + + + + @@ -2558,10 +2592,12 @@ + + diff --git a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters index 9decf190..4e0d0b75 100644 --- a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters @@ -53,6 +53,9 @@ {BF23FC10-1D57-2A9B-706F-6DD8A7B593D4} + + {386862D5-4DCC-A4B3-5642-60A201E303EF} + {092EFC17-7C95-7E04-0ACA-0D61A462EE81} @@ -709,6 +712,21 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -805,6 +823,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -817,6 +838,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -892,7 +916,7 @@ JUCE Modules\juce_audio_devices\native - + JUCE Modules\juce_audio_devices\native @@ -3228,6 +3252,54 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -3354,6 +3426,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -3366,6 +3441,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph diff --git a/examples/DemoRunner/Builds/VisualStudio2019/resources.rc b/examples/DemoRunner/Builds/VisualStudio2019/resources.rc index c99123eb..04cd390a 100644 --- a/examples/DemoRunner/Builds/VisualStudio2019/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2019/resources.rc @@ -9,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6,0,5,0 +FILEVERSION 6,0,7,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -18,9 +18,9 @@ BEGIN VALUE "CompanyName", "Raw Material Software Limited\0" VALUE "LegalCopyright", "Copyright (c) 2020 - Raw Material Software Limited\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "6.0.5\0" + VALUE "FileVersion", "6.0.7\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "6.0.5\0" + VALUE "ProductVersion", "6.0.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 549c57a0..6ab365b6 100644 --- a/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj +++ b/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj @@ -923,7 +923,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_analytics=1", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", @@ -953,8 +953,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_IPHONE_5BC26AE3=1", - "JUCE_APP_VERSION=6.0.5", - "JUCE_APP_VERSION_HEX=0x60005", + "JUCE_APP_VERSION=6.0.7", + "JUCE_APP_VERSION_HEX=0x60007", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -966,21 +966,22 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); 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.rmsl.juce.demorunner; + PRODUCT_BUNDLE_IDENTIFIER = com.rmsl.jucedemorunner; PRODUCT_NAME = "DemoRunner"; USE_HEADERMAP = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; }; name = Debug; }; @@ -1004,7 +1005,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_analytics=1", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", @@ -1034,8 +1035,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_IPHONE_5BC26AE3=1", - "JUCE_APP_VERSION=6.0.5", - "JUCE_APP_VERSION_HEX=0x60005", + "JUCE_APP_VERSION=6.0.7", + "JUCE_APP_VERSION_HEX=0x60007", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -1047,8 +1048,8 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; @@ -1056,13 +1057,14 @@ INSTALL_PATH = "$(HOME)/Applications"; LLVM_LTO = YES; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); 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.rmsl.juce.demorunner; + PRODUCT_BUNDLE_IDENTIFIER = com.rmsl.jucedemorunner; PRODUCT_NAME = "DemoRunner"; USE_HEADERMAP = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; }; name = Release; }; @@ -1272,7 +1274,7 @@ AC6F0E9A0809A184B2C2B7DE = { isa = PBXProject; buildConfigurationList = 80E8AD1971F52B06F4D28891; - attributes = { LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { 291E01DCBE746A376DBFA4D1 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; com.apple.iCloud = { enabled = 1; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1230; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { 291E01DCBE746A376DBFA4D1 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; com.apple.iCloud = { enabled = 1; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 91A9A0FE9DF4F4E10009EEC7; diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f2e3cbe8..00000000 --- a/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - BuildSystemType - Original - DisableBuildSystemDeprecationWarning - - - diff --git a/examples/DemoRunner/Builds/iOS/Info-App.plist b/examples/DemoRunner/Builds/iOS/Info-App.plist index 5391e621..48b5c3be 100644 --- a/examples/DemoRunner/Builds/iOS/Info-App.plist +++ b/examples/DemoRunner/Builds/iOS/Info-App.plist @@ -20,7 +20,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - com.rmsl.juce.demorunner + com.rmsl.jucedemorunner CFBundleName DemoRunner CFBundleDisplayName @@ -30,9 +30,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 6.0.5 + 6.0.7 CFBundleVersion - 6.0.5 + 6.0.7 NSHumanReadableCopyright Copyright (c) 2020 - Raw Material Software Limited NSHighResolutionCapable diff --git a/examples/DemoRunner/DemoRunner.jucer b/examples/DemoRunner/DemoRunner.jucer index 2f2a0262..d797a133 100644 --- a/examples/DemoRunner/DemoRunner.jucer +++ b/examples/DemoRunner/DemoRunner.jucer @@ -1,7 +1,7 @@ setName ("accent colour"); - paramControls.accentColourSelector->setCurrentColour (paramControls.accentColourButton.findColour (TextButton::buttonColourId)); - paramControls.accentColourSelector->setColour (ColourSelector::backgroundColourId, Colours::transparentBlack); - paramControls.accentColourSelector->setSize (200, 200); - paramControls.accentColourSelector->addComponentListener (this); - paramControls.accentColourSelector->addChangeListener (this); - - CallOutBox::launchAsynchronously (paramControls.accentColourSelector, paramControls.accentColourButton.getScreenBounds(), nullptr); + auto accentColourSelector = std::make_unique(); + + accentColourSelector->setName ("accent colour"); + accentColourSelector->setCurrentColour (paramControls.accentColourButton.findColour (TextButton::buttonColourId)); + accentColourSelector->setColour (ColourSelector::backgroundColourId, Colours::transparentBlack); + accentColourSelector->setSize (200, 200); + accentColourSelector->addComponentListener (this); + accentColourSelector->addChangeListener (this); + + paramControls.accentColourSelector = accentColourSelector.get(); + + CallOutBox::launchAsynchronously (std::move (accentColourSelector), paramControls.accentColourButton.getScreenBounds(), nullptr); } void setupLedColour() { - paramControls.ledColourSelector = new ColourSelector(); - paramControls.ledColourSelector->setName ("led colour"); - paramControls.ledColourSelector->setCurrentColour (paramControls.ledColourButton.findColour (TextButton::buttonColourId)); - paramControls.ledColourSelector->setColour (ColourSelector::backgroundColourId, Colours::transparentBlack); - paramControls.ledColourSelector->setSize (200, 200); - paramControls.ledColourSelector->addComponentListener (this); - paramControls.ledColourSelector->addChangeListener (this); - - CallOutBox::launchAsynchronously (paramControls.ledColourSelector, paramControls.accentColourButton.getScreenBounds(), nullptr); + auto ledColourSelector = std::make_unique(); + + ledColourSelector->setName ("led colour"); + ledColourSelector->setCurrentColour (paramControls.ledColourButton.findColour (TextButton::buttonColourId)); + ledColourSelector->setColour (ColourSelector::backgroundColourId, Colours::transparentBlack); + ledColourSelector->setSize (200, 200); + ledColourSelector->addComponentListener (this); + ledColourSelector->addChangeListener (this); + + paramControls.ledColourSelector = ledColourSelector.get(); + + CallOutBox::launchAsynchronously (std::move (ledColourSelector), paramControls.accentColourButton.getScreenBounds(), nullptr); } void changeListenerCallback (ChangeBroadcaster* source) override diff --git a/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt b/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt index 8fe7c02d..500841ff 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt +++ b/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt @@ -23,9 +23,9 @@ include_directories( AFTER enable_language(ASM) if(JUCE_BUILD_CONFIGURATION MATCHES "DEBUG") - add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" "-DDEBUG=1" "-D_DEBUG=1") + add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" "-DDEBUG=1" "-D_DEBUG=1") elseif(JUCE_BUILD_CONFIGURATION MATCHES "RELEASE") - add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" "-DNDEBUG=1") + add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" "-DNDEBUG=1") else() message( FATAL_ERROR "No matching build-configuration found." ) endif() @@ -119,6 +119,27 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.cpp" "../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h" "../../../../../modules/juce_audio_devices/audio_io/juce_SystemAudioVolume.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPacket.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPackets.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConversion.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConverters.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPDispatcher.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPFactory.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPIterator.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToBytestreamTranslator.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPProtocols.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPReceiver.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPTests.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.h" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.h" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" @@ -193,6 +214,8 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResampler.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.h" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.cpp" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.cpp" @@ -201,6 +224,8 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.h" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.cpp" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.cpp" @@ -245,7 +270,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/native/juce_linux_JackAudio.cpp" "../../../../../modules/juce_audio_devices/native/juce_linux_Midi.cpp" "../../../../../modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp" - "../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp" + "../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.mm" "../../../../../modules/juce_audio_devices/native/juce_MidiDataConcatenator.h" "../../../../../modules/juce_audio_devices/native/juce_win32_ASIO.cpp" "../../../../../modules/juce_audio_devices/native/juce_win32_DirectSound.cpp" @@ -1533,6 +1558,27 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/ set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/juce_SystemAudioVolume.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPacket.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPackets.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConversion.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConverters.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPDispatcher.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPFactory.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPIterator.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToBytestreamTranslator.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPProtocols.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPReceiver.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPTests.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1607,6 +1653,8 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/native/ob set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResampler.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1615,6 +1663,8 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/native/ob set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1659,7 +1709,7 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/native/ju set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_linux_JackAudio.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_linux_Midi.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.mm" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_MidiDataConcatenator.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_win32_ASIO.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_win32_DirectSound.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile b/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile index 6815873c..da58090f 100644 --- a/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile +++ b/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl 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 := AudioPerformanceTest @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl 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 := AudioPerformanceTest diff --git a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj index eb7bf237..85724ccd 100644 --- a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj +++ b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj @@ -509,7 +509,7 @@ "DEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -537,8 +537,8 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; @@ -546,8 +546,8 @@ INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); PRODUCT_BUNDLE_IDENTIFIER = com.juce.AudioPerformanceTest; PRODUCT_NAME = "AudioPerformanceTest"; @@ -573,7 +573,7 @@ "NDEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -601,8 +601,8 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; @@ -611,8 +611,8 @@ LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); PRODUCT_BUNDLE_IDENTIFIER = com.juce.AudioPerformanceTest; PRODUCT_NAME = "AudioPerformanceTest"; @@ -800,7 +800,7 @@ 9CE2A44801B5B4BE7A9667DA = { isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; - attributes = { LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { E9FD2656EC625C9C8DE30219 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1230; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { E9FD2656EC625C9C8DE30219 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3BA1BA0CAFE969E99950C06B; diff --git a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f2e3cbe8..00000000 --- a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - BuildSystemType - Original - DisableBuildSystemDeprecationWarning - - - diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj b/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj index fc08d1ab..d63ea295 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -105,7 +105,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -251,6 +251,21 @@ true + + true + + + true + + + true + + + true + + + true + true @@ -347,6 +362,9 @@ true + + true + true @@ -359,6 +377,9 @@ true + + true + true @@ -434,9 +455,6 @@ true - - true - true @@ -2068,6 +2086,22 @@ + + + + + + + + + + + + + + + + @@ -2110,10 +2144,12 @@ + + diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj.filters b/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj.filters index 19182a52..37e04f00 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj.filters +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2019/AudioPerformanceTest_App.vcxproj.filters @@ -38,6 +38,9 @@ {BF23FC10-1D57-2A9B-706F-6DD8A7B593D4} + + {386862D5-4DCC-A4B3-5642-60A201E303EF} + {092EFC17-7C95-7E04-0ACA-0D61A462EE81} @@ -538,6 +541,21 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -634,6 +652,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -646,6 +667,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -721,7 +745,7 @@ JUCE Modules\juce_audio_devices\native - + JUCE Modules\juce_audio_devices\native @@ -2577,6 +2601,54 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -2703,6 +2775,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -2715,6 +2790,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph diff --git a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj index 59acc882..42293641 100644 --- a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj +++ b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj @@ -547,7 +547,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -575,16 +575,16 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); PRODUCT_BUNDLE_IDENTIFIER = com.juce.AudioPerformanceTest; PRODUCT_NAME = "AudioPerformanceTest"; @@ -611,7 +611,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -639,8 +639,8 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; @@ -648,8 +648,8 @@ INSTALL_PATH = "$(HOME)/Applications"; LLVM_LTO = YES; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); PRODUCT_BUNDLE_IDENTIFIER = com.juce.AudioPerformanceTest; PRODUCT_NAME = "AudioPerformanceTest"; @@ -843,7 +843,7 @@ 9CE2A44801B5B4BE7A9667DA = { isa = PBXProject; buildConfigurationList = 7097CF6AC086DAC346ACCCD9; - attributes = { LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { E9FD2656EC625C9C8DE30219 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1230; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { E9FD2656EC625C9C8DE30219 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3BA1BA0CAFE969E99950C06B; diff --git a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f2e3cbe8..00000000 --- a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - BuildSystemType - Original - DisableBuildSystemDeprecationWarning - - - diff --git a/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt b/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt index 5811c3db..e837ae56 100644 --- a/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt +++ b/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt @@ -24,9 +24,9 @@ include_directories( AFTER enable_language(ASM) if(JUCE_BUILD_CONFIGURATION MATCHES "DEBUG") - add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_WASAPI=1" "-DJUCE_DIRECTSOUND=1" "-DJUCE_ALSA=1" "-DJUCE_USE_FLAC=0" "-DJUCE_USE_OGGVORBIS=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_AU=1" "-DJUCE_PLUGINHOST_LADSPA=1" "-DJUCE_USE_CDREADER=0" "-DJUCE_USE_CDBURNER=0" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" "-DDEBUG=1" "-D_DEBUG=1") + add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_WASAPI=1" "-DJUCE_DIRECTSOUND=1" "-DJUCE_ALSA=1" "-DJUCE_USE_FLAC=0" "-DJUCE_USE_OGGVORBIS=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_AU=1" "-DJUCE_PLUGINHOST_LADSPA=1" "-DJUCE_USE_CDREADER=0" "-DJUCE_USE_CDBURNER=0" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" "-DDEBUG=1" "-D_DEBUG=1") elseif(JUCE_BUILD_CONFIGURATION MATCHES "RELEASE") - add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_WASAPI=1" "-DJUCE_DIRECTSOUND=1" "-DJUCE_ALSA=1" "-DJUCE_USE_FLAC=0" "-DJUCE_USE_OGGVORBIS=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_AU=1" "-DJUCE_PLUGINHOST_LADSPA=1" "-DJUCE_USE_CDREADER=0" "-DJUCE_USE_CDBURNER=0" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" "-DNDEBUG=1") + add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_WASAPI=1" "-DJUCE_DIRECTSOUND=1" "-DJUCE_ALSA=1" "-DJUCE_USE_FLAC=0" "-DJUCE_USE_OGGVORBIS=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_AU=1" "-DJUCE_PLUGINHOST_LADSPA=1" "-DJUCE_USE_CDREADER=0" "-DJUCE_USE_CDBURNER=0" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" "-DNDEBUG=1") if(NOT (ANDROID_ABI STREQUAL "mips" OR ANDROID_ABI STREQUAL "mips64")) set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto") @@ -136,6 +136,27 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.cpp" "../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h" "../../../../../modules/juce_audio_devices/audio_io/juce_SystemAudioVolume.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPacket.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPackets.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConversion.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConverters.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPDispatcher.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPFactory.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPIterator.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToBytestreamTranslator.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPProtocols.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPReceiver.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPTests.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.h" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.h" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" @@ -210,6 +231,8 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResampler.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.h" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.cpp" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.cpp" @@ -218,6 +241,8 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.h" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.cpp" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.cpp" @@ -262,7 +287,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/native/juce_linux_JackAudio.cpp" "../../../../../modules/juce_audio_devices/native/juce_linux_Midi.cpp" "../../../../../modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp" - "../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp" + "../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.mm" "../../../../../modules/juce_audio_devices/native/juce_MidiDataConcatenator.h" "../../../../../modules/juce_audio_devices/native/juce_win32_ASIO.cpp" "../../../../../modules/juce_audio_devices/native/juce_win32_DirectSound.cpp" @@ -1693,6 +1718,27 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/ set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/juce_SystemAudioVolume.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPacket.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPackets.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConversion.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConverters.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPDispatcher.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPFactory.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPIterator.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToBytestreamTranslator.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPProtocols.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPReceiver.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPTests.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1767,6 +1813,8 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/native/ob set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResampler.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1775,6 +1823,8 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/native/ob set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1819,7 +1869,7 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/native/ju set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_linux_JackAudio.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_linux_Midi.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.mm" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_MidiDataConcatenator.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_win32_ASIO.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_win32_DirectSound.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile b/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile index 54bb46b6..3e70aaa5 100644 --- a/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile +++ b/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_WASAPI=1" "-DJUCE_DIRECTSOUND=1" "-DJUCE_ALSA=1" "-DJUCE_USE_FLAC=0" "-DJUCE_USE_OGGVORBIS=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_AU=1" "-DJUCE_PLUGINHOST_LADSPA=1" "-DJUCE_USE_CDREADER=0" "-DJUCE_USE_CDBURNER=0" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl) -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_WASAPI=1" "-DJUCE_DIRECTSOUND=1" "-DJUCE_ALSA=1" "-DJUCE_USE_FLAC=0" "-DJUCE_USE_OGGVORBIS=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_AU=1" "-DJUCE_PLUGINHOST_LADSPA=1" "-DJUCE_USE_CDREADER=0" "-DJUCE_USE_CDBURNER=0" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl) -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -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 := AudioPluginHost @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_WASAPI=1" "-DJUCE_DIRECTSOUND=1" "-DJUCE_ALSA=1" "-DJUCE_USE_FLAC=0" "-DJUCE_USE_OGGVORBIS=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_AU=1" "-DJUCE_PLUGINHOST_LADSPA=1" "-DJUCE_USE_CDREADER=0" "-DJUCE_USE_CDBURNER=0" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl) -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_WASAPI=1" "-DJUCE_DIRECTSOUND=1" "-DJUCE_ALSA=1" "-DJUCE_USE_FLAC=0" "-DJUCE_USE_OGGVORBIS=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_AU=1" "-DJUCE_PLUGINHOST_LADSPA=1" "-DJUCE_USE_CDREADER=0" "-DJUCE_USE_CDBURNER=0" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl) -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -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 := AudioPluginHost diff --git a/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj b/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj index be04d35d..75189570 100644 --- a/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj +++ b/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj @@ -761,7 +761,7 @@ "DEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -803,9 +803,9 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../../../modules/juce_audio_processors/format_types/VST3_SDK", - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; @@ -813,14 +813,15 @@ INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_HEADER_SEARCH_PATHS = ( - "../../../../modules/juce_audio_processors/format_types/VST3_SDK", - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); 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.pluginhost; PRODUCT_NAME = "AudioPluginHost"; USE_HEADERMAP = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL; VALID_ARCHS = "i386 x86_64 arm64 arm64e"; }; name = Debug; @@ -842,7 +843,7 @@ "NDEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -884,9 +885,9 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../../../modules/juce_audio_processors/format_types/VST3_SDK", - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; @@ -895,14 +896,15 @@ LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_HEADER_SEARCH_PATHS = ( - "../../../../modules/juce_audio_processors/format_types/VST3_SDK", - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); 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.pluginhost; PRODUCT_NAME = "AudioPluginHost"; USE_HEADERMAP = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL; VALID_ARCHS = "i386 x86_64 arm64 arm64e"; }; name = Release; @@ -1099,7 +1101,7 @@ ADE6E539DB98A302483A82D0 = { isa = PBXProject; buildConfigurationList = 493C2C5E457692E5149C5525; - attributes = { LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { DE12B7643D374BFF7E4FEB1C = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1230; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { DE12B7643D374BFF7E4FEB1C = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 65BEFC705A89E5C8A9E35C97; diff --git a/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f2e3cbe8..00000000 --- a/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - BuildSystemType - Original - DisableBuildSystemDeprecationWarning - - - diff --git a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj index 23802851..d33b4862 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -106,7 +106,7 @@ Full ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -258,6 +258,21 @@ true + + true + + + true + + + true + + + true + + + true + true @@ -354,6 +369,9 @@ true + + true + true @@ -366,6 +384,9 @@ true + + true + true @@ -441,9 +462,6 @@ true - - true - true @@ -2243,6 +2261,22 @@ + + + + + + + + + + + + + + + + @@ -2285,10 +2319,12 @@ + + diff --git a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters index dae2e654..43d5b8ea 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters @@ -44,6 +44,9 @@ {BF23FC10-1D57-2A9B-706F-6DD8A7B593D4} + + {386862D5-4DCC-A4B3-5642-60A201E303EF} + {092EFC17-7C95-7E04-0ACA-0D61A462EE81} @@ -607,6 +610,21 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -703,6 +721,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -715,6 +736,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -790,7 +814,7 @@ JUCE Modules\juce_audio_devices\native - + JUCE Modules\juce_audio_devices\native @@ -2841,6 +2865,54 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -2967,6 +3039,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -2979,6 +3054,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph diff --git a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj index bff43a32..df2b66ee 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -106,7 +106,7 @@ Full ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -258,6 +258,21 @@ true + + true + + + true + + + true + + + true + + + true + true @@ -354,6 +369,9 @@ true + + true + true @@ -366,6 +384,9 @@ true + + true + true @@ -441,9 +462,6 @@ true - - true - true @@ -2243,6 +2261,22 @@ + + + + + + + + + + + + + + + + @@ -2285,10 +2319,12 @@ + + diff --git a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters index 8f53d51f..767740f4 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters @@ -44,6 +44,9 @@ {BF23FC10-1D57-2A9B-706F-6DD8A7B593D4} + + {386862D5-4DCC-A4B3-5642-60A201E303EF} + {092EFC17-7C95-7E04-0ACA-0D61A462EE81} @@ -607,6 +610,21 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -703,6 +721,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -715,6 +736,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -790,7 +814,7 @@ JUCE Modules\juce_audio_devices\native - + JUCE Modules\juce_audio_devices\native @@ -2841,6 +2865,54 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -2967,6 +3039,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -2979,6 +3054,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph diff --git a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj index 0728d3b2..40933135 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -106,7 +106,7 @@ Full ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -258,6 +258,21 @@ true + + true + + + true + + + true + + + true + + + true + true @@ -354,6 +369,9 @@ true + + true + true @@ -366,6 +384,9 @@ true + + true + true @@ -441,9 +462,6 @@ true - - true - true @@ -2243,6 +2261,22 @@ + + + + + + + + + + + + + + + + @@ -2285,10 +2319,12 @@ + + diff --git a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters index 07c82862..4eefc221 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters @@ -44,6 +44,9 @@ {BF23FC10-1D57-2A9B-706F-6DD8A7B593D4} + + {386862D5-4DCC-A4B3-5642-60A201E303EF} + {092EFC17-7C95-7E04-0ACA-0D61A462EE81} @@ -607,6 +610,21 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -703,6 +721,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -715,6 +736,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -790,7 +814,7 @@ JUCE Modules\juce_audio_devices\native - + JUCE Modules\juce_audio_devices\native @@ -2841,6 +2865,54 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -2967,6 +3039,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -2979,6 +3054,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj index bdebe197..05936ffe 100644 --- a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj +++ b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj @@ -787,7 +787,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -829,23 +829,24 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../../../modules/juce_audio_processors/format_types/VST3_SDK", - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MTL_HEADER_SEARCH_PATHS = ( - "../../../../modules/juce_audio_processors/format_types/VST3_SDK", - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); 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.pluginhost; PRODUCT_NAME = "Plugin Host"; USE_HEADERMAP = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; }; name = Debug; }; @@ -868,7 +869,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -910,9 +911,9 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../../../modules/juce_audio_processors/format_types/VST3_SDK", - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; @@ -920,14 +921,15 @@ INSTALL_PATH = "$(HOME)/Applications"; LLVM_LTO = YES; MTL_HEADER_SEARCH_PATHS = ( - "../../../../modules/juce_audio_processors/format_types/VST3_SDK", - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); 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.pluginhost; PRODUCT_NAME = "Plugin Host"; USE_HEADERMAP = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; }; name = Release; }; @@ -1129,7 +1131,7 @@ ADE6E539DB98A302483A82D0 = { isa = PBXProject; buildConfigurationList = 493C2C5E457692E5149C5525; - attributes = { LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { DE12B7643D374BFF7E4FEB1C = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1230; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { DE12B7643D374BFF7E4FEB1C = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 65BEFC705A89E5C8A9E35C97; diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f2e3cbe8..00000000 --- a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - BuildSystemType - Original - DisableBuildSystemDeprecationWarning - - - diff --git a/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile b/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile index 56637be0..ed12adcb 100644 --- a/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile +++ b/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=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) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=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) JUCE_CPPFLAGS_CONSOLEAPP := "-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_CONSOLEAPP := BinaryBuilder @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=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) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=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) JUCE_CPPFLAGS_CONSOLEAPP := "-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_CONSOLEAPP := BinaryBuilder diff --git a/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj b/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj index 9b235ee9..4bb9f535 100644 --- a/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj +++ b/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj @@ -185,7 +185,7 @@ "DEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_core=1", "JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1", "JUCE_STANDALONE_APPLICATION=1", @@ -203,15 +203,15 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INSTALL_PATH = "/usr/bin"; MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); PRODUCT_BUNDLE_IDENTIFIER = com.juce.binarybuilder; PRODUCT_NAME = "BinaryBuilder"; @@ -237,7 +237,7 @@ "NDEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_core=1", "JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1", "JUCE_STANDALONE_APPLICATION=1", @@ -255,16 +255,16 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INSTALL_PATH = "/usr/bin"; LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); PRODUCT_BUNDLE_IDENTIFIER = com.juce.binarybuilder; PRODUCT_NAME = "BinaryBuilder"; @@ -433,7 +433,7 @@ 36B6F402BC83F21646259DEF = { isa = PBXProject; buildConfigurationList = E4C85B0464A93027D035AA1F; - attributes = { LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Raw Material Software Limited"; }; + attributes = { LastUpgradeCheck = 1230; ORGANIZATIONNAME = "Raw Material Software Limited"; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = C18D022743CF5BD14D6A6A9E; diff --git a/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f2e3cbe8..00000000 --- a/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - BuildSystemType - Original - DisableBuildSystemDeprecationWarning - - - diff --git a/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj b/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj index 71844699..f646087e 100644 --- a/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj +++ b/extras/BinaryBuilder/Builds/VisualStudio2019/BinaryBuilder_ConsoleApp.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -105,7 +105,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake index 73a450e8..4bf7206e 100644 --- a/extras/Build/CMake/JUCEUtils.cmake +++ b/extras/Build/CMake/JUCEUtils.cmake @@ -2244,12 +2244,12 @@ function(juce_set_aax_sdk_path path) endif() if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - add_library(juce_aax_sdk STATIC IMPORTED) + add_library(juce_aax_sdk STATIC IMPORTED GLOBAL) set_target_properties(juce_aax_sdk PROPERTIES IMPORTED_LOCATION_DEBUG "${path}/Libs/Debug/libAAXLibrary_libcpp.a" IMPORTED_LOCATION "${path}/Libs/Release/libAAXLibrary_libcpp.a") elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") - add_library(juce_aax_sdk INTERFACE IMPORTED) + add_library(juce_aax_sdk INTERFACE IMPORTED GLOBAL) else() return() endif() @@ -2273,7 +2273,7 @@ function(juce_set_vst2_sdk_path path) message(FATAL_ERROR "Could not find VST2 SDK at the specified path: ${path}") endif() - add_library(juce_vst2_sdk INTERFACE IMPORTED) + add_library(juce_vst2_sdk INTERFACE IMPORTED GLOBAL) # This is a bit of a hack, but we really need the VST2 paths to always follow the VST3 paths. target_include_directories(juce_vst2_sdk INTERFACE diff --git a/extras/Build/juce_build_tools/juce_build_tools.h b/extras/Build/juce_build_tools/juce_build_tools.h index f67a76f8..da3862cd 100644 --- a/extras/Build/juce_build_tools/juce_build_tools.h +++ b/extras/Build/juce_build_tools/juce_build_tools.h @@ -34,7 +34,7 @@ ID: juce_build_tools vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE Build Tools description: Classes for generating intermediate files for JUCE projects. website: http://www.juce.com/juce diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt b/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt index 8f3ab5eb..86b95620 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt @@ -23,9 +23,9 @@ include_directories( AFTER enable_language(ASM) if(JUCE_BUILD_CONFIGURATION MATCHES "DEBUG") - add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEBUG=0" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" "-DDEBUG=1" "-D_DEBUG=1") + add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEBUG=0" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" "-DDEBUG=1" "-D_DEBUG=1") elseif(JUCE_BUILD_CONFIGURATION MATCHES "RELEASE") - add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" "-DNDEBUG=1") + add_definitions("-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" "-DNDEBUG=1") else() message( FATAL_ERROR "No matching build-configuration found." ) endif() @@ -123,6 +123,27 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.cpp" "../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h" "../../../../../modules/juce_audio_devices/audio_io/juce_SystemAudioVolume.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPacket.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPackets.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConversion.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConverters.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPDispatcher.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPFactory.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPIterator.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToBytestreamTranslator.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPProtocols.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPReceiver.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPTests.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.h" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.cpp" + "../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.h" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.h" "../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" @@ -197,6 +218,8 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResampler.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.h" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.cpp" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.cpp" @@ -205,6 +228,8 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.h" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.cpp" + "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.cpp" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.h" "../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.cpp" @@ -249,7 +274,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_audio_devices/native/juce_linux_JackAudio.cpp" "../../../../../modules/juce_audio_devices/native/juce_linux_Midi.cpp" "../../../../../modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp" - "../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp" + "../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.mm" "../../../../../modules/juce_audio_devices/native/juce_MidiDataConcatenator.h" "../../../../../modules/juce_audio_devices/native/juce_win32_ASIO.cpp" "../../../../../modules/juce_audio_devices/native/juce_win32_DirectSound.cpp" @@ -1612,6 +1637,27 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/ set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/audio_io/juce_SystemAudioVolume.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPacket.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPackets.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConversion.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPConverters.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPDispatcher.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPFactory.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPIterator.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToBytestreamTranslator.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPProtocols.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPReceiver.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPTests.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/ump/juce_UMPView.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiDevices.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1686,6 +1732,8 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/native/ob set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResampler.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1694,6 +1742,8 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/native/ob set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -1738,7 +1788,7 @@ set_source_files_properties("../../../../../modules/juce_audio_devices/native/ju set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_linux_JackAudio.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_linux_Midi.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) -set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_mac_CoreMidi.mm" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_MidiDataConcatenator.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_win32_ASIO.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_audio_devices/native/juce_win32_DirectSound.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile b/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile index 0343013d..0b671dc1 100644 --- a/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile +++ b/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl 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 := JUCE\ Network\ Graphics\ Demo @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl 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 := JUCE\ Network\ Graphics\ Demo diff --git a/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj b/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj index 08effdcc..467f032a 100644 --- a/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj +++ b/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj @@ -645,7 +645,7 @@ "DEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -676,8 +676,8 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; @@ -685,12 +685,13 @@ INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.9; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); PRODUCT_BUNDLE_IDENTIFIER = com.juce.NetworkGraphicsDemo; PRODUCT_NAME = "JUCE Network Graphics Demo"; USE_HEADERMAP = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL; VALID_ARCHS = "i386 x86_64 arm64 arm64e"; }; name = Debug; @@ -712,7 +713,7 @@ "NDEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -743,8 +744,8 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; @@ -753,12 +754,13 @@ LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); PRODUCT_BUNDLE_IDENTIFIER = com.juce.NetworkGraphicsDemo; PRODUCT_NAME = "JUCE Network Graphics Demo"; USE_HEADERMAP = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL; VALID_ARCHS = "i386 x86_64 arm64 arm64e"; }; name = Release; @@ -948,7 +950,7 @@ A5398ADB6F5B128C00EB935C = { isa = PBXProject; buildConfigurationList = 02715337C584F3C721251428; - attributes = { LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { 4311FBCBD02948A0ED96C7DD = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1230; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { 4311FBCBD02948A0ED96C7DD = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D2EB65517396C974F0415A7F; diff --git a/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f2e3cbe8..00000000 --- a/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - BuildSystemType - Original - DisableBuildSystemDeprecationWarning - - - diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj index 2bb0f746..ac4c11e1 100644 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj +++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -105,7 +105,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -251,6 +251,21 @@ true + + true + + + true + + + true + + + true + + + true + true @@ -347,6 +362,9 @@ true + + true + true @@ -359,6 +377,9 @@ true + + true + true @@ -434,9 +455,6 @@ true - - true - true @@ -2153,6 +2171,22 @@ + + + + + + + + + + + + + + + + @@ -2195,10 +2229,12 @@ + + diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj.filters b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj.filters index 4f667072..51a8abb0 100644 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj.filters +++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2019/NetworkGraphicsDemo_App.vcxproj.filters @@ -38,6 +38,9 @@ {BF23FC10-1D57-2A9B-706F-6DD8A7B593D4} + + {386862D5-4DCC-A4B3-5642-60A201E303EF} + {092EFC17-7C95-7E04-0ACA-0D61A462EE81} @@ -568,6 +571,21 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -664,6 +682,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -676,6 +697,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -751,7 +775,7 @@ JUCE Modules\juce_audio_devices\native - + JUCE Modules\juce_audio_devices\native @@ -2712,6 +2736,54 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -2838,6 +2910,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -2850,6 +2925,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph diff --git a/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj b/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj index 0462d718..61deee9b 100644 --- a/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj +++ b/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj @@ -683,7 +683,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -714,20 +714,21 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); PRODUCT_BUNDLE_IDENTIFIER = com.juce.NetworkGraphicsDemo; PRODUCT_NAME = "JUCE Network Graphics Demo"; USE_HEADERMAP = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; }; name = Debug; }; @@ -750,7 +751,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -781,8 +782,8 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; @@ -790,12 +791,13 @@ INSTALL_PATH = "$(HOME)/Applications"; LLVM_LTO = YES; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); PRODUCT_BUNDLE_IDENTIFIER = com.juce.NetworkGraphicsDemo; PRODUCT_NAME = "JUCE Network Graphics Demo"; USE_HEADERMAP = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; }; name = Release; }; @@ -991,7 +993,7 @@ A5398ADB6F5B128C00EB935C = { isa = PBXProject; buildConfigurationList = 02715337C584F3C721251428; - attributes = { LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { 4311FBCBD02948A0ED96C7DD = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1230; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { 4311FBCBD02948A0ED96C7DD = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = D2EB65517396C974F0415A7F; diff --git a/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f2e3cbe8..00000000 --- a/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - BuildSystemType - Original - DisableBuildSystemDeprecationWarning - - - diff --git a/extras/Projucer/Builds/LinuxMakefile/Makefile b/extras/Projucer/Builds/LinuxMakefile/Makefile index 00638ef5..5bfbf1ac 100644 --- a/extras/Projucer/Builds/LinuxMakefile/Makefile +++ b/extras/Projucer/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=1" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.0.5" "-DJUCE_APP_VERSION_HEX=0x60005" $(shell pkg-config --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=1" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.0.7" "-DJUCE_APP_VERSION_HEX=0x60007" $(shell pkg-config --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -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 @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=1" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.0.5" "-DJUCE_APP_VERSION_HEX=0x60005" $(shell pkg-config --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=1" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.0.7" "-DJUCE_APP_VERSION_HEX=0x60007" $(shell pkg-config --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -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 diff --git a/extras/Projucer/Builds/MacOSX/Info-App.plist b/extras/Projucer/Builds/MacOSX/Info-App.plist index f4f845eb..f118438d 100644 --- a/extras/Projucer/Builds/MacOSX/Info-App.plist +++ b/extras/Projucer/Builds/MacOSX/Info-App.plist @@ -22,9 +22,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 6.0.5 + 6.0.7 CFBundleVersion - 6.0.5 + 6.0.7 NSHumanReadableCopyright Raw Material Software Limited NSHighResolutionCapable diff --git a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj index 8f94d1a6..01f8a59b 100644 --- a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj +++ b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj @@ -3165,7 +3165,7 @@ "DEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_build_tools=1", "JUCE_MODULE_AVAILABLE_juce_core=1", "JUCE_MODULE_AVAILABLE_juce_cryptography=1", @@ -3183,8 +3183,8 @@ "JUCE_WEB_BROWSER=0", "JUCE_STANDALONE_APPLICATION=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=6.0.5", - "JUCE_APP_VERSION_HEX=0x60005", + "JUCE_APP_VERSION=6.0.7", + "JUCE_APP_VERSION_HEX=0x60007", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -3196,9 +3196,9 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../Build", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../Build", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; @@ -3206,14 +3206,15 @@ INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../Build", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../Build", + "$(SRCROOT)/../../../../modules", ); 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; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL; VALID_ARCHS = "i386 x86_64 arm64 arm64e"; }; name = Debug; @@ -3235,7 +3236,7 @@ "NDEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_build_tools=1", "JUCE_MODULE_AVAILABLE_juce_core=1", "JUCE_MODULE_AVAILABLE_juce_cryptography=1", @@ -3253,8 +3254,8 @@ "JUCE_WEB_BROWSER=0", "JUCE_STANDALONE_APPLICATION=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=6.0.5", - "JUCE_APP_VERSION_HEX=0x60005", + "JUCE_APP_VERSION=6.0.7", + "JUCE_APP_VERSION_HEX=0x60007", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -3266,9 +3267,9 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../Build", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../Build", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INFOPLIST_FILE = Info-App.plist; @@ -3276,14 +3277,15 @@ INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../Build", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../Build", + "$(SRCROOT)/../../../../modules", ); 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; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL; VALID_ARCHS = "i386 x86_64 arm64 arm64e"; }; name = Release; @@ -3521,7 +3523,7 @@ 74EA481348A24104E6ACE009 = { isa = PBXProject; buildConfigurationList = F90407F24422C589DA251604; - attributes = { LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { 0039FE1A254FE518518BF8B8 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; + attributes = { LastUpgradeCheck = 1230; ORGANIZATIONNAME = "Raw Material Software Limited"; TargetAttributes = { 0039FE1A254FE518518BF8B8 = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; com.apple.HardenedRuntime = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 3CC531922CC2D398E283A845; diff --git a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f2e3cbe8..00000000 --- a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - BuildSystemType - Original - DisableBuildSystemDeprecationWarning - - - diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj index 902819b0..435a7807 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\Build;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.0.5;JUCE_APP_VERSION_HEX=0x60005;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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.0.7;JUCE_APP_VERSION_HEX=0x60007;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 NotUsing @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\Build;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.0.5;JUCE_APP_VERSION_HEX=0x60005;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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.0.7;JUCE_APP_VERSION_HEX=0x60007;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 NotUsing diff --git a/extras/Projucer/Builds/VisualStudio2015/resources.rc b/extras/Projucer/Builds/VisualStudio2015/resources.rc index cb7ae4b8..077ee25e 100644 --- a/extras/Projucer/Builds/VisualStudio2015/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2015/resources.rc @@ -9,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6,0,5,0 +FILEVERSION 6,0,7,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -18,9 +18,9 @@ BEGIN VALUE "CompanyName", "Raw Material Software Limited\0" VALUE "LegalCopyright", "Raw Material Software Limited\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "6.0.5\0" + VALUE "FileVersion", "6.0.7\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "6.0.5\0" + VALUE "ProductVersion", "6.0.7\0" END END diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj index eb01454f..9cb7fd42 100644 --- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\Build;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.0.5;JUCE_APP_VERSION_HEX=0x60005;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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.0.7;JUCE_APP_VERSION_HEX=0x60007;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 NotUsing @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\Build;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.0.5;JUCE_APP_VERSION_HEX=0x60005;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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.0.7;JUCE_APP_VERSION_HEX=0x60007;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 NotUsing diff --git a/extras/Projucer/Builds/VisualStudio2017/resources.rc b/extras/Projucer/Builds/VisualStudio2017/resources.rc index cb7ae4b8..077ee25e 100644 --- a/extras/Projucer/Builds/VisualStudio2017/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2017/resources.rc @@ -9,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6,0,5,0 +FILEVERSION 6,0,7,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -18,9 +18,9 @@ BEGIN VALUE "CompanyName", "Raw Material Software Limited\0" VALUE "LegalCopyright", "Raw Material Software Limited\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "6.0.5\0" + VALUE "FileVersion", "6.0.7\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "6.0.5\0" + VALUE "ProductVersion", "6.0.7\0" END END diff --git a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj index 37d7f62d..6874ef15 100644 --- a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\Build;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.0.5;JUCE_APP_VERSION_HEX=0x60005;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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.0.7;JUCE_APP_VERSION_HEX=0x60007;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 NotUsing @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\Build;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.0.5;JUCE_APP_VERSION_HEX=0x60005;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_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.0.7;JUCE_APP_VERSION_HEX=0x60007;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 NotUsing diff --git a/extras/Projucer/Builds/VisualStudio2019/resources.rc b/extras/Projucer/Builds/VisualStudio2019/resources.rc index cb7ae4b8..077ee25e 100644 --- a/extras/Projucer/Builds/VisualStudio2019/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2019/resources.rc @@ -9,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6,0,5,0 +FILEVERSION 6,0,7,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -18,9 +18,9 @@ BEGIN VALUE "CompanyName", "Raw Material Software Limited\0" VALUE "LegalCopyright", "Raw Material Software Limited\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "6.0.5\0" + VALUE "FileVersion", "6.0.7\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "6.0.5\0" + VALUE "ProductVersion", "6.0.7\0" END END diff --git a/extras/Projucer/JuceLibraryCode/BinaryData.cpp b/extras/Projucer/JuceLibraryCode/BinaryData.cpp index da75406b..9cf3def1 100644 --- a/extras/Projucer/JuceLibraryCode/BinaryData.cpp +++ b/extras/Projucer/JuceLibraryCode/BinaryData.cpp @@ -6301,6 +6301,8 @@ static const unsigned char temp_binary_data_38[] = " #else\r\n" " // This is the place where you check if the layout is supported.\r\n" " // In this template code we only support mono or stereo.\r\n" +" // Some plugin hosts, such as certain GarageBand versions, will only\r\n" +" // load plugins that support stereo bus layouts.\r\n" " if (layouts.getMainOutputChannelSet() != juce::AudioChannelSet::mono()\r\n" " && layouts.getMainOutputChannelSet() != juce::AudioChannelSet::stereo())\r\n" " return false;\r\n" @@ -7594,7 +7596,7 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) case 0x915d7304: numBytes = 1187; return jucer_AudioComponentTemplate_h; case 0x27c5a93a: numBytes = 1355; return jucer_AudioPluginEditorTemplate_cpp; case 0x4d0721bf: numBytes = 973; return jucer_AudioPluginEditorTemplate_h; - case 0x51b49ac5: numBytes = 6090; return jucer_AudioPluginFilterTemplate_cpp; + case 0x51b49ac5: numBytes = 6218; return jucer_AudioPluginFilterTemplate_cpp; case 0x488afa0a: numBytes = 2299; return jucer_AudioPluginFilterTemplate_h; case 0xabad7041: numBytes = 2147; return jucer_ComponentTemplate_cpp; case 0xfc72fe86: numBytes = 2065; return jucer_ComponentTemplate_h; diff --git a/extras/Projucer/JuceLibraryCode/BinaryData.h b/extras/Projucer/JuceLibraryCode/BinaryData.h index e2eeae6b..dc4ddc83 100644 --- a/extras/Projucer/JuceLibraryCode/BinaryData.h +++ b/extras/Projucer/JuceLibraryCode/BinaryData.h @@ -123,7 +123,7 @@ namespace BinaryData const int jucer_AudioPluginEditorTemplate_hSize = 973; extern const char* jucer_AudioPluginFilterTemplate_cpp; - const int jucer_AudioPluginFilterTemplate_cppSize = 6090; + const int jucer_AudioPluginFilterTemplate_cppSize = 6218; extern const char* jucer_AudioPluginFilterTemplate_h; const int jucer_AudioPluginFilterTemplate_hSize = 2299; diff --git a/extras/Projucer/JuceLibraryCode/JuceHeader.h b/extras/Projucer/JuceLibraryCode/JuceHeader.h index 5d222093..ad5d8e65 100644 --- a/extras/Projucer/JuceLibraryCode/JuceHeader.h +++ b/extras/Projucer/JuceLibraryCode/JuceHeader.h @@ -44,7 +44,7 @@ namespace ProjectInfo { const char* const projectName = "Projucer"; const char* const companyName = "Raw Material Software Limited"; - const char* const versionString = "6.0.5"; - const int versionNumber = 0x60005; + const char* const versionString = "6.0.7"; + const int versionNumber = 0x60007; } #endif diff --git a/extras/Projucer/Projucer.jucer b/extras/Projucer/Projucer.jucer index 362bd5e0..74848c43 100644 --- a/extras/Projucer/Projucer.jucer +++ b/extras/Projucer/Projucer.jucer @@ -1,7 +1,7 @@ diff --git a/extras/Projucer/Source/Application/StartPage/jucer_ContentComponents.h b/extras/Projucer/Source/Application/StartPage/jucer_ContentComponents.h index 4f4fd675..97badcdd 100644 --- a/extras/Projucer/Source/Application/StartPage/jucer_ContentComponents.h +++ b/extras/Projucer/Source/Application/StartPage/jucer_ContentComponents.h @@ -127,7 +127,7 @@ public: getAppSettings().getStoredPath (Ids::defaultJuceModulePath, TargetOS::getThisOS()), TargetOS::getThisOS()); - panel.addProperties (buildPropertyList()); + panel.addProperties (buildPropertyList(), 2); addAndMakeVisible (panel); } diff --git a/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp b/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp index d1720105..c63c28c5 100644 --- a/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp +++ b/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp @@ -269,7 +269,8 @@ void LatestVersionCheckerAndUpdater::askUserForLocationToDownload (const Version if (! AlertWindow::showOkCancelBox (AlertWindow::WarningIcon, "Overwrite Existing JUCE Folder?", "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.")) + "This will move the existing folder to " + targetFolderPath + "_old.\n\n" + "Replacing the folder that contains the currently running Projucer executable may not work on Windows.")) { return; } diff --git a/extras/Projucer/Source/BinaryData/Templates/jucer_AudioPluginFilterTemplate.cpp b/extras/Projucer/Source/BinaryData/Templates/jucer_AudioPluginFilterTemplate.cpp index 0b194bdb..053611e8 100644 --- a/extras/Projucer/Source/BinaryData/Templates/jucer_AudioPluginFilterTemplate.cpp +++ b/extras/Projucer/Source/BinaryData/Templates/jucer_AudioPluginFilterTemplate.cpp @@ -111,6 +111,8 @@ bool %%filter_class_name%%::isBusesLayoutSupported (const BusesLayout& layouts) #else // This is the place where you check if the layout is supported. // In this template code we only support mono or stereo. + // Some plugin hosts, such as certain GarageBand versions, will only + // load plugins that support stereo bus layouts. if (layouts.getMainOutputChannelSet() != juce::AudioChannelSet::mono() && layouts.getMainOutputChannelSet() != juce::AudioChannelSet::stereo()) return false; diff --git a/extras/Projucer/Source/Project/jucer_Project.cpp b/extras/Projucer/Source/Project/jucer_Project.cpp index ea8bd288..d2fed0b9 100644 --- a/extras/Projucer/Source/Project/jucer_Project.cpp +++ b/extras/Projucer/Source/Project/jucer_Project.cpp @@ -1394,9 +1394,11 @@ void Project::createAudioPluginPropertyEditors (PropertyListBuilder& props) props.add (new TextPropertyComponent (pluginManufacturerValue, "Plugin Manufacturer", 256, false), "The name of your company (cannot be blank)."); props.add (new TextPropertyComponent (pluginManufacturerCodeValue, "Plugin Manufacturer Code", 4, false), - "A four-character unique ID for your company. Note that for AU compatibility, this must contain at least one upper-case letter!"); + "A four-character unique ID for your company. Note that for AU compatibility, this must contain at least one upper-case letter!" + " GarageBand 10.3 requires the first letter to be upper-case, and the remaining letters to be lower-case."); props.add (new TextPropertyComponent (pluginCodeValue, "Plugin Code", 4, false), - "A four-character unique ID for your plugin. Note that for AU compatibility, this must contain at least one upper-case letter!"); + "A four-character unique ID for your plugin. Note that for AU compatibility, this must contain exactly one upper-case letter!" + " GarageBand 10.3 requires the first letter to be upper-case, and the remaining letters to be lower-case."); props.add (new TextPropertyComponent (pluginChannelConfigsValue, "Plugin Channel Configurations", 1024, false), "This list is a comma-separated set list in the form {numIns, numOuts} and each pair indicates a valid plug-in " "configuration. For example {1, 1}, {2, 2} means that the plugin can be used either with 1 input and 1 output, " diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h index c6af8a08..a5182fec 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h @@ -350,12 +350,14 @@ private: auto keys = defines.getAllKeys(); auto values = defines.getAllValues(); + const auto escapedQuote = isWindows() ? "\\\"" : "\\\\\""; + for (int i = 0; i < defines.size(); ++i) { auto result = keys[i]; if (values[i].isNotEmpty()) - result += "=" + values[i]; + result += "=\"" + values[i].replace ("\"", escapedQuote) + "\""; defs.add (result); } @@ -569,7 +571,7 @@ private: for (auto& def : getDefines (config, target)) { if (! def.containsChar ('=')) - def << '='; + def << '='; flags.add ("-D" + def); } diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h index f918ef0f..81446aca 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h @@ -47,6 +47,7 @@ namespace v10_15, v10_16, v11_0, + v11_1, }; static const char* const getName (MacOSVersion m) @@ -64,6 +65,7 @@ namespace case MacOSVersion::v10_15: return "10.15"; case MacOSVersion::v10_16: return "10.16"; case MacOSVersion::v11_0: return "11.0"; + case MacOSVersion::v11_1: return "11.1"; default: break; } @@ -74,7 +76,7 @@ namespace static String getDisplayName (MacOSVersion m) { return getName (m) + String (" SDK"); } static String getRootName (MacOSVersion m) { return String ("macosx") + getName (m); } - constexpr auto nextMacOSVersion = (MacOSVersion) ((int) MacOSVersion::v11_0 + 1); + constexpr auto nextMacOSVersion = (MacOSVersion) ((int) MacOSVersion::v11_1 + 1); constexpr auto oldestDeploymentTarget = MacOSVersion::v10_7; constexpr auto macOSDefaultVersion = MacOSVersion::v10_11; constexpr auto oldestSDKVersion = MacOSVersion::v10_11; @@ -182,7 +184,8 @@ public: useHeaderMapValue (settings, Ids::useHeaderMap, getUndoManager()), customLaunchStoryboardValue (settings, Ids::customLaunchStoryboard, getUndoManager()), exporterBundleIdentifierValue (settings, Ids::bundleIdentifier, getUndoManager()), - suppressPlistResourceUsage (settings, Ids::suppressPlistResourceUsage, getUndoManager()) + suppressPlistResourceUsageValue (settings, Ids::suppressPlistResourceUsage, getUndoManager()), + useLegacyBuildSystemValue (settings, Ids::useLegacyBuildSystem, getUndoManager()) { if (iOS) { @@ -269,7 +272,9 @@ public: bool isDocumentBrowserEnabled() const { return uiSupportsDocumentBrowserValue.get(); } bool isStatusBarHidden() const { return uiStatusBarHiddenValue.get(); } - bool getSuppressPlistResourceUsage() const { return suppressPlistResourceUsage.get(); } + bool getSuppressPlistResourceUsage() const { return suppressPlistResourceUsageValue.get(); } + + bool shouldUseLegacyBuildSystem() const { return useLegacyBuildSystemValue.get(); } String getDocumentExtensionsString() const { return documentExtensionsValue.get(); } @@ -392,6 +397,11 @@ public: "Using a leading '.' is optional, and the extensions are not case-sensitive."); } + props.add (new ChoicePropertyComponent (useLegacyBuildSystemValue, "Use Legacy Build System"), + "Enable this to use the deprecated \"Legacy Build System\" in Xcode 10 and above. " + "This may fix build issues that were introduced with the new build system in Xcode 10 and subsequently fixed in Xcode 10.2, " + "however the new build system is recommended for apps targeting Apple silicon."); + if (isOSX()) { props.add (new MultiChoicePropertyComponent (validArchsValue, "Valid Architectures", getAllArchs(), getAllArchs()), @@ -570,7 +580,7 @@ public: props.add (new TextPropertyComponent (pListPrefixHeaderValue, "PList Prefix Header", 512, false), "Header file containing definitions used in plist file (see PList Preprocess)."); - props.add (new ChoicePropertyComponent (suppressPlistResourceUsage, "Suppress AudioUnit Plist resourceUsage Key"), + props.add (new ChoicePropertyComponent (suppressPlistResourceUsageValue, "Suppress AudioUnit Plist resourceUsage Key"), "Suppress the resourceUsage key in the target's generated Plist. This is useful for AU" " plugins that must access resources which cannot be declared in the resourceUsage block, such" " as UNIX domain sockets. In particular, PACE-protected AU plugins may require this option to be enabled" @@ -668,9 +678,6 @@ public: [this] (MemoryOutputStream& mo) { writeProjectFile (mo); }); writeInfoPlistFiles(); - - // This forces the project to use the legacy build system to workaround Xcode 10 issues, - // hopefully these will be fixed in the future and this can be removed... writeWorkspaceSettings(); // Deleting the .rsrc files can be needed to force Xcode to update the version number. @@ -1154,7 +1161,7 @@ public: v->setProperty ("isa", "PBXFileReference", nullptr); v->setProperty ("explicitFileType", fileType, nullptr); v->setProperty ("includeInIndex", (int) 0, nullptr); - v->setProperty ("path", sanitisePath (binaryName), nullptr); + v->setProperty ("path", binaryName, nullptr); v->setProperty ("sourceTree", "BUILT_PRODUCTS_DIR", nullptr); owner.pbxFileReferences.add (v); } @@ -1393,6 +1400,19 @@ public: s.set ("HEADER_SEARCH_PATHS", indentParenthesisedList (headerPaths, 1)); s.set ("USE_HEADERMAP", String (static_cast (config.exporter.settings.getProperty ("useHeaderMap")) ? "YES" : "NO")); + auto frameworksToSkip = [this]() -> String + { + const String openGLFramework (owner.iOS ? "OpenGLES" : "OpenGL"); + + if (owner.xcodeFrameworks.contains (openGLFramework)) + return openGLFramework; + + return {}; + }(); + + if (frameworksToSkip.isNotEmpty()) + s.set ("VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS", frameworksToSkip); + auto frameworkSearchPaths = getFrameworkSearchPaths (config); if (! frameworkSearchPaths.isEmpty()) @@ -1450,7 +1470,6 @@ public: if (config.isFastMathEnabled()) s.set ("GCC_FAST_MATH", "YES"); - auto flags = (config.getRecommendedCompilerWarningFlags().joinIntoString (" ") + " " + owner.getExtraCompilerFlagsString()).trim(); flags = owner.replacePreprocessorTokens (config, flags); @@ -1500,10 +1519,11 @@ public: build_tools::RelativePath binaryPath (config.getTargetBinaryRelativePathString(), build_tools::RelativePath::projectFolder); - configurationBuildDir = sanitisePath (binaryPath.rebased (owner.projectFolder, - owner.getTargetFolder(), - build_tools::RelativePath::buildTargetFolder) - .toUnixStyle()); + + configurationBuildDir = expandPath (binaryPath.rebased (owner.projectFolder, + owner.getTargetFolder(), + build_tools::RelativePath::buildTargetFolder) + .toUnixStyle()); } s.set ("CONFIGURATION_BUILD_DIR", addQuotesIfRequired (configurationBuildDir)); @@ -1785,8 +1805,7 @@ public: for (auto& path : paths) { - // Xcode 10 can't deal with search paths starting with "~" so we need to replace them here... - path = owner.replacePreprocessorTokens (config, sanitisePath (path)); + path = owner.replacePreprocessorTokens (config, expandPath (path)); if (path.containsChar (' ')) path = "\"\\\"" + path + "\\\"\""; // crazy double quotes required when there are spaces.. @@ -1961,12 +1980,12 @@ private: uiFileSharingEnabledValue, uiSupportsDocumentBrowserValue, uiStatusBarHiddenValue, documentExtensionsValue, iosInAppPurchasesValue, iosContentSharingValue, iosBackgroundAudioValue, iosBackgroundBleValue, iosPushNotificationsValue, iosAppGroupsValue, iCloudPermissionsValue, iosDevelopmentTeamIDValue, iosAppGroupsIDValue, keepCustomXcodeSchemesValue, useHeaderMapValue, customLaunchStoryboardValue, - exporterBundleIdentifierValue, suppressPlistResourceUsage; + exporterBundleIdentifierValue, suppressPlistResourceUsageValue, useLegacyBuildSystemValue; - static String sanitisePath (const String& path) + static String expandPath (const String& path) { - if (path.startsWithChar ('~')) - return "$(HOME)" + path.substring (1); + if (! File::isAbsolutePath (path)) return "$(SRCROOT)/" + path; + if (path.startsWithChar ('~')) return "$(HOME)" + path.substring (1); return path; } @@ -2312,21 +2331,28 @@ private: .getChildFile ("xcshareddata") .getChildFile ("WorkspaceSettings.xcsettings"); - build_tools::writeStreamToFile (settingsFile, [this] (MemoryOutputStream& mo) + if (shouldUseLegacyBuildSystem()) { - mo.setNewLineString (getNewLineString()); - - mo << "" << newLine - << "" << newLine - << "" << newLine - << "" << newLine - << "\t" << "BuildSystemType" << newLine - << "\t" << "Original" << newLine - << "\t" << "DisableBuildSystemDeprecationWarning" << newLine - << "\t" << "" << newLine - << "" << newLine - << "" << newLine; - }); + build_tools::writeStreamToFile (settingsFile, [this] (MemoryOutputStream& mo) + { + mo.setNewLineString (getNewLineString()); + + mo << "" << newLine + << "" << newLine + << "" << newLine + << "" << newLine + << "\t" << "BuildSystemType" << newLine + << "\t" << "Original" << newLine + << "\t" << "DisableBuildSystemDeprecationWarning" << newLine + << "\t" << "" << newLine + << "" << newLine + << "" << newLine; + }); + } + else + { + settingsFile.deleteFile(); + } } void writeInfoPlistFiles() const @@ -2374,7 +2400,7 @@ private: searchPath = srcRoot + searchPath; } - return sanitisePath (searchPath); + return expandPath (searchPath); } String getCodeSigningIdentity (const XcodeBuildConfiguration& config) const @@ -3240,7 +3266,7 @@ private: { String attributes; - attributes << "{ LastUpgradeCheck = 1200; " + attributes << "{ LastUpgradeCheck = 1230; " << "ORGANIZATIONNAME = " << getProject().getCompanyNameString().quoted() <<"; "; diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp index 544073a0..887ffe99 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp @@ -410,6 +410,7 @@ StringPairArray ProjectExporter::getAllPreprocessorDefs (const BuildConfiguratio { auto defs = mergePreprocessorDefs (config.getAllPreprocessorDefs(), parsePreprocessorDefs (getExporterPreprocessorDefsString())); + addDefaultPreprocessorDefs (defs); addTargetSpecificPreprocessorDefs (defs, targetType); @@ -465,8 +466,8 @@ void ProjectExporter::addDefaultPreprocessorDefs (StringPairArray& defs) const String ProjectExporter::replacePreprocessorTokens (const ProjectExporter::BuildConfiguration& config, const String& sourceString) const { - return build_tools::replacePreprocessorDefs (getAllPreprocessorDefs (config, - build_tools::ProjectType::Target::unspecified), sourceString); + return build_tools::replacePreprocessorDefs (getAllPreprocessorDefs (config, build_tools::ProjectType::Target::unspecified), + sourceString); } void ProjectExporter::copyMainGroupFromProject() diff --git a/extras/Projucer/Source/Settings/jucer_AppearanceSettings.cpp b/extras/Projucer/Source/Settings/jucer_AppearanceSettings.cpp index 6d0b56cf..57882271 100644 --- a/extras/Projucer/Source/Settings/jucer_AppearanceSettings.cpp +++ b/extras/Projucer/Source/Settings/jucer_AppearanceSettings.cpp @@ -31,27 +31,22 @@ AppearanceSettings::AppearanceSettings (bool updateAppWhenChanged) : settings ("COLOUR_SCHEME") { - if (! ProjucerApplication::getApp().isRunningCommandLine) - { - ProjucerLookAndFeel lf; - - CodeDocument doc; - CPlusPlusCodeTokeniser tokeniser; - CodeEditorComponent editor (doc, &tokeniser); + CodeDocument doc; + CPlusPlusCodeTokeniser tokeniser; + CodeEditorComponent editor (doc, &tokeniser); - CodeEditorComponent::ColourScheme cs (editor.getColourScheme()); + CodeEditorComponent::ColourScheme cs (editor.getColourScheme()); - for (int i = cs.types.size(); --i >= 0;) - { - auto& t = cs.types.getReference(i); - getColourValue (t.name) = t.colour.toString(); - } + for (int i = cs.types.size(); --i >= 0;) + { + auto& t = cs.types.getReference(i); + getColourValue (t.name) = t.colour.toString(); + } - getCodeFontValue() = getDefaultCodeFont().toString(); + getCodeFontValue() = getDefaultCodeFont().toString(); - if (updateAppWhenChanged) - settings.addListener (this); - } + if (updateAppWhenChanged) + settings.addListener (this); } File AppearanceSettings::getSchemesFolder() diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h b/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h index b2cc9329..bcf0b048 100644 --- a/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h +++ b/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h @@ -358,6 +358,7 @@ namespace Ids DECLARE_ID (pluginVSTNumMidiInputs); DECLARE_ID (pluginVSTNumMidiOutputs); DECLARE_ID (suppressPlistResourceUsage); + DECLARE_ID (useLegacyBuildSystem); DECLARE_ID (exporters); DECLARE_ID (website); DECLARE_ID (mainClass); diff --git a/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile b/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile index 0e5d4789..5378190c 100644 --- a/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile +++ b/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_blocks_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_STANDALONE_APPLICATION=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 freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_blocks_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_STANDALONE_APPLICATION=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 freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_CONSOLEAPP := "-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_CONSOLEAPP := UnitTestRunner @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60005" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_blocks_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_STANDALONE_APPLICATION=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 freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60007" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_blocks_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_STANDALONE_APPLICATION=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 freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_CONSOLEAPP := "-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_CONSOLEAPP := UnitTestRunner diff --git a/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj b/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj index 721ef81c..7295617e 100644 --- a/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj +++ b/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj @@ -701,7 +701,7 @@ "DEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_analytics=1", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", @@ -739,20 +739,21 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INSTALL_PATH = "/usr/bin"; MACOSX_DEPLOYMENT_TARGET = 10.10; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); 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.UnitTestRunner; PRODUCT_NAME = "UnitTestRunner"; USE_HEADERMAP = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL; VALID_ARCHS = "i386 x86_64 arm64 arm64e"; }; name = Debug; @@ -774,7 +775,7 @@ "NDEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60005", + "JUCE_PROJUCER_VERSION=0x60007", "JUCE_MODULE_AVAILABLE_juce_analytics=1", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", @@ -812,21 +813,22 @@ ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", "$(inherited)", ); INSTALL_PATH = "/usr/bin"; LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.10; MTL_HEADER_SEARCH_PATHS = ( - "../../JuceLibraryCode", - "../../../../modules", + "$(SRCROOT)/../../JuceLibraryCode", + "$(SRCROOT)/../../../../modules", ); 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.UnitTestRunner; PRODUCT_NAME = "UnitTestRunner"; USE_HEADERMAP = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL; VALID_ARCHS = "i386 x86_64 arm64 arm64e"; }; name = Release; @@ -1022,7 +1024,7 @@ E1E93F2B4B2D17E011395520 = { isa = PBXProject; buildConfigurationList = 18FC121B1014F7999CD135D3; - attributes = { LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Raw Material Software Limited"; }; + attributes = { LastUpgradeCheck = 1230; ORGANIZATIONNAME = "Raw Material Software Limited"; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 99F3717D3FEAFDCA3C22E868; diff --git a/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f2e3cbe8..00000000 --- a/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - BuildSystemType - Original - DisableBuildSystemDeprecationWarning - - - diff --git a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj index cb48740e..e87d7fdc 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj +++ b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -107,7 +107,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -267,6 +267,21 @@ true + + true + + + true + + + true + + + true + + + true + true @@ -363,6 +378,9 @@ true + + true + true @@ -375,6 +393,9 @@ true + + true + true @@ -450,9 +471,6 @@ true - - true - true @@ -2366,6 +2384,22 @@ + + + + + + + + + + + + + + + + @@ -2408,10 +2442,12 @@ + + diff --git a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters index 9c9ed055..e68a1b4a 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters +++ b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters @@ -47,6 +47,9 @@ {BF23FC10-1D57-2A9B-706F-6DD8A7B593D4} + + {386862D5-4DCC-A4B3-5642-60A201E303EF} + {092EFC17-7C95-7E04-0ACA-0D61A462EE81} @@ -658,6 +661,21 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -754,6 +772,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -766,6 +787,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -841,7 +865,7 @@ JUCE Modules\juce_audio_devices\native - + JUCE Modules\juce_audio_devices\native @@ -3018,6 +3042,54 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -3144,6 +3216,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -3156,6 +3231,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph diff --git a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj index b41f71e3..6de8bb6c 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj +++ b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -107,7 +107,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_blocks_basics=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -267,6 +267,21 @@ true + + true + + + true + + + true + + + true + + + true + true @@ -363,6 +378,9 @@ true + + true + true @@ -375,6 +393,9 @@ true + + true + true @@ -450,9 +471,6 @@ true - - true - true @@ -2366,6 +2384,22 @@ + + + + + + + + + + + + + + + + @@ -2408,10 +2442,12 @@ + + diff --git a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters index bd6ce4f9..256ff7f9 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters +++ b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters @@ -47,6 +47,9 @@ {BF23FC10-1D57-2A9B-706F-6DD8A7B593D4} + + {386862D5-4DCC-A4B3-5642-60A201E303EF} + {092EFC17-7C95-7E04-0ACA-0D61A462EE81} @@ -658,6 +661,21 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -754,6 +772,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -766,6 +787,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -841,7 +865,7 @@ JUCE Modules\juce_audio_devices\native - + JUCE Modules\juce_audio_devices\native @@ -3018,6 +3042,54 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -3144,6 +3216,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -3156,6 +3231,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph diff --git a/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj b/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj index 0d61cd2f..82cbde05 100644 --- a/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj +++ b/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DLL_BUILD=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;_LIB;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DLL_BUILD=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;_LIB;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -105,7 +105,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60005;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DLL_BUILD=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;_LIB;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60007;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DLL_BUILD=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;_LIB;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -250,6 +250,21 @@ true + + true + + + true + + + true + + + true + + + true + true @@ -346,6 +361,9 @@ true + + true + true @@ -358,6 +376,9 @@ true + + true + true @@ -433,9 +454,6 @@ true - - true - true @@ -2129,6 +2147,22 @@ + + + + + + + + + + + + + + + + @@ -2171,10 +2205,12 @@ + + diff --git a/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj.filters b/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj.filters index ed7faae8..74ed3bb9 100644 --- a/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj.filters +++ b/extras/WindowsDLL/Builds/VisualStudio2019/WindowsDLL_StaticLibrary.vcxproj.filters @@ -32,6 +32,9 @@ {BF23FC10-1D57-2A9B-706F-6DD8A7B593D4} + + {386862D5-4DCC-A4B3-5642-60A201E303EF} + {092EFC17-7C95-7E04-0ACA-0D61A462EE81} @@ -565,6 +568,21 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -661,6 +679,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -673,6 +694,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -748,7 +772,7 @@ JUCE Modules\juce_audio_devices\native - + JUCE Modules\juce_audio_devices\native @@ -2679,6 +2703,54 @@ JUCE Modules\juce_audio_devices\audio_io + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + + + JUCE Modules\juce_audio_devices\midi_io\ump + JUCE Modules\juce_audio_devices\midi_io @@ -2805,6 +2877,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph\resampler + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph @@ -2817,6 +2892,9 @@ JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph + JUCE Modules\juce_audio_devices\native\oboe\src\flowgraph diff --git a/modules/juce_analytics/juce_analytics.h b/modules/juce_analytics/juce_analytics.h index 81333385..a283bc50 100644 --- a/modules/juce_analytics/juce_analytics.h +++ b/modules/juce_analytics/juce_analytics.h @@ -35,7 +35,7 @@ ID: juce_analytics vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE analytics classes description: Classes to collect analytics and send to destinations website: http://www.juce.com/juce diff --git a/modules/juce_audio_basics/juce_audio_basics.h b/modules/juce_audio_basics/juce_audio_basics.h index a3b3d41d..8c207fa6 100644 --- a/modules/juce_audio_basics/juce_audio_basics.h +++ b/modules/juce_audio_basics/juce_audio_basics.h @@ -32,7 +32,7 @@ ID: juce_audio_basics vendor: juce - version: 6.0.5 + version: 6.0.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 diff --git a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp index aa155bcf..84df6f46 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp @@ -27,30 +27,33 @@ namespace { const uint8 noLSBValueReceived = 0xff; const Range allChannels { 1, 17 }; + + template + void mpeInstrumentFill (Range& range, const Value& value) + { + std::fill (std::begin (range), std::end (range), value); + } } //============================================================================== MPEInstrument::MPEInstrument() noexcept { - std::fill_n (lastPressureLowerBitReceivedOnChannel, 16, noLSBValueReceived); - std::fill_n (lastTimbreLowerBitReceivedOnChannel, 16, noLSBValueReceived); - std::fill_n (isMemberChannelSustained, 16, false); + mpeInstrumentFill (lastPressureLowerBitReceivedOnChannel, noLSBValueReceived); + mpeInstrumentFill (lastTimbreLowerBitReceivedOnChannel, noLSBValueReceived); + mpeInstrumentFill (isMemberChannelSustained, false); pitchbendDimension.value = &MPENote::pitchbend; pressureDimension.value = &MPENote::pressure; timbreDimension.value = &MPENote::timbre; - // the default value for pressure is 0, for all other dimension it is centre (= default MPEValue) - std::fill_n (pressureDimension.lastValueReceivedOnChannel, 16, MPEValue::minValue()); + resetLastReceivedValues(); legacyMode.isEnabled = false; legacyMode.pitchbendRange = 2; legacyMode.channelRange = allChannels; } -MPEInstrument::~MPEInstrument() -{ -} +MPEInstrument::~MPEInstrument() = default; //============================================================================== MPEZoneLayout MPEInstrument::getZoneLayout() const noexcept @@ -58,6 +61,23 @@ MPEZoneLayout MPEInstrument::getZoneLayout() const noexcept return zoneLayout; } +void MPEInstrument::resetLastReceivedValues() +{ + struct Defaults + { + MPEDimension& dimension; + MPEValue defaultValue; + }; + + // The default value for pressure is 0, for all other dimensions it is centre + for (const auto& pair : { Defaults { pressureDimension, MPEValue::minValue() }, + Defaults { pitchbendDimension, MPEValue::centreValue() }, + Defaults { timbreDimension, MPEValue::centreValue() } }) + { + mpeInstrumentFill (pair.dimension.lastValueReceivedOnChannel, pair.defaultValue); + } +} + void MPEInstrument::setZoneLayout (MPEZoneLayout newLayout) { releaseAllNotes(); @@ -65,6 +85,8 @@ void MPEInstrument::setZoneLayout (MPEZoneLayout newLayout) const ScopedLock sl (lock); legacyMode.isEnabled = false; zoneLayout = newLayout; + + resetLastReceivedValues(); } //============================================================================== diff --git a/modules/juce_audio_basics/mpe/juce_MPEInstrument.h b/modules/juce_audio_basics/mpe/juce_MPEInstrument.h index 26537025..3db823f5 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEInstrument.h +++ b/modules/juce_audio_basics/mpe/juce_MPEInstrument.h @@ -376,6 +376,8 @@ private: LegacyMode legacyMode; MPEDimension pitchbendDimension, pressureDimension, timbreDimension; + void resetLastReceivedValues(); + void updateDimension (int midiChannel, MPEDimension&, MPEValue); void updateDimensionMaster (bool, MPEDimension&, MPEValue); void updateDimensionForNote (MPENote&, MPEDimension&, MPEValue); diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp index bc472707..a19c7b05 100644 --- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp +++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp @@ -704,7 +704,7 @@ void AudioDeviceManager::restartLastAudioDevice() { // This method will only reload the last device that was running // before closeAudioDevice() was called - you need to actually open - // one first, with setAudioDevice(). + // one first, with setAudioDeviceSetup(). jassertfalse; return; } diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h index ac490c0d..d5c6f03f 100644 --- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h +++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h @@ -267,7 +267,7 @@ public: Note that this only reloads the last device that was running before closeAudioDevice() was called - it doesn't reload any kind of saved-state, - and can only be called after a device has been opened with SetAudioDevice(). + and can only be called after a device has been opened with setAudioDeviceSetup(). If a device is already open, this call will do nothing. */ diff --git a/modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h b/modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h index eca32bf9..683d038a 100644 --- a/modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h +++ b/modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h @@ -80,9 +80,8 @@ public: The scanForDevices() method must have been called to create this list. - @param wantInputNames only really used by DirectSound where devices are split up - into inputs and outputs, this indicates whether to use - the input or output name to refer to a pair of devices. + @param wantInputNames for devices which have separate inputs and outputs + this determines which list of names is returned */ virtual StringArray getDeviceNames (bool wantInputNames = false) const = 0; diff --git a/modules/juce_audio_devices/juce_audio_devices.cpp b/modules/juce_audio_devices/juce_audio_devices.cpp index b3a315c9..7f7e461d 100644 --- a/modules/juce_audio_devices/juce_audio_devices.cpp +++ b/modules/juce_audio_devices/juce_audio_devices.cpp @@ -47,6 +47,35 @@ #include "native/juce_MidiDataConcatenator.h" +#include "midi_io/ump/juce_UMPProtocols.h" +#include "midi_io/ump/juce_UMPUtils.h" +#include "midi_io/ump/juce_UMPacket.h" +#include "midi_io/ump/juce_UMPSysEx7.h" +#include "midi_io/ump/juce_UMPView.h" +#include "midi_io/ump/juce_UMPIterator.h" +#include "midi_io/ump/juce_UMPackets.h" +#include "midi_io/ump/juce_UMPFactory.h" +#include "midi_io/ump/juce_UMPConversion.h" +#include "midi_io/ump/juce_UMPMidi1ToBytestreamTranslator.h" +#include "midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h" +#include "midi_io/ump/juce_UMPConverters.h" +#include "midi_io/ump/juce_UMPDispatcher.h" +#include "midi_io/ump/juce_UMPReceiver.h" +#include "midi_io/ump/juce_UMPBytestreamInputHandler.h" +#include "midi_io/ump/juce_UMPU32InputHandler.h" + +#include "midi_io/ump/juce_UMPUtils.cpp" +#include "midi_io/ump/juce_UMPView.cpp" +#include "midi_io/ump/juce_UMPSysEx7.cpp" +#include "midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp" + +#include "midi_io/ump/juce_UMPTests.cpp" + +namespace juce +{ +namespace ump = universal_midi_packets; +} + //============================================================================== #if JUCE_MAC #define Point CarbonDummyPointName @@ -58,7 +87,7 @@ #undef Component #include "native/juce_mac_CoreAudio.cpp" - #include "native/juce_mac_CoreMidi.cpp" + #include "native/juce_mac_CoreMidi.mm" #elif JUCE_IOS #import @@ -70,7 +99,7 @@ #endif #include "native/juce_ios_Audio.cpp" - #include "native/juce_mac_CoreMidi.cpp" + #include "native/juce_mac_CoreMidi.mm" //============================================================================== #elif JUCE_WINDOWS diff --git a/modules/juce_audio_devices/juce_audio_devices.h b/modules/juce_audio_devices/juce_audio_devices.h index 361427c1..0cc0a449 100644 --- a/modules/juce_audio_devices/juce_audio_devices.h +++ b/modules/juce_audio_devices/juce_audio_devices.h @@ -32,7 +32,7 @@ ID: juce_audio_devices vendor: juce - version: 6.0.5 + version: 6.0.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 diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h new file mode 100644 index 00000000..49ce6642 --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h @@ -0,0 +1,134 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** + A base class for classes which convert bytestream midi to other formats. +*/ +struct BytestreamInputHandler +{ + virtual ~BytestreamInputHandler() noexcept = default; + + virtual void reset() = 0; + virtual void pushMidiData (const void* data, int bytes, double time) = 0; +}; + +/** + Parses a continuous bytestream and emits complete MidiMessages whenever a full + message is received. +*/ +struct BytestreamToBytestreamHandler : public BytestreamInputHandler +{ + BytestreamToBytestreamHandler (MidiInput& i, MidiInputCallback& c) + : input (i), callback (c), concatenator (2048) {} + + /** + Provides an `operator()` which can create an input handler for a given + MidiInput. + + All handler classes should have a similar Factory to facilitate + creation of handlers in generic contexts. + */ + class Factory + { + public: + explicit Factory (MidiInputCallback* c) + : callback (c) {} + + std::unique_ptr operator() (MidiInput& i) const + { + if (callback != nullptr) + return std::make_unique (i, *callback); + + jassertfalse; + return {}; + } + + private: + MidiInputCallback* callback = nullptr; + }; + + void reset() override { concatenator.reset(); } + + void pushMidiData (const void* data, int bytes, double time) override + { + concatenator.pushMidiData (data, bytes, time, &input, callback); + } + + MidiInput& input; + MidiInputCallback& callback; + MidiDataConcatenator concatenator; +}; + +/** + Parses a continuous MIDI 1.0 bytestream, and emits full messages in the requested + UMP format. +*/ +struct BytestreamToUMPHandler : public BytestreamInputHandler +{ + BytestreamToUMPHandler (PacketProtocol protocol, Receiver& c) + : recipient (c), dispatcher (protocol, 2048) {} + + /** + Provides an `operator()` which can create an input handler for a given + MidiInput. + + All handler classes should have a similar Factory to facilitate + creation of handlers in generic contexts. + */ + class Factory + { + public: + Factory (PacketProtocol p, Receiver& c) + : protocol (p), callback (c) {} + + std::unique_ptr operator() (MidiInput&) const + { + return std::make_unique (protocol, callback); + } + + private: + PacketProtocol protocol; + Receiver& callback; + }; + + void reset() override { dispatcher.reset(); } + + void pushMidiData (const void* data, int bytes, double time) override + { + const auto* ptr = static_cast (data); + dispatcher.dispatch (ptr, ptr + bytes, time, [&] (const View& v) + { + recipient.packetReceived (v, time); + }); + } + + Receiver& recipient; + BytestreamToUMPDispatcher dispatcher; +}; + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPConversion.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPConversion.h new file mode 100644 index 00000000..c85a33f1 --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPConversion.h @@ -0,0 +1,326 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** + Functions to assist conversion of UMP messages to/from other formats, + especially older 'bytestream' formatted MidiMessages. + + @tags{Audio} +*/ +struct Conversion +{ + /** Converts from a MIDI 1 bytestream to MIDI 1 on Universal MIDI Packets. + + `callback` is a function which accepts a single View argument. + */ + template + static void toMidi1 (const MidiMessage& m, PacketCallbackFunction&& callback) + { + const auto* data = m.getRawData(); + const auto firstByte = data[0]; + const auto size = m.getRawDataSize(); + + if (firstByte != 0xf0) + { + const auto mask = [size]() -> uint32_t + { + switch (size) + { + case 0: return 0xff000000; + case 1: return 0xffff0000; + case 2: return 0xffffff00; + case 3: return 0xffffffff; + } + + return 0x00000000; + }(); + + const auto extraByte = (uint8_t) ((((firstByte & 0xf0) == 0xf0) ? 0x1 : 0x2) << 0x4); + const PacketX1 packet { mask & Utils::bytesToWord (extraByte, data[0], data[1], data[2]) }; + callback (View (packet.data())); + return; + } + + const auto numSysExBytes = m.getSysExDataSize(); + const auto numMessages = SysEx7::getNumPacketsRequiredForDataSize ((uint32_t) numSysExBytes); + auto* dataOffset = m.getSysExData(); + + if (numMessages <= 1) + { + const auto packet = Factory::makeSysExIn1Packet (0, (uint8_t) numSysExBytes, dataOffset); + callback (View (packet.data())); + return; + } + + constexpr auto byteIncrement = 6; + + for (auto i = numSysExBytes; i > 0; i -= byteIncrement, dataOffset += byteIncrement) + { + const auto func = [&] + { + if (i == numSysExBytes) + return Factory::makeSysExStart; + + if (i <= byteIncrement) + return Factory::makeSysExEnd; + + return Factory::makeSysExContinue; + }(); + + const auto bytesNow = std::min (byteIncrement, i); + const auto packet = func (0, (uint8_t) bytesNow, dataOffset); + callback (View (packet.data())); + } + } + + /** Converts a MidiMessage to one or more messages in UMP format, using + the MIDI 1.0 Protocol. + + `packets` is an out-param to allow the caller to control + allocation/deallocation. Returning a new Packets object would + require every call to toMidi1 to allocate. With this version, no + allocations will occur, provided that `packets` has adequate reserved + space. + */ + static void toMidi1 (const MidiMessage& m, Packets& packets) + { + toMidi1 (m, [&] (const View& view) { packets.add (view); }); + } + + /** Widens a 7-bit MIDI 1.0 value to a 8-bit MIDI 2.0 value. */ + static uint8_t scaleTo8 (uint8_t word7Bit) + { + const auto shifted = (uint8_t) (word7Bit << 0x1); + const auto repeat = (uint8_t) (word7Bit & 0x3f); + const auto mask = (uint8_t) (word7Bit <= 0x40 ? 0x0 : 0xff); + return (uint8_t) (shifted | ((repeat >> 5) & mask)); + } + + /** Widens a 7-bit MIDI 1.0 value to a 16-bit MIDI 2.0 value. */ + static uint16_t scaleTo16 (uint8_t word7Bit) + { + const auto shifted = (uint16_t) (word7Bit << 0x9); + const auto repeat = (uint16_t) (word7Bit & 0x3f); + const auto mask = (uint16_t) (word7Bit <= 0x40 ? 0x0 : 0xffff); + return (uint16_t) (shifted | (((repeat << 3) | (repeat >> 3)) & mask)); + } + + /** Widens a 14-bit MIDI 1.0 value to a 16-bit MIDI 2.0 value. */ + static uint16_t scaleTo16 (uint16_t word14Bit) + { + const auto shifted = (uint16_t) (word14Bit << 0x2); + const auto repeat = (uint16_t) (word14Bit & 0x1fff); + const auto mask = (uint16_t) (word14Bit <= 0x2000 ? 0x0 : 0xffff); + return (uint16_t) (shifted | ((repeat >> 11) & mask)); + } + + /** Widens a 7-bit MIDI 1.0 value to a 32-bit MIDI 2.0 value. */ + static uint32_t scaleTo32 (uint8_t word7Bit) + { + const auto shifted = (uint32_t) (word7Bit << 0x19); + const auto repeat = (uint32_t) (word7Bit & 0x3f); + const auto mask = (uint32_t) (word7Bit <= 0x40 ? 0x0 : 0xffffffff); + return (uint32_t) (shifted | (((repeat << 19) + | (repeat << 13) + | (repeat << 7) + | (repeat << 1) + | (repeat >> 5)) & mask)); + } + + /** Widens a 14-bit MIDI 1.0 value to a 32-bit MIDI 2.0 value. */ + static uint32_t scaleTo32 (uint16_t word14Bit) + { + const auto shifted = (uint32_t) (word14Bit << 0x12); + const auto repeat = (uint32_t) (word14Bit & 0x1fff); + const auto mask = (uint32_t) (word14Bit <= 0x2000 ? 0x0 : 0xffffffff); + return (uint32_t) (shifted | (((repeat << 5) | (repeat >> 8)) & mask)); + } + + /** Narrows a 16-bit MIDI 2.0 value to a 7-bit MIDI 1.0 value. */ + static uint8_t scaleTo7 (uint8_t word8Bit) { return (uint8_t) (word8Bit >> 1); } + + /** Narrows a 16-bit MIDI 2.0 value to a 7-bit MIDI 1.0 value. */ + static uint8_t scaleTo7 (uint16_t word16Bit) { return (uint8_t) (word16Bit >> 9); } + + /** Narrows a 32-bit MIDI 2.0 value to a 7-bit MIDI 1.0 value. */ + static uint8_t scaleTo7 (uint32_t word32Bit) { return (uint8_t) (word32Bit >> 25); } + + /** Narrows a 32-bit MIDI 2.0 value to a 14-bit MIDI 1.0 value. */ + static uint16_t scaleTo14 (uint16_t word16Bit) { return (uint16_t) (word16Bit >> 2); } + + /** Narrows a 32-bit MIDI 2.0 value to a 14-bit MIDI 1.0 value. */ + static uint16_t scaleTo14 (uint32_t word32Bit) { return (uint16_t) (word32Bit >> 18); } + + /** Converts UMP messages which may include MIDI 2.0 channel voice messages into + equivalent MIDI 1.0 messages (still in UMP format). + + `callback` is a function that accepts a single View argument and will be + called with each converted packet. + + Note that not all MIDI 2.0 messages have MIDI 1.0 equivalents, so such + messages will be ignored. + */ + template + static void midi2ToMidi1DefaultTranslation (const View& v, Callback&& callback) + { + const auto firstWord = v[0]; + + if (Utils::getMessageType (firstWord) != 0x4) + { + callback (v); + return; + } + + const auto status = Utils::getStatus (firstWord); + const auto typeAndGroup = (uint8_t) ((0x2 << 0x4) | Utils::getGroup (firstWord)); + + switch (status) + { + case 0x8: // note off + case 0x9: // note on + case 0xa: // poly pressure + case 0xb: // control change + { + const auto statusAndChannel = (uint8_t) ((firstWord >> 0x10) & 0xff); + const auto byte2 = (uint8_t) ((firstWord >> 0x08) & 0xff); + const auto byte3 = scaleTo7 (v[1]); + + // If this is a note-on, and the scaled byte is 0, + // the scaled velocity should be 1 instead of 0 + const auto needsCorrection = status == 0x9 && byte3 == 0; + const auto correctedByte = (uint8_t) (needsCorrection ? 1 : byte3); + + const auto shouldIgnore = status == 0xb && [&] + { + switch (byte2) + { + case 0: + case 6: + case 32: + case 38: + case 98: + case 99: + case 100: + case 101: + return true; + } + + return false; + }(); + + if (shouldIgnore) + return; + + const PacketX1 packet { Utils::bytesToWord (typeAndGroup, + statusAndChannel, + byte2, + correctedByte) }; + callback (View (packet.data())); + return; + } + + case 0xd: // channel pressure + { + const auto statusAndChannel = (uint8_t) ((firstWord >> 0x10) & 0xff); + const auto byte2 = scaleTo7 (v[1]); + + const PacketX1 packet { Utils::bytesToWord (typeAndGroup, + statusAndChannel, + byte2, + 0) }; + callback (View (packet.data())); + return; + } + + case 0x2: // rpn + case 0x3: // nrpn + { + const auto ccX = (uint8_t) (status == 0x2 ? 101 : 99); + const auto ccY = (uint8_t) (status == 0x2 ? 100 : 98); + const auto statusAndChannel = (uint8_t) ((0xb << 0x4) | Utils::getChannel (firstWord)); + const auto data = scaleTo14 (v[1]); + + const PacketX1 packets[] + { + PacketX1 { Utils::bytesToWord (typeAndGroup, statusAndChannel, ccX, (uint8_t) ((firstWord >> 0x8) & 0x7f)) }, + PacketX1 { Utils::bytesToWord (typeAndGroup, statusAndChannel, ccY, (uint8_t) ((firstWord >> 0x0) & 0x7f)) }, + PacketX1 { Utils::bytesToWord (typeAndGroup, statusAndChannel, 6, (uint8_t) ((data >> 0x7) & 0x7f)) }, + PacketX1 { Utils::bytesToWord (typeAndGroup, statusAndChannel, 38, (uint8_t) ((data >> 0x0) & 0x7f)) }, + }; + + for (const auto& packet : packets) + callback (View (packet.data())); + + return; + } + + case 0xc: // program change / bank select + { + if (firstWord & 1) + { + const auto statusAndChannel = (uint8_t) ((0xb << 0x4) | Utils::getChannel (firstWord)); + const auto secondWord = v[1]; + + const PacketX1 packets[] + { + PacketX1 { Utils::bytesToWord (typeAndGroup, statusAndChannel, 0, (uint8_t) ((secondWord >> 0x8) & 0x7f)) }, + PacketX1 { Utils::bytesToWord (typeAndGroup, statusAndChannel, 32, (uint8_t) ((secondWord >> 0x0) & 0x7f)) }, + }; + + for (const auto& packet : packets) + callback (View (packet.data())); + } + + const auto statusAndChannel = (uint8_t) ((0xc << 0x4) | Utils::getChannel (firstWord)); + const PacketX1 packet { Utils::bytesToWord (typeAndGroup, + statusAndChannel, + (uint8_t) ((v[1] >> 0x18) & 0x7f), + 0) }; + callback (View (packet.data())); + return; + } + + case 0xe: // pitch bend + { + const auto data = scaleTo14 (v[1]); + const auto statusAndChannel = (uint8_t) ((firstWord >> 0x10) & 0xff); + const PacketX1 packet { Utils::bytesToWord (typeAndGroup, + statusAndChannel, + (uint8_t) (data & 0x7f), + (uint8_t) ((data >> 7) & 0x7f)) }; + callback (View (packet.data())); + return; + } + + default: // other message types do not translate + return; + } + } +}; + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPConverters.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPConverters.h new file mode 100644 index 00000000..d47927bd --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPConverters.h @@ -0,0 +1,165 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + /** + Allows conversion from bytestream- or Universal MIDI Packet-formatted + messages to MIDI 1.0 messages in UMP format. + + @tags{Audio} + */ + struct ToUMP1Converter + { + template + void convert (const MidiMessage& m, Fn&& fn) + { + Conversion::toMidi1 (m, std::forward (fn)); + } + + template + void convert (const View& v, Fn&& fn) + { + Conversion::midi2ToMidi1DefaultTranslation (v, std::forward (fn)); + } + }; + + /** + Allows conversion from bytestream- or Universal MIDI Packet-formatted + messages to MIDI 2.0 messages in UMP format. + + @tags{Audio} + */ + struct ToUMP2Converter + { + template + void convert (const MidiMessage& m, Fn&& fn) + { + Conversion::toMidi1 (m, [&] (const View& v) + { + translator.dispatch (v, fn); + }); + } + + template + void convert (const View& v, Fn&& fn) + { + translator.dispatch (v, std::forward (fn)); + } + + void reset() + { + translator.reset(); + } + + Midi1ToMidi2DefaultTranslator translator; + }; + + /** + Allows conversion from bytestream- or Universal MIDI Packet-formatted + messages to UMP format. + + The packet protocol can be selected using the constructor parameter. + + @tags{Audio} + */ + class GenericUMPConverter + { + public: + explicit GenericUMPConverter (PacketProtocol m) + : mode (m) {} + + void reset() + { + std::get<1> (converters).reset(); + } + + template + void convert (const MidiMessage& m, Fn&& fn) + { + switch (mode) + { + case PacketProtocol::MIDI_1_0: return std::get<0> (converters).convert (m, std::forward (fn)); + case PacketProtocol::MIDI_2_0: return std::get<1> (converters).convert (m, std::forward (fn)); + } + } + + template + void convert (const View& v, Fn&& fn) + { + switch (mode) + { + case PacketProtocol::MIDI_1_0: return std::get<0> (converters).convert (v, std::forward (fn)); + case PacketProtocol::MIDI_2_0: return std::get<1> (converters).convert (v, std::forward (fn)); + } + } + + template + void convert (Iterator begin, Iterator end, Fn&& fn) + { + std::for_each (begin, end, [&] (const View& v) + { + convert (v, fn); + }); + } + + PacketProtocol getProtocol() const noexcept { return mode; } + + private: + std::tuple converters; + const PacketProtocol mode{}; + }; + + /** + Allows conversion from bytestream- or Universal MIDI Packet-formatted + messages to bytestream format. + + @tags{Audio} + */ + struct ToBytestreamConverter + { + explicit ToBytestreamConverter (int storageSize) + : translator (storageSize) {} + + template + void convert (const MidiMessage& m, Fn&& fn) + { + fn (m); + } + + template + void convert (const View& v, double time, Fn&& fn) + { + Conversion::midi2ToMidi1DefaultTranslation (v, [&] (const View& midi1) + { + translator.dispatch (midi1, time, fn); + }); + } + + void reset() { translator.reset(); } + + Midi1ToBytestreamTranslator translator; + }; +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPDispatcher.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPDispatcher.h new file mode 100644 index 00000000..a365b4fd --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPDispatcher.h @@ -0,0 +1,190 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** + Parses a raw stream of uint32_t, and calls a user-provided callback every time + a full Universal MIDI Packet is encountered. + + @tags{Audio} +*/ +class Dispatcher +{ +public: + /** Clears the dispatcher. */ + void reset() { currentPacketLen = 0; } + + /** Calls `callback` with a View of each packet encountered in the range delimited + by `begin` and `end`. + + If the range ends part-way through a packet, the next call to `dispatch` will + continue from that point in the packet (unless `reset` is called first). + */ + template + void dispatch (const uint32_t* begin, + const uint32_t* end, + double timeStamp, + PacketCallbackFunction&& callback) + { + std::for_each (begin, end, [&] (uint32_t word) + { + nextPacket[currentPacketLen++] = word; + + if (currentPacketLen == Utils::getNumWordsForMessageType (nextPacket.front())) + { + callback (View (nextPacket.data()), timeStamp); + currentPacketLen = 0; + } + }); + } + +private: + std::array nextPacket; + size_t currentPacketLen = 0; +}; + +//============================================================================== +/** + Parses a stream of bytes representing a sequence of bytestream-encoded MIDI 1.0 messages, + converting the messages to UMP format and passing the packets to a user-provided callback + as they become ready. + + @tags{Audio} +*/ +class BytestreamToUMPDispatcher +{ +public: + /** Initialises the dispatcher. + + Channel messages will be converted to the requested protocol format `pp`. + `storageSize` bytes will be allocated to store incomplete messages. + */ + explicit BytestreamToUMPDispatcher (PacketProtocol pp, int storageSize) + : concatenator (storageSize), + converter (pp) + {} + + void reset() + { + concatenator.reset(); + converter.reset(); + } + + /** Calls `callback` with a View of each converted packet as it becomes ready. + + @param begin the first byte in a range of bytes representing bytestream-encoded MIDI messages. + @param end one-past the last byte in a range of bytes representing bytestream-encoded MIDI messages. + @param timestamp a timestamp to apply to the created packets. + @param callback a callback which will be passed a View pointing to each new packet as it becomes ready. + */ + template + void dispatch (const uint8_t* begin, + const uint8_t* end, + double timestamp, + PacketCallbackFunction&& callback) + { + using CallbackPtr = decltype (std::addressof (callback)); + + struct Callback + { + Callback (BytestreamToUMPDispatcher& d, CallbackPtr c) + : dispatch (d), callbackPtr (c) {} + + void handleIncomingMidiMessage (void*, const MidiMessage& msg) const + { + Conversion::toMidi1 (msg, [&] (const View& view) + { + dispatch.converter.convert (view, *callbackPtr); + }); + } + + void handlePartialSysexMessage (void*, const uint8_t*, int, double) const {} + + BytestreamToUMPDispatcher& dispatch; + CallbackPtr callbackPtr = nullptr; + }; + + Callback inputCallback { *this, &callback }; + concatenator.pushMidiData (begin, int (end - begin), timestamp, (void*) nullptr, inputCallback); + } + +private: + MidiDataConcatenator concatenator; + GenericUMPConverter converter; +}; + +//============================================================================== +/** + Parses a stream of 32-bit words representing a sequence of UMP-encoded MIDI messages, + converting the messages to MIDI 1.0 bytestream format and passing them to a user-provided + callback as they become ready. + + @tags{Audio} +*/ +class ToBytestreamDispatcher +{ +public: + /** Initialises the dispatcher. + + `storageSize` bytes will be allocated to store incomplete messages. + */ + explicit ToBytestreamDispatcher (int storageSize) + : converter (storageSize) {} + + /** Clears the dispatcher. */ + void reset() + { + dispatcher.reset(); + converter.reset(); + } + + /** Calls `callback` with converted bytestream-formatted MidiMessage whenever + a new message becomes available. + + @param begin the first word in a stream of words representing UMP-encoded MIDI packets. + @param end one-past the last word in a stream of words representing UMP-encoded MIDI packets. + @param timestamp a timestamp to apply to converted messages. + @param callback a callback which will be passed a MidiMessage each time a new message becomes ready. + */ + template + void dispatch (const uint32_t* begin, + const uint32_t* end, + double timestamp, + BytestreamMessageCallback&& callback) + { + dispatcher.dispatch (begin, end, timestamp, [&] (const View& view, double time) + { + converter.convert (view, time, callback); + }); + } + +private: + Dispatcher dispatcher; + ToBytestreamConverter converter; +}; + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPFactory.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPFactory.h new file mode 100644 index 00000000..acfcc6c8 --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPFactory.h @@ -0,0 +1,534 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** + This struct holds functions that can be used to create different kinds + of Universal MIDI Packet. + + @tags{Audio} +*/ +struct Factory +{ + /** @internal */ + struct Detail + { + static PacketX1 makeSystem() { return PacketX1{}.withMessageType (1); } + static PacketX1 makeV1() { return PacketX1{}.withMessageType (2); } + static PacketX2 makeV2() { return PacketX2{}.withMessageType (4); } + + static PacketX2 makeSysEx (uint8_t group, + uint8_t status, + uint8_t numBytes, + const uint8_t* data) + { + jassert (numBytes <= 6); + + std::array bytes{{}}; + bytes[0] = (0x3 << 0x4) | group; + bytes[1] = (uint8_t) (status << 0x4) | numBytes; + + std::memcpy (bytes.data() + 2, data, numBytes); + + std::array words; + + size_t index = 0; + + for (auto& word : words) + word = ByteOrder::bigEndianInt (bytes.data() + 4 * index++); + + return PacketX2 { words }; + } + + static PacketX4 makeSysEx8 (uint8_t group, + uint8_t status, + uint8_t numBytes, + uint8_t dataStart, + const uint8_t* data) + { + jassert (numBytes <= 16 - dataStart); + + std::array bytes{{}}; + bytes[0] = (0x5 << 0x4) | group; + bytes[1] = (uint8_t) (status << 0x4) | numBytes; + + std::memcpy (bytes.data() + dataStart, data, numBytes); + + std::array words; + + size_t index = 0; + + for (auto& word : words) + word = ByteOrder::bigEndianInt (bytes.data() + 4 * index++); + + return PacketX4 { words }; + } + }; + + static PacketX1 makeNoop (uint8_t group) + { + return PacketX1{}.withGroup (group); + } + + static PacketX1 makeJRClock (uint8_t group, uint16_t time) + { + return PacketX1 { time }.withStatus (1).withGroup (group); + } + + static PacketX1 makeJRTimestamp (uint8_t group, uint16_t time) + { + return PacketX1 { time }.withStatus (2).withGroup (group); + } + + static PacketX1 makeTimeCode (uint8_t group, uint8_t code) + { + return Detail::makeSystem().withGroup (group) + .withU8<1> (0xf1) + .withU8<2> (code & 0x7f); + } + + static PacketX1 makeSongPositionPointer (uint8_t group, uint16_t pos) + { + return Detail::makeSystem().withGroup (group) + .withU8<1> (0xf2) + .withU8<2> (pos & 0x7f) + .withU8<3> ((pos >> 7) & 0x7f); + } + + static PacketX1 makeSongSelect (uint8_t group, uint8_t song) + { + return Detail::makeSystem().withGroup (group) + .withU8<1> (0xf3) + .withU8<2> (song & 0x7f); + } + + static PacketX1 makeTuneRequest (uint8_t group) + { + return Detail::makeSystem().withGroup (group) + .withU8<1> (0xf6); + } + + static PacketX1 makeTimingClock (uint8_t group) + { + return Detail::makeSystem().withGroup (group) + .withU8<1> (0xf8); + } + + static PacketX1 makeStart (uint8_t group) + { + return Detail::makeSystem().withGroup (group) + .withU8<1> (0xfa); + } + + static PacketX1 makeContinue (uint8_t group) + { + return Detail::makeSystem().withGroup (group) + .withU8<1> (0xfb); + } + + static PacketX1 makeStop (uint8_t group) + { + return Detail::makeSystem().withGroup (group) + .withU8<1> (0xfc); + } + + static PacketX1 makeActiveSensing (uint8_t group) + { + return Detail::makeSystem().withGroup (group) + .withU8<1> (0xfe); + } + + static PacketX1 makeReset (uint8_t group) + { + return Detail::makeSystem().withGroup (group) + .withU8<1> (0xff); + } + + static PacketX1 makeNoteOffV1 (uint8_t group, + uint8_t channel, + uint8_t note, + uint8_t velocity) + { + return Detail::makeV1().withGroup (group) + .withStatus (0x8) + .withChannel (channel) + .withU8<2> (note & 0x7f) + .withU8<3> (velocity & 0x7f); + } + + static PacketX1 makeNoteOnV1 (uint8_t group, + uint8_t channel, + uint8_t note, + uint8_t velocity) + { + return Detail::makeV1().withGroup (group) + .withStatus (0x9) + .withChannel (channel) + .withU8<2> (note & 0x7f) + .withU8<3> (velocity & 0x7f); + } + + static PacketX1 makePolyPressureV1 (uint8_t group, + uint8_t channel, + uint8_t note, + uint8_t pressure) + { + return Detail::makeV1().withGroup (group) + .withStatus (0xa) + .withChannel (channel) + .withU8<2> (note & 0x7f) + .withU8<3> (pressure & 0x7f); + } + + static PacketX1 makeControlChangeV1 (uint8_t group, + uint8_t channel, + uint8_t controller, + uint8_t value) + { + return Detail::makeV1().withGroup (group) + .withStatus (0xb) + .withChannel (channel) + .withU8<2> (controller & 0x7f) + .withU8<3> (value & 0x7f); + } + + static PacketX1 makeProgramChangeV1 (uint8_t group, + uint8_t channel, + uint8_t program) + { + return Detail::makeV1().withGroup (group) + .withStatus (0xc) + .withChannel (channel) + .withU8<2> (program & 0x7f); + } + + static PacketX1 makeChannelPressureV1 (uint8_t group, + uint8_t channel, + uint8_t pressure) + { + return Detail::makeV1().withGroup (group) + .withStatus (0xd) + .withChannel (channel) + .withU8<2> (pressure & 0x7f); + } + + static PacketX1 makePitchBend (uint8_t group, + uint8_t channel, + uint16_t pitchbend) + { + return Detail::makeV1().withGroup (group) + .withStatus (0xe) + .withChannel (channel) + .withU8<2> (pitchbend & 0x7f) + .withU8<3> ((pitchbend >> 7) & 0x7f); + } + + static PacketX2 makeSysExIn1Packet (uint8_t group, + uint8_t numBytes, + const uint8_t* data) + { + return Detail::makeSysEx (group, 0x0, numBytes, data); + } + + static PacketX2 makeSysExStart (uint8_t group, + uint8_t numBytes, + const uint8_t* data) + { + return Detail::makeSysEx (group, 0x1, numBytes, data); + } + + static PacketX2 makeSysExContinue (uint8_t group, + uint8_t numBytes, + const uint8_t* data) + { + return Detail::makeSysEx (group, 0x2, numBytes, data); + } + + static PacketX2 makeSysExEnd (uint8_t group, + uint8_t numBytes, + const uint8_t* data) + { + return Detail::makeSysEx (group, 0x3, numBytes, data); + } + + static PacketX2 makeRegisteredPerNoteControllerV2 (uint8_t group, + uint8_t channel, + uint8_t note, + uint8_t controller, + uint32_t data) + { + return Detail::makeV2().withGroup (group) + .withStatus (0x0) + .withChannel (channel) + .withU8<2> (note & 0x7f) + .withU8<3> (controller & 0x7f) + .withU32<1> (data); + } + + static PacketX2 makeAssignablePerNoteControllerV2 (uint8_t group, + uint8_t channel, + uint8_t note, + uint8_t controller, + uint32_t data) + { + return Detail::makeV2().withGroup (group) + .withStatus (0x1) + .withChannel (channel) + .withU8<2> (note & 0x7f) + .withU8<3> (controller & 0x7f) + .withU32<1> (data); + } + + static PacketX2 makeRegisteredControllerV2 (uint8_t group, + uint8_t channel, + uint8_t bank, + uint8_t index, + uint32_t data) + { + return Detail::makeV2().withGroup (group) + .withStatus (0x2) + .withChannel (channel) + .withU8<2> (bank & 0x7f) + .withU8<3> (index & 0x7f) + .withU32<1> (data); + } + + static PacketX2 makeAssignableControllerV2 (uint8_t group, + uint8_t channel, + uint8_t bank, + uint8_t index, + uint32_t data) + { + return Detail::makeV2().withGroup (group) + .withStatus (0x3) + .withChannel (channel) + .withU8<2> (bank & 0x7f) + .withU8<3> (index & 0x7f) + .withU32<1> (data); + } + + static PacketX2 makeRelativeRegisteredControllerV2 (uint8_t group, + uint8_t channel, + uint8_t bank, + uint8_t index, + uint32_t data) + { + return Detail::makeV2().withGroup (group) + .withStatus (0x4) + .withChannel (channel) + .withU8<2> (bank & 0x7f) + .withU8<3> (index & 0x7f) + .withU32<1> (data); + } + + static PacketX2 makeRelativeAssignableControllerV2 (uint8_t group, + uint8_t channel, + uint8_t bank, + uint8_t index, + uint32_t data) + { + return Detail::makeV2().withGroup (group) + .withStatus (0x5) + .withChannel (channel) + .withU8<2> (bank & 0x7f) + .withU8<3> (index & 0x7f) + .withU32<1> (data); + } + + static PacketX2 makePerNotePitchBendV2 (uint8_t group, + uint8_t channel, + uint8_t note, + uint32_t data) + { + return Detail::makeV2().withGroup (group) + .withStatus (0x6) + .withChannel (channel) + .withU8<2> (note & 0x7f) + .withU32<1> (data); + } + + enum class NoteAttributeKind : uint8_t + { + none = 0x00, + manufacturer = 0x01, + profile = 0x02, + pitch7_9 = 0x03 + }; + + static PacketX2 makeNoteOffV2 (uint8_t group, + uint8_t channel, + uint8_t note, + NoteAttributeKind attribute, + uint16_t velocity, + uint16_t attributeValue) + { + return Detail::makeV2().withGroup (group) + .withStatus (0x8) + .withChannel (channel) + .withU8<2> (note & 0x7f) + .withU8<3> ((uint8_t) attribute) + .withU16<2> (velocity) + .withU16<3> (attributeValue); + } + + static PacketX2 makeNoteOnV2 (uint8_t group, + uint8_t channel, + uint8_t note, + NoteAttributeKind attribute, + uint16_t velocity, + uint16_t attributeValue) + { + return Detail::makeV2().withGroup (group) + .withStatus (0x9) + .withChannel (channel) + .withU8<2> (note & 0x7f) + .withU8<3> ((uint8_t) attribute) + .withU16<2> (velocity) + .withU16<3> (attributeValue); + } + + static PacketX2 makePolyPressureV2 (uint8_t group, + uint8_t channel, + uint8_t note, + uint32_t data) + { + return Detail::makeV2().withGroup (group) + .withStatus (0xa) + .withChannel (channel) + .withU8<2> (note & 0x7f) + .withU32<1> (data); + } + + static PacketX2 makeControlChangeV2 (uint8_t group, + uint8_t channel, + uint8_t controller, + uint32_t data) + { + return Detail::makeV2().withGroup (group) + .withStatus (0xb) + .withChannel (channel) + .withU8<2> (controller & 0x7f) + .withU32<1> (data); + } + + static PacketX2 makeProgramChangeV2 (uint8_t group, + uint8_t channel, + uint8_t optionFlags, + uint8_t program, + uint8_t bankMsb, + uint8_t bankLsb) + { + return Detail::makeV2().withGroup (group) + .withStatus (0xc) + .withChannel (channel) + .withU8<3> (optionFlags) + .withU8<4> (program) + .withU8<6> (bankMsb) + .withU8<7> (bankLsb); + } + + static PacketX2 makeChannelPressureV2 (uint8_t group, + uint8_t channel, + uint32_t data) + { + return Detail::makeV2().withGroup (group) + .withStatus (0xd) + .withChannel (channel) + .withU32<1> (data); + } + + static PacketX2 makePitchBendV2 (uint8_t group, + uint8_t channel, + uint32_t data) + { + return Detail::makeV2().withGroup (group) + .withStatus (0xe) + .withChannel (channel) + .withU32<1> (data); + } + + static PacketX2 makePerNoteManagementV2 (uint8_t group, + uint8_t channel, + uint8_t note, + uint8_t optionFlags) + { + return Detail::makeV2().withGroup (group) + .withStatus (0xf) + .withChannel (channel) + .withU8<2> (note) + .withU8<3> (optionFlags); + } + + + static PacketX4 makeSysEx8in1Packet (uint8_t group, + uint8_t numBytes, + uint8_t streamId, + const uint8_t* data) + { + return Detail::makeSysEx8 (group, 0x0, numBytes, 3, data).withU8<2> (streamId); + } + + static PacketX4 makeSysEx8Start (uint8_t group, + uint8_t numBytes, + uint8_t streamId, + const uint8_t* data) + { + return Detail::makeSysEx8 (group, 0x1, numBytes, 3, data).withU8<2> (streamId); + } + + static PacketX4 makeSysEx8Continue (uint8_t group, + uint8_t numBytes, + uint8_t streamId, + const uint8_t* data) + { + return Detail::makeSysEx8 (group, 0x2, numBytes, 3, data).withU8<2> (streamId); + } + + static PacketX4 makeSysEx8End (uint8_t group, + uint8_t numBytes, + uint8_t streamId, + const uint8_t* data) + { + return Detail::makeSysEx8 (group, 0x3, numBytes, 3, data).withU8<2> (streamId); + } + + static PacketX4 makeMixedDataSetHeader (uint8_t group, + uint8_t dataSetId, + const uint8_t* data) + { + return Detail::makeSysEx8 (group, 0x8, 14, 2, data).withChannel (dataSetId); + } + + static PacketX4 makeDataSetPayload (uint8_t group, + uint8_t dataSetId, + const uint8_t* data) + { + return Detail::makeSysEx8 (group, 0x9, 14, 2, data).withChannel (dataSetId); + } +}; + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPIterator.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPIterator.h new file mode 100644 index 00000000..a91b115d --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPIterator.h @@ -0,0 +1,126 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** + Enables iteration over a collection of Universal MIDI Packets stored as + a contiguous range of 32-bit words. + + This iterator is used by Packets to allow access to the messages + that it contains. + + @tags{Audio} +*/ +class Iterator +{ +public: + /** Creates an invalid (singular) iterator. */ + Iterator() noexcept = default; + + /** Creates an iterator pointing at `ptr`. */ + explicit Iterator (const uint32_t* ptr, size_t bytes) noexcept + : view (ptr) + #if JUCE_DEBUG + , bytesRemaining (bytes) + #endif + { + ignoreUnused (bytes); + } + + using difference_type = std::iterator_traits::difference_type; + using value_type = View; + using reference = const View&; + using pointer = const View*; + using iterator_category = std::input_iterator_tag; + + /** Moves this iterator to the next packet in the range. */ + Iterator& operator++() noexcept + { + const auto increment = view.size(); + + #if JUCE_DEBUG + // If you hit this, the memory region contained a truncated or otherwise + // malformed Universal MIDI Packet. + // The Iterator can only be used on regions containing complete packets! + jassert (increment <= bytesRemaining); + bytesRemaining -= increment; + #endif + + view = View (view.data() + increment); + return *this; + } + + /** Moves this iterator to the next packet in the range, + returning the value of the iterator before it was + incremented. + */ + Iterator operator++ (int) noexcept + { + auto copy = *this; + ++(*this); + return copy; + } + + /** Returns true if this iterator points to the same address + as another iterator. + */ + bool operator== (const Iterator& other) const noexcept + { + return view == other.view; + } + + /** Returns false if this iterator points to the same address + as another iterator. + */ + bool operator!= (const Iterator& other) const noexcept + { + return ! operator== (other); + } + + /** Returns a reference to a View of the packet currently + pointed-to by this iterator. + + The View can be queried for its size and content. + */ + reference operator*() noexcept { return view; } + + /** Returns a pointer to a View of the packet currently + pointed-to by this iterator. + + The View can be queried for its size and content. + */ + pointer operator->() noexcept { return &view; } + +private: + View view; + + #if JUCE_DEBUG + size_t bytesRemaining = 0; + #endif +}; + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToBytestreamTranslator.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToBytestreamTranslator.h new file mode 100644 index 00000000..5debeef1 --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToBytestreamTranslator.h @@ -0,0 +1,213 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** + Parses a raw stream of uint32_t holding a series of Universal MIDI Packets using + the MIDI 1.0 Protocol, converting to plain (non-UMP) MidiMessages. + + @tags{Audio} +*/ +class Midi1ToBytestreamTranslator +{ +public: + /** Ensures that there is room in the internal buffer for a sysex message of at least + `initialBufferSize` bytes. + */ + explicit Midi1ToBytestreamTranslator (int initialBufferSize) + { + pendingSysExData.reserve (size_t (initialBufferSize)); + } + + /** Clears the concatenator. */ + void reset() + { + pendingSysExData.clear(); + pendingSysExTime = 0.0; + } + + /** Converts a Universal MIDI Packet using the MIDI 1.0 Protocol to + an equivalent MidiMessage. Accumulates SysEx packets into a single + MidiMessage, as appropriate. + + @param packet a packet which is using the MIDI 1.0 Protocol. + @param time the timestamp to be applied to these messages. + @param callback a callback which will be called with each converted MidiMessage. + */ + template + void dispatch (const View& packet, double time, MessageCallback&& callback) + { + const auto firstWord = *packet.data(); + + if (! pendingSysExData.empty() && shouldPacketTerminateSysExEarly (firstWord)) + pendingSysExData.clear(); + + switch (packet.size()) + { + case 1: + { + // Utility messages don't translate to bytestream format + if (Utils::getMessageType (firstWord) != 0x00) + callback (fromUmp (PacketX1 { firstWord }, time)); + + break; + } + + case 2: + { + if (Utils::getMessageType (firstWord) == 0x3) + processSysEx (PacketX2 { packet[0], packet[1] }, time, callback); + + break; + } + + case 3: // no 3-word packets in the current spec + case 4: // no 4-word packets translate to bytestream format + default: + break; + } + } + + /** Converts from a Universal MIDI Packet to MIDI 1 bytestream format. + + This is only capable of converting a single Universal MIDI Packet to + an equivalent bytestream MIDI message. This function cannot understand + multi-packet messages, like SysEx7 messages. + + To convert multi-packet messages, use `Midi1ToBytestreamTranslator` + to convert from a UMP MIDI 1.0 stream, or `ToBytestreamDispatcher` + to convert from both MIDI 2.0 and MIDI 1.0. + */ + static MidiMessage fromUmp (const PacketX1& m, double time = 0) + { + const auto word = m.front(); + jassert (Utils::getNumWordsForMessageType (word) == 1); + + const std::array bytes { { uint8_t ((word >> 0x10) & 0xff), + uint8_t ((word >> 0x08) & 0xff), + uint8_t ((word >> 0x00) & 0xff) } }; + const auto numBytes = MidiMessage::getMessageLengthFromFirstByte (bytes.front()); + return MidiMessage (bytes.data(), numBytes, time); + } + +private: + template + void processSysEx (const PacketX2& packet, + double time, + MessageCallback&& callback) + { + switch (getSysEx7Kind (packet[0])) + { + case SysEx7::Kind::complete: + startSysExMessage (time); + pushBytes (packet); + terminateSysExMessage (callback); + break; + + case SysEx7::Kind::begin: + startSysExMessage (time); + pushBytes (packet); + break; + + case SysEx7::Kind::continuation: + if (pendingSysExData.empty()) + break; + + pushBytes (packet); + break; + + case SysEx7::Kind::end: + if (pendingSysExData.empty()) + break; + + pushBytes (packet); + terminateSysExMessage (callback); + break; + } + } + + void pushBytes (const PacketX2& packet) + { + const auto bytes = SysEx7::getDataBytes (packet); + pendingSysExData.insert (pendingSysExData.end(), + bytes.data.begin(), + bytes.data.begin() + bytes.size); + } + + void startSysExMessage (double time) + { + pendingSysExTime = time; + pendingSysExData.push_back (0xf0); + } + + template + void terminateSysExMessage (MessageCallback&& callback) + { + pendingSysExData.push_back (0xf7); + callback (MidiMessage (pendingSysExData.data(), + int (pendingSysExData.size()), + pendingSysExTime)); + pendingSysExData.clear(); + } + + static bool shouldPacketTerminateSysExEarly (uint32_t firstWord) + { + return ! (isSysExContinuation (firstWord) + || isSystemRealTime (firstWord) + || isJROrNOP (firstWord)); + } + + static SysEx7::Kind getSysEx7Kind (uint32_t word) + { + return SysEx7::Kind ((word >> 0x14) & 0xf); + } + + static bool isJROrNOP (uint32_t word) + { + return Utils::getMessageType (word) == 0x0; + } + + static bool isSysExContinuation (uint32_t word) + { + if (Utils::getMessageType (word) != 0x3) + return false; + + const auto kind = getSysEx7Kind (word); + return kind == SysEx7::Kind::continuation || kind == SysEx7::Kind::end; + } + + static bool isSystemRealTime (uint32_t word) + { + return Utils::getMessageType (word) == 0x1 && ((word >> 0x10) & 0xff) >= 0xf8; + } + + std::vector pendingSysExData; + + double pendingSysExTime = 0.0; +}; + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp b/modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp new file mode 100644 index 00000000..9da72c34 --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp @@ -0,0 +1,195 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +PacketX2 Midi1ToMidi2DefaultTranslator::processNoteOnOrOff (const HelperValues helpers) +{ + const auto velocity = helpers.byte2; + const auto needsConversion = (helpers.byte0 >> 0x4) == 0x9 && velocity == 0; + const auto firstByte = needsConversion ? (uint8_t) ((0x8 << 0x4) | (helpers.byte0 & 0xf)) + : helpers.byte0; + + return PacketX2 + { + Utils::bytesToWord (helpers.typeAndGroup, firstByte, helpers.byte1, 0), + (uint32_t) (Conversion::scaleTo16 (velocity) << 0x10) + }; +} + +PacketX2 Midi1ToMidi2DefaultTranslator::processPolyPressure (const HelperValues helpers) +{ + return PacketX2 + { + Utils::bytesToWord (helpers.typeAndGroup, helpers.byte0, helpers.byte1, 0), + Conversion::scaleTo32 (helpers.byte2) + }; +} + +bool Midi1ToMidi2DefaultTranslator::processControlChange (const HelperValues helpers, + PacketX2& packet) +{ + const auto statusAndChannel = helpers.byte0; + const auto cc = helpers.byte1; + + const auto shouldAccumulate = [&] + { + switch (cc) + { + case 6: + case 38: + case 98: + case 99: + case 100: + case 101: + return true; + } + + return false; + }(); + + const auto group = (uint8_t) (helpers.typeAndGroup & 0xf); + const auto channel = (uint8_t) (statusAndChannel & 0xf); + const auto byte = helpers.byte2; + + if (shouldAccumulate) + { + auto& accumulator = groupAccumulators[group][channel]; + + if (accumulator.addByte (cc, byte)) + { + const auto& bytes = accumulator.getBytes(); + const auto bank = bytes[0]; + const auto index = bytes[1]; + const auto msb = bytes[2]; + const auto lsb = bytes[3]; + + const auto value = (uint16_t) (((msb & 0x7f) << 7) | (lsb & 0x7f)); + + const auto newStatus = (uint8_t) (accumulator.getKind() == PnKind::nrpn ? 0x3 : 0x2); + + packet = PacketX2 + { + Utils::bytesToWord (helpers.typeAndGroup, (uint8_t) ((newStatus << 0x4) | channel), bank, index), + Conversion::scaleTo32 (value) + }; + return true; + } + + return false; + } + + if (cc == 0) + { + groupBanks[group][channel].setMsb (byte); + return false; + } + + if (cc == 32) + { + groupBanks[group][channel].setLsb (byte); + return false; + } + + packet = PacketX2 + { + Utils::bytesToWord (helpers.typeAndGroup, statusAndChannel, cc, 0), + Conversion::scaleTo32 (helpers.byte2) + }; + return true; +} + +PacketX2 Midi1ToMidi2DefaultTranslator::processProgramChange (const HelperValues helpers) const +{ + const auto group = (uint8_t) (helpers.typeAndGroup & 0xf); + const auto channel = (uint8_t) (helpers.byte0 & 0xf); + const auto bank = groupBanks[group][channel]; + const auto valid = bank.isValid(); + + return PacketX2 + { + Utils::bytesToWord (helpers.typeAndGroup, helpers.byte0, 0, valid ? 1 : 0), + Utils::bytesToWord (helpers.byte1, 0, valid ? bank.getMsb() : 0, valid ? bank.getLsb() : 0) + }; +} + +PacketX2 Midi1ToMidi2DefaultTranslator::processChannelPressure (const HelperValues helpers) +{ + return PacketX2 + { + Utils::bytesToWord (helpers.typeAndGroup, helpers.byte0, 0, 0), + Conversion::scaleTo32 (helpers.byte1) + }; +} + +PacketX2 Midi1ToMidi2DefaultTranslator::processPitchBend (const HelperValues helpers) +{ + const auto lsb = helpers.byte1; + const auto msb = helpers.byte2; + const auto value = (uint16_t) (msb << 7 | lsb); + + return PacketX2 + { + Utils::bytesToWord (helpers.typeAndGroup, helpers.byte0, 0, 0), + Conversion::scaleTo32 (value) + }; +} + +bool Midi1ToMidi2DefaultTranslator::PnAccumulator::addByte (uint8_t cc, uint8_t byte) +{ + const auto isStart = cc == 99 || cc == 101; + + if (isStart) + { + kind = cc == 99 ? PnKind::nrpn : PnKind::rpn; + index = 0; + } + + bytes[index] = byte; + + const auto shouldContinue = [&] + { + switch (index) + { + case 0: return isStart; + case 1: return kind == PnKind::nrpn ? cc == 98 : cc == 100; + case 2: return cc == 6; + case 3: return cc == 38; + } + + return false; + }(); + + index = shouldContinue ? index + 1 : 0; + + if (index != bytes.size()) + return false; + + index = 0; + return true; +} + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h new file mode 100644 index 00000000..61d566ff --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h @@ -0,0 +1,187 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** + Translates a series of MIDI 1 Universal MIDI Packets to corresponding MIDI 2 + packets. + + @tags{Audio} +*/ +class Midi1ToMidi2DefaultTranslator +{ +public: + Midi1ToMidi2DefaultTranslator() = default; + + /** Converts MIDI 1 Universal MIDI Packets to corresponding MIDI 2 packets, + calling `callback` with each converted packet. + + In some cases (such as RPN/NRPN messages) multiple MIDI 1 packets will + convert to a single MIDI 2 packet. In these cases, the translator will + accumulate the full message internally, and send a single callback with + the completed message, once all the individual MIDI 1 packets have been + processed. + */ + template + void dispatch (const View& v, PacketCallback&& callback) + { + const auto firstWord = v[0]; + const auto messageType = Utils::getMessageType (firstWord); + + if (messageType != 0x2) + { + callback (v); + return; + } + + const HelperValues helperValues + { + (uint8_t) ((0x4 << 0x4) | Utils::getGroup (firstWord)), + (uint8_t) ((firstWord >> 0x10) & 0xff), + (uint8_t) ((firstWord >> 0x08) & 0x7f), + (uint8_t) ((firstWord >> 0x00) & 0x7f), + }; + + switch (Utils::getStatus (firstWord)) + { + case 0x8: + case 0x9: + { + const auto packet = processNoteOnOrOff (helperValues); + callback (View (packet.data())); + return; + } + + case 0xa: + { + const auto packet = processPolyPressure (helperValues); + callback (View (packet.data())); + return; + } + + case 0xb: + { + PacketX2 packet; + + if (processControlChange (helperValues, packet)) + callback (View (packet.data())); + + return; + } + + case 0xc: + { + const auto packet = processProgramChange (helperValues); + callback (View (packet.data())); + return; + } + + case 0xd: + { + const auto packet = processChannelPressure (helperValues); + callback (View (packet.data())); + return; + } + + case 0xe: + { + const auto packet = processPitchBend (helperValues); + callback (View (packet.data())); + return; + } + } + } + + void reset() + { + groupAccumulators = {}; + groupBanks = {}; + } + +private: + enum class PnKind { nrpn, rpn }; + + struct HelperValues + { + uint8_t typeAndGroup; + uint8_t byte0; + uint8_t byte1; + uint8_t byte2; + }; + + static PacketX2 processNoteOnOrOff (const HelperValues helpers); + static PacketX2 processPolyPressure (const HelperValues helpers); + + bool processControlChange (const HelperValues helpers, PacketX2& packet); + + PacketX2 processProgramChange (const HelperValues helpers) const; + + static PacketX2 processChannelPressure (const HelperValues helpers); + static PacketX2 processPitchBend (const HelperValues helpers); + + class PnAccumulator + { + public: + bool addByte (uint8_t cc, uint8_t byte); + + const std::array& getBytes() const noexcept { return bytes; } + PnKind getKind() const noexcept { return kind; } + + private: + std::array bytes; + uint8_t index = 0; + PnKind kind = PnKind::nrpn; + }; + + class Bank + { + public: + bool isValid() const noexcept { return ! (msb & 0x80); } + + uint8_t getMsb() const noexcept { return msb & 0x7f; } + uint8_t getLsb() const noexcept { return lsb & 0x7f; } + + void setMsb (uint8_t i) noexcept { msb = i & 0x7f; } + void setLsb (uint8_t i) noexcept { msb &= 0x7f; lsb = i & 0x7f; } + + private: + // We use the top bit to indicate whether this bank is valid. + // After reading the spec, it's not clear how we should determine whether + // there are valid values, so we'll just assume that the bank is valid + // once either the lsb or msb have been written. + uint8_t msb = 0x80; + uint8_t lsb = 0x00; + }; + + using ChannelAccumulators = std::array; + std::array groupAccumulators; + + using ChannelBanks = std::array; + std::array groupBanks; +}; + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPProtocols.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPProtocols.h new file mode 100644 index 00000000..a5b5ca9f --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPProtocols.h @@ -0,0 +1,44 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** The kinds of MIDI protocol that can be formatted into Universal MIDI Packets. */ +enum class PacketProtocol +{ + MIDI_1_0, + MIDI_2_0, +}; + +/** All kinds of MIDI protocol understood by JUCE. */ +enum class MidiProtocol +{ + bytestream, + UMP_MIDI_1_0, + UMP_MIDI_2_0, +}; + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPReceiver.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPReceiver.h new file mode 100644 index 00000000..469efd3a --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPReceiver.h @@ -0,0 +1,40 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** + A base class for classes which receive Universal MIDI Packets from an input. +*/ +struct Receiver +{ + virtual ~Receiver() noexcept = default; + + /** This will be called each time a new packet is ready for processing. */ + virtual void packetReceived (const View& packet, double time) = 0; +}; + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.cpp b/modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.cpp new file mode 100644 index 00000000..bf4f790b --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.cpp @@ -0,0 +1,53 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +uint32_t SysEx7::getNumPacketsRequiredForDataSize (uint32_t size) +{ + constexpr auto denom = 6; + return (size / denom) + ((size % denom) != 0); +} + +SysEx7::PacketBytes SysEx7::getDataBytes (const PacketX2& packet) +{ + const auto numBytes = Utils::getChannel (packet[0]); + constexpr uint8_t maxBytes = 6; + jassert (numBytes <= maxBytes); + + return + { + { packet.getU8<2>(), + packet.getU8<3>(), + packet.getU8<4>(), + packet.getU8<5>(), + packet.getU8<6>(), + packet.getU8<7>() }, + jmin (numBytes, maxBytes) + }; +} + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.h new file mode 100644 index 00000000..f5f898a7 --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPSysEx7.h @@ -0,0 +1,73 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** + This struct acts as a single-file namespace for Univeral MIDI Packet + functionality related to 7-bit SysEx. + + @tags{Audio} +*/ +struct SysEx7 +{ + /** Returns the number of 64-bit packets required to hold a series of + SysEx bytes. + + The number passed to this function should exclude the leading/trailing + SysEx bytes used in an old midi bytestream, as these are not required + when using Universal MIDI Packets. + */ + static uint32_t getNumPacketsRequiredForDataSize (uint32_t); + + /** The different kinds of UMP SysEx-7 message. */ + enum class Kind : uint8_t + { + /** The whole message fits in a single 2-word packet. */ + complete = 0, + + /** The packet begins a SysEx message that will continue in subsequent packets. */ + begin = 1, + + /** The packet is a continuation of an ongoing SysEx message. */ + continuation = 2, + + /** The packet terminates an ongoing SysEx message. */ + end = 3 + }; + + /** Holds the bytes from a single SysEx-7 packet. */ + struct PacketBytes + { + std::array data; + uint8_t size; + }; + + /** Extracts the data bytes from a 64-bit data message. */ + static PacketBytes getDataBytes (const PacketX2& packet); +}; + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPTests.cpp b/modules/juce_audio_devices/midi_io/ump/juce_UMPTests.cpp new file mode 100644 index 00000000..0ac2cce0 --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPTests.cpp @@ -0,0 +1,1020 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +#if JUCE_UNIT_TESTS + +constexpr uint8_t operator""_u8 (unsigned long long int i) { return static_cast (i); } +constexpr uint16_t operator""_u16 (unsigned long long int i) { return static_cast (i); } +constexpr uint32_t operator""_u32 (unsigned long long int i) { return static_cast (i); } +constexpr uint64_t operator""_u64 (unsigned long long int i) { return static_cast (i); } + +class UniversalMidiPacketTests : public UnitTest +{ +public: + UniversalMidiPacketTests() + : UnitTest ("Universal MIDI Packet", UnitTestCategories::midi) + { + } + + void runTest() override + { + auto random = getRandom(); + + beginTest ("Short bytestream midi messages can be round-tripped through the UMP converter"); + { + Midi1ToBytestreamTranslator translator (0); + + forEachNonSysExTestMessage (random, [&] (const MidiMessage& m) + { + Packets packets; + Conversion::toMidi1 (m, packets); + expect (packets.size() == 1); + + // Make sure that the message type is correct + expect (Utils::getMessageType (packets.data()[0]) == ((m.getRawData()[0] >> 0x4) == 0xf ? 0x1 : 0x2)); + + translator.dispatch (View {packets.data() }, + 0, + [&] (const MidiMessage& roundTripped) + { + expect (equal (m, roundTripped)); + }); + }); + } + + beginTest ("Bytestream SysEx converts to universal packets"); + { + { + // Zero length message + Packets packets; + Conversion::toMidi1 (createRandomSysEx (random, 0), packets); + expect (packets.size() == 2); + + expect (packets.data()[0] == 0x30000000); + expect (packets.data()[1] == 0x00000000); + } + + { + const auto message = createRandomSysEx (random, 1); + Packets packets; + Conversion::toMidi1 (message, packets); + expect (packets.size() == 2); + + const auto* sysEx = message.getSysExData(); + expect (packets.data()[0] == Utils::bytesToWord (0x30, 0x01, sysEx[0], 0)); + expect (packets.data()[1] == 0x00000000); + } + + { + const auto message = createRandomSysEx (random, 6); + Packets packets; + Conversion::toMidi1 (message, packets); + expect (packets.size() == 2); + + const auto* sysEx = message.getSysExData(); + expect (packets.data()[0] == Utils::bytesToWord (0x30, 0x06, sysEx[0], sysEx[1])); + expect (packets.data()[1] == Utils::bytesToWord (sysEx[2], sysEx[3], sysEx[4], sysEx[5])); + } + + { + const auto message = createRandomSysEx (random, 12); + Packets packets; + Conversion::toMidi1 (message, packets); + expect (packets.size() == 4); + + const auto* sysEx = message.getSysExData(); + expect (packets.data()[0] == Utils::bytesToWord (0x30, 0x16, sysEx[0], sysEx[1])); + expect (packets.data()[1] == Utils::bytesToWord (sysEx[2], sysEx[3], sysEx[4], sysEx[5])); + expect (packets.data()[2] == Utils::bytesToWord (0x30, 0x36, sysEx[6], sysEx[7])); + expect (packets.data()[3] == Utils::bytesToWord (sysEx[8], sysEx[9], sysEx[10], sysEx[11])); + } + + { + const auto message = createRandomSysEx (random, 13); + Packets packets; + Conversion::toMidi1 (message, packets); + expect (packets.size() == 6); + + const auto* sysEx = message.getSysExData(); + expect (packets.data()[0] == Utils::bytesToWord (0x30, 0x16, sysEx[0], sysEx[1])); + expect (packets.data()[1] == Utils::bytesToWord (sysEx[2], sysEx[3], sysEx[4], sysEx[5])); + expect (packets.data()[2] == Utils::bytesToWord (0x30, 0x26, sysEx[6], sysEx[7])); + expect (packets.data()[3] == Utils::bytesToWord (sysEx[8], sysEx[9], sysEx[10], sysEx[11])); + expect (packets.data()[4] == Utils::bytesToWord (0x30, 0x31, sysEx[12], 0)); + expect (packets.data()[5] == 0x00000000); + } + } + + ToBytestreamDispatcher converter (0); + Packets packets; + + const auto checkRoundTrip = [&] (const MidiBuffer& expected) + { + for (const auto meta : expected) + Conversion::toMidi1 (meta.getMessage(), packets); + + MidiBuffer output; + converter.dispatch (packets.data(), + packets.data() + packets.size(), + 0, + [&] (const MidiMessage& roundTripped) + { + output.addEvent (roundTripped, int (roundTripped.getTimeStamp())); + }); + packets.clear(); + + expect (equal (expected, output)); + }; + + beginTest ("Long SysEx bytestream midi messages can be round-tripped through the UMP converter"); + { + for (auto length : { 0, 1, 2, 3, 4, 5, 6, 7, 13, 20, 100, 1000 }) + { + MidiBuffer expected; + expected.addEvent (createRandomSysEx (random, size_t (length)), 0); + checkRoundTrip (expected); + } + } + + beginTest ("UMP SysEx7 messages interspersed with utility messages convert to bytestream"); + { + const auto sysEx = createRandomSysEx (random, 100); + Packets originalPackets; + Conversion::toMidi1 (sysEx, originalPackets); + + Packets modifiedPackets; + + const auto addRandomUtilityUMP = [&] + { + const auto newPacket = createRandomUtilityUMP (random); + modifiedPackets.add (View (newPacket.data())); + }; + + for (const auto& packet : originalPackets) + { + addRandomUtilityUMP(); + modifiedPackets.add (packet); + addRandomUtilityUMP(); + } + + MidiBuffer output; + converter.dispatch (modifiedPackets.data(), + modifiedPackets.data() + modifiedPackets.size(), + 0, + [&] (const MidiMessage& roundTripped) + { + output.addEvent (roundTripped, int (roundTripped.getTimeStamp())); + }); + + // All Utility messages should have been ignored + expect (output.getNumEvents() == 1); + + for (const auto meta : output) + expect (equal (meta.getMessage(), sysEx)); + } + + beginTest ("UMP SysEx7 messages interspersed with System Realtime messages convert to bytestream"); + { + const auto sysEx = createRandomSysEx (random, 200); + Packets originalPackets; + Conversion::toMidi1 (sysEx, originalPackets); + + Packets modifiedPackets; + MidiBuffer realtimeMessages; + + const auto addRandomRealtimeUMP = [&] + { + const auto newPacket = createRandomRealtimeUMP (random); + modifiedPackets.add (View (newPacket.data())); + realtimeMessages.addEvent (Midi1ToBytestreamTranslator::fromUmp (newPacket), 0); + }; + + for (const auto& packet : originalPackets) + { + addRandomRealtimeUMP(); + modifiedPackets.add (packet); + addRandomRealtimeUMP(); + } + + MidiBuffer output; + converter.dispatch (modifiedPackets.data(), + modifiedPackets.data() + modifiedPackets.size(), + 0, + [&] (const MidiMessage& roundTripped) + { + output.addEvent (roundTripped, int (roundTripped.getTimeStamp())); + }); + + const auto numOutputs = output.getNumEvents(); + const auto numInputs = realtimeMessages.getNumEvents(); + expect (numOutputs == numInputs + 1); + + if (numOutputs == numInputs + 1) + { + const auto isMetadataEquivalent = [] (const MidiMessageMetadata& a, + const MidiMessageMetadata& b) + { + return equal (a.getMessage(), b.getMessage()); + }; + + auto it = output.begin(); + + for (const auto meta : realtimeMessages) + { + if (! isMetadataEquivalent (*it, meta)) + { + expect (equal ((*it).getMessage(), sysEx)); + ++it; + } + + expect (isMetadataEquivalent (*it, meta)); + ++it; + } + } + } + + beginTest ("UMP SysEx7 messages interspersed with System Realtime and Utility messages convert to bytestream"); + { + const auto sysEx = createRandomSysEx (random, 300); + Packets originalPackets; + Conversion::toMidi1 (sysEx, originalPackets); + + Packets modifiedPackets; + MidiBuffer realtimeMessages; + + const auto addRandomRealtimeUMP = [&] + { + const auto newPacket = createRandomRealtimeUMP (random); + modifiedPackets.add (View (newPacket.data())); + realtimeMessages.addEvent (Midi1ToBytestreamTranslator::fromUmp (newPacket), 0); + }; + + const auto addRandomUtilityUMP = [&] + { + const auto newPacket = createRandomUtilityUMP (random); + modifiedPackets.add (View (newPacket.data())); + }; + + for (const auto& packet : originalPackets) + { + addRandomRealtimeUMP(); + addRandomUtilityUMP(); + modifiedPackets.add (packet); + addRandomRealtimeUMP(); + addRandomUtilityUMP(); + } + + MidiBuffer output; + converter.dispatch (modifiedPackets.data(), + modifiedPackets.data() + modifiedPackets.size(), + 0, + [&] (const MidiMessage& roundTripped) + { + output.addEvent (roundTripped, int (roundTripped.getTimeStamp())); + }); + + const auto numOutputs = output.getNumEvents(); + const auto numInputs = realtimeMessages.getNumEvents(); + expect (numOutputs == numInputs + 1); + + if (numOutputs == numInputs + 1) + { + const auto isMetadataEquivalent = [] (const MidiMessageMetadata& a, const MidiMessageMetadata& b) + { + return equal (a.getMessage(), b.getMessage()); + }; + + auto it = output.begin(); + + for (const auto meta : realtimeMessages) + { + if (! isMetadataEquivalent (*it, meta)) + { + expect (equal ((*it).getMessage(), sysEx)); + ++it; + } + + expect (isMetadataEquivalent (*it, meta)); + ++it; + } + } + } + + beginTest ("SysEx messages are terminated by non-Utility, non-Realtime messages"); + { + const auto noteOn = [&] + { + MidiBuffer b; + b.addEvent (MidiMessage::noteOn (1, uint8_t (64), uint8_t (64)), 0); + return b; + }(); + + const auto noteOnPackets = [&] + { + Packets p; + + for (const auto meta : noteOn) + Conversion::toMidi1 (meta.getMessage(), p); + + return p; + }(); + + const auto sysEx = createRandomSysEx (random, 300); + + const auto originalPackets = [&] + { + Packets p; + Conversion::toMidi1 (sysEx, p); + return p; + }(); + + const auto modifiedPackets = [&] + { + Packets p; + + const auto insertionPoint = std::next (originalPackets.begin(), 10); + std::for_each (originalPackets.begin(), + insertionPoint, + [&] (const View& view) { p.add (view); }); + + for (const auto& view : noteOnPackets) + p.add (view); + + std::for_each (insertionPoint, + originalPackets.end(), + [&] (const View& view) { p.add (view); }); + + return p; + }(); + + // modifiedPackets now contains some SysEx packets interrupted by a MIDI 1 noteOn + + MidiBuffer output; + + const auto pushToOutput = [&] (const Packets& p) + { + converter.dispatch (p.data(), + p.data() + p.size(), + 0, + [&] (const MidiMessage& roundTripped) + { + output.addEvent (roundTripped, int (roundTripped.getTimeStamp())); + }); + }; + + pushToOutput (modifiedPackets); + + // Interrupted sysEx shouldn't be present + expect (equal (output, noteOn)); + + const auto newSysEx = createRandomSysEx (random, 300); + Packets newSysExPackets; + Conversion::toMidi1 (newSysEx, newSysExPackets); + + // If we push another midi event without interrupting it, + // it should get through without being modified, + // and it shouldn't be affected by the previous (interrupted) sysex. + + output.clear(); + pushToOutput (newSysExPackets); + + expect (output.getNumEvents() == 1); + + for (const auto meta : output) + expect (equal (meta.getMessage(), newSysEx)); + } + + beginTest ("Widening conversions work"); + { + // This is similar to the 'slow' example code from the MIDI 2.0 spec + const auto baselineScale = [] (uint32_t srcVal, uint32_t srcBits, uint32_t dstBits) + { + const auto scaleBits = (uint32_t) (dstBits - srcBits); + + auto bitShiftedValue = (uint32_t) (srcVal << scaleBits); + + const auto srcCenter = (uint32_t) (1 << (srcBits - 1)); + + if (srcVal <= srcCenter) + return bitShiftedValue; + + const auto repeatBits = (uint32_t) (srcBits - 1); + const auto repeatMask = (uint32_t) ((1 << repeatBits) - 1); + + auto repeatValue = (uint32_t) (srcVal & repeatMask); + + if (scaleBits > repeatBits) + repeatValue <<= scaleBits - repeatBits; + else + repeatValue >>= repeatBits - scaleBits; + + while (repeatValue != 0) + { + bitShiftedValue |= repeatValue; + repeatValue >>= repeatBits; + } + + return bitShiftedValue; + }; + + const auto baselineScale7To8 = [&] (uint8_t in) + { + return baselineScale (in, 7, 8); + }; + + const auto baselineScale7To16 = [&] (uint8_t in) + { + return baselineScale (in, 7, 16); + }; + + const auto baselineScale14To16 = [&] (uint16_t in) + { + return baselineScale (in, 14, 16); + }; + + const auto baselineScale7To32 = [&] (uint8_t in) + { + return baselineScale (in, 7, 32); + }; + + const auto baselineScale14To32 = [&] (uint16_t in) + { + return baselineScale (in, 14, 32); + }; + + for (auto i = 0; i != 100; ++i) + { + const auto rand = (uint8_t) random.nextInt (0x80); + expectEquals ((int64_t) Conversion::scaleTo8 (rand), + (int64_t) baselineScale7To8 (rand)); + } + + expectEquals ((int64_t) Conversion::scaleTo16 ((uint8_t) 0x00), (int64_t) 0x0000); + expectEquals ((int64_t) Conversion::scaleTo16 ((uint8_t) 0x0a), (int64_t) 0x1400); + expectEquals ((int64_t) Conversion::scaleTo16 ((uint8_t) 0x40), (int64_t) 0x8000); + expectEquals ((int64_t) Conversion::scaleTo16 ((uint8_t) 0x57), (int64_t) 0xaeba); + expectEquals ((int64_t) Conversion::scaleTo16 ((uint8_t) 0x7f), (int64_t) 0xffff); + + for (auto i = 0; i != 100; ++i) + { + const auto rand = (uint8_t) random.nextInt (0x80); + expectEquals ((int64_t) Conversion::scaleTo16 (rand), + (int64_t) baselineScale7To16 (rand)); + } + + for (auto i = 0; i != 100; ++i) + { + const auto rand = (uint16_t) random.nextInt (0x4000); + expectEquals ((int64_t) Conversion::scaleTo16 (rand), + (int64_t) baselineScale14To16 (rand)); + } + + for (auto i = 0; i != 100; ++i) + { + const auto rand = (uint8_t) random.nextInt (0x80); + expectEquals ((int64_t) Conversion::scaleTo32 (rand), + (int64_t) baselineScale7To32 (rand)); + } + + expectEquals ((int64_t) Conversion::scaleTo32 ((uint16_t) 0x0000), (int64_t) 0x00000000); + expectEquals ((int64_t) Conversion::scaleTo32 ((uint16_t) 0x2000), (int64_t) 0x80000000); + expectEquals ((int64_t) Conversion::scaleTo32 ((uint16_t) 0x3fff), (int64_t) 0xffffffff); + + for (auto i = 0; i != 100; ++i) + { + const auto rand = (uint16_t) random.nextInt (0x4000); + expectEquals ((int64_t) Conversion::scaleTo32 (rand), + (int64_t) baselineScale14To32 (rand)); + } + } + + beginTest ("Round-trip widening/narrowing conversions work"); + { + for (auto i = 0; i != 100; ++i) + { + { + const auto rand = (uint8_t) random.nextInt (0x80); + expectEquals (Conversion::scaleTo7 (Conversion::scaleTo8 (rand)), rand); + } + + { + const auto rand = (uint8_t) random.nextInt (0x80); + expectEquals (Conversion::scaleTo7 (Conversion::scaleTo16 (rand)), rand); + } + + { + const auto rand = (uint8_t) random.nextInt (0x80); + expectEquals (Conversion::scaleTo7 (Conversion::scaleTo32 (rand)), rand); + } + + { + const auto rand = (uint16_t) random.nextInt (0x4000); + expectEquals ((uint64_t) Conversion::scaleTo14 (Conversion::scaleTo16 (rand)), (uint64_t) rand); + } + + { + const auto rand = (uint16_t) random.nextInt (0x4000); + expectEquals ((uint64_t) Conversion::scaleTo14 (Conversion::scaleTo32 (rand)), (uint64_t) rand); + } + } + } + + beginTest ("MIDI 2 -> 1 note on conversions"); + { + { + Packets midi2; + midi2.add (PacketX2 { 0x41946410, 0x12345678 }); + + Packets midi1; + midi1.add (PacketX1 { 0x21946409 }); + + checkMidi2ToMidi1Conversion (midi2, midi1); + } + + { + // If the velocity is close to 0, the output velocity should still be 1 + Packets midi2; + midi2.add (PacketX2 { 0x4295327f, 0x00345678 }); + + Packets midi1; + midi1.add (PacketX1 { 0x22953201 }); + + checkMidi2ToMidi1Conversion (midi2, midi1); + } + } + + beginTest ("MIDI 2 -> 1 note off conversion"); + { + Packets midi2; + midi2.add (PacketX2 { 0x448b0520, 0xfedcba98 }); + + Packets midi1; + midi1.add (PacketX1 { 0x248b057f }); + + checkMidi2ToMidi1Conversion (midi2, midi1); + } + + beginTest ("MIDI 2 -> 1 poly pressure conversion"); + { + Packets midi2; + midi2.add (PacketX2 { 0x49af0520, 0x80dcba98 }); + + Packets midi1; + midi1.add (PacketX1 { 0x29af0540 }); + + checkMidi2ToMidi1Conversion (midi2, midi1); + } + + beginTest ("MIDI 2 -> 1 control change conversion"); + { + Packets midi2; + midi2.add (PacketX2 { 0x49b00520, 0x80dcba98 }); + + Packets midi1; + midi1.add (PacketX1 { 0x29b00540 }); + + checkMidi2ToMidi1Conversion (midi2, midi1); + } + + beginTest ("MIDI 2 -> 1 channel pressure conversion"); + { + Packets midi2; + midi2.add (PacketX2 { 0x40d20520, 0x80dcba98 }); + + Packets midi1; + midi1.add (PacketX1 { 0x20d24000 }); + + checkMidi2ToMidi1Conversion (midi2, midi1); + } + + beginTest ("MIDI 2 -> 1 nrpn rpn conversion"); + { + { + Packets midi2; + midi2.add (PacketX2 { 0x44240123, 0x456789ab }); + + Packets midi1; + midi1.add (PacketX1 { 0x24b46501 }); + midi1.add (PacketX1 { 0x24b46423 }); + midi1.add (PacketX1 { 0x24b40622 }); + midi1.add (PacketX1 { 0x24b42659 }); + + checkMidi2ToMidi1Conversion (midi2, midi1); + } + + { + Packets midi2; + midi2.add (PacketX2 { 0x48347f7f, 0xffffffff }); + + Packets midi1; + midi1.add (PacketX1 { 0x28b4637f }); + midi1.add (PacketX1 { 0x28b4627f }); + midi1.add (PacketX1 { 0x28b4067f }); + midi1.add (PacketX1 { 0x28b4267f }); + + checkMidi2ToMidi1Conversion (midi2, midi1); + } + } + + beginTest ("MIDI 2 -> 1 program change and bank select conversion"); + { + { + // If the bank valid bit is 0, just emit a program change + Packets midi2; + midi2.add (PacketX2 { 0x4cc10000, 0x70004020 }); + + Packets midi1; + midi1.add (PacketX1 { 0x2cc17000 }); + + checkMidi2ToMidi1Conversion (midi2, midi1); + } + + { + // If the bank valid bit is 1, emit bank select control changes and a program change + Packets midi2; + midi2.add (PacketX2 { 0x4bc20001, 0x70004020 }); + + Packets midi1; + midi1.add (PacketX1 { 0x2bb20040 }); + midi1.add (PacketX1 { 0x2bb22020 }); + midi1.add (PacketX1 { 0x2bc27000 }); + + checkMidi2ToMidi1Conversion (midi2, midi1); + } + } + + beginTest ("MIDI 2 -> 1 pitch bend conversion"); + { + Packets midi2; + midi2.add (PacketX2 { 0x4eee0000, 0x12340000 }); + + Packets midi1; + midi1.add (PacketX1 { 0x2eee0d09 }); + + checkMidi2ToMidi1Conversion (midi2, midi1); + } + + beginTest ("MIDI 2 -> 1 messages which don't convert"); + { + const uint8_t opcodes[] { 0x0, 0x1, 0x4, 0x5, 0x6, 0xf }; + + for (const auto opcode : opcodes) + { + Packets midi2; + midi2.add (PacketX2 { Utils::bytesToWord (0x40, (uint8_t) (opcode << 0x4), 0, 0), 0x0 }); + checkMidi2ToMidi1Conversion (midi2, {}); + } + } + + beginTest ("MIDI 2 -> 1 messages which are passed through"); + { + const uint8_t typecodesX1[] { 0x0, 0x1, 0x2 }; + + for (const auto typecode : typecodesX1) + { + Packets p; + p.add (PacketX1 { (uint32_t) (typecode << 0x1c | (random.nextInt64() & 0xffffff)) }); + + checkMidi2ToMidi1Conversion (p, p); + } + + { + Packets p; + p.add (PacketX2 { (uint32_t) (0x3 << 0x1c | (random.nextInt64() & 0xffffff)), + (uint32_t) (random.nextInt64() & 0xffffffff) }); + + checkMidi2ToMidi1Conversion (p, p); + } + + { + Packets p; + p.add (PacketX4 { (uint32_t) (0x5 << 0x1c | (random.nextInt64() & 0xffffff)), + (uint32_t) (random.nextInt64() & 0xffffffff), + (uint32_t) (random.nextInt64() & 0xffffffff), + (uint32_t) (random.nextInt64() & 0xffffffff) }); + + checkMidi2ToMidi1Conversion (p, p); + } + } + + beginTest ("MIDI 2 -> 1 control changes which should be ignored"); + { + const uint8_t CCs[] { 6, 38, 98, 99, 100, 101, 0, 32 }; + + for (const auto cc : CCs) + { + Packets midi2; + midi2.add (PacketX2 { (uint32_t) (0x40b00000 | (cc << 0x8)), 0x00000000 }); + + checkMidi2ToMidi1Conversion (midi2, {}); + } + } + + beginTest ("MIDI 1 -> 2 note on conversions"); + { + { + Packets midi1; + midi1.add (PacketX1 { 0x20904040 }); + + Packets midi2; + midi2.add (PacketX2 { 0x40904000, static_cast (Conversion::scaleTo16 (0x40_u8)) << 0x10 }); + + checkMidi1ToMidi2Conversion (midi1, midi2); + } + + // If velocity is 0, convert to a note-off + { + Packets midi1; + midi1.add (PacketX1 { 0x23935100 }); + + Packets midi2; + midi2.add (PacketX2 { 0x43835100, 0x0 }); + + checkMidi1ToMidi2Conversion (midi1, midi2); + } + } + + beginTest ("MIDI 1 -> 2 note off conversions"); + { + Packets midi1; + midi1.add (PacketX1 { 0x21831020 }); + + Packets midi2; + midi2.add (PacketX2 { 0x41831000, static_cast (Conversion::scaleTo16 (0x20_u8)) << 0x10 }); + + checkMidi1ToMidi2Conversion (midi1, midi2); + } + + beginTest ("MIDI 1 -> 2 poly pressure conversions"); + { + Packets midi1; + midi1.add (PacketX1 { 0x20af7330 }); + + Packets midi2; + midi2.add (PacketX2 { 0x40af7300, Conversion::scaleTo32 (0x30_u8) }); + + checkMidi1ToMidi2Conversion (midi1, midi2); + } + + beginTest ("individual MIDI 1 -> 2 control changes which should be ignored"); + { + const uint8_t CCs[] { 6, 38, 98, 99, 100, 101, 0, 32 }; + + for (const auto cc : CCs) + { + Packets midi1; + midi1.add (PacketX1 { Utils::bytesToWord (0x20, 0xb0, cc, 0x00) }); + + checkMidi1ToMidi2Conversion (midi1, {}); + } + } + + beginTest ("MIDI 1 -> 2 control change conversions"); + { + // normal control change + { + Packets midi1; + midi1.add (PacketX1 { 0x29b1017f }); + + Packets midi2; + midi2.add (PacketX2 { 0x49b10100, Conversion::scaleTo32 (0x7f_u8) }); + + checkMidi1ToMidi2Conversion (midi1, midi2); + } + + // nrpn + { + Packets midi1; + midi1.add (PacketX1 { 0x20b06301 }); + midi1.add (PacketX1 { 0x20b06223 }); + midi1.add (PacketX1 { 0x20b00645 }); + midi1.add (PacketX1 { 0x20b02667 }); + + Packets midi2; + midi2.add (PacketX2 { 0x40300123, Conversion::scaleTo32 (static_cast ((0x45 << 7) | 0x67)) }); + + checkMidi1ToMidi2Conversion (midi1, midi2); + } + + // rpn + { + Packets midi1; + midi1.add (PacketX1 { 0x20b06543 }); + midi1.add (PacketX1 { 0x20b06421 }); + midi1.add (PacketX1 { 0x20b00601 }); + midi1.add (PacketX1 { 0x20b02623 }); + + Packets midi2; + midi2.add (PacketX2 { 0x40204321, Conversion::scaleTo32 (static_cast ((0x01 << 7) | 0x23)) }); + + checkMidi1ToMidi2Conversion (midi1, midi2); + } + } + + beginTest ("MIDI 1 -> MIDI 2 program change and bank select"); + { + Packets midi1; + // program change with bank + midi1.add (PacketX1 { 0x2bb20030 }); + midi1.add (PacketX1 { 0x2bb22010 }); + midi1.add (PacketX1 { 0x2bc24000 }); + // program change without bank (different group and channel) + midi1.add (PacketX1 { 0x20c01000 }); + + Packets midi2; + midi2.add (PacketX2 { 0x4bc20001, 0x40003010 }); + midi2.add (PacketX2 { 0x40c00000, 0x10000000 }); + + checkMidi1ToMidi2Conversion (midi1, midi2); + } + + beginTest ("MIDI 1 -> MIDI 2 channel pressure conversions"); + { + Packets midi1; + midi1.add (PacketX1 { 0x20df3000 }); + + Packets midi2; + midi2.add (PacketX2 { 0x40df0000, Conversion::scaleTo32 (0x30_u8) }); + + checkMidi1ToMidi2Conversion (midi1, midi2); + } + + beginTest ("MIDI 1 -> MIDI 2 pitch bend conversions"); + { + Packets midi1; + midi1.add (PacketX1 { 0x20e74567 }); + + Packets midi2; + midi2.add (PacketX2 { 0x40e70000, Conversion::scaleTo32 (static_cast ((0x67 << 7) | 0x45)) }); + + checkMidi1ToMidi2Conversion (midi1, midi2); + } + } + +private: + static Packets convertMidi2ToMidi1 (const Packets& midi2) + { + Packets r; + + for (const auto& packet : midi2) + Conversion::midi2ToMidi1DefaultTranslation (packet, [&r] (const View& v) { r.add (v); }); + + return r; + } + + static Packets convertMidi1ToMidi2 (const Packets& midi1) + { + Packets r; + Midi1ToMidi2DefaultTranslator translator; + + for (const auto& packet : midi1) + translator.dispatch (packet, [&r] (const View& v) { r.add (v); }); + + return r; + } + + void checkBytestreamConversion (const Packets& actual, const Packets& expected) + { + expectEquals ((int) actual.size(), (int) expected.size()); + + if (actual.size() != expected.size()) + return; + + auto actualPtr = actual.data(); + + std::for_each (expected.data(), + expected.data() + expected.size(), + [&] (const uint32_t word) { expectEquals ((uint64_t) *actualPtr++, (uint64_t) word); }); + } + + void checkMidi2ToMidi1Conversion (const Packets& midi2, const Packets& expected) + { + checkBytestreamConversion (convertMidi2ToMidi1 (midi2), expected); + } + + void checkMidi1ToMidi2Conversion (const Packets& midi1, const Packets& expected) + { + checkBytestreamConversion (convertMidi1ToMidi2 (midi1), expected); + } + + MidiMessage createRandomSysEx (Random& random, size_t sysExBytes) + { + std::vector data; + data.reserve (sysExBytes); + + for (size_t i = 0; i != sysExBytes; ++i) + data.push_back (uint8_t (random.nextInt (0x80))); + + return MidiMessage::createSysExMessage (data.data(), int (data.size())); + } + + PacketX1 createRandomUtilityUMP (Random& random) + { + const auto status = random.nextInt (3); + + return PacketX1 { Utils::bytesToWord (0, + uint8_t (status << 0x4), + uint8_t (status == 0 ? 0 : random.nextInt (0x100)), + uint8_t (status == 0 ? 0 : random.nextInt (0x100))) }; + } + + PacketX1 createRandomRealtimeUMP (Random& random) + { + const auto status = [&] + { + switch (random.nextInt (6)) + { + case 0: return 0xf8; + case 1: return 0xfa; + case 2: return 0xfb; + case 3: return 0xfc; + case 4: return 0xfe; + case 5: return 0xff; + } + + jassertfalse; + return 0x00; + }(); + + return PacketX1 { Utils::bytesToWord (0x10, uint8_t (status), 0x00, 0x00) }; + } + + template + void forEachNonSysExTestMessage (Random& random, Fn&& fn) + { + for (uint8_t firstByte = 0x80; firstByte != 0x00; ++firstByte) + { + if (firstByte == 0xf0 || firstByte == 0xf7) + continue; // sysEx is tested separately + + const auto length = MidiMessage::getMessageLengthFromFirstByte (firstByte); + const auto getDataByte = [&] { return uint8_t (random.nextInt (256) & 0x7f); }; + + const auto message = [&] + { + switch (length) + { + case 1: return MidiMessage (firstByte); + case 2: return MidiMessage (firstByte, getDataByte()); + case 3: return MidiMessage (firstByte, getDataByte(), getDataByte()); + } + + return MidiMessage(); + }(); + + fn (message); + } + } + + #if JUCE_WINDOWS + #define JUCE_CHECKED_ITERATOR(msg, size) \ + stdext::checked_array_iterator::type> ((msg), (size)) + #else + #define JUCE_CHECKED_ITERATOR(msg, size) (msg) + #endif + + static bool equal (const MidiMessage& a, const MidiMessage& b) noexcept + { + return a.getRawDataSize() == b.getRawDataSize() + && std::equal (a.getRawData(), a.getRawData() + a.getRawDataSize(), + JUCE_CHECKED_ITERATOR (b.getRawData(), b.getRawDataSize())); + } + + #undef JUCE_CHECKED_ITERATOR + + static bool equal (const MidiBuffer& a, const MidiBuffer& b) noexcept + { + return a.data == b.data; + } +}; + +static UniversalMidiPacketTests universalMidiPacketTests; + +#endif + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h new file mode 100644 index 00000000..b5471aa8 --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h @@ -0,0 +1,145 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** + A base class for classes which convert Universal MIDI Packets to other + formats. +*/ +struct U32InputHandler +{ + virtual ~U32InputHandler() noexcept = default; + + virtual void reset() = 0; + virtual void pushMidiData (const uint32_t* begin, const uint32_t* end, double time) = 0; +}; + +/** + Parses a continuous stream of U32 words and emits complete MidiMessages whenever a full + message is received. +*/ +struct U32ToBytestreamHandler : public U32InputHandler +{ + U32ToBytestreamHandler (MidiInput& i, MidiInputCallback& c) + : input (i), callback (c), dispatcher (2048) {} + + /** + Provides an `operator()` which can create an input handler for a given + MidiInput. + + All handler classes should have a similar Factory to facilitate + creation of handlers in generic contexts. + */ + class Factory + { + public: + explicit Factory (MidiInputCallback* c) + : callback (c) {} + + std::unique_ptr operator() (MidiInput& i) const + { + if (callback != nullptr) + return std::make_unique (i, *callback); + + jassertfalse; + return {}; + } + + private: + MidiInputCallback* callback = nullptr; + }; + + void reset() override { dispatcher.reset(); } + + void pushMidiData (const uint32_t* begin, const uint32_t* end, double time) override + { + dispatcher.dispatch (begin, end, time, [this] (const MidiMessage& m) + { + callback.handleIncomingMidiMessage (&input, m); + }); + } + + MidiInput& input; + MidiInputCallback& callback; + ToBytestreamDispatcher dispatcher; +}; + +/** + Parses a continuous stream of U32 words and emits full messages in the requested + UMP format. +*/ +struct U32ToUMPHandler : public U32InputHandler +{ + U32ToUMPHandler (PacketProtocol protocol, Receiver& c) + : recipient (c), converter (protocol) {} + + /** + Provides an `operator()` which can create an input handler for a given + MidiInput. + + All handler classes should have a similar Factory to facilitate + creation of handlers in generic contexts. + */ + class Factory + { + public: + Factory (PacketProtocol p, Receiver& c) + : protocol (p), callback (c) {} + + std::unique_ptr operator() (MidiInput&) const + { + return std::make_unique (protocol, callback); + } + + private: + PacketProtocol protocol; + Receiver& callback; + }; + + void reset() override + { + dispatcher.reset(); + converter.reset(); + } + + void pushMidiData (const uint32_t* begin, const uint32_t* end, double time) override + { + dispatcher.dispatch (begin, end, time, [this] (const View& view, double thisTime) + { + converter.convert (view, [&] (const View& converted) + { + recipient.packetReceived (converted, thisTime); + }); + }); + } + + Receiver& recipient; + Dispatcher dispatcher; + GenericUMPConverter converter; +}; + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.cpp b/modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.cpp new file mode 100644 index 00000000..166c4bfa --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.cpp @@ -0,0 +1,59 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +uint32_t Utils::getNumWordsForMessageType (uint32_t mt) +{ + switch (Utils::getMessageType (mt)) + { + case 0x0: + case 0x1: + case 0x2: + case 0x6: + case 0x7: + return 1; + case 0x3: + case 0x4: + case 0x8: + case 0x9: + case 0xa: + return 2; + case 0xb: + case 0xc: + return 3; + case 0x5: + case 0xd: + case 0xe: + case 0xf: + return 4; + } + + jassertfalse; + return 1; +} + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.h new file mode 100644 index 00000000..9bac9e4b --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPUtils.h @@ -0,0 +1,113 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** + Helpful types and functions for interacting with Universal MIDI Packets. + + @tags{Audio} +*/ +struct Utils +{ + /** Joins 4 bytes into a single 32-bit word. */ + static constexpr uint32_t bytesToWord (uint8_t a, uint8_t b, uint8_t c, uint8_t d) + { + return uint32_t (a << 0x18 | b << 0x10 | c << 0x08 | d << 0x00); + } + + /** Returns the expected number of 32-bit words in a Universal MIDI Packet, given + the first word of the packet. + + The result will be between 1 and 4 inclusive. + A result of 1 means that the word is itself a complete packet. + */ + static uint32_t getNumWordsForMessageType (uint32_t); + + /** + Helper functions for setting/getting 4-bit ranges inside a 32-bit word. + */ + template + struct U4 + { + static constexpr uint32_t shift = (uint32_t) 0x1c - Index * 4; + + static constexpr uint32_t set (uint32_t word, uint8_t value) + { + return (word & ~((uint32_t) 0xf << shift)) | (uint32_t) ((value & 0xf) << shift); + } + + static constexpr uint8_t get (uint32_t word) + { + return (uint8_t) ((word >> shift) & 0xf); + } + }; + + /** + Helper functions for setting/getting 8-bit ranges inside a 32-bit word. + */ + template + struct U8 + { + static constexpr uint32_t shift = (uint32_t) 0x18 - Index * 8; + + static constexpr uint32_t set (uint32_t word, uint8_t value) + { + return (word & ~((uint32_t) 0xff << shift)) | (uint32_t) (value << shift); + } + + static constexpr uint8_t get (uint32_t word) + { + return (uint8_t) ((word >> shift) & 0xff); + } + }; + + /** + Helper functions for setting/getting 16-bit ranges inside a 32-bit word. + */ + template + struct U16 + { + static constexpr uint32_t shift = (uint32_t) 0x10 - Index * 16; + + static constexpr uint32_t set (uint32_t word, uint16_t value) + { + return (word & ~((uint32_t) 0xffff << shift)) | (uint32_t) (value << shift); + } + + static constexpr uint16_t get (uint32_t word) + { + return (uint16_t) ((word >> shift) & 0xffff); + } + }; + + static constexpr uint8_t getMessageType (uint32_t w) noexcept { return U4<0>::get (w); } + static constexpr uint8_t getGroup (uint32_t w) noexcept { return U4<1>::get (w); } + static constexpr uint8_t getStatus (uint32_t w) noexcept { return U4<2>::get (w); } + static constexpr uint8_t getChannel (uint32_t w) noexcept { return U4<3>::get (w); } +}; + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPView.cpp b/modules/juce_audio_devices/midi_io/ump/juce_UMPView.cpp new file mode 100644 index 00000000..c5f3db85 --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPView.cpp @@ -0,0 +1,35 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +uint32_t View::size() const noexcept +{ + jassert (ptr != nullptr); + return Utils::getNumWordsForMessageType (*ptr); +} + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPView.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPView.h new file mode 100644 index 00000000..504e024c --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPView.h @@ -0,0 +1,88 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** + Points to a single Universal MIDI Packet. + + The packet must be well-formed for member functions to work correctly. + + Specifically, the constructor argument must be the beginning of a region of + uint32_t that contains at least `getNumWordsForMessageType(*ddata)` items, + where `data` is the constructor argument. + + NOTE: Instances of this class do not own the memory that they point to! + If you need to store a packet pointed-to by a View for later use, copy + the view contents to a Packets collection, or use the Utils::PacketX types. + + @tags{Audio} +*/ +class View +{ +public: + /** Create an invalid view. */ + View() noexcept = default; + + /** Create a view of the packet starting at address `d`. */ + explicit View (const uint32_t* data) noexcept : ptr (data) {} + + /** Get a pointer to the first word in the Universal MIDI Packet currently + pointed-to by this view. + */ + const uint32_t* data() const noexcept { return ptr; } + + /** Get the number of 32-words (between 1 and 4 inclusive) in the Universal + MIDI Packet currently pointed-to by this view. + */ + uint32_t size() const noexcept; + + /** Get a specific word from this packet. + + Passing an `index` that is greater than or equal to the result of `size` + will cause undefined behaviour. + */ + const uint32_t& operator[] (size_t index) const noexcept { return ptr[index]; } + + /** Get an iterator pointing to the first word in the packet. */ + const uint32_t* begin() const noexcept { return ptr; } + const uint32_t* cbegin() const noexcept { return ptr; } + + /** Get an iterator pointing one-past the last word in the packet. */ + const uint32_t* end() const noexcept { return ptr + size(); } + const uint32_t* cend() const noexcept { return ptr + size(); } + + /** Return true if this view is pointing to the same address as another view. */ + bool operator== (const View& other) const noexcept { return ptr == other.ptr; } + + /** Return false if this view is pointing to the same address as another view. */ + bool operator!= (const View& other) const noexcept { return ! operator== (other); } + +private: + const uint32_t* ptr = nullptr; +}; + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPacket.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPacket.h new file mode 100644 index 00000000..b58304d5 --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPacket.h @@ -0,0 +1,187 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** + Holds a single Universal MIDI Packet. +*/ +template +class Packet +{ +public: + Packet() = default; + + template ::type = 0> + Packet (uint32_t a) + : contents { { a } } + { + jassert (Utils::getNumWordsForMessageType (a) == 1); + } + + template ::type = 0> + Packet (uint32_t a, uint32_t b) + : contents { { a, b } } + { + jassert (Utils::getNumWordsForMessageType (a) == 2); + } + + template ::type = 0> + Packet (uint32_t a, uint32_t b, uint32_t c) + : contents { { a, b, c } } + { + jassert (Utils::getNumWordsForMessageType (a) == 3); + } + + template ::type = 0> + Packet (uint32_t a, uint32_t b, uint32_t c, uint32_t d) + : contents { { a, b, c, d } } + { + jassert (Utils::getNumWordsForMessageType (a) == 4); + } + + template ::type = 0> + explicit Packet (const std::array& fullPacket) + : contents (fullPacket) + { + jassert (Utils::getNumWordsForMessageType (fullPacket.front()) == numWords); + } + + Packet withMessageType (uint8_t type) const noexcept + { + return withU4<0> (type); + } + + Packet withGroup (uint8_t group) const noexcept + { + return withU4<1> (group); + } + + Packet withStatus (uint8_t status) const noexcept + { + return withU4<2> (status); + } + + Packet withChannel (uint8_t channel) const noexcept + { + return withU4<3> (channel); + } + + uint8_t getMessageType() const noexcept { return getU4<0>(); } + + uint8_t getGroup() const noexcept { return getU4<1>(); } + + uint8_t getStatus() const noexcept { return getU4<2>(); } + + uint8_t getChannel() const noexcept { return getU4<3>(); } + + template + Packet withU4 (uint8_t value) const noexcept + { + constexpr auto word = index / 8; + auto copy = *this; + std::get (copy.contents) = Utils::U4::set (copy.template getU32(), value); + return copy; + } + + template + Packet withU8 (uint8_t value) const noexcept + { + constexpr auto word = index / 4; + auto copy = *this; + std::get (copy.contents) = Utils::U8::set (copy.template getU32(), value); + return copy; + } + + template + Packet withU16 (uint16_t value) const noexcept + { + constexpr auto word = index / 2; + auto copy = *this; + std::get (copy.contents) = Utils::U16::set (copy.template getU32(), value); + return copy; + } + + template + Packet withU32 (uint32_t value) const noexcept + { + auto copy = *this; + std::get (copy.contents) = value; + return copy; + } + + template + uint8_t getU4() const noexcept + { + return Utils::U4::get (this->template getU32()); + } + + template + uint8_t getU8() const noexcept + { + return Utils::U8::get (this->template getU32()); + } + + template + uint16_t getU16() const noexcept + { + return Utils::U16::get (this->template getU32()); + } + + template + uint32_t getU32() const noexcept + { + return std::get (contents); + } + + //============================================================================== + using Contents = std::array; + + using const_iterator = typename Contents::const_iterator; + + const_iterator begin() const noexcept { return contents.begin(); } + const_iterator cbegin() const noexcept { return contents.begin(); } + + const_iterator end() const noexcept { return contents.end(); } + const_iterator cend() const noexcept { return contents.end(); } + + const uint32_t* data() const noexcept { return contents.data(); } + + const uint32_t& front() const noexcept { return contents.front(); } + const uint32_t& back() const noexcept { return contents.back(); } + + const uint32_t& operator[] (size_t index) const noexcept { return contents[index]; } + +private: + Contents contents { {} }; +}; + +using PacketX1 = Packet<1>; +using PacketX2 = Packet<2>; +using PacketX3 = Packet<3>; +using PacketX4 = Packet<4>; + +} +} diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPackets.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPackets.h new file mode 100644 index 00000000..2a0a1b8f --- /dev/null +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPackets.h @@ -0,0 +1,92 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ +namespace universal_midi_packets +{ + +/** + Holds a collection of Universal MIDI Packets. + + Unlike MidiBuffer, this collection does not store any additional information + (e.g. timestamps) alongside the raw messages. + + If timestamps are required, these can be added to the container in UMP format, + as Jitter Reduction Utility messages. + + @tags{Audio} +*/ +class Packets +{ +public: + /** Adds a single packet to the collection. + + The View must be valid for this to work. If the view + points to a malformed message, or if the view points to a region + too short for the contained message, this call will result in + undefined behaviour. + */ + void add (const View& v) { storage.insert (storage.end(), v.cbegin(), v.cend()); } + + void add (const PacketX1& p) { addImpl (p); } + void add (const PacketX2& p) { addImpl (p); } + void add (const PacketX3& p) { addImpl (p); } + void add (const PacketX4& p) { addImpl (p); } + + /** Pre-allocates space for at least `numWords` 32-bit words in this collection. */ + void reserve (size_t numWords) { storage.reserve (numWords); } + + /** Removes all previously-added packets from this collection. */ + void clear() { storage.clear(); } + + /** Gets an iterator pointing to the first packet in this collection. */ + Iterator cbegin() const noexcept { return Iterator (data(), size()); } + Iterator begin() const noexcept { return cbegin(); } + + /** Gets an iterator pointing one-past the last packet in this collection. */ + Iterator cend() const noexcept { return Iterator (data() + size(), 0); } + Iterator end() const noexcept { return cend(); } + + /** Gets a pointer to the contents of the collection as a range of raw 32-bit words. */ + const uint32_t* data() const noexcept { return storage.data(); } + + /** Returns the number of uint32_t words in storage. + + Note that this is likely to be larger than the number of packets + currently being stored, as some packets span multiple words. + */ + size_t size() const noexcept { return storage.size(); } + +private: + template + void addImpl (const Packet& p) + { + jassert (Utils::getNumWordsForMessageType (p[0]) == numWords); + add (View (p.data())); + } + + std::vector storage; +}; + +} +} diff --git a/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp b/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp deleted file mode 100644 index 704a0574..00000000 --- a/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp +++ /dev/null @@ -1,732 +0,0 @@ -/* - ============================================================================== - - This file is part of the JUCE library. - Copyright (c) 2020 - Raw Material Software Limited - - 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 -{ - -#ifndef JUCE_LOG_COREMIDI_ERRORS - #define JUCE_LOG_COREMIDI_ERRORS 1 -#endif - -namespace CoreMidiHelpers -{ - //============================================================================== - static bool checkError (OSStatus err, int lineNum) - { - if (err == noErr) - return true; - - #if JUCE_LOG_COREMIDI_ERRORS - Logger::writeToLog ("CoreMIDI error: " + String (lineNum) + " - " + String::toHexString ((int) err)); - #endif - - ignoreUnused (lineNum); - return false; - } - - #undef CHECK_ERROR - #define CHECK_ERROR(a) CoreMidiHelpers::checkError (a, __LINE__) - - static MidiDeviceInfo getMidiObjectInfo (MIDIObjectRef entity) - { - MidiDeviceInfo info; - - { - ScopedCFString str; - - if (CHECK_ERROR (MIDIObjectGetStringProperty (entity, kMIDIPropertyName, &str.cfString))) - info.name = String::fromCFString (str.cfString); - } - - SInt32 objectID = 0; - - if (CHECK_ERROR (MIDIObjectGetIntegerProperty (entity, kMIDIPropertyUniqueID, &objectID))) - { - info.identifier = String (objectID); - } - else - { - ScopedCFString str; - - if (CHECK_ERROR (MIDIObjectGetStringProperty (entity, kMIDIPropertyUniqueID, &str.cfString))) - info.identifier = String::fromCFString (str.cfString); - } - - return info; - } - - static MidiDeviceInfo getEndpointInfo (MIDIEndpointRef endpoint, bool isExternal) - { - // NB: don't attempt to use nullptr for refs - it fails in some types of build. - MIDIEntityRef entity = 0; - MIDIEndpointGetEntity (endpoint, &entity); - - // probably virtual - if (entity == 0) - return getMidiObjectInfo (endpoint); - - auto result = getMidiObjectInfo (endpoint); - - // endpoint is empty - try the entity - if (result == MidiDeviceInfo()) - result = getMidiObjectInfo (entity); - - // now consider the device - MIDIDeviceRef device = 0; - MIDIEntityGetDevice (entity, &device); - - if (device != 0) - { - auto info = getMidiObjectInfo (device); - - if (info != MidiDeviceInfo()) - { - // if an external device has only one entity, throw away - // the endpoint name and just use the device name - if (isExternal && MIDIDeviceGetNumberOfEntities (device) < 2) - { - result = info; - } - else if (! result.name.startsWithIgnoreCase (info.name)) - { - // prepend the device name and identifier to the entity's - result.name = (info.name + " " + result.name).trimEnd(); - result.identifier = info.identifier + " " + result.identifier; - } - } - } - - return result; - } - - static MidiDeviceInfo getConnectedEndpointInfo (MIDIEndpointRef endpoint) - { - MidiDeviceInfo result; - - // Does the endpoint have connections? - CFDataRef connections = nullptr; - int numConnections = 0; - - MIDIObjectGetDataProperty (endpoint, kMIDIPropertyConnectionUniqueID, &connections); - - if (connections != nullptr) - { - numConnections = ((int) CFDataGetLength (connections)) / (int) sizeof (MIDIUniqueID); - - if (numConnections > 0) - { - auto* pid = reinterpret_cast (CFDataGetBytePtr (connections)); - - for (int i = 0; i < numConnections; ++i, ++pid) - { - auto id = (MIDIUniqueID) ByteOrder::swapIfLittleEndian ((uint32) *pid); - MIDIObjectRef connObject; - MIDIObjectType connObjectType; - auto err = MIDIObjectFindByUniqueID (id, &connObject, &connObjectType); - - if (err == noErr) - { - MidiDeviceInfo deviceInfo; - - if (connObjectType == kMIDIObjectType_ExternalSource - || connObjectType == kMIDIObjectType_ExternalDestination) - { - // Connected to an external device's endpoint (10.3 and later). - deviceInfo = getEndpointInfo (static_cast (connObject), true); - } - else - { - // Connected to an external device (10.2) (or something else, catch-all) - deviceInfo = getMidiObjectInfo (connObject); - } - - if (deviceInfo != MidiDeviceInfo()) - { - if (result.name.isNotEmpty()) result.name += ", "; - if (result.identifier.isNotEmpty()) result.identifier += ", "; - - result.name += deviceInfo.name; - result.identifier += deviceInfo.identifier; - } - } - } - } - - CFRelease (connections); - } - - // Here, either the endpoint had no connections, or we failed to obtain names for them. - if (result == MidiDeviceInfo()) - return getEndpointInfo (endpoint, false); - - return result; - } - - static int createUniqueIDForMidiPort (String deviceName, bool isInput) - { - String uniqueID; - - #ifdef JucePlugin_CFBundleIdentifier - uniqueID = JUCE_STRINGIFY (JucePlugin_CFBundleIdentifier); - #else - auto appBundle = File::getSpecialLocation (File::currentApplicationFile); - ScopedCFString appBundlePath (appBundle.getFullPathName()); - - if (auto bundleURL = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, appBundlePath.cfString, kCFURLPOSIXPathStyle, true)) - { - auto bundleRef = CFBundleCreate (kCFAllocatorDefault, bundleURL); - CFRelease (bundleURL); - - if (bundleRef != nullptr) - { - if (auto bundleId = CFBundleGetIdentifier (bundleRef)) - uniqueID = String::fromCFString (bundleId); - - CFRelease (bundleRef); - } - } - #endif - - if (uniqueID.isEmpty()) - uniqueID = String (Random::getSystemRandom().nextInt (1024)); - - uniqueID += "." + deviceName + (isInput ? ".input" : ".output"); - return uniqueID.hashCode(); - } - - static void enableSimulatorMidiSession() - { - #if TARGET_OS_SIMULATOR - static bool hasEnabledNetworkSession = false; - - if (! hasEnabledNetworkSession) - { - MIDINetworkSession* session = [MIDINetworkSession defaultSession]; - session.enabled = YES; - session.connectionPolicy = MIDINetworkConnectionPolicy_Anyone; - - hasEnabledNetworkSession = true; - } - #endif - } - - static void globalSystemChangeCallback (const MIDINotification*, void*) - { - // TODO.. Should pass-on this notification.. - } - - static String getGlobalMidiClientName() - { - if (auto* app = JUCEApplicationBase::getInstance()) - return app->getApplicationName(); - - return "JUCE"; - } - - static MIDIClientRef getGlobalMidiClient() - { - static MIDIClientRef globalMidiClient = 0; - - if (globalMidiClient == 0) - { - // Since OSX 10.6, the MIDIClientCreate function will only work - // correctly when called from the message thread! - JUCE_ASSERT_MESSAGE_THREAD - - enableSimulatorMidiSession(); - - ScopedCFString name (getGlobalMidiClientName()); - CHECK_ERROR (MIDIClientCreate (name.cfString, &globalSystemChangeCallback, nullptr, &globalMidiClient)); - } - - return globalMidiClient; - } - - static Array findDevices (bool forInput) - { - // It seems that OSX can be a bit picky about the thread that's first used to - // search for devices. It's safest to use the message thread for calling this. - JUCE_ASSERT_MESSAGE_THREAD - - if (getGlobalMidiClient() == 0) - { - jassertfalse; - return {}; - } - - enableSimulatorMidiSession(); - - Array devices; - auto numDevices = (forInput ? MIDIGetNumberOfSources() : MIDIGetNumberOfDestinations()); - - for (ItemCount i = 0; i < numDevices; ++i) - { - MidiDeviceInfo deviceInfo; - - if (auto dest = forInput ? MIDIGetSource (i) : MIDIGetDestination (i)) - deviceInfo = getConnectedEndpointInfo (dest); - - if (deviceInfo == MidiDeviceInfo()) - deviceInfo.name = deviceInfo.identifier = ""; - - devices.add (deviceInfo); - } - - return devices; - } - - //============================================================================== - class MidiPortAndEndpoint - { - public: - MidiPortAndEndpoint (MIDIPortRef p, MIDIEndpointRef ep) noexcept - : port (p), endpoint (ep) - { - } - - ~MidiPortAndEndpoint() noexcept - { - if (port != 0) - MIDIPortDispose (port); - - // if port == nullptr, it means we created the endpoint, so it's safe to delete it - if (port == 0 && endpoint != 0) - MIDIEndpointDispose (endpoint); - } - - void send (const MIDIPacketList* packets) noexcept - { - if (port != 0) - MIDISend (port, endpoint, packets); - else - MIDIReceived (endpoint, packets); - } - - MIDIPortRef port; - MIDIEndpointRef endpoint; - }; - - //============================================================================== - struct MidiPortAndCallback; - CriticalSection callbackLock; - Array activeCallbacks; - - struct MidiPortAndCallback - { - MidiPortAndCallback (MidiInputCallback& cb) : callback (cb) {} - - ~MidiPortAndCallback() - { - active = false; - - { - const ScopedLock sl (callbackLock); - activeCallbacks.removeFirstMatchingValue (this); - } - - if (portAndEndpoint != nullptr && portAndEndpoint->port != 0) - CHECK_ERROR (MIDIPortDisconnectSource (portAndEndpoint->port, portAndEndpoint->endpoint)); - } - - void handlePackets (const MIDIPacketList* pktlist) - { - auto time = Time::getMillisecondCounterHiRes() * 0.001; - - const ScopedLock sl (callbackLock); - - if (activeCallbacks.contains (this) && active) - { - auto* packet = &pktlist->packet[0]; - - for (unsigned int i = 0; i < pktlist->numPackets; ++i) - { - auto len = readUnalignedlength)> (&(packet->length)); - concatenator.pushMidiData (packet->data, (int) len, time, input, callback); - - packet = MIDIPacketNext (packet); - } - } - } - - MidiInput* input = nullptr; - std::unique_ptr portAndEndpoint; - std::atomic active { false }; - - private: - MidiInputCallback& callback; - MidiDataConcatenator concatenator { 2048 }; - }; - - static void midiInputProc (const MIDIPacketList* pktlist, void* readProcRefCon, void* /*srcConnRefCon*/) - { - static_cast (readProcRefCon)->handlePackets (pktlist); - } - - static Array getEndpoints (bool isInput) - { - Array endpoints; - auto numDevices = (isInput ? MIDIGetNumberOfSources() : MIDIGetNumberOfDestinations()); - - for (ItemCount i = 0; i < numDevices; ++i) - endpoints.add (isInput ? MIDIGetSource (i) : MIDIGetDestination (i)); - - return endpoints; - } -} - -class MidiInput::Pimpl : public CoreMidiHelpers::MidiPortAndCallback -{ -public: - using MidiPortAndCallback::MidiPortAndCallback; -}; - -//============================================================================== -Array MidiInput::getAvailableDevices() -{ - return CoreMidiHelpers::findDevices (true); -} - -MidiDeviceInfo MidiInput::getDefaultDevice() -{ - return getAvailableDevices().getFirst(); -} - -std::unique_ptr MidiInput::openDevice (const String& deviceIdentifier, MidiInputCallback* callback) -{ - if (deviceIdentifier.isEmpty()) - return nullptr; - - using namespace CoreMidiHelpers; - - if (auto client = getGlobalMidiClient()) - { - for (auto& endpoint : getEndpoints (true)) - { - auto endpointInfo = getConnectedEndpointInfo (endpoint); - - if (deviceIdentifier == endpointInfo.identifier) - { - ScopedCFString cfName; - - if (CHECK_ERROR (MIDIObjectGetStringProperty (endpoint, kMIDIPropertyName, &cfName.cfString))) - { - MIDIPortRef port; - auto mpc = std::make_unique (*callback); - - if (CHECK_ERROR (MIDIInputPortCreate (client, cfName.cfString, midiInputProc, mpc.get(), &port))) - { - if (CHECK_ERROR (MIDIPortConnectSource (port, endpoint, nullptr))) - { - mpc->portAndEndpoint = std::make_unique (port, endpoint); - - std::unique_ptr midiInput (new MidiInput (endpointInfo.name, endpointInfo.identifier)); - - mpc->input = midiInput.get(); - auto* ptr = mpc.get(); - midiInput->internal = std::move (mpc); - - const ScopedLock sl (callbackLock); - activeCallbacks.add (ptr); - - return midiInput; - } - else - { - CHECK_ERROR (MIDIPortDispose (port)); - } - } - } - } - } - } - - return {}; -} - -std::unique_ptr MidiInput::createNewDevice (const String& deviceName, MidiInputCallback* callback) -{ - using namespace CoreMidiHelpers; - jassert (callback != nullptr); - - if (auto client = getGlobalMidiClient()) - { - auto mpc = std::make_unique (*callback); - mpc->active = false; - - MIDIEndpointRef endpoint; - ScopedCFString name (deviceName); - - auto err = MIDIDestinationCreate (client, name.cfString, midiInputProc, mpc.get(), &endpoint); - - #if JUCE_IOS - if (err == kMIDINotPermitted) - { - // If you've hit this assertion then you probably haven't enabled the "Audio Background Capability" - // setting in the iOS exporter for your app - this is required if you want to create a MIDI device! - jassertfalse; - return nullptr; - } - #endif - - if (CHECK_ERROR (err)) - { - auto deviceIdentifier = createUniqueIDForMidiPort (deviceName, true); - - if (CHECK_ERROR (MIDIObjectSetIntegerProperty (endpoint, kMIDIPropertyUniqueID, (SInt32) deviceIdentifier))) - { - mpc->portAndEndpoint = std::make_unique ((UInt32) 0, endpoint); - - std::unique_ptr midiInput (new MidiInput (deviceName, String (deviceIdentifier))); - - mpc->input = midiInput.get(); - auto* ptr = mpc.get(); - midiInput->internal = std::move (mpc); - - const ScopedLock sl (callbackLock); - activeCallbacks.add (ptr); - - return midiInput; - } - } - } - - return {}; -} - -StringArray MidiInput::getDevices() -{ - StringArray deviceNames; - - for (auto& d : getAvailableDevices()) - deviceNames.add (d.name); - - return deviceNames; -} - -int MidiInput::getDefaultDeviceIndex() -{ - return 0; -} - -std::unique_ptr MidiInput::openDevice (int index, MidiInputCallback* callback) -{ - return openDevice (getAvailableDevices()[index].identifier, callback); -} - -MidiInput::MidiInput (const String& deviceName, const String& deviceIdentifier) - : deviceInfo (deviceName, deviceIdentifier) -{ -} - -MidiInput::~MidiInput() = default; - -void MidiInput::start() -{ - const ScopedLock sl (CoreMidiHelpers::callbackLock); - internal->active = true; -} - -void MidiInput::stop() -{ - const ScopedLock sl (CoreMidiHelpers::callbackLock); - internal->active = false; -} - -//============================================================================== -class MidiOutput::Pimpl : public CoreMidiHelpers::MidiPortAndEndpoint -{ -public: - using MidiPortAndEndpoint::MidiPortAndEndpoint; -}; - -Array MidiOutput::getAvailableDevices() -{ - return CoreMidiHelpers::findDevices (false); -} - -MidiDeviceInfo MidiOutput::getDefaultDevice() -{ - return getAvailableDevices().getFirst(); -} - -std::unique_ptr MidiOutput::openDevice (const String& deviceIdentifier) -{ - if (deviceIdentifier.isEmpty()) - return nullptr; - - using namespace CoreMidiHelpers; - - if (auto client = getGlobalMidiClient()) - { - for (auto& endpoint : getEndpoints (false)) - { - auto endpointInfo = getConnectedEndpointInfo (endpoint); - - if (deviceIdentifier == endpointInfo.identifier) - { - ScopedCFString cfName; - - if (CHECK_ERROR (MIDIObjectGetStringProperty (endpoint, kMIDIPropertyName, &cfName.cfString))) - { - MIDIPortRef port; - - if (CHECK_ERROR (MIDIOutputPortCreate (client, cfName.cfString, &port))) - { - std::unique_ptr midiOutput (new MidiOutput (endpointInfo.name, endpointInfo.identifier)); - midiOutput->internal = std::make_unique (port, endpoint); - - return midiOutput; - } - } - } - } - } - - return {}; -} - -std::unique_ptr MidiOutput::createNewDevice (const String& deviceName) -{ - using namespace CoreMidiHelpers; - - if (auto client = getGlobalMidiClient()) - { - MIDIEndpointRef endpoint; - - ScopedCFString name (deviceName); - - auto err = MIDISourceCreate (client, name.cfString, &endpoint); - - #if JUCE_IOS - if (err == kMIDINotPermitted) - { - // If you've hit this assertion then you probably haven't enabled the "Audio Background Capability" - // setting in the iOS exporter for your app - this is required if you want to create a MIDI device! - jassertfalse; - return nullptr; - } - #endif - - if (CHECK_ERROR (err)) - { - auto deviceIdentifier = createUniqueIDForMidiPort (deviceName, false); - - if (CHECK_ERROR (MIDIObjectSetIntegerProperty (endpoint, kMIDIPropertyUniqueID, (SInt32) deviceIdentifier))) - { - std::unique_ptr midiOutput (new MidiOutput (deviceName, String (deviceIdentifier))); - midiOutput->internal = std::make_unique ((UInt32) 0, endpoint); - - return midiOutput; - } - } - } - - return {}; -} - -StringArray MidiOutput::getDevices() -{ - StringArray deviceNames; - - for (auto& d : getAvailableDevices()) - deviceNames.add (d.name); - - return deviceNames; -} - -int MidiOutput::getDefaultDeviceIndex() -{ - return 0; -} - -std::unique_ptr MidiOutput::openDevice (int index) -{ - return openDevice (getAvailableDevices()[index].identifier); -} - -MidiOutput::~MidiOutput() -{ - stopBackgroundThread(); -} - -void MidiOutput::sendMessageNow (const MidiMessage& message) -{ - #if JUCE_IOS - const MIDITimeStamp timeStamp = mach_absolute_time(); - #else - const MIDITimeStamp timeStamp = AudioGetCurrentHostTime(); - #endif - - HeapBlock allocatedPackets; - MIDIPacketList stackPacket; - auto* packetToSend = &stackPacket; - auto dataSize = (size_t) message.getRawDataSize(); - - if (message.isSysEx()) - { - const int maxPacketSize = 256; - int pos = 0, bytesLeft = (int) dataSize; - const int numPackets = (bytesLeft + maxPacketSize - 1) / maxPacketSize; - allocatedPackets.malloc ((size_t) (32 * (size_t) numPackets + dataSize), 1); - packetToSend = allocatedPackets; - packetToSend->numPackets = (UInt32) numPackets; - - auto* p = packetToSend->packet; - - for (int i = 0; i < numPackets; ++i) - { - p->timeStamp = timeStamp; - p->length = (UInt16) jmin (maxPacketSize, bytesLeft); - memcpy (p->data, message.getRawData() + pos, p->length); - pos += p->length; - bytesLeft -= p->length; - p = MIDIPacketNext (p); - } - } - else if (dataSize < 65536) // max packet size - { - auto stackCapacity = sizeof (stackPacket.packet->data); - - if (dataSize > stackCapacity) - { - allocatedPackets.malloc ((sizeof (MIDIPacketList) - stackCapacity) + dataSize, 1); - packetToSend = allocatedPackets; - } - - packetToSend->numPackets = 1; - auto& p = *(packetToSend->packet); - p.timeStamp = timeStamp; - p.length = (UInt16) dataSize; - memcpy (p.data, message.getRawData(), dataSize); - } - else - { - jassertfalse; // packet too large to send! - return; - } - - internal->send (packetToSend); -} - -#undef CHECK_ERROR - -} // namespace juce diff --git a/modules/juce_audio_devices/native/juce_mac_CoreMidi.mm b/modules/juce_audio_devices/native/juce_mac_CoreMidi.mm new file mode 100644 index 00000000..4c24bcc4 --- /dev/null +++ b/modules/juce_audio_devices/native/juce_mac_CoreMidi.mm @@ -0,0 +1,1269 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + 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 +{ + +#ifndef JUCE_LOG_COREMIDI_ERRORS + #define JUCE_LOG_COREMIDI_ERRORS 1 +#endif + +namespace CoreMidiHelpers +{ + static bool checkError (OSStatus err, int lineNum) + { + if (err == noErr) + return true; + + #if JUCE_LOG_COREMIDI_ERRORS + Logger::writeToLog ("CoreMIDI error: " + String (lineNum) + " - " + String::toHexString ((int) err)); + #endif + + ignoreUnused (lineNum); + return false; + } + + #undef CHECK_ERROR + #define CHECK_ERROR(a) CoreMidiHelpers::checkError (a, __LINE__) + + enum class ImplementationStrategy + { + onlyNew, + both, + onlyOld + }; + + #if (defined (MAC_OS_VERSION_11_0) || defined (__IPHONE_14_0)) + #if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_14_0) + #define JUCE_HAS_NEW_COREMIDI_API 1 + #define JUCE_HAS_OLD_COREMIDI_API 0 + constexpr auto implementationStrategy = ImplementationStrategy::onlyNew; + #else + #define JUCE_HAS_NEW_COREMIDI_API 1 + #define JUCE_HAS_OLD_COREMIDI_API 1 + constexpr auto implementationStrategy = ImplementationStrategy::both; + #endif + #else + #define JUCE_HAS_NEW_COREMIDI_API 0 + #define JUCE_HAS_OLD_COREMIDI_API 1 + constexpr auto implementationStrategy = ImplementationStrategy::onlyOld; + #endif + + struct SenderBase + { + virtual ~SenderBase() noexcept = default; + + virtual void send (MIDIPortRef port, MIDIEndpointRef endpoint, const MidiMessage& m) = 0; + virtual void send (MIDIPortRef port, MIDIEndpointRef endpoint, ump::Iterator b, ump::Iterator e) = 0; + + virtual ump::MidiProtocol getProtocol() const noexcept = 0; + }; + + template + struct Sender; + + #if JUCE_HAS_NEW_COREMIDI_API + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wunguarded-availability-new") + + template <> + struct Sender : public SenderBase + { + explicit Sender (MIDIEndpointRef ep) + : umpConverter (getProtocolForEndpoint (ep)) + {} + + void send (MIDIPortRef port, MIDIEndpointRef endpoint, const MidiMessage& m) override + { + newSendImpl (port, endpoint, m); + } + + void send (MIDIPortRef port, MIDIEndpointRef endpoint, ump::Iterator b, ump::Iterator e) override + { + newSendImpl (port, endpoint, b, e); + } + + ump::MidiProtocol getProtocol() const noexcept override + { + return umpConverter.getProtocol() == ump::PacketProtocol::MIDI_2_0 ? ump::MidiProtocol::UMP_MIDI_2_0 + : ump::MidiProtocol::UMP_MIDI_1_0; + } + + private: + ump::GenericUMPConverter umpConverter; + + static ump::PacketProtocol getProtocolForEndpoint (MIDIEndpointRef ep) noexcept + { + SInt32 protocol = 0; + CHECK_ERROR (MIDIObjectGetIntegerProperty (ep, kMIDIPropertyProtocolID, &protocol)); + + return protocol == kMIDIProtocol_2_0 ? ump::PacketProtocol::MIDI_2_0 + : ump::PacketProtocol::MIDI_1_0; + } + + template + void newSendImpl (MIDIPortRef port, MIDIEndpointRef endpoint, Params&&... params) + { + // The converter protocol got out-of-sync with the device protocol + jassert (getProtocolForEndpoint (endpoint) == umpConverter.getProtocol()); + + #if JUCE_IOS + const MIDITimeStamp timeStamp = mach_absolute_time(); + #else + const MIDITimeStamp timeStamp = AudioGetCurrentHostTime(); + #endif + + MIDIEventList stackList = {}; + MIDIEventPacket* end = nullptr; + + const auto init = [&] + { + end = MIDIEventListInit (&stackList, + umpConverter.getProtocol() == ump::PacketProtocol::MIDI_2_0 ? kMIDIProtocol_2_0 + : kMIDIProtocol_1_0); + }; + + const auto send = [&] + { + CHECK_ERROR (port != 0 ? MIDISendEventList (port, endpoint, &stackList) + : MIDIReceivedEventList (endpoint, &stackList)); + }; + + const auto add = [&] (const ump::View& view) + { + static_assert (sizeof (uint32_t) == sizeof (UInt32) + && alignof (uint32_t) == alignof (UInt32), + "If this fails, the cast below will be broken too!"); + end = MIDIEventListAdd (&stackList, + sizeof (MIDIEventList::packet), + end, + timeStamp, + view.size(), + reinterpret_cast (view.data())); + }; + + init(); + + umpConverter.convert (params..., [&] (const ump::View& view) + { + add (view); + + if (end != nullptr) + return; + + send(); + init(); + add (view); + }); + + send(); + } + }; + + JUCE_END_IGNORE_WARNINGS_GCC_LIKE + #endif + + #if JUCE_HAS_OLD_COREMIDI_API + template <> + struct Sender : public SenderBase + { + explicit Sender (MIDIEndpointRef) {} + + void send (MIDIPortRef port, MIDIEndpointRef endpoint, const MidiMessage& m) override + { + oldSendImpl (port, endpoint, m); + } + + void send (MIDIPortRef port, MIDIEndpointRef endpoint, ump::Iterator b, ump::Iterator e) override + { + std::for_each (b, e, [&] (const ump::View& v) + { + bytestreamConverter.convert (v, 0.0, [&] (const MidiMessage& m) + { + send (port, endpoint, m); + }); + }); + } + + ump::MidiProtocol getProtocol() const noexcept override + { + return ump::MidiProtocol::bytestream; + } + + private: + ump::ToBytestreamConverter bytestreamConverter { 2048 }; + + void oldSendImpl (MIDIPortRef port, MIDIEndpointRef endpoint, const MidiMessage& message) + { + #if JUCE_IOS + const MIDITimeStamp timeStamp = mach_absolute_time(); + #else + const MIDITimeStamp timeStamp = AudioGetCurrentHostTime(); + #endif + + HeapBlock allocatedPackets; + MIDIPacketList stackPacket; + auto* packetToSend = &stackPacket; + auto dataSize = (size_t) message.getRawDataSize(); + + if (message.isSysEx()) + { + const int maxPacketSize = 256; + int pos = 0, bytesLeft = (int) dataSize; + const int numPackets = (bytesLeft + maxPacketSize - 1) / maxPacketSize; + allocatedPackets.malloc ((size_t) (32 * (size_t) numPackets + dataSize), 1); + packetToSend = allocatedPackets; + packetToSend->numPackets = (UInt32) numPackets; + + auto* p = packetToSend->packet; + + for (int i = 0; i < numPackets; ++i) + { + p->timeStamp = timeStamp; + p->length = (UInt16) jmin (maxPacketSize, bytesLeft); + memcpy (p->data, message.getRawData() + pos, p->length); + pos += p->length; + bytesLeft -= p->length; + p = MIDIPacketNext (p); + } + } + else if (dataSize < 65536) // max packet size + { + auto stackCapacity = sizeof (stackPacket.packet->data); + + if (dataSize > stackCapacity) + { + allocatedPackets.malloc ((sizeof (MIDIPacketList) - stackCapacity) + dataSize, 1); + packetToSend = allocatedPackets; + } + + packetToSend->numPackets = 1; + auto& p = *(packetToSend->packet); + p.timeStamp = timeStamp; + p.length = (UInt16) dataSize; + memcpy (p.data, message.getRawData(), dataSize); + } + else + { + jassertfalse; // packet too large to send! + return; + } + + if (port != 0) + MIDISend (port, endpoint, packetToSend); + else + MIDIReceived (endpoint, packetToSend); + } + }; + #endif + + #if JUCE_HAS_NEW_COREMIDI_API && JUCE_HAS_OLD_COREMIDI_API + template <> + struct Sender + { + explicit Sender (MIDIEndpointRef ep) + : sender (makeImpl (ep)) + {} + + void send (MIDIPortRef port, MIDIEndpointRef endpoint, const MidiMessage& m) + { + sender->send (port, endpoint, m); + } + + void send (MIDIPortRef port, MIDIEndpointRef endpoint, ump::Iterator b, ump::Iterator e) + { + sender->send (port, endpoint, b, e); + } + + ump::MidiProtocol getProtocol() const noexcept + { + return sender->getProtocol(); + } + + private: + static std::unique_ptr makeImpl (MIDIEndpointRef ep) + { + if (@available (macOS 11, iOS 14, *)) + return std::make_unique> (ep); + + return std::make_unique> (ep); + } + + std::unique_ptr sender; + }; + #endif + + using SenderToUse = Sender; + + //============================================================================== + class MidiPortAndEndpoint + { + public: + MidiPortAndEndpoint (MIDIPortRef p, MIDIEndpointRef ep) noexcept + : port (p), endpoint (ep), sender (ep) + {} + + ~MidiPortAndEndpoint() noexcept + { + if (port != 0) + MIDIPortDispose (port); + + // if port == nullptr, it means we created the endpoint, so it's safe to delete it + if (port == 0 && endpoint != 0) + MIDIEndpointDispose (endpoint); + } + + void send (const MidiMessage& m) + { + sender.send (port, endpoint, m); + } + + void send (ump::Iterator b, ump::Iterator e) + { + sender.send (port, endpoint, b, e); + } + + bool canStop() const noexcept { return port != 0; } + void stop() const { CHECK_ERROR (MIDIPortDisconnectSource (port, endpoint)); } + + ump::MidiProtocol getProtocol() const noexcept + { + return sender.getProtocol(); + } + + private: + MIDIPortRef port; + MIDIEndpointRef endpoint; + + SenderToUse sender; + }; + + static MidiDeviceInfo getMidiObjectInfo (MIDIObjectRef entity) + { + MidiDeviceInfo info; + + { + ScopedCFString str; + + if (CHECK_ERROR (MIDIObjectGetStringProperty (entity, kMIDIPropertyName, &str.cfString))) + info.name = String::fromCFString (str.cfString); + } + + SInt32 objectID = 0; + + if (CHECK_ERROR (MIDIObjectGetIntegerProperty (entity, kMIDIPropertyUniqueID, &objectID))) + { + info.identifier = String (objectID); + } + else + { + ScopedCFString str; + + if (CHECK_ERROR (MIDIObjectGetStringProperty (entity, kMIDIPropertyUniqueID, &str.cfString))) + info.identifier = String::fromCFString (str.cfString); + } + + return info; + } + + static MidiDeviceInfo getEndpointInfo (MIDIEndpointRef endpoint, bool isExternal) + { + // NB: don't attempt to use nullptr for refs - it fails in some types of build. + MIDIEntityRef entity = 0; + MIDIEndpointGetEntity (endpoint, &entity); + + // probably virtual + if (entity == 0) + return getMidiObjectInfo (endpoint); + + auto result = getMidiObjectInfo (endpoint); + + // endpoint is empty - try the entity + if (result == MidiDeviceInfo()) + result = getMidiObjectInfo (entity); + + // now consider the device + MIDIDeviceRef device = 0; + MIDIEntityGetDevice (entity, &device); + + if (device != 0) + { + auto info = getMidiObjectInfo (device); + + if (info != MidiDeviceInfo()) + { + // if an external device has only one entity, throw away + // the endpoint name and just use the device name + if (isExternal && MIDIDeviceGetNumberOfEntities (device) < 2) + { + result = info; + } + else if (! result.name.startsWithIgnoreCase (info.name)) + { + // prepend the device name and identifier to the entity's + result.name = (info.name + " " + result.name).trimEnd(); + result.identifier = info.identifier + " " + result.identifier; + } + } + } + + return result; + } + + static MidiDeviceInfo getConnectedEndpointInfo (MIDIEndpointRef endpoint) + { + MidiDeviceInfo result; + + // Does the endpoint have connections? + CFDataRef connections = nullptr; + int numConnections = 0; + + MIDIObjectGetDataProperty (endpoint, kMIDIPropertyConnectionUniqueID, &connections); + + if (connections != nullptr) + { + numConnections = ((int) CFDataGetLength (connections)) / (int) sizeof (MIDIUniqueID); + + if (numConnections > 0) + { + auto* pid = reinterpret_cast (CFDataGetBytePtr (connections)); + + for (int i = 0; i < numConnections; ++i, ++pid) + { + auto id = (MIDIUniqueID) ByteOrder::swapIfLittleEndian ((uint32) *pid); + MIDIObjectRef connObject; + MIDIObjectType connObjectType; + auto err = MIDIObjectFindByUniqueID (id, &connObject, &connObjectType); + + if (err == noErr) + { + MidiDeviceInfo deviceInfo; + + if (connObjectType == kMIDIObjectType_ExternalSource + || connObjectType == kMIDIObjectType_ExternalDestination) + { + // Connected to an external device's endpoint (10.3 and later). + deviceInfo = getEndpointInfo (static_cast (connObject), true); + } + else + { + // Connected to an external device (10.2) (or something else, catch-all) + deviceInfo = getMidiObjectInfo (connObject); + } + + if (deviceInfo != MidiDeviceInfo()) + { + if (result.name.isNotEmpty()) result.name += ", "; + if (result.identifier.isNotEmpty()) result.identifier += ", "; + + result.name += deviceInfo.name; + result.identifier += deviceInfo.identifier; + } + } + } + } + + CFRelease (connections); + } + + // Here, either the endpoint had no connections, or we failed to obtain names for them. + if (result == MidiDeviceInfo()) + return getEndpointInfo (endpoint, false); + + return result; + } + + static int createUniqueIDForMidiPort (String deviceName, bool isInput) + { + String uniqueID; + + #ifdef JucePlugin_CFBundleIdentifier + uniqueID = JUCE_STRINGIFY (JucePlugin_CFBundleIdentifier); + #else + auto appBundle = File::getSpecialLocation (File::currentApplicationFile); + ScopedCFString appBundlePath (appBundle.getFullPathName()); + + if (auto bundleURL = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, + appBundlePath.cfString, + kCFURLPOSIXPathStyle, + true)) + { + auto bundleRef = CFBundleCreate (kCFAllocatorDefault, bundleURL); + CFRelease (bundleURL); + + if (bundleRef != nullptr) + { + if (auto bundleId = CFBundleGetIdentifier (bundleRef)) + uniqueID = String::fromCFString (bundleId); + + CFRelease (bundleRef); + } + } + #endif + + if (uniqueID.isEmpty()) + uniqueID = String (Random::getSystemRandom().nextInt (1024)); + + uniqueID += "." + deviceName + (isInput ? ".input" : ".output"); + return uniqueID.hashCode(); + } + + static void enableSimulatorMidiSession() + { + #if TARGET_OS_SIMULATOR + static bool hasEnabledNetworkSession = false; + + if (! hasEnabledNetworkSession) + { + MIDINetworkSession* session = [MIDINetworkSession defaultSession]; + session.enabled = YES; + session.connectionPolicy = MIDINetworkConnectionPolicy_Anyone; + + hasEnabledNetworkSession = true; + } + #endif + } + + static void globalSystemChangeCallback (const MIDINotification*, void*) + { + // TODO.. Should pass-on this notification.. + } + + static String getGlobalMidiClientName() + { + if (auto* app = JUCEApplicationBase::getInstance()) + return app->getApplicationName(); + + return "JUCE"; + } + + static MIDIClientRef getGlobalMidiClient() + { + static MIDIClientRef globalMidiClient = 0; + + if (globalMidiClient == 0) + { + // Since OSX 10.6, the MIDIClientCreate function will only work + // correctly when called from the message thread! + JUCE_ASSERT_MESSAGE_THREAD + + enableSimulatorMidiSession(); + + ScopedCFString name (getGlobalMidiClientName()); + CHECK_ERROR (MIDIClientCreate (name.cfString, &globalSystemChangeCallback, nullptr, &globalMidiClient)); + } + + return globalMidiClient; + } + + static Array findDevices (bool forInput) + { + // It seems that OSX can be a bit picky about the thread that's first used to + // search for devices. It's safest to use the message thread for calling this. + JUCE_ASSERT_MESSAGE_THREAD + + if (getGlobalMidiClient() == 0) + { + jassertfalse; + return {}; + } + + enableSimulatorMidiSession(); + + Array devices; + auto numDevices = (forInput ? MIDIGetNumberOfSources() : MIDIGetNumberOfDestinations()); + + for (ItemCount i = 0; i < numDevices; ++i) + { + MidiDeviceInfo deviceInfo; + + if (auto dest = forInput ? MIDIGetSource (i) : MIDIGetDestination (i)) + deviceInfo = getConnectedEndpointInfo (dest); + + if (deviceInfo == MidiDeviceInfo()) + deviceInfo.name = deviceInfo.identifier = ""; + + devices.add (deviceInfo); + } + + return devices; + } + + //============================================================================== + template + struct Receiver; + + #if JUCE_HAS_NEW_COREMIDI_API + template <> + struct Receiver + { + Receiver (ump::PacketProtocol protocol, ump::Receiver& receiver) + : u32InputHandler (std::make_unique (protocol, receiver)) + {} + + Receiver (MidiInput& input, MidiInputCallback& callback) + : u32InputHandler (std::make_unique (input, callback)) + {} + + void dispatch (const MIDIEventList& list, double time) const + { + auto* packet = &list.packet[0]; + + for (uint32_t i = 0; i < list.numPackets; ++i) + { + static_assert (sizeof (uint32_t) == sizeof (UInt32) + && alignof (uint32_t) == alignof (UInt32), + "If this fails, the cast below will be broken too!"); + u32InputHandler->pushMidiData (reinterpret_cast (packet->words), + reinterpret_cast (packet->words + packet->wordCount), + time); + + packet = MIDIEventPacketNext (packet); + } + } + + private: + std::unique_ptr u32InputHandler; + }; + #endif + + #if JUCE_HAS_OLD_COREMIDI_API + template <> + struct Receiver + { + Receiver (ump::PacketProtocol protocol, ump::Receiver& receiver) + : bytestreamInputHandler (std::make_unique (protocol, receiver)) + {} + + Receiver (MidiInput& input, MidiInputCallback& callback) + : bytestreamInputHandler (std::make_unique (input, callback)) + {} + + void dispatch (const MIDIPacketList& list, double time) const + { + auto* packet = &list.packet[0]; + + for (unsigned int i = 0; i < list.numPackets; ++i) + { + auto len = readUnalignedlength)> (&(packet->length)); + bytestreamInputHandler->pushMidiData (packet->data, len, time); + + packet = MIDIPacketNext (packet); + } + } + + private: + std::unique_ptr bytestreamInputHandler; + }; + #endif + + #if JUCE_HAS_NEW_COREMIDI_API && JUCE_HAS_OLD_COREMIDI_API + template <> + struct Receiver + { + Receiver (ump::PacketProtocol protocol, ump::Receiver& receiver) + : newReceiver (protocol, receiver), oldReceiver (protocol, receiver) + {} + + Receiver (MidiInput& input, MidiInputCallback& callback) + : newReceiver (input, callback), oldReceiver (input, callback) + {} + + void dispatch (const MIDIEventList& list, double time) const + { + newReceiver.dispatch (list, time); + } + + void dispatch (const MIDIPacketList& list, double time) const + { + oldReceiver.dispatch (list, time); + } + + private: + Receiver newReceiver; + Receiver oldReceiver; + }; + #endif + + using ReceiverToUse = Receiver; + + class MidiPortAndCallback; + CriticalSection callbackLock; + Array activeCallbacks; + + class MidiPortAndCallback + { + public: + MidiPortAndCallback (MidiInput& inputIn, ReceiverToUse receiverIn) + : input (&inputIn), receiver (std::move (receiverIn)) + {} + + ~MidiPortAndCallback() + { + active = false; + + { + const ScopedLock sl (callbackLock); + activeCallbacks.removeFirstMatchingValue (this); + } + + if (portAndEndpoint != nullptr && portAndEndpoint->canStop()) + portAndEndpoint->stop(); + } + + template + void handlePackets (const EventList& list) + { + const auto time = Time::getMillisecondCounterHiRes() * 0.001; + + const ScopedLock sl (callbackLock); + + if (activeCallbacks.contains (this) && active) + receiver.dispatch (list, time); + } + + MidiInput* input = nullptr; + std::atomic active { false }; + + ReceiverToUse receiver; + + std::unique_ptr portAndEndpoint; + + private: + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiPortAndCallback) + }; + + //============================================================================== + static Array getEndpoints (bool isInput) + { + Array endpoints; + auto numDevices = (isInput ? MIDIGetNumberOfSources() : MIDIGetNumberOfDestinations()); + + for (ItemCount i = 0; i < numDevices; ++i) + endpoints.add (isInput ? MIDIGetSource (i) : MIDIGetDestination (i)); + + return endpoints; + } + + struct CreatorFunctionPointers + { + OSStatus (*createInputPort) (ump::PacketProtocol protocol, + MIDIClientRef client, + CFStringRef portName, + void* refCon, + MIDIPortRef* outPort); + + OSStatus (*createDestination) (ump::PacketProtocol protocol, + MIDIClientRef client, + CFStringRef name, + void* refCon, + MIDIEndpointRef* outDest); + + OSStatus (*createSource) (ump::PacketProtocol protocol, + MIDIClientRef client, + CFStringRef name, + MIDIEndpointRef* outSrc); + }; + + template + struct CreatorFunctions; + + #if JUCE_HAS_NEW_COREMIDI_API + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wunguarded-availability-new") + + template <> + struct CreatorFunctions + { + static OSStatus createInputPort (ump::PacketProtocol protocol, + MIDIClientRef client, + CFStringRef portName, + void* refCon, + MIDIPortRef* outPort) + { + return MIDIInputPortCreateWithProtocol (client, + portName, + convertToPacketProtocol (protocol), + outPort, + ^void (const MIDIEventList* l, void* src) + { + newMidiInputProc (l, refCon, src); + }); + } + + static OSStatus createDestination (ump::PacketProtocol protocol, + MIDIClientRef client, + CFStringRef name, + void* refCon, + MIDIEndpointRef* outDest) + { + return MIDIDestinationCreateWithProtocol (client, + name, + convertToPacketProtocol (protocol), + outDest, + ^void (const MIDIEventList* l, void* src) + { + newMidiInputProc (l, refCon, src); + }); + } + + static OSStatus createSource (ump::PacketProtocol protocol, + MIDIClientRef client, + CFStringRef name, + MIDIEndpointRef* outSrc) + { + return MIDISourceCreateWithProtocol (client, + name, + convertToPacketProtocol (protocol), + outSrc); + } + + static constexpr CreatorFunctionPointers getCreatorFunctionPointers() + { + return { createInputPort, createDestination, createSource }; + } + + private: + static constexpr MIDIProtocolID convertToPacketProtocol (ump::PacketProtocol p) + { + return p == ump::PacketProtocol::MIDI_2_0 ? kMIDIProtocol_2_0 + : kMIDIProtocol_1_0; + } + + static void newMidiInputProc (const MIDIEventList* list, void* readProcRefCon, void*) + { + static_cast (readProcRefCon)->handlePackets (*list); + } + }; + + JUCE_END_IGNORE_WARNINGS_GCC_LIKE + #endif + + #if JUCE_HAS_OLD_COREMIDI_API + template <> + struct CreatorFunctions + { + static OSStatus createInputPort (ump::PacketProtocol, + MIDIClientRef client, + CFStringRef portName, + void* refCon, + MIDIPortRef* outPort) + { + return MIDIInputPortCreate (client, portName, oldMidiInputProc, refCon, outPort); + } + + static OSStatus createDestination (ump::PacketProtocol, + MIDIClientRef client, + CFStringRef name, + void* refCon, + MIDIEndpointRef* outDest) + { + return MIDIDestinationCreate (client, name, oldMidiInputProc, refCon, outDest); + } + + static OSStatus createSource (ump::PacketProtocol, + MIDIClientRef client, + CFStringRef name, + MIDIEndpointRef* outSrc) + { + return MIDISourceCreate (client, name, outSrc); + } + + static constexpr CreatorFunctionPointers getCreatorFunctionPointers() + { + return { createInputPort, createDestination, createSource }; + } + + private: + static void oldMidiInputProc (const MIDIPacketList* list, void* readProcRefCon, void*) + { + static_cast (readProcRefCon)->handlePackets (*list); + } + }; + #endif + + #if JUCE_HAS_NEW_COREMIDI_API && JUCE_HAS_OLD_COREMIDI_API + template <> + struct CreatorFunctions + { + static OSStatus createInputPort (ump::PacketProtocol protocol, + MIDIClientRef client, + CFStringRef portName, + void* refCon, + MIDIPortRef* outPort) + { + return getCreatorFunctionPointers().createInputPort (protocol, client, portName, refCon, outPort); + } + + static OSStatus createDestination (ump::PacketProtocol protocol, + MIDIClientRef client, + CFStringRef name, + void* refCon, + MIDIEndpointRef* outDest) + { + return getCreatorFunctionPointers().createDestination (protocol, client, name, refCon, outDest); + } + + static OSStatus createSource (ump::PacketProtocol protocol, + MIDIClientRef client, + CFStringRef name, + MIDIEndpointRef* outSrc) + { + return getCreatorFunctionPointers().createSource (protocol, client, name, outSrc); + } + + private: + static CreatorFunctionPointers getCreatorFunctionPointers() + { + if (@available (macOS 11, iOS 14, *)) + return CreatorFunctions::getCreatorFunctionPointers(); + + return CreatorFunctions::getCreatorFunctionPointers(); + } + }; + #endif + + using CreatorFunctionsToUse = CreatorFunctions; +} + +//============================================================================== +class MidiInput::Pimpl : public CoreMidiHelpers::MidiPortAndCallback +{ +public: + using MidiPortAndCallback::MidiPortAndCallback; + + static std::unique_ptr makePimpl (MidiInput& midiInput, + ump::PacketProtocol packetProtocol, + ump::Receiver& umpReceiver) + { + return std::make_unique (midiInput, CoreMidiHelpers::ReceiverToUse (packetProtocol, umpReceiver)); + } + + static std::unique_ptr makePimpl (MidiInput& midiInput, + MidiInputCallback* midiInputCallback) + { + if (midiInputCallback == nullptr) + return {}; + + return std::make_unique (midiInput, CoreMidiHelpers::ReceiverToUse (midiInput, *midiInputCallback)); + } + + template + static std::unique_ptr makeInput (const String& name, + const String& identifier, + Args&&... args) + { + using namespace CoreMidiHelpers; + + if (auto midiInput = rawToUniquePtr (new MidiInput (name, identifier))) + { + if ((midiInput->internal = makePimpl (*midiInput, std::forward (args)...))) + { + const ScopedLock sl (callbackLock); + activeCallbacks.add (midiInput->internal.get()); + + return midiInput; + } + } + + return {}; + } + + template + static std::unique_ptr openDevice (ump::PacketProtocol protocol, + const String& deviceIdentifier, + Args&&... args) + { + using namespace CoreMidiHelpers; + + if (deviceIdentifier.isEmpty()) + return {}; + + if (auto client = getGlobalMidiClient()) + { + for (auto& endpoint : getEndpoints (true)) + { + auto endpointInfo = getConnectedEndpointInfo (endpoint); + + if (deviceIdentifier != endpointInfo.identifier) + continue; + + ScopedCFString cfName; + + if (! CHECK_ERROR (MIDIObjectGetStringProperty (endpoint, kMIDIPropertyName, &cfName.cfString))) + continue; + + if (auto input = makeInput (endpointInfo.name, endpointInfo.identifier, std::forward (args)...)) + { + MIDIPortRef port; + + if (! CHECK_ERROR (CreatorFunctionsToUse::createInputPort (protocol, client, cfName.cfString, input->internal.get(), &port))) + continue; + + if (! CHECK_ERROR (MIDIPortConnectSource (port, endpoint, nullptr))) + { + CHECK_ERROR (MIDIPortDispose (port)); + continue; + } + + input->internal->portAndEndpoint = std::make_unique (port, endpoint); + return input; + } + } + } + + return {}; + } + + template + static std::unique_ptr createDevice (ump::PacketProtocol protocol, + const String& deviceName, + Args&&... args) + { + using namespace CoreMidiHelpers; + + if (auto client = getGlobalMidiClient()) + { + auto deviceIdentifier = createUniqueIDForMidiPort (deviceName, true); + + if (auto input = makeInput (deviceName, String (deviceIdentifier), std::forward (args)...)) + { + MIDIEndpointRef endpoint; + ScopedCFString name (deviceName); + + auto err = CreatorFunctionsToUse::createDestination (protocol, client, name.cfString, input->internal.get(), &endpoint); + + #if JUCE_IOS + if (err == kMIDINotPermitted) + { + // If you've hit this assertion then you probably haven't enabled the "Audio Background Capability" + // setting in the iOS exporter for your app - this is required if you want to create a MIDI device! + jassertfalse; + return {}; + } + #endif + + if (! CHECK_ERROR (err)) + return {}; + + if (! CHECK_ERROR (MIDIObjectSetIntegerProperty (endpoint, kMIDIPropertyUniqueID, (SInt32) deviceIdentifier))) + return {}; + + input->internal->portAndEndpoint = std::make_unique ((MIDIPortRef) 0, endpoint); + return input; + } + } + + return {}; + } +}; + +//============================================================================== +Array MidiInput::getAvailableDevices() +{ + return CoreMidiHelpers::findDevices (true); +} + +MidiDeviceInfo MidiInput::getDefaultDevice() +{ + return getAvailableDevices().getFirst(); +} + +std::unique_ptr MidiInput::openDevice (const String& deviceIdentifier, MidiInputCallback* callback) +{ + if (callback == nullptr) + return nullptr; + + return Pimpl::openDevice (ump::PacketProtocol::MIDI_1_0, + deviceIdentifier, + callback); +} + +std::unique_ptr MidiInput::createNewDevice (const String& deviceName, MidiInputCallback* callback) +{ + return Pimpl::createDevice (ump::PacketProtocol::MIDI_1_0, + deviceName, + callback); +} + +StringArray MidiInput::getDevices() +{ + StringArray deviceNames; + + for (auto& d : getAvailableDevices()) + deviceNames.add (d.name); + + return deviceNames; +} + +int MidiInput::getDefaultDeviceIndex() +{ + return 0; +} + +std::unique_ptr MidiInput::openDevice (int index, MidiInputCallback* callback) +{ + return openDevice (getAvailableDevices()[index].identifier, callback); +} + +MidiInput::MidiInput (const String& deviceName, const String& deviceIdentifier) + : deviceInfo (deviceName, deviceIdentifier) +{ +} + +MidiInput::~MidiInput() = default; + +void MidiInput::start() +{ + const ScopedLock sl (CoreMidiHelpers::callbackLock); + internal->active = true; +} + +void MidiInput::stop() +{ + const ScopedLock sl (CoreMidiHelpers::callbackLock); + internal->active = false; +} + +//============================================================================== +class MidiOutput::Pimpl : public CoreMidiHelpers::MidiPortAndEndpoint +{ +public: + using MidiPortAndEndpoint::MidiPortAndEndpoint; +}; + +Array MidiOutput::getAvailableDevices() +{ + return CoreMidiHelpers::findDevices (false); +} + +MidiDeviceInfo MidiOutput::getDefaultDevice() +{ + return getAvailableDevices().getFirst(); +} + +std::unique_ptr MidiOutput::openDevice (const String& deviceIdentifier) +{ + if (deviceIdentifier.isEmpty()) + return {}; + + using namespace CoreMidiHelpers; + + if (auto client = getGlobalMidiClient()) + { + for (auto& endpoint : getEndpoints (false)) + { + auto endpointInfo = getConnectedEndpointInfo (endpoint); + + if (deviceIdentifier != endpointInfo.identifier) + continue; + + ScopedCFString cfName; + + if (! CHECK_ERROR (MIDIObjectGetStringProperty (endpoint, kMIDIPropertyName, &cfName.cfString))) + continue; + + MIDIPortRef port; + + if (! CHECK_ERROR (MIDIOutputPortCreate (client, cfName.cfString, &port))) + continue; + + auto midiOutput = rawToUniquePtr (new MidiOutput (endpointInfo.name, endpointInfo.identifier)); + midiOutput->internal = std::make_unique (port, endpoint); + + return midiOutput; + } + } + + return {}; +} + +std::unique_ptr MidiOutput::createNewDevice (const String& deviceName) +{ + using namespace CoreMidiHelpers; + + if (auto client = getGlobalMidiClient()) + { + MIDIEndpointRef endpoint; + + ScopedCFString name (deviceName); + + auto err = CreatorFunctionsToUse::createSource (ump::PacketProtocol::MIDI_1_0, client, name.cfString, &endpoint); + + #if JUCE_IOS + if (err == kMIDINotPermitted) + { + // If you've hit this assertion then you probably haven't enabled the "Audio Background Capability" + // setting in the iOS exporter for your app - this is required if you want to create a MIDI device! + jassertfalse; + return {}; + } + #endif + + if (! CHECK_ERROR (err)) + return {}; + + auto deviceIdentifier = createUniqueIDForMidiPort (deviceName, false); + + if (! CHECK_ERROR (MIDIObjectSetIntegerProperty (endpoint, kMIDIPropertyUniqueID, (SInt32) deviceIdentifier))) + return {}; + + auto midiOutput = rawToUniquePtr (new MidiOutput (deviceName, String (deviceIdentifier))); + midiOutput->internal = std::make_unique ((UInt32) 0, endpoint); + + return midiOutput; + } + + return {}; +} + +StringArray MidiOutput::getDevices() +{ + StringArray deviceNames; + + for (auto& d : getAvailableDevices()) + deviceNames.add (d.name); + + return deviceNames; +} + +int MidiOutput::getDefaultDeviceIndex() +{ + return 0; +} + +std::unique_ptr MidiOutput::openDevice (int index) +{ + return openDevice (getAvailableDevices()[index].identifier); +} + +MidiOutput::~MidiOutput() +{ + stopBackgroundThread(); +} + +void MidiOutput::sendMessageNow (const MidiMessage& message) +{ + internal->send (message); +} + +#undef CHECK_ERROR + +} // namespace juce diff --git a/modules/juce_audio_devices/native/oboe/CMakeLists.txt b/modules/juce_audio_devices/native/oboe/CMakeLists.txt index f05dd460..4763da23 100644 --- a/modules/juce_audio_devices/native/oboe/CMakeLists.txt +++ b/modules/juce_audio_devices/native/oboe/CMakeLists.txt @@ -26,10 +26,12 @@ set (oboe_sources src/fifo/FifoController.cpp src/fifo/FifoControllerBase.cpp src/fifo/FifoControllerIndirect.cpp - src/flowgraph/FlowGraphNode.cpp + src/flowgraph/FlowGraphNode.cpp + src/flowgraph/ChannelCountConverter.cpp src/flowgraph/ClipToRange.cpp src/flowgraph/ManyToMultiConverter.cpp src/flowgraph/MonoToMultiConverter.cpp + src/flowgraph/MultiToMonoConverter.cpp src/flowgraph/RampLinear.cpp src/flowgraph/SampleRateConverter.cpp src/flowgraph/SinkFloat.cpp @@ -77,7 +79,7 @@ set_target_properties(oboe PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED TRUE # JUCE CHANGE ENDS HERE -# Enable logging for debug builds +# Enable logging of D,V for debug builds target_compile_definitions(oboe PUBLIC $<$:OBOE_ENABLE_LOGGING=1>) target_link_libraries(oboe PRIVATE log OpenSLES) diff --git a/modules/juce_audio_devices/native/oboe/include/oboe/AudioStream.h b/modules/juce_audio_devices/native/oboe/include/oboe/AudioStream.h index a158aafc..c862de6d 100644 --- a/modules/juce_audio_devices/native/oboe/include/oboe/AudioStream.h +++ b/modules/juce_audio_devices/native/oboe/include/oboe/AudioStream.h @@ -393,12 +393,25 @@ public: * Swap old callback for new callback. * This not atomic. * This should only be used internally. - * @param streamCallback - * @return previous streamCallback + * @param dataCallback + * @return previous dataCallback */ - AudioStreamCallback *swapCallback(AudioStreamCallback *streamCallback) { - AudioStreamCallback *previousCallback = mStreamCallback; - mStreamCallback = streamCallback; + AudioStreamDataCallback *swapDataCallback(AudioStreamDataCallback *dataCallback) { + AudioStreamDataCallback *previousCallback = mDataCallback; + mDataCallback = dataCallback; + return previousCallback; + } + + /* + * Swap old callback for new callback. + * This not atomic. + * This should only be used internally. + * @param errorCallback + * @return previous errorCallback + */ + AudioStreamErrorCallback *swapErrorCallback(AudioStreamErrorCallback *errorCallback) { + AudioStreamErrorCallback *previousCallback = mErrorCallback; + mErrorCallback = errorCallback; return previousCallback; } @@ -419,6 +432,13 @@ public: ResultWithValue waitForAvailableFrames(int32_t numFrames, int64_t timeoutNanoseconds); + /** + * @return last result passed from an error callback + */ + virtual oboe::Result getLastErrorCallbackResult() const { + return mErrorCallbackResult; + } + protected: /** @@ -515,8 +535,10 @@ protected: std::mutex mLock; // for synchronizing start/stop/close + oboe::Result mErrorCallbackResult = oboe::Result::OK; private: + // Log the scheduler if it changes. void checkScheduler(); int mPreviousScheduler = -1; diff --git a/modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamBase.h b/modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamBase.h index 4a6237df..e0b38aa6 100644 --- a/modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamBase.h +++ b/modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamBase.h @@ -62,9 +62,14 @@ public: int32_t getSampleRate() const { return mSampleRate; } /** - * @return the number of frames in each callback or kUnspecified. + * @deprecated use `getFramesPerDataCallback` instead. */ - int32_t getFramesPerCallback() const { return mFramesPerCallback; } + int32_t getFramesPerCallback() const { return getFramesPerDataCallback(); } + + /** + * @return the number of frames in each data callback or kUnspecified. + */ + int32_t getFramesPerDataCallback() const { return mFramesPerCallback; } /** * @return the audio sample format (e.g. Float or I16) @@ -100,10 +105,35 @@ public: int32_t getDeviceId() const { return mDeviceId; } /** - * @return the callback object for this stream, if set. + * For internal use only. + * @return the data callback object for this stream, if set. + */ + AudioStreamDataCallback *getDataCallback() const { + return mDataCallback; + } + + /** + * For internal use only. + * @return the error callback object for this stream, if set. + */ + AudioStreamErrorCallback *getErrorCallback() const { + return mErrorCallback; + } + + /** + * @return true if a data callback was set for this stream */ - AudioStreamCallback* getCallback() const { - return mStreamCallback; + bool isDataCallbackSpecified() const { + return mDataCallback != nullptr; + } + + /** + * Note that if the app does not set an error callback then a + * default one may be provided. + * @return true if an error callback was set for this stream + */ + bool isErrorCallbackSpecified() const { + return mErrorCallback != nullptr; } /** @@ -148,9 +178,12 @@ public: } protected: + /** The callback which will be fired when new data is ready to be read/written. **/ + AudioStreamDataCallback *mDataCallback = nullptr; + + /** The callback which will be fired when an error or a disconnect occurs. **/ + AudioStreamErrorCallback *mErrorCallback = nullptr; - /** The callback which will be fired when new data is ready to be read/written **/ - AudioStreamCallback *mStreamCallback = nullptr; /** Number of audio frames which will be requested in each callback */ int32_t mFramesPerCallback = kUnspecified; /** Stream channel count */ @@ -195,6 +228,32 @@ protected: bool mFormatConversionAllowed = false; // Control whether and how Oboe can convert sample rates to achieve optimal results. SampleRateConversionQuality mSampleRateConversionQuality = SampleRateConversionQuality::None; + + /** Validate stream parameters that might not be checked in lower layers */ + virtual Result isValidConfig() { + switch (mFormat) { + case AudioFormat::Unspecified: + case AudioFormat::I16: + case AudioFormat::Float: + break; + + case AudioFormat::Invalid: + default: + return Result::ErrorInvalidFormat; + } + + switch (mSampleRateConversionQuality) { + case SampleRateConversionQuality::None: + case SampleRateConversionQuality::Fastest: + case SampleRateConversionQuality::Low: + case SampleRateConversionQuality::Medium: + case SampleRateConversionQuality::High: + case SampleRateConversionQuality::Best: + return Result::OK; + default: + return Result::ErrorIllegalArgument; + } + } }; } // namespace oboe diff --git a/modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamBuilder.h b/modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamBuilder.h index a1ea0a85..de9c6069 100644 --- a/modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamBuilder.h +++ b/modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamBuilder.h @@ -74,6 +74,13 @@ public: return this; } + /** + * @deprecated use `setFramesPerDataCallback` instead. + */ + AudioStreamBuilder *setFramesPerCallback(int framesPerCallback) { + return setFramesPerDataCallback(framesPerCallback); + } + /** * Request a specific number of frames for the data callback. * @@ -88,7 +95,7 @@ public: * @param framesPerCallback * @return pointer to the builder so calls can be chained */ - AudioStreamBuilder *setFramesPerCallback(int framesPerCallback) { + AudioStreamBuilder *setFramesPerDataCallback(int framesPerCallback) { mFramesPerCallback = framesPerCallback; return this; } @@ -198,10 +205,11 @@ public: /** - * Set the intended use case for the stream. + * Set the intended use case for an output stream. * * The system will use this information to optimize the behavior of the stream. * This could, for example, affect how volume and focus is handled for the stream. + * The usage is ignored for input streams. * * The default, if you do not call this function, is Usage::Media. * @@ -215,10 +223,11 @@ public: } /** - * Set the type of audio data that the stream will carry. + * Set the type of audio data that an output stream will carry. * * The system will use this information to optimize the behavior of the stream. * This could, for example, affect whether a stream is paused when a notification occurs. + * The contentType is ignored for input streams. * * The default, if you do not call this function, is ContentType::Music. * @@ -303,9 +312,45 @@ public: return this; } + /** + * Specifies an object to handle data related callbacks from the underlying API. + * + * Important: See AudioStreamCallback for restrictions on what may be called + * from the callback methods. + * + * @param dataCallback + * @return pointer to the builder so calls can be chained + */ + AudioStreamBuilder *setDataCallback(oboe::AudioStreamDataCallback *dataCallback) { + mDataCallback = dataCallback; + return this; + } + + /** + * Specifies an object to handle error related callbacks from the underlying API. + * This can occur when a stream is disconnected because a headset is plugged in or unplugged. + * It can also occur if the audio service fails or if an exclusive stream is stolen by + * another stream. + * + * Important: See AudioStreamCallback for restrictions on what may be called + * from the callback methods. + * + * When an error callback occurs, the associated stream must be stopped and closed + * in a separate thread. + * + * @param errorCallback + * @return pointer to the builder so calls can be chained + */ + AudioStreamBuilder *setErrorCallback(oboe::AudioStreamErrorCallback *errorCallback) { + mErrorCallback = errorCallback; + return this; + } + /** * Specifies an object to handle data or error related callbacks from the underlying API. * + * This is the equivalent of calling both setDataCallback() and setErrorCallback(). + * * Important: See AudioStreamCallback for restrictions on what may be called * from the callback methods. * @@ -325,7 +370,9 @@ public: * @return pointer to the builder so calls can be chained */ AudioStreamBuilder *setCallback(AudioStreamCallback *streamCallback) { - mStreamCallback = streamCallback; + // Use the same callback object for both, dual inheritance. + mDataCallback = streamCallback; + mErrorCallback = streamCallback; return this; } diff --git a/modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamCallback.h b/modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamCallback.h index f427693e..915c3d71 100644 --- a/modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamCallback.h +++ b/modules/juce_audio_devices/native/oboe/include/oboe/AudioStreamCallback.h @@ -24,15 +24,16 @@ namespace oboe { class AudioStream; /** - * AudioStreamCallback defines a callback interface for: - * - * 1) moving data to/from an audio stream using `onAudioReady` + * AudioStreamDataCallback defines a callback interface for + * moving data to/from an audio stream using `onAudioReady` * 2) being alerted when a stream has an error using `onError*` methods * + * It is used with AudioStreamBuilder::setDataCallback(). */ -class AudioStreamCallback { + +class AudioStreamDataCallback { public: - virtual ~AudioStreamCallback() = default; + virtual ~AudioStreamDataCallback() = default; /** * A buffer is ready for processing. @@ -75,21 +76,64 @@ public: * If you need to move data, eg. MIDI commands, in or out of the callback function then * we recommend the use of non-blocking techniques such as an atomic FIFO. * - * @param oboeStream pointer to the associated stream + * @param audioStream pointer to the associated stream * @param audioData buffer containing input data or a place to put output data * @param numFrames number of frames to be processed * @return DataCallbackResult::Continue or DataCallbackResult::Stop */ virtual DataCallbackResult onAudioReady( - AudioStream *oboeStream, + AudioStream *audioStream, void *audioData, int32_t numFrames) = 0; +}; + +/** + * AudioStreamErrorCallback defines a callback interface for + * being alerted when a stream has an error or is disconnected + * using `onError*` methods. + * + * It is used with AudioStreamBuilder::setErrorCallback(). + */ +class AudioStreamErrorCallback { +public: + virtual ~AudioStreamErrorCallback() = default; + + /** + * This will be called before other `onError` methods when an error occurs on a stream, + * such as when the stream is disconnected. + * + * It can be used to override and customize the normal error processing. + * Use of this method is considered an advanced technique. + * It might, for example, be used if an app want to use a high level lock when + * closing and reopening a stream. + * Or it might be used when an app want to signal a management thread that handles + * all of the stream state. + * + * If this method returns false it indicates that the stream has *not been stopped and closed + * by the application. In this case it will be stopped by Oboe in the following way: + * onErrorBeforeClose() will be called, then the stream will be closed and onErrorAfterClose() + * will be closed. + * + * If this method returns true it indicates that the stream *has* been stopped and closed + * by the application and Oboe will not do this. + * In that case, the app MUST stop() and close() the stream. + * + * This method will be called on a thread created by Oboe. + * + * @param audioStream pointer to the associated stream + * @param error + * @return true if the stream has been stopped and closed, false if not + */ + virtual bool onError(AudioStream* /* audioStream */, Result /* error */) { + return false; + } /** - * This will be called when an error occurs on a stream or when the stream is disconnected. + * This will be called when an error occurs on a stream, + * such as when the stream is disconnected, + * and if onError() returns false (indicating that the error has not already been handled). * - * Note that this will be called on a different thread than the onAudioReady() thread. - * This thread will be created by Oboe. + * Note that this will be called on a thread created by Oboe. * * The underlying stream will already be stopped by Oboe but not yet closed. * So the stream can be queried. @@ -97,27 +141,49 @@ public: * Do not close or delete the stream in this method because it will be * closed after this method returns. * - * @param oboeStream pointer to the associated stream + * @param audioStream pointer to the associated stream * @param error */ - virtual void onErrorBeforeClose(AudioStream* /* oboeStream */, Result /* error */) {} + virtual void onErrorBeforeClose(AudioStream* /* audioStream */, Result /* error */) {} /** - * This will be called when an error occurs on a stream or when the stream is disconnected. + * This will be called when an error occurs on a stream, + * such as when the stream is disconnected, + * and if onError() returns false (indicating that the error has not already been handled). + * * The underlying AAudio or OpenSL ES stream will already be stopped AND closed by Oboe. * So the underlying stream cannot be referenced. * But you can still query most parameters. * * This callback could be used to reopen a new stream on another device. - * You can safely delete the old AudioStream in this method. * - * @param oboeStream pointer to the associated stream + * @param audioStream pointer to the associated stream * @param error */ - virtual void onErrorAfterClose(AudioStream* /* oboeStream */, Result /* error */) {} + virtual void onErrorAfterClose(AudioStream* /* audioStream */, Result /* error */) {} }; +/** + * AudioStreamCallback defines a callback interface for: + * + * 1) moving data to/from an audio stream using `onAudioReady` + * 2) being alerted when a stream has an error using `onError*` methods + * + * It is used with AudioStreamBuilder::setCallback(). + * + * It combines the interfaces defined by AudioStreamDataCallback and AudioStreamErrorCallback. + * This was the original callback object. We now recommend using the individual interfaces + * and using setDataCallback() and setErrorCallback(). + * + * @deprecated Use `AudioStreamDataCallback` and `AudioStreamErrorCallback` instead + */ +class AudioStreamCallback : public AudioStreamDataCallback, + public AudioStreamErrorCallback { +public: + virtual ~AudioStreamCallback() = default; +}; + } // namespace oboe #endif //OBOE_STREAM_CALLBACK_H diff --git a/modules/juce_audio_devices/native/oboe/include/oboe/LatencyTuner.h b/modules/juce_audio_devices/native/oboe/include/oboe/LatencyTuner.h index df472f56..8b8404d9 100644 --- a/modules/juce_audio_devices/native/oboe/include/oboe/LatencyTuner.h +++ b/modules/juce_audio_devices/native/oboe/include/oboe/LatencyTuner.h @@ -54,7 +54,7 @@ public: * @param stream the stream who's latency will be tuned * @param the maximum buffer size which the tune() operation will set the buffer size to */ - explicit LatencyTuner(AudioStream &stream, int32_t maximumBufferSize); + explicit LatencyTuner(AudioStream &stream, int32_t maximumBufferSize); /** * Adjust the bufferSizeInFrames to optimize latency. @@ -81,8 +81,37 @@ public: * was specified when constructing the LatencyTuner then the value of * stream->getBufferCapacityInFrames is used */ - bool isAtMaximumBufferSize(); + bool isAtMaximumBufferSize(); + /** + * Set the minimum bufferSize in frames that is used when the tuner is reset. + * You may wish to call requestReset() after calling this. + * @param bufferSize + */ + void setMinimumBufferSize(int32_t bufferSize) { + mMinimumBufferSize = bufferSize; + } + + int32_t getMinimumBufferSize() const { + return mMinimumBufferSize; + } + + /** + * Set the amount the bufferSize will be incremented while tuning. + * By default, this will be one burst. + * + * Note that AAudio will quantize the buffer size to a multiple of the burstSize. + * So the final buffer sizes may not be a multiple of this increment. + * + * @param sizeIncrement + */ + void setBufferSizeIncrement(int32_t sizeIncrement) { + mBufferSizeIncrement = sizeIncrement; + } + + int32_t getBufferSizeIncrement() const { + return mBufferSizeIncrement; + } private: @@ -103,12 +132,15 @@ private: // arbitrary number of calls to wait before bumping up the latency static constexpr int32_t kIdleCount = 8; + static constexpr int32_t kDefaultNumBursts = 2; AudioStream &mStream; State mState = State::Idle; int32_t mMaxBufferSize = 0; int32_t mPreviousXRuns = 0; int32_t mIdleCountDown = 0; + int32_t mMinimumBufferSize; + int32_t mBufferSizeIncrement; std::atomic mLatencyTriggerRequests{0}; // TODO user atomic requester from AAudio std::atomic mLatencyTriggerResponses{0}; }; diff --git a/modules/juce_audio_devices/native/oboe/include/oboe/Version.h b/modules/juce_audio_devices/native/oboe/include/oboe/Version.h index bdc12e4a..fac42d4c 100644 --- a/modules/juce_audio_devices/native/oboe/include/oboe/Version.h +++ b/modules/juce_audio_devices/native/oboe/include/oboe/Version.h @@ -34,10 +34,10 @@ #define OBOE_VERSION_MAJOR 1 // Type: 8-bit unsigned int. Min value: 0 Max value: 255. See below for description. -#define OBOE_VERSION_MINOR 4 +#define OBOE_VERSION_MINOR 5 // Type: 16-bit unsigned int. Min value: 0 Max value: 65535. See below for description. -#define OBOE_VERSION_PATCH 2 +#define OBOE_VERSION_PATCH 0 #define OBOE_STRINGIFY(x) #x #define OBOE_TOSTRING(x) OBOE_STRINGIFY(x) diff --git a/modules/juce_audio_devices/native/oboe/src/aaudio/AudioStreamAAudio.cpp b/modules/juce_audio_devices/native/oboe/src/aaudio/AudioStreamAAudio.cpp index 52d85b9b..cb817623 100644 --- a/modules/juce_audio_devices/native/oboe/src/aaudio/AudioStreamAAudio.cpp +++ b/modules/juce_audio_devices/native/oboe/src/aaudio/AudioStreamAAudio.cpp @@ -62,14 +62,16 @@ static aaudio_data_callback_result_t oboe_aaudio_data_callback_proc( static void oboe_aaudio_error_thread_proc(AudioStreamAAudio *oboeStream, Result error) { LOGD("%s() - entering >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", __func__); - oboeStream->requestStop(); - if (oboeStream->getCallback() != nullptr) { - oboeStream->getCallback()->onErrorBeforeClose(oboeStream, error); - } - oboeStream->close(); - if (oboeStream->getCallback() != nullptr) { + AudioStreamErrorCallback *errorCallback = oboeStream->getErrorCallback(); + if (errorCallback == nullptr) return; // should be impossible + bool isErrorHandled = errorCallback->onError(oboeStream, error); + + if (!isErrorHandled) { + oboeStream->requestStop(); + errorCallback->onErrorBeforeClose(oboeStream, error); + oboeStream->close(); // Warning, oboeStream may get deleted by this callback. - oboeStream->getCallback()->onErrorAfterClose(oboeStream, error); + errorCallback->onErrorAfterClose(oboeStream, error); } LOGD("%s() - exiting <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", __func__); } @@ -92,7 +94,7 @@ AudioStreamAAudio::AudioStreamAAudio(const AudioStreamBuilder &builder) : AudioStream(builder) , mAAudioStream(nullptr) { mCallbackThreadEnabled.store(false); - isSupported(); + mLibLoader = AAudioLoader::getInstance(); } bool AudioStreamAAudio::isSupported() { @@ -101,16 +103,29 @@ bool AudioStreamAAudio::isSupported() { return openResult == 0; } -// Static 'C' wrapper for the error callback method. +// Static method for the error callback. +// We use a method so we can access protected methods on the stream. // Launch a thread to handle the error. // That other thread can safely stop, close and delete the stream. void AudioStreamAAudio::internalErrorCallback( AAudioStream *stream, void *userData, aaudio_result_t error) { + oboe::Result oboeResult = static_cast(error); AudioStreamAAudio *oboeStream = reinterpret_cast(userData); - // Prevents deletion of the stream if the app is using AudioStreamBuilder::openSharedStream() + // Coerce the error code if needed to workaround a regression in RQ1A that caused + // the wrong code to be passed when headsets plugged in. See b/173928197. + if (OboeGlobals::areWorkaroundsEnabled() + && getSdkVersion() == __ANDROID_API_R__ + && oboeResult == oboe::Result::ErrorTimeout) { + oboeResult = oboe::Result::ErrorDisconnected; + LOGD("%s() ErrorTimeout changed to ErrorDisconnected to fix b/173928197", __func__); + } + + oboeStream->mErrorCallbackResult = oboeResult; + + // Prevents deletion of the stream if the app is using AudioStreamBuilder::openStream(shared_ptr) std::shared_ptr sharedStream = oboeStream->lockWeakThis(); // These checks should be enough because we assume that the stream close() @@ -118,16 +133,14 @@ void AudioStreamAAudio::internalErrorCallback( if (oboeStream->wasErrorCallbackCalled()) { // block extra error callbacks LOGE("%s() multiple error callbacks called!", __func__); } else if (stream != oboeStream->getUnderlyingStream()) { - LOGW("%s() stream already closed", __func__); // can happen if there are bugs + LOGW("%s() stream already closed or closing", __func__); // might happen if there are bugs } else if (sharedStream) { // Handle error on a separate thread using shared pointer. - std::thread t(oboe_aaudio_error_thread_proc_shared, sharedStream, - static_cast(error)); + std::thread t(oboe_aaudio_error_thread_proc_shared, sharedStream, oboeResult); t.detach(); } else { // Handle error on a separate thread. - std::thread t(oboe_aaudio_error_thread_proc, oboeStream, - static_cast(error)); + std::thread t(oboe_aaudio_error_thread_proc, oboeStream, oboeResult); t.detach(); } } @@ -213,8 +226,13 @@ Result AudioStreamAAudio::open() { } if (mLibLoader->builder_setInputPreset != nullptr) { + aaudio_input_preset_t inputPreset = mInputPreset; + if (getSdkVersion() <= __ANDROID_API_P__ && inputPreset == InputPreset::VoicePerformance) { + LOGD("InputPreset::VoicePerformance not supported before Q. Using VoiceRecognition."); + inputPreset = InputPreset::VoiceRecognition; // most similar preset + } mLibLoader->builder_setInputPreset(aaudioBuilder, - static_cast(mInputPreset)); + static_cast(inputPreset)); } if (mLibLoader->builder_setSessionId != nullptr) { @@ -224,13 +242,19 @@ Result AudioStreamAAudio::open() { // TODO get more parameters from the builder? - if (mStreamCallback != nullptr) { + if (isDataCallbackSpecified()) { mLibLoader->builder_setDataCallback(aaudioBuilder, oboe_aaudio_data_callback_proc, this); - mLibLoader->builder_setFramesPerDataCallback(aaudioBuilder, getFramesPerCallback()); - // If the data callback is not being used then the write method will return an error - // and the app can stop and close the stream. + mLibLoader->builder_setFramesPerDataCallback(aaudioBuilder, getFramesPerDataCallback()); + + if (!isErrorCallbackSpecified()) { + // The app did not specify a callback so we should specify + // our own so the stream gets closed and stopped. + mErrorCallback = &mDefaultErrorCallback; + } mLibLoader->builder_setErrorCallback(aaudioBuilder, internalErrorCallback, this); } + // Else if the data callback is not being used then the write method will return an error + // and the app can stop and close the stream. // ============= OPEN THE STREAM ================ { @@ -239,6 +263,11 @@ Result AudioStreamAAudio::open() { mAAudioStream.store(stream); } if (result != Result::OK) { + // Warn developer because ErrorInternal is not very informative. + if (result == Result::ErrorInternal && mDirection == Direction::Input) { + LOGW("AudioStreamAAudio.open() may have failed due to lack of " + "audio recording permission."); + } goto error2; } @@ -253,7 +282,6 @@ Result AudioStreamAAudio::open() { mBufferCapacityInFrames = mLibLoader->stream_getBufferCapacity(mAAudioStream); mBufferSizeInFrames = mLibLoader->stream_getBufferSize(mAAudioStream); - // These were added in P so we have to check for the function pointer. if (mLibLoader->stream_getUsage != nullptr) { mUsage = static_cast(mLibLoader->stream_getUsage(mAAudioStream)); @@ -282,10 +310,9 @@ error2: } Result AudioStreamAAudio::close() { - // The main reason we have this mutex if to prevent a collision between a call - // by the application to stop a stream at the same time that an onError callback - // is being executed because of a disconnect. The close will delete the stream, - // which could otherwise cause the requestStop() to crash. + // Prevent two threads from closing the stream at the same time and crashing. + // This could occur, for example, if an application called close() at the same + // time that an onError callback was being executed because of a disconnect. std::lock_guard lock(mLock); AudioStream::close(); @@ -293,6 +320,17 @@ Result AudioStreamAAudio::close() { // This will delete the AAudio stream object so we need to null out the pointer. AAudioStream *stream = mAAudioStream.exchange(nullptr); if (stream != nullptr) { + if (OboeGlobals::areWorkaroundsEnabled()) { + // Make sure we are really stopped. Do it under mLock + // so another thread cannot call requestStart() right before the close. + requestStop_l(stream); + // Sometimes a callback can occur shortly after a stream has been stopped and + // even after a close! If the stream has been closed then the callback + // can access memory that has been freed. That causes a crash. + // This seems to be more likely in Android P or earlier. + // But it can also occur in later versions. + usleep(kDelayBeforeCloseMillis * 1000); + } return static_cast(mLibLoader->stream_close(stream)); } else { return Result::ErrorClosed; @@ -338,7 +376,7 @@ Result AudioStreamAAudio::requestStart() { return Result::OK; } } - if (mStreamCallback != nullptr) { // Was a callback requested? + if (isDataCallbackSpecified()) { setDataCallbackEnabled(true); } return static_cast(mLibLoader->stream_requestStart(stream)); @@ -385,19 +423,24 @@ Result AudioStreamAAudio::requestStop() { std::lock_guard lock(mLock); AAudioStream *stream = mAAudioStream.load(); if (stream != nullptr) { - // Avoid state machine errors in O_MR1. - if (getSdkVersion() <= __ANDROID_API_O_MR1__) { - StreamState state = static_cast(mLibLoader->stream_getState(stream)); - if (state == StreamState::Stopping || state == StreamState::Stopped) { - return Result::OK; - } - } - return static_cast(mLibLoader->stream_requestStop(stream)); + return requestStop_l(stream); } else { return Result::ErrorClosed; } } +// Call under mLock +Result AudioStreamAAudio::requestStop_l(AAudioStream *stream) { + // Avoid state machine errors in O_MR1. + if (getSdkVersion() <= __ANDROID_API_O_MR1__) { + StreamState state = static_cast(mLibLoader->stream_getState(stream)); + if (state == StreamState::Stopping || state == StreamState::Stopped) { + return Result::OK; + } + } + return static_cast(mLibLoader->stream_requestStop(stream)); +} + ResultWithValue AudioStreamAAudio::write(const void *buffer, int32_t numFrames, int64_t timeoutNanoseconds) { diff --git a/modules/juce_audio_devices/native/oboe/src/aaudio/AudioStreamAAudio.h b/modules/juce_audio_devices/native/oboe/src/aaudio/AudioStreamAAudio.h index 6267328b..83f4b2fe 100644 --- a/modules/juce_audio_devices/native/oboe/src/aaudio/AudioStreamAAudio.h +++ b/modules/juce_audio_devices/native/oboe/src/aaudio/AudioStreamAAudio.h @@ -109,13 +109,22 @@ protected: void logUnsupportedAttributes(); private: + // Must call under mLock. And stream must NOT be nullptr. + Result requestStop_l(AAudioStream *stream); + + // Time to sleep in order to prevent a race condition with a callback after a close(). + // Two milliseconds may be enough but 10 msec is even safer. + static constexpr int kDelayBeforeCloseMillis = 10; std::atomic mCallbackThreadEnabled; - // pointer to the underlying AAudio stream, valid if open, null if closed + // pointer to the underlying 'C' AAudio stream, valid if open, null if closed std::atomic mAAudioStream{nullptr}; static AAudioLoader *mLibLoader; + + // We may not use this but it is so small that it is not worth allocating dynamically. + AudioStreamErrorCallback mDefaultErrorCallback; }; } // namespace oboe diff --git a/modules/juce_audio_devices/native/oboe/src/common/AudioSourceCaller.cpp b/modules/juce_audio_devices/native/oboe/src/common/AudioSourceCaller.cpp index 0180c226..a19cf813 100644 --- a/modules/juce_audio_devices/native/oboe/src/common/AudioSourceCaller.cpp +++ b/modules/juce_audio_devices/native/oboe/src/common/AudioSourceCaller.cpp @@ -20,7 +20,7 @@ using namespace oboe; using namespace flowgraph; int32_t AudioSourceCaller::onProcessFixedBlock(uint8_t *buffer, int32_t numBytes) { - oboe::AudioStreamCallback *callback = mStream->getCallback(); + AudioStreamDataCallback *callback = mStream->getDataCallback(); int32_t result = 0; int32_t numFrames = numBytes / mStream->getBytesPerFrame(); if (callback != nullptr) { diff --git a/modules/juce_audio_devices/native/oboe/src/common/AudioStream.cpp b/modules/juce_audio_devices/native/oboe/src/common/AudioStream.cpp index 7bcd087c..8a9cd452 100644 --- a/modules/juce_audio_devices/native/oboe/src/common/AudioStream.cpp +++ b/modules/juce_audio_devices/native/oboe/src/common/AudioStream.cpp @@ -59,10 +59,10 @@ DataCallbackResult AudioStream::fireDataCallback(void *audioData, int32_t numFra } DataCallbackResult result; - if (mStreamCallback == nullptr) { - result = onDefaultCallback(audioData, numFrames); + if (mDataCallback) { + result = mDataCallback->onAudioReady(this, audioData, numFrames); } else { - result = mStreamCallback->onAudioReady(this, audioData, numFrames); + result = onDefaultCallback(audioData, numFrames); } // On Oreo, we might get called after returning stop. // So block that here. diff --git a/modules/juce_audio_devices/native/oboe/src/common/AudioStreamBuilder.cpp b/modules/juce_audio_devices/native/oboe/src/common/AudioStreamBuilder.cpp index 9f1e31b5..dffcd75e 100644 --- a/modules/juce_audio_devices/native/oboe/src/common/AudioStreamBuilder.cpp +++ b/modules/juce_audio_devices/native/oboe/src/common/AudioStreamBuilder.cpp @@ -80,13 +80,18 @@ AudioStream *AudioStreamBuilder::build() { } bool AudioStreamBuilder::isCompatible(AudioStreamBase &other) { - return getSampleRate() == other.getSampleRate() - && getFormat() == other.getFormat() - && getChannelCount() == other.getChannelCount(); + return (getSampleRate() == oboe::Unspecified || getSampleRate() == other.getSampleRate()) + && (getFormat() == (AudioFormat)oboe::Unspecified || getFormat() == other.getFormat()) + && (getFramesPerDataCallback() == oboe::Unspecified || getFramesPerDataCallback() == other.getFramesPerDataCallback()) + && (getChannelCount() == oboe::Unspecified || getChannelCount() == other.getChannelCount()); } Result AudioStreamBuilder::openStream(AudioStream **streamPP) { - Result result = Result::OK; + auto result = isValidConfig(); + if (result != Result::OK) { + return result; + } + LOGI("%s() %s -------- %s --------", __func__, getDirection() == Direction::Input ? "INPUT" : "OUTPUT", getVersionText()); @@ -111,7 +116,7 @@ Result AudioStreamBuilder::openStream(AudioStream **streamPP) { } if (isCompatible(*tempStream)) { - // Everything matches so we can just use the child stream directly. + // The child stream would work as the requested stream so we can just use it directly. *streamPP = tempStream; return result; } else { @@ -126,6 +131,9 @@ Result AudioStreamBuilder::openStream(AudioStream **streamPP) { if (getSampleRate() == oboe::Unspecified) { parentBuilder.setSampleRate(tempStream->getSampleRate()); } + if (getFramesPerDataCallback() == oboe::Unspecified) { + parentBuilder.setFramesPerCallback(tempStream->getFramesPerDataCallback()); + } // Use childStream in a FilterAudioStream. LOGI("%s() create a FilterAudioStream for data conversion.", __func__); @@ -180,16 +188,24 @@ Result AudioStreamBuilder::openStream(AudioStream **streamPP) { Result AudioStreamBuilder::openManagedStream(oboe::ManagedStream &stream) { stream.reset(); + auto result = isValidConfig(); + if (result != Result::OK) { + return result; + } AudioStream *streamptr; - auto result = openStream(&streamptr); + result = openStream(&streamptr); stream.reset(streamptr); return result; } Result AudioStreamBuilder::openStream(std::shared_ptr &sharedStream) { sharedStream.reset(); + auto result = isValidConfig(); + if (result != Result::OK) { + return result; + } AudioStream *streamptr; - auto result = openStream(&streamptr); + result = openStream(&streamptr); if (result == Result::OK) { sharedStream.reset(streamptr); // Save a weak_ptr in the stream for use with callbacks. diff --git a/modules/juce_audio_devices/native/oboe/src/common/DataConversionFlowGraph.cpp b/modules/juce_audio_devices/native/oboe/src/common/DataConversionFlowGraph.cpp index c15e92d2..2829e6f5 100644 --- a/modules/juce_audio_devices/native/oboe/src/common/DataConversionFlowGraph.cpp +++ b/modules/juce_audio_devices/native/oboe/src/common/DataConversionFlowGraph.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -81,34 +82,39 @@ Result DataConversionFlowGraph::configure(AudioStream *sourceStream, AudioStream AudioFormat sourceFormat = sourceStream->getFormat(); int32_t sourceChannelCount = sourceStream->getChannelCount(); int32_t sourceSampleRate = sourceStream->getSampleRate(); + int32_t sourceFramesPerCallback = sourceStream->getFramesPerDataCallback(); AudioFormat sinkFormat = sinkStream->getFormat(); int32_t sinkChannelCount = sinkStream->getChannelCount(); int32_t sinkSampleRate = sinkStream->getSampleRate(); + int32_t sinkFramesPerCallback = sinkStream->getFramesPerDataCallback(); - LOGI("%s() flowgraph converts channels: %d to %d, format: %d to %d, rate: %d to %d, qual = %d", + LOGI("%s() flowgraph converts channels: %d to %d, format: %d to %d" + ", rate: %d to %d, cbsize: %d to %d, qual = %d", __func__, sourceChannelCount, sinkChannelCount, sourceFormat, sinkFormat, sourceSampleRate, sinkSampleRate, + sourceFramesPerCallback, sinkFramesPerCallback, sourceStream->getSampleRateConversionQuality()); - int32_t framesPerCallback = (sourceStream->getFramesPerCallback() == kUnspecified) - ? sourceStream->getFramesPerBurst() - : sourceStream->getFramesPerCallback(); // Source - // If OUTPUT and using a callback then call back to the app using a SourceCaller. - // If INPUT and NOT using a callback then read from the child stream using a SourceCaller. - if ((sourceStream->getCallback() != nullptr && isOutput) - || (sourceStream->getCallback() == nullptr && isInput)) { + // IF OUTPUT and using a callback then call back to the app using a SourceCaller. + // OR IF INPUT and NOT using a callback then read from the child stream using a SourceCaller. + bool isDataCallbackSpecified = sourceStream->isDataCallbackSpecified(); + if ((isDataCallbackSpecified && isOutput) + || (!isDataCallbackSpecified && isInput)) { + int32_t actualSourceFramesPerCallback = (sourceFramesPerCallback == kUnspecified) + ? sourceStream->getFramesPerBurst() + : sourceFramesPerCallback; switch (sourceFormat) { case AudioFormat::Float: mSourceCaller = std::make_unique(sourceChannelCount, - framesPerCallback); + actualSourceFramesPerCallback); break; case AudioFormat::I16: mSourceCaller = std::make_unique(sourceChannelCount, - framesPerCallback); + actualSourceFramesPerCallback); break; default: LOGE("%s() Unsupported source caller format = %d", __func__, sourceFormat); @@ -117,8 +123,8 @@ Result DataConversionFlowGraph::configure(AudioStream *sourceStream, AudioStream mSourceCaller->setStream(sourceStream); lastOutput = &mSourceCaller->output; } else { - // If OUTPUT and NOT using a callback then write to the child stream using a BlockWriter. - // If INPUT and using a callback then write to the app using a BlockWriter. + // IF OUTPUT and NOT using a callback then write to the child stream using a BlockWriter. + // OR IF INPUT and using a callback then write to the app using a BlockWriter. switch (sourceFormat) { case AudioFormat::Float: mSource = std::make_unique(sourceChannelCount); @@ -131,35 +137,61 @@ Result DataConversionFlowGraph::configure(AudioStream *sourceStream, AudioStream return Result::ErrorIllegalArgument; } if (isInput) { + int32_t actualSinkFramesPerCallback = (sinkFramesPerCallback == kUnspecified) + ? sinkStream->getFramesPerBurst() + : sinkFramesPerCallback; // The BlockWriter is after the Sink so use the SinkStream size. - mBlockWriter.open(framesPerCallback * sinkStream->getBytesPerFrame()); + mBlockWriter.open(actualSinkFramesPerCallback * sinkStream->getBytesPerFrame()); mAppBuffer = std::make_unique( kDefaultBufferSize * sinkStream->getBytesPerFrame()); } lastOutput = &mSource->output; } + // If we are going to reduce the number of channels then do it before the + // sample rate converter. + if (sourceChannelCount > sinkChannelCount) { + if (sinkChannelCount == 1) { + mMultiToMonoConverter = std::make_unique(sourceChannelCount); + lastOutput->connect(&mMultiToMonoConverter->input); + lastOutput = &mMultiToMonoConverter->output; + } else { + mChannelCountConverter = std::make_unique( + sourceChannelCount, + sinkChannelCount); + lastOutput->connect(&mChannelCountConverter->input); + lastOutput = &mChannelCountConverter->output; + } + } + // Sample Rate conversion if (sourceSampleRate != sinkSampleRate) { - mResampler.reset(MultiChannelResampler::make(sourceChannelCount, + // Create a resampler to do the math. + mResampler.reset(MultiChannelResampler::make(lastOutput->getSamplesPerFrame(), sourceSampleRate, sinkSampleRate, convertOboeSRQualityToMCR( sourceStream->getSampleRateConversionQuality()))); - mRateConverter = std::make_unique(sourceChannelCount, + // Make a flowgraph node that uses the resampler. + mRateConverter = std::make_unique(lastOutput->getSamplesPerFrame(), *mResampler.get()); lastOutput->connect(&mRateConverter->input); lastOutput = &mRateConverter->output; } // Expand the number of channels if required. - if (sourceChannelCount == 1 && sinkChannelCount > 1) { - mChannelConverter = std::make_unique(sinkChannelCount); - lastOutput->connect(&mChannelConverter->input); - lastOutput = &mChannelConverter->output; - } else if (sourceChannelCount != sinkChannelCount) { - LOGW("%s() Channel reduction not supported.", __func__); - return Result::ErrorUnimplemented; // TODO + if (sourceChannelCount < sinkChannelCount) { + if (sourceChannelCount == 1) { + mMonoToMultiConverter = std::make_unique(sinkChannelCount); + lastOutput->connect(&mMonoToMultiConverter->input); + lastOutput = &mMonoToMultiConverter->output; + } else { + mChannelCountConverter = std::make_unique( + sourceChannelCount, + sinkChannelCount); + lastOutput->connect(&mChannelCountConverter->input); + lastOutput = &mChannelCountConverter->output; + } } // Sink @@ -176,8 +208,6 @@ Result DataConversionFlowGraph::configure(AudioStream *sourceStream, AudioStream } lastOutput->connect(&mSink->input); - mFramePosition = 0; - return Result::OK; } @@ -185,8 +215,7 @@ int32_t DataConversionFlowGraph::read(void *buffer, int32_t numFrames, int64_t t if (mSourceCaller) { mSourceCaller->setTimeoutNanos(timeoutNanos); } - int32_t numRead = mSink->read(mFramePosition, buffer, numFrames); - mFramePosition += numRead; + int32_t numRead = mSink->read(buffer, numFrames); return numRead; } @@ -196,8 +225,7 @@ int32_t DataConversionFlowGraph::write(void *inputBuffer, int32_t numFrames) { mSource->setData(inputBuffer, numFrames); while (true) { // Pull and read some data in app format into a small buffer. - int32_t framesRead = mSink->read(mFramePosition, mAppBuffer.get(), flowgraph::kDefaultBufferSize); - mFramePosition += framesRead; + int32_t framesRead = mSink->read(mAppBuffer.get(), flowgraph::kDefaultBufferSize); if (framesRead <= 0) break; // Write to a block adapter, which will call the destination whenever it has enough data. int32_t bytesRead = mBlockWriter.write(mAppBuffer.get(), @@ -209,7 +237,7 @@ int32_t DataConversionFlowGraph::write(void *inputBuffer, int32_t numFrames) { int32_t DataConversionFlowGraph::onProcessFixedBlock(uint8_t *buffer, int32_t numBytes) { int32_t numFrames = numBytes / mFilterStream->getBytesPerFrame(); - mCallbackResult = mFilterStream->getCallback()->onAudioReady(mFilterStream, buffer, numFrames); + mCallbackResult = mFilterStream->getDataCallback()->onAudioReady(mFilterStream, buffer, numFrames); // TODO handle STOP from callback, process data remaining in the block adapter return numBytes; -} \ No newline at end of file +} diff --git a/modules/juce_audio_devices/native/oboe/src/common/DataConversionFlowGraph.h b/modules/juce_audio_devices/native/oboe/src/common/DataConversionFlowGraph.h index b1d5ebe8..0cde1f35 100644 --- a/modules/juce_audio_devices/native/oboe/src/common/DataConversionFlowGraph.h +++ b/modules/juce_audio_devices/native/oboe/src/common/DataConversionFlowGraph.h @@ -21,7 +21,9 @@ #include #include +#include #include +#include #include #include #include "AudioSourceCaller.h" @@ -67,7 +69,9 @@ public: private: std::unique_ptr mSource; std::unique_ptr mSourceCaller; - std::unique_ptr mChannelConverter; + std::unique_ptr mMonoToMultiConverter; + std::unique_ptr mMultiToMonoConverter; + std::unique_ptr mChannelCountConverter; std::unique_ptr mResampler; std::unique_ptr mRateConverter; std::unique_ptr mSink; @@ -76,8 +80,6 @@ private: DataCallbackResult mCallbackResult = DataCallbackResult::Continue; AudioStream *mFilterStream = nullptr; std::unique_ptr mAppBuffer; - - int64_t mFramePosition = 0; }; } diff --git a/modules/juce_audio_devices/native/oboe/src/common/FilterAudioStream.cpp b/modules/juce_audio_devices/native/oboe/src/common/FilterAudioStream.cpp index a4715835..975b03dd 100644 --- a/modules/juce_audio_devices/native/oboe/src/common/FilterAudioStream.cpp +++ b/modules/juce_audio_devices/native/oboe/src/common/FilterAudioStream.cpp @@ -16,6 +16,7 @@ #include +#include "OboeDebug.h" #include "FilterAudioStream.h" using namespace oboe; @@ -90,3 +91,16 @@ ResultWithValue FilterAudioStream::read(void *buffer, return ResultWithValue::createBasedOnSign(framesRead); } +DataCallbackResult FilterAudioStream::onAudioReady(AudioStream *oboeStream, + void *audioData, + int32_t numFrames) { + int32_t framesProcessed; + if (oboeStream->getDirection() == Direction::Output) { + framesProcessed = mFlowGraph->read(audioData, numFrames, 0 /* timeout */); + } else { + framesProcessed = mFlowGraph->write(audioData, numFrames); + } + return (framesProcessed < numFrames) + ? DataCallbackResult::Stop + : mFlowGraph->getDataCallbackResult(); +} diff --git a/modules/juce_audio_devices/native/oboe/src/common/FilterAudioStream.h b/modules/juce_audio_devices/native/oboe/src/common/FilterAudioStream.h index 3949de77..210e9d11 100644 --- a/modules/juce_audio_devices/native/oboe/src/common/FilterAudioStream.h +++ b/modules/juce_audio_devices/native/oboe/src/common/FilterAudioStream.h @@ -42,8 +42,11 @@ public: : AudioStream(builder) , mChildStream(childStream) { // Intercept the callback if used. - if (builder.getCallback() != nullptr) { - mStreamCallback = mChildStream->swapCallback(this); + if (builder.isErrorCallbackSpecified()) { + mErrorCallback = mChildStream->swapErrorCallback(this); + } + if (builder.isDataCallbackSpecified()) { + mDataCallback = mChildStream->swapDataCallback(this); } else { const int size = childStream->getFramesPerBurst() * childStream->getBytesPerFrame(); mBlockingBuffer = std::make_unique(size); @@ -52,6 +55,7 @@ public: // Copy parameters that may not match builder. mBufferCapacityInFrames = mChildStream->getBufferCapacityInFrames(); mPerformanceMode = mChildStream->getPerformanceMode(); + mInputPreset = mChildStream->getInputPreset(); } virtual ~FilterAudioStream() = default; @@ -175,32 +179,36 @@ public: DataCallbackResult onAudioReady(AudioStream *oboeStream, void *audioData, - int32_t numFrames) override { - int32_t framesProcessed; - if (oboeStream->getDirection() == Direction::Output) { - framesProcessed = mFlowGraph->read(audioData, numFrames, 0 /* timeout */); - } else { - framesProcessed = mFlowGraph->write(audioData, numFrames); + int32_t numFrames) override; + + bool onError(AudioStream * audioStream, Result error) override { + if (mErrorCallback != nullptr) { + return mErrorCallback->onError(this, error); } - return (framesProcessed < numFrames) - ? DataCallbackResult::Stop - : mFlowGraph->getDataCallbackResult(); + return false; } void onErrorBeforeClose(AudioStream *oboeStream, Result error) override { - if (mStreamCallback != nullptr) { - mStreamCallback->onErrorBeforeClose(this, error); + if (mErrorCallback != nullptr) { + mErrorCallback->onErrorBeforeClose(this, error); } } void onErrorAfterClose(AudioStream *oboeStream, Result error) override { // Close this parent stream because the callback will only close the child. AudioStream::close(); - if (mStreamCallback != nullptr) { - mStreamCallback->onErrorAfterClose(this, error); + if (mErrorCallback != nullptr) { + mErrorCallback->onErrorAfterClose(this, error); } } + /** + * @return last result passed from an error callback + */ + oboe::Result getLastErrorCallbackResult() const override { + return mChildStream->getLastErrorCallbackResult(); + } + private: std::unique_ptr mChildStream; // this stream wraps the child stream diff --git a/modules/juce_audio_devices/native/oboe/src/common/LatencyTuner.cpp b/modules/juce_audio_devices/native/oboe/src/common/LatencyTuner.cpp index cce8e189..0ac29750 100644 --- a/modules/juce_audio_devices/native/oboe/src/common/LatencyTuner.cpp +++ b/modules/juce_audio_devices/native/oboe/src/common/LatencyTuner.cpp @@ -19,13 +19,16 @@ using namespace oboe; LatencyTuner::LatencyTuner(AudioStream &stream) - : LatencyTuner(stream, stream.getBufferCapacityInFrames()){ - } + : LatencyTuner(stream, stream.getBufferCapacityInFrames()) { +} LatencyTuner::LatencyTuner(oboe::AudioStream &stream, int32_t maximumBufferSize) - : mStream(stream) - , mMaxBufferSize(maximumBufferSize) { - reset(); + : mStream(stream) + , mMaxBufferSize(maximumBufferSize) { + int32_t burstSize = stream.getFramesPerBurst(); + setMinimumBufferSize(kDefaultNumBursts * burstSize); + setBufferSizeIncrement(burstSize); + reset(); } Result LatencyTuner::tune() { @@ -55,12 +58,15 @@ Result LatencyTuner::tune() { if ((xRunCountResult.value() - mPreviousXRuns) > 0) { mPreviousXRuns = xRunCountResult.value(); int32_t oldBufferSize = mStream.getBufferSizeInFrames(); - int32_t requestedBufferSize = oldBufferSize + mStream.getFramesPerBurst(); + int32_t requestedBufferSize = oldBufferSize + getBufferSizeIncrement(); // Do not request more than the maximum buffer size (which was either user-specified // or was from stream->getBufferCapacityInFrames()) if (requestedBufferSize > mMaxBufferSize) requestedBufferSize = mMaxBufferSize; + // Note that this will not allocate more memory. It simply determines + // how much of the existing buffer capacity will be used. The size will be + // clipped to the bufferCapacity by AAudio. auto setBufferResult = mStream.setBufferSizeInFrames(requestedBufferSize); if (setBufferResult != Result::OK) { result = setBufferResult; @@ -94,7 +100,7 @@ void LatencyTuner::reset() { mState = State::Idle; mIdleCountDown = kIdleCount; // Set to minimal latency - mStream.setBufferSizeInFrames(2 * mStream.getFramesPerBurst()); + mStream.setBufferSizeInFrames(getMinimumBufferSize()); } bool LatencyTuner::isAtMaximumBufferSize() { diff --git a/modules/juce_audio_devices/native/oboe/src/common/QuirksManager.cpp b/modules/juce_audio_devices/native/oboe/src/common/QuirksManager.cpp index 3df1bc4a..aa285de0 100644 --- a/modules/juce_audio_devices/native/oboe/src/common/QuirksManager.cpp +++ b/modules/juce_audio_devices/native/oboe/src/common/QuirksManager.cpp @@ -17,8 +17,13 @@ #include #include +#include "OboeDebug.h" #include "QuirksManager.h" +#ifndef __ANDROID_API_R__ +#define __ANDROID_API_R__ 30 +#endif + using namespace oboe; int32_t QuirksManager::DeviceQuirks::clipBufferSize(AudioStream &stream, @@ -51,11 +56,24 @@ int32_t QuirksManager::DeviceQuirks::clipBufferSize(AudioStream &stream, return adjustedSize; } +bool QuirksManager::DeviceQuirks::isAAudioMMapPossible(const AudioStreamBuilder &builder) const { + bool isSampleRateCompatible = + builder.getSampleRate() == oboe::Unspecified + || builder.getSampleRate() == kCommonNativeRate + || builder.getSampleRateConversionQuality() != SampleRateConversionQuality::None; + return builder.getPerformanceMode() == PerformanceMode::LowLatency + && isSampleRateCompatible + && builder.getChannelCount() <= kChannelCountStereo; +} + class SamsungDeviceQuirks : public QuirksManager::DeviceQuirks { public: SamsungDeviceQuirks() { std::string arch = getPropertyString("ro.arch"); isExynos = (arch.rfind("exynos", 0) == 0); // starts with? + + std::string chipname = getPropertyString("ro.hardware.chipname"); + isExynos9810 = (chipname == "exynos9810"); } virtual ~SamsungDeviceQuirks() = default; @@ -69,12 +87,24 @@ public: return kTopMargin; } + // See Oboe issue #824 for more information. + bool isMonoMMapActuallyStereo() const override { + return isExynos9810; // TODO We can make this version specific if it gets fixed. + } + + bool isAAudioMMapPossible(const AudioStreamBuilder &builder) const override { + return DeviceQuirks::isAAudioMMapPossible(builder) + // Samsung says they use Legacy for Camcorder + && builder.getInputPreset() != oboe::InputPreset::Camcorder; + } + private: // Stay farther away from DSP position on Exynos devices. static constexpr int32_t kBottomMarginExynos = 2; static constexpr int32_t kBottomMarginOther = 1; static constexpr int32_t kTopMargin = 1; bool isExynos = false; + bool isExynos9810 = false; }; QuirksManager::QuirksManager() { @@ -94,6 +124,28 @@ bool QuirksManager::isConversionNeeded( const bool isInput = builder.getDirection() == Direction::Input; const bool isFloat = builder.getFormat() == AudioFormat::Float; + // There are multiple bugs involving using callback with a specified callback size. + // Issue #778: O to Q had a problem with Legacy INPUT streams for FLOAT streams + // and a specified callback size. It would assert because of a bad buffer size. + // + // Issue #973: O to R had a problem with Legacy output streams using callback and a specified callback size. + // An AudioTrack stream could still be running when the AAudio FixedBlockReader was closed. + // Internally b/161914201#comment25 + // + // Issue #983: O to R would glitch if the framesPerCallback was too small. + // + // Most of these problems were related to Legacy stream. MMAP was OK. But we don't + // know if we will get an MMAP stream. So, to be safe, just do the conversion in Oboe. + if (OboeGlobals::areWorkaroundsEnabled() + && builder.willUseAAudio() + && builder.isDataCallbackSpecified() + && builder.getFramesPerDataCallback() != 0 + && getSdkVersion() <= __ANDROID_API_R__) { + LOGI("QuirksManager::%s() avoid setFramesPerCallback(n>0)", __func__); + childBuilder.setFramesPerCallback(oboe::Unspecified); + conversionNeeded = true; + } + // If a SAMPLE RATE is specified for low latency then let the native code choose an optimal rate. // TODO There may be a problem if the devices supports low latency // at a higher rate than the default. @@ -115,24 +167,39 @@ bool QuirksManager::isConversionNeeded( ) { childBuilder.setFormat(AudioFormat::I16); // needed for FAST track conversionNeeded = true; + LOGI("QuirksManager::%s() forcing internal format to I16 for low latency", __func__); } - // Channel Count - if (builder.getChannelCount() != oboe::Unspecified - && builder.isChannelConversionAllowed()) { - if (OboeGlobals::areWorkaroundsEnabled() - && builder.getChannelCount() == 2 // stereo? - && isInput - && isLowLatency - && (!builder.willUseAAudio() && (getSdkVersion() == __ANDROID_API_O__))) { - // Workaround for heap size regression in O. - // b/66967812 AudioRecord does not allow FAST track for stereo capture in O - childBuilder.setChannelCount(1); - conversionNeeded = true; - } - // Note that MMAP does not support mono in 8.1. But that would only matter on Pixel 1 - // phones and they have almost all been updated to 9.0. + // Channel Count conversions + if (OboeGlobals::areWorkaroundsEnabled() + && builder.isChannelConversionAllowed() + && builder.getChannelCount() == kChannelCountStereo + && isInput + && isLowLatency + && (!builder.willUseAAudio() && (getSdkVersion() == __ANDROID_API_O__)) + ) { + // Workaround for heap size regression in O. + // b/66967812 AudioRecord does not allow FAST track for stereo capture in O + childBuilder.setChannelCount(kChannelCountMono); + conversionNeeded = true; + LOGI("QuirksManager::%s() using mono internally for low latency on O", __func__); + } else if (OboeGlobals::areWorkaroundsEnabled() + && builder.getChannelCount() == kChannelCountMono + && isInput + && mDeviceQuirks->isMonoMMapActuallyStereo() + && builder.willUseAAudio() + // Note: we might use this workaround on a device that supports + // MMAP but will use Legacy for this stream. But this will only happen + // on devices that have the broken mono. + && mDeviceQuirks->isAAudioMMapPossible(builder) + ) { + // Workaround for mono actually running in stereo mode. + childBuilder.setChannelCount(kChannelCountStereo); // Use stereo and extract first channel. + conversionNeeded = true; + LOGI("QuirksManager::%s() using stereo internally to avoid broken mono", __func__); } + // Note that MMAP does not support mono in 8.1. But that would only matter on Pixel 1 + // phones and they have almost all been updated to 9.0. return conversionNeeded; } diff --git a/modules/juce_audio_devices/native/oboe/src/common/QuirksManager.h b/modules/juce_audio_devices/native/oboe/src/common/QuirksManager.h index a177764c..b4e38ded 100644 --- a/modules/juce_audio_devices/native/oboe/src/common/QuirksManager.h +++ b/modules/juce_audio_devices/native/oboe/src/common/QuirksManager.h @@ -91,6 +91,13 @@ public: return kDefaultTopMarginInBursts; } + // On some devices, you can open a mono stream but it is actually running in stereo! + virtual bool isMonoMMapActuallyStereo() const { + return false; + } + + virtual bool isAAudioMMapPossible(const AudioStreamBuilder &builder) const; + static constexpr int32_t kDefaultBottomMarginInBursts = 0; static constexpr int32_t kDefaultTopMarginInBursts = 0; @@ -98,10 +105,14 @@ public: // b/129545119 | AAudio Legacy allows setBufferSizeInFrames too low // Fixed in Q static constexpr int32_t kLegacyBottomMarginInBursts = 1; + static constexpr int32_t kCommonNativeRate = 48000; // very typical native sample rate }; private: + static constexpr int32_t kChannelCountMono = 1; + static constexpr int32_t kChannelCountStereo = 2; + std::unique_ptr mDeviceQuirks{}; }; diff --git a/modules/juce_audio_devices/native/oboe/src/common/Trace.h b/modules/juce_audio_devices/native/oboe/src/common/Trace.h index dad6c007..c7965f95 100644 --- a/modules/juce_audio_devices/native/oboe/src/common/Trace.h +++ b/modules/juce_audio_devices/native/oboe/src/common/Trace.h @@ -28,4 +28,4 @@ private: static bool mIsTracingSupported; }; -#endif //OBOE_TRACE_H +#endif //OBOE_TRACE_H \ No newline at end of file diff --git a/modules/juce_audio_devices/native/oboe/src/common/Utilities.cpp b/modules/juce_audio_devices/native/oboe/src/common/Utilities.cpp index c3acf476..d38874b5 100644 --- a/modules/juce_audio_devices/native/oboe/src/common/Utilities.cpp +++ b/modules/juce_audio_devices/native/oboe/src/common/Utilities.cpp @@ -183,7 +183,7 @@ const char *convertToText(AudioStream* stream) { <<"BufferCapacity: "<getBufferCapacityInFrames()<getBufferSizeInFrames()<getFramesPerBurst()<getFramesPerCallback()<getFramesPerDataCallback()<getSampleRate()<getChannelCount()<getFormat())< -#include -#include -#include #include +#include +#include -#include "common/OboeDebug.h" #include "fifo/FifoControllerBase.h" #include "fifo/FifoController.h" #include "fifo/FifoControllerIndirect.h" #include "fifo/FifoBuffer.h" -#include "common/AudioClock.h" namespace oboe { diff --git a/modules/juce_audio_devices/native/oboe/src/fifo/FifoBuffer.h b/modules/juce_audio_devices/native/oboe/src/fifo/FifoBuffer.h index 80186208..6cced2d3 100644 --- a/modules/juce_audio_devices/native/oboe/src/fifo/FifoBuffer.h +++ b/modules/juce_audio_devices/native/oboe/src/fifo/FifoBuffer.h @@ -17,13 +17,13 @@ #ifndef OBOE_FIFOPROCESSOR_H #define OBOE_FIFOPROCESSOR_H -#include -#include +#include +#include -#include "common/OboeDebug.h" -#include "FifoControllerBase.h" #include "oboe/Definitions.h" +#include "FifoControllerBase.h" + namespace oboe { class FifoBuffer { diff --git a/modules/juce_audio_devices/native/oboe/src/fifo/FifoController.cpp b/modules/juce_audio_devices/native/oboe/src/fifo/FifoController.cpp index 5590683b..b2168d13 100644 --- a/modules/juce_audio_devices/native/oboe/src/fifo/FifoController.cpp +++ b/modules/juce_audio_devices/native/oboe/src/fifo/FifoController.cpp @@ -14,8 +14,8 @@ * limitations under the License. */ -#include -#include +#include + #include "FifoControllerBase.h" #include "FifoController.h" diff --git a/modules/juce_audio_devices/native/oboe/src/fifo/FifoController.h b/modules/juce_audio_devices/native/oboe/src/fifo/FifoController.h index 6562e6de..d3e413e3 100644 --- a/modules/juce_audio_devices/native/oboe/src/fifo/FifoController.h +++ b/modules/juce_audio_devices/native/oboe/src/fifo/FifoController.h @@ -17,9 +17,10 @@ #ifndef NATIVEOBOE_FIFOCONTROLLER_H #define NATIVEOBOE_FIFOCONTROLLER_H -#include -#include "FifoControllerBase.h" #include +#include + +#include "FifoControllerBase.h" namespace oboe { diff --git a/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerBase.cpp b/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerBase.cpp index 6aceea0e..d3419475 100644 --- a/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerBase.cpp +++ b/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerBase.cpp @@ -14,14 +14,11 @@ * limitations under the License. */ -#include "FifoControllerBase.h" - -#include -#include #include -#include "FifoControllerBase.h" +#include +#include -#include "common/OboeDebug.h" +#include "FifoControllerBase.h" namespace oboe { diff --git a/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerBase.h b/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerBase.h index c8041e04..a4c2b41a 100644 --- a/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerBase.h +++ b/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerBase.h @@ -18,7 +18,6 @@ #define NATIVEOBOE_FIFOCONTROLLERBASE_H #include -#include namespace oboe { diff --git a/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerIndirect.cpp b/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerIndirect.cpp index f596461f..78c43399 100644 --- a/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerIndirect.cpp +++ b/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerIndirect.cpp @@ -14,6 +14,7 @@ * limitations under the License. */ +#include #include "FifoControllerIndirect.h" diff --git a/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerIndirect.h b/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerIndirect.h index 216a28b5..32f78819 100644 --- a/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerIndirect.h +++ b/modules/juce_audio_devices/native/oboe/src/fifo/FifoControllerIndirect.h @@ -17,8 +17,10 @@ #ifndef NATIVEOBOE_FIFOCONTROLLERINDIRECT_H #define NATIVEOBOE_FIFOCONTROLLERINDIRECT_H -#include "FifoControllerBase.h" #include +#include + +#include "FifoControllerBase.h" namespace oboe { diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.cpp new file mode 100644 index 00000000..b56f8b27 --- /dev/null +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.cpp @@ -0,0 +1,52 @@ +/* + * Copyright 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "FlowGraphNode.h" +#include "ChannelCountConverter.h" + +using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph; + +ChannelCountConverter::ChannelCountConverter( + int32_t inputChannelCount, + int32_t outputChannelCount) + : input(*this, inputChannelCount) + , output(*this, outputChannelCount) { +} + +ChannelCountConverter::~ChannelCountConverter() { } + +int32_t ChannelCountConverter::onProcess(int32_t numFrames) { + const float *inputBuffer = input.getBuffer(); + float *outputBuffer = output.getBuffer(); + int32_t inputChannelCount = input.getSamplesPerFrame(); + int32_t outputChannelCount = output.getSamplesPerFrame(); + for (int i = 0; i < numFrames; i++) { + int inputChannel = 0; + for (int outputChannel = 0; outputChannel < outputChannelCount; outputChannel++) { + // Copy input channels to output channels. + // Wrap if we run out of inputs. + // Discard if we run out of outputs. + outputBuffer[outputChannel] = inputBuffer[inputChannel]; + inputChannel = (inputChannel == inputChannelCount) + ? 0 : inputChannel + 1; + } + inputBuffer += inputChannelCount; + outputBuffer += outputChannelCount; + } + return numFrames; +} + diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.h new file mode 100644 index 00000000..f688d443 --- /dev/null +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/ChannelCountConverter.h @@ -0,0 +1,54 @@ +/* + * Copyright 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FLOWGRAPH_CHANNEL_COUNT_CONVERTER_H +#define FLOWGRAPH_CHANNEL_COUNT_CONVERTER_H + +#include +#include + +#include "FlowGraphNode.h" + +namespace FLOWGRAPH_OUTER_NAMESPACE { +namespace flowgraph { + +/** + * Change the number of number of channels without mixing. + * When increasing the channel count, duplicate input channels. + * When decreasing the channel count, drop input channels. + */ + class ChannelCountConverter : public FlowGraphNode { + public: + explicit ChannelCountConverter( + int32_t inputChannelCount, + int32_t outputChannelCount); + + virtual ~ChannelCountConverter(); + + int32_t onProcess(int32_t numFrames) override; + + const char *getName() override { + return "ChannelCountConverter"; + } + + FlowGraphPortFloatInput input; + FlowGraphPortFloatOutput output; + }; + +} /* namespace flowgraph */ +} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ + +#endif //FLOWGRAPH_CHANNEL_COUNT_CONVERTER_H diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.cpp index d2f8a02a..c6ad0b0f 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.cpp @@ -19,7 +19,7 @@ #include "FlowGraphNode.h" #include "ClipToRange.h" -using namespace flowgraph; +using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph; ClipToRange::ClipToRange(int32_t channelCount) : FlowGraphFilter(channelCount) { diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.h index 22b78049..4dc82f6c 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.h +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/ClipToRange.h @@ -23,6 +23,7 @@ #include "FlowGraphNode.h" +namespace FLOWGRAPH_OUTER_NAMESPACE { namespace flowgraph { // This is 3 dB, (10^(3/20)), to match the maximum headroom in AudioTrack for float data. @@ -64,5 +65,6 @@ private: }; } /* namespace flowgraph */ +} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ #endif //FLOWGRAPH_CLIP_TO_RANGE_H diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.cpp index bb6ecc9f..9a62d7d8 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.cpp @@ -19,26 +19,24 @@ #include #include "FlowGraphNode.h" -using namespace flowgraph; +using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph; /***************************************************************************/ -int32_t FlowGraphNode::pullData(int64_t framePosition, int32_t numFrames) { +int32_t FlowGraphNode::pullData(int32_t numFrames, int64_t callCount) { int32_t frameCount = numFrames; // Prevent recursion and multiple execution of nodes. - if (framePosition <= mLastFramePosition && !mBlockRecursion) { - mBlockRecursion = true; // for cyclic graphs + if (callCount > mLastCallCount) { + mLastCallCount = callCount; if (mDataPulledAutomatically) { // Pull from all the upstream nodes. for (auto &port : mInputPorts) { // TODO fix bug of leaving unused data in some ports if using multiple AudioSource - frameCount = port.get().pullData(framePosition, frameCount); + frameCount = port.get().pullData(callCount, frameCount); } } if (frameCount > 0) { frameCount = onProcess(frameCount); } - mLastFramePosition += frameCount; - mBlockRecursion = false; mLastFrameCount = frameCount; } else { frameCount = mLastFrameCount; @@ -60,6 +58,7 @@ void FlowGraphNode::pullReset() { void FlowGraphNode::reset() { mLastFrameCount = 0; + mLastCallCount = kInitialCallCount; } /***************************************************************************/ @@ -74,9 +73,9 @@ FlowGraphPortFloat::FlowGraphPortFloat(FlowGraphNode &parent, } /***************************************************************************/ -int32_t FlowGraphPortFloatOutput::pullData(int64_t framePosition, int32_t numFrames) { +int32_t FlowGraphPortFloatOutput::pullData(int64_t callCount, int32_t numFrames) { numFrames = std::min(getFramesPerBuffer(), numFrames); - return mContainingNode.pullData(framePosition, numFrames); + return mContainingNode.pullData(numFrames, callCount); } void FlowGraphPortFloatOutput::pullReset() { @@ -93,10 +92,10 @@ void FlowGraphPortFloatOutput::disconnect(FlowGraphPortFloatInput *port) { } /***************************************************************************/ -int32_t FlowGraphPortFloatInput::pullData(int64_t framePosition, int32_t numFrames) { +int32_t FlowGraphPortFloatInput::pullData(int64_t callCount, int32_t numFrames) { return (mConnected == nullptr) ? std::min(getFramesPerBuffer(), numFrames) - : mConnected->pullData(framePosition, numFrames); + : mConnected->pullData(callCount, numFrames); } void FlowGraphPortFloatInput::pullReset() { if (mConnected != nullptr) mConnected->pullReset(); @@ -109,3 +108,7 @@ float *FlowGraphPortFloatInput::getBuffer() { return mConnected->getBuffer(); } } + +int32_t FlowGraphSink::pullData(int32_t numFrames) { + return FlowGraphNode::pullData(numFrames, getLastCallCount() + 1); +} diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.h index 007131e4..acbee565 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.h +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/FlowGraphNode.h @@ -40,8 +40,20 @@ // Set this to 1 if using it inside the Android framework. // This code is kept here so that it can be moved easily between Oboe and AAudio. +#ifndef FLOWGRAPH_ANDROID_INTERNAL #define FLOWGRAPH_ANDROID_INTERNAL 0 - +#endif + +// Set this to a name that will prevent AAudio from calling into Oboe. +// AAudio and Oboe both use a version of this flowgraph package. +// There was a problem in the unit tests where AAudio would call a constructor +// in AAudio and then call a destructor in Oboe! That caused memory corruption. +// For more details, see Issue #930. +#ifndef FLOWGRAPH_OUTER_NAMESPACE +#define FLOWGRAPH_OUTER_NAMESPACE oboe +#endif + +namespace FLOWGRAPH_OUTER_NAMESPACE { namespace flowgraph { // Default block size that can be overridden when the FlowGraphPortFloat is created. @@ -71,15 +83,17 @@ public: virtual int32_t onProcess(int32_t numFrames) = 0; /** - * If the framePosition is at or after the last frame position then call onProcess(). + * If the callCount is at or after the previous callCount then call + * pullData on all of the upstreamNodes. + * Then call onProcess(). * This prevents infinite recursion in case of cyclic graphs. * It also prevents nodes upstream from a branch from being executed twice. * - * @param framePosition + * @param callCount * @param numFrames * @return number of frames valid */ - int32_t pullData(int64_t framePosition, int32_t numFrames); + int32_t pullData(int32_t numFrames, int64_t callCount); /** * Recursively reset all the nodes in the graph, starting from a Sink. @@ -118,12 +132,14 @@ public: return "FlowGraph"; } - int64_t getLastFramePosition() { - return mLastFramePosition; + int64_t getLastCallCount() { + return mLastCallCount; } protected: - int64_t mLastFramePosition = 0; + + static constexpr int64_t kInitialCallCount = -1; + int64_t mLastCallCount = kInitialCallCount; std::vector> mInputPorts; @@ -148,6 +164,8 @@ public: : mContainingNode(parent) , mSamplesPerFrame(samplesPerFrame) { } + + virtual ~FlowGraphPort() = default; // Ports are often declared public. So let's make them non-copyable. FlowGraphPort(const FlowGraphPort&) = delete; @@ -394,8 +412,15 @@ public: return numFrames; } - virtual int32_t read(int64_t framePosition, void *data, int32_t numFrames) = 0; + virtual int32_t read(void *data, int32_t numFrames) = 0; +protected: + /** + * Pull data through the graph using this nodes last callCount. + * @param numFrames + * @return + */ + int32_t pullData(int32_t numFrames); }; /***************************************************************************/ @@ -418,5 +443,6 @@ public: }; } /* namespace flowgraph */ +} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ #endif /* FLOWGRAPH_FLOW_GRAPH_NODE_H */ diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.cpp index 879685e8..4f973bc3 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.cpp @@ -18,7 +18,7 @@ #include "ManyToMultiConverter.h" -using namespace flowgraph; +using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph; ManyToMultiConverter::ManyToMultiConverter(int32_t channelCount) : inputs(channelCount) diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.h index eca4a8ed..c60e0704 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.h +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/ManyToMultiConverter.h @@ -23,6 +23,9 @@ #include "FlowGraphNode.h" +namespace FLOWGRAPH_OUTER_NAMESPACE { +namespace flowgraph { + /** * Combine multiple mono inputs into one interleaved multi-channel output. */ @@ -46,4 +49,7 @@ public: private: }; +} /* namespace flowgraph */ +} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ + #endif //FLOWGRAPH_MANY_TO_MULTI_CONVERTER_H diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.cpp index 11cea788..bb471a0f 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.cpp @@ -18,11 +18,11 @@ #include "FlowGraphNode.h" #include "MonoToMultiConverter.h" -using namespace flowgraph; +using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph; -MonoToMultiConverter::MonoToMultiConverter(int32_t channelCount) +MonoToMultiConverter::MonoToMultiConverter(int32_t outputChannelCount) : input(*this, 1) - , output(*this, channelCount) { + , output(*this, outputChannelCount) { } MonoToMultiConverter::~MonoToMultiConverter() { } diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.h index 376f7a37..9216f1a9 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.h +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/MonoToMultiConverter.h @@ -22,15 +22,16 @@ #include "FlowGraphNode.h" +namespace FLOWGRAPH_OUTER_NAMESPACE { namespace flowgraph { /** - * Convert a monophonic stream to a multi-channel stream + * Convert a monophonic stream to a multi-channel interleaved stream * with the same signal on each channel. */ class MonoToMultiConverter : public FlowGraphNode { public: - explicit MonoToMultiConverter(int32_t channelCount); + explicit MonoToMultiConverter(int32_t outputChannelCount); virtual ~MonoToMultiConverter(); @@ -45,5 +46,6 @@ public: }; } /* namespace flowgraph */ +} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ #endif //FLOWGRAPH_MONO_TO_MULTI_CONVERTER_H diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.cpp new file mode 100644 index 00000000..8e895bf6 --- /dev/null +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.cpp @@ -0,0 +1,41 @@ +/* + * Copyright 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "FlowGraphNode.h" +#include "MultiToMonoConverter.h" + +using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph; + +MultiToMonoConverter::MultiToMonoConverter(int32_t inputChannelCount) + : input(*this, inputChannelCount) + , output(*this, 1) { +} + +MultiToMonoConverter::~MultiToMonoConverter() { } + +int32_t MultiToMonoConverter::onProcess(int32_t numFrames) { + const float *inputBuffer = input.getBuffer(); + float *outputBuffer = output.getBuffer(); + int32_t channelCount = input.getSamplesPerFrame(); + for (int i = 0; i < numFrames; i++) { + // read first channel of multi stream, write many + *outputBuffer++ = *inputBuffer; + inputBuffer += channelCount; + } + return numFrames; +} + diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.h new file mode 100644 index 00000000..9cb69114 --- /dev/null +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/MultiToMonoConverter.h @@ -0,0 +1,51 @@ +/* + * Copyright 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FLOWGRAPH_MULTI_TO_MONO_CONVERTER_H +#define FLOWGRAPH_MULTI_TO_MONO_CONVERTER_H + +#include +#include + +#include "FlowGraphNode.h" + +namespace FLOWGRAPH_OUTER_NAMESPACE { +namespace flowgraph { + +/** + * Convert a multi-channel interleaved stream to a monophonic stream + * by extracting channel[0]. + */ + class MultiToMonoConverter : public FlowGraphNode { + public: + explicit MultiToMonoConverter(int32_t inputChannelCount); + + virtual ~MultiToMonoConverter(); + + int32_t onProcess(int32_t numFrames) override; + + const char *getName() override { + return "MultiToMonoConverter"; + } + + FlowGraphPortFloatInput input; + FlowGraphPortFloatOutput output; + }; + +} /* namespace flowgraph */ +} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ + +#endif //FLOWGRAPH_MULTI_TO_MONO_CONVERTER_H diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.cpp index afef0181..33b2712c 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.cpp @@ -19,7 +19,7 @@ #include "FlowGraphNode.h" #include "RampLinear.h" -using namespace flowgraph; +using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph; RampLinear::RampLinear(int32_t channelCount) : FlowGraphFilter(channelCount) { diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.h index f285704c..8d4c546e 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.h +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/RampLinear.h @@ -23,6 +23,7 @@ #include "FlowGraphNode.h" +namespace FLOWGRAPH_OUTER_NAMESPACE { namespace flowgraph { /** @@ -92,5 +93,6 @@ private: }; } /* namespace flowgraph */ +} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ #endif //FLOWGRAPH_RAMP_LINEAR_H diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.cpp index 708c684f..b1ae4bd8 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.cpp @@ -16,7 +16,7 @@ #include "SampleRateConverter.h" -using namespace flowgraph; +using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph; using namespace resampler; SampleRateConverter::SampleRateConverter(int32_t channelCount, MultiChannelResampler &resampler) @@ -25,11 +25,17 @@ SampleRateConverter::SampleRateConverter(int32_t channelCount, MultiChannelResam setDataPulledAutomatically(false); } +void SampleRateConverter::reset() { + FlowGraphNode::reset(); + mInputCursor = kInitialCallCount; +} + // Return true if there is a sample available. bool SampleRateConverter::isInputAvailable() { + // If we have consumed all of the input data then go out and get some more. if (mInputCursor >= mNumValidInputFrames) { - mNumValidInputFrames = input.pullData(mInputFramePosition, input.getFramesPerBuffer()); - mInputFramePosition += mNumValidInputFrames; + mInputCallCount++; + mNumValidInputFrames = input.pullData(mInputCallCount, input.getFramesPerBuffer()); mInputCursor = 0; } return (mInputCursor < mNumValidInputFrames); diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.h index d940b22b..534df49a 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.h +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/SampleRateConverter.h @@ -23,6 +23,7 @@ #include "FlowGraphNode.h" #include "resampler/MultiChannelResampler.h" +namespace FLOWGRAPH_OUTER_NAMESPACE { namespace flowgraph { class SampleRateConverter : public FlowGraphFilter { @@ -37,6 +38,8 @@ public: return "SampleRateConverter"; } + void reset() override; + private: // Return true if there is a sample available. @@ -47,10 +50,15 @@ private: resampler::MultiChannelResampler &mResampler; - int32_t mInputCursor = 0; - int32_t mNumValidInputFrames = 0; - int64_t mInputFramePosition = 0; // monotonic counter of input frames used for pullData + int32_t mInputCursor = 0; // offset into the input port buffer + int32_t mNumValidInputFrames = 0; // number of valid frames currently in the input port buffer + // We need our own callCount for upstream calls because calls occur at a different rate. + // This means we cannot have cyclic graphs or merges that contain an SRC. + int64_t mInputCallCount = 0; }; + } /* namespace flowgraph */ +} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ + #endif //OBOE_SAMPLE_RATE_CONVERTER_H diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkFloat.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkFloat.cpp index f830dafd..e0ac6e93 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkFloat.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkFloat.cpp @@ -19,13 +19,13 @@ #include "FlowGraphNode.h" #include "SinkFloat.h" -using namespace flowgraph; +using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph; SinkFloat::SinkFloat(int32_t channelCount) : FlowGraphSink(channelCount) { } -int32_t SinkFloat::read(int64_t framePosition, void *data, int32_t numFrames) { +int32_t SinkFloat::read(void *data, int32_t numFrames) { // printf("SinkFloat::read(,,%d)\n", numFrames); float *floatData = (float *) data; int32_t channelCount = input.getSamplesPerFrame(); @@ -33,7 +33,7 @@ int32_t SinkFloat::read(int64_t framePosition, void *data, int32_t numFrames) { int32_t framesLeft = numFrames; while (framesLeft > 0) { // Run the graph and pull data through the input port. - int32_t framesPulled = pullData(framePosition, framesLeft); + int32_t framesPulled = pullData(framesLeft); // printf("SinkFloat::read: framesLeft = %d, framesPulled = %d\n", framesLeft, framesPulled); if (framesPulled <= 0) { break; @@ -43,7 +43,6 @@ int32_t SinkFloat::read(int64_t framePosition, void *data, int32_t numFrames) { memcpy(floatData, signal, numSamples * sizeof(float)); floatData += numSamples; framesLeft -= framesPulled; - framePosition += framesPulled; } // printf("SinkFloat returning %d\n", numFrames - framesLeft); return numFrames - framesLeft; diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkFloat.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkFloat.h index b6474d18..98d21820 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkFloat.h +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkFloat.h @@ -23,6 +23,7 @@ #include "FlowGraphNode.h" +namespace FLOWGRAPH_OUTER_NAMESPACE { namespace flowgraph { /** @@ -32,7 +33,7 @@ class SinkFloat : public FlowGraphSink { public: explicit SinkFloat(int32_t channelCount); - int32_t read(int64_t framePosition, void *data, int32_t numFrames) override; + int32_t read(void *data, int32_t numFrames) override; const char *getName() override { return "SinkFloat"; @@ -40,5 +41,6 @@ public: }; } /* namespace flowgraph */ +} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ #endif //FLOWGRAPH_SINK_FLOAT_H diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI16.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI16.cpp index a5904e82..690431ce 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI16.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI16.cpp @@ -23,19 +23,19 @@ #include #endif -using namespace flowgraph; +using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph; SinkI16::SinkI16(int32_t channelCount) : FlowGraphSink(channelCount) {} -int32_t SinkI16::read(int64_t framePosition, void *data, int32_t numFrames) { +int32_t SinkI16::read(void *data, int32_t numFrames) { int16_t *shortData = (int16_t *) data; const int32_t channelCount = input.getSamplesPerFrame(); int32_t framesLeft = numFrames; while (framesLeft > 0) { // Run the graph and pull data through the input port. - int32_t framesRead = pullData(framePosition, framesLeft); + int32_t framesRead = pullData(framesLeft); if (framesRead <= 0) { break; } @@ -52,7 +52,6 @@ int32_t SinkI16::read(int64_t framePosition, void *data, int32_t numFrames) { } #endif framesLeft -= framesRead; - framePosition += framesRead; } return numFrames - framesLeft; } diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI16.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI16.h index 2cfdfb0c..e65ffae5 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI16.h +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI16.h @@ -22,6 +22,7 @@ #include "FlowGraphNode.h" +namespace FLOWGRAPH_OUTER_NAMESPACE { namespace flowgraph { /** @@ -31,7 +32,7 @@ class SinkI16 : public FlowGraphSink { public: explicit SinkI16(int32_t channelCount); - int32_t read(int64_t framePosition, void *data, int32_t numFrames) override; + int32_t read(void *data, int32_t numFrames) override; const char *getName() override { return "SinkI16"; @@ -39,5 +40,6 @@ public: }; } /* namespace flowgraph */ +} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ #endif //FLOWGRAPH_SINK_I16_H diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI24.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI24.cpp index b944b770..d4f68b68 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI24.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI24.cpp @@ -25,19 +25,19 @@ #include #endif -using namespace flowgraph; +using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph; SinkI24::SinkI24(int32_t channelCount) : FlowGraphSink(channelCount) {} -int32_t SinkI24::read(int64_t framePosition, void *data, int32_t numFrames) { +int32_t SinkI24::read(void *data, int32_t numFrames) { uint8_t *byteData = (uint8_t *) data; const int32_t channelCount = input.getSamplesPerFrame(); int32_t framesLeft = numFrames; while (framesLeft > 0) { // Run the graph and pull data through the input port. - int32_t framesRead = pullData(framePosition, framesLeft); + int32_t framesRead = pullData(framesLeft); if (framesRead <= 0) { break; } @@ -61,7 +61,6 @@ int32_t SinkI24::read(int64_t framePosition, void *data, int32_t numFrames) { } #endif framesLeft -= framesRead; - framePosition += framesRead; } return numFrames - framesLeft; } diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI24.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI24.h index 7477c8d2..116a5790 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI24.h +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/SinkI24.h @@ -22,6 +22,7 @@ #include "FlowGraphNode.h" +namespace FLOWGRAPH_OUTER_NAMESPACE { namespace flowgraph { /** @@ -32,7 +33,7 @@ class SinkI24 : public FlowGraphSink { public: explicit SinkI24(int32_t channelCount); - int32_t read(int64_t framePosition, void *data, int32_t numFrames) override; + int32_t read(void *data, int32_t numFrames) override; const char *getName() override { return "SinkI24"; @@ -40,5 +41,6 @@ public: }; } /* namespace flowgraph */ +} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ #endif //FLOWGRAPH_SINK_I24_H diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceFloat.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceFloat.cpp index f574d842..3161ec18 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceFloat.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceFloat.cpp @@ -20,7 +20,7 @@ #include "FlowGraphNode.h" #include "SourceFloat.h" -using namespace flowgraph; +using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph; SourceFloat::SourceFloat(int32_t channelCount) : FlowGraphSourceBuffered(channelCount) { diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceFloat.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceFloat.h index 4de1b41c..d191c4c6 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceFloat.h +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceFloat.h @@ -22,6 +22,7 @@ #include "FlowGraphNode.h" +namespace FLOWGRAPH_OUTER_NAMESPACE { namespace flowgraph { /** @@ -39,5 +40,6 @@ public: }; } /* namespace flowgraph */ +} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ #endif //FLOWGRAPH_SOURCE_FLOAT_H diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI16.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI16.cpp index 88130239..16cd2b3d 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI16.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI16.cpp @@ -24,7 +24,7 @@ #include #endif -using namespace flowgraph; +using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph; SourceI16::SourceI16(int32_t channelCount) : FlowGraphSourceBuffered(channelCount) { diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI16.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI16.h index fe440b20..3e04c5e5 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI16.h +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI16.h @@ -22,6 +22,7 @@ #include "FlowGraphNode.h" +namespace FLOWGRAPH_OUTER_NAMESPACE { namespace flowgraph { /** * AudioSource that reads a block of pre-defined 16-bit integer data. @@ -38,5 +39,6 @@ public: }; } /* namespace flowgraph */ +} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ #endif //FLOWGRAPH_SOURCE_I16_H diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI24.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI24.cpp index 19758787..321f732f 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI24.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI24.cpp @@ -24,7 +24,7 @@ #include "FlowGraphNode.h" #include "SourceI24.h" -using namespace flowgraph; +using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph; constexpr int kBytesPerI24Packed = 3; diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI24.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI24.h index 37795343..69044d52 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI24.h +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/SourceI24.h @@ -22,6 +22,7 @@ #include "FlowGraphNode.h" +namespace FLOWGRAPH_OUTER_NAMESPACE { namespace flowgraph { /** @@ -39,5 +40,6 @@ public: }; } /* namespace flowgraph */ +} /* namespace FLOWGRAPH_OUTER_NAMESPACE */ #endif //FLOWGRAPH_SOURCE_I24_H diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResampler.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResampler.cpp index 4862ad8a..163cf7cb 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResampler.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResampler.cpp @@ -14,6 +14,7 @@ * limitations under the License. */ +#include #include #include "IntegerRatio.h" #include "PolyphaseResampler.h" diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResampler.h b/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResampler.h index c7de1185..52671cd2 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResampler.h +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResampler.h @@ -25,8 +25,8 @@ namespace resampler { /** - * Resample that is optimized for a reduced ratio of sample rates. - * All of the coefficients for eacxh possible phase value are precalculated. + * Resampler that is optimized for a reduced ratio of sample rates. + * All of the coefficients for each possible phase value are pre-calculated. */ class PolyphaseResampler : public MultiChannelResampler { public: diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResamplerMono.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResamplerMono.cpp index 2dcdc8ec..c0e29b7c 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResamplerMono.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResamplerMono.cpp @@ -14,6 +14,7 @@ * limitations under the License. */ +#include #include "PolyphaseResamplerMono.h" using namespace resampler; diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResamplerStereo.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResamplerStereo.cpp index 5c73a8e3..e4bef742 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResamplerStereo.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResamplerStereo.cpp @@ -14,6 +14,7 @@ * limitations under the License. */ +#include #include "PolyphaseResamplerStereo.h" using namespace resampler; diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResampler.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResampler.cpp index 1084356d..37582109 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResampler.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResampler.cpp @@ -14,6 +14,7 @@ * limitations under the License. */ +#include #include #include "SincResampler.h" diff --git a/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp b/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp index bde658a4..ce003022 100644 --- a/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp +++ b/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp @@ -14,6 +14,7 @@ * limitations under the License. */ +#include #include #include "SincResamplerStereo.h" diff --git a/modules/juce_audio_devices/native/oboe/src/opensles/AudioInputStreamOpenSLES.cpp b/modules/juce_audio_devices/native/oboe/src/opensles/AudioInputStreamOpenSLES.cpp index fcad183b..b07b0ccd 100644 --- a/modules/juce_audio_devices/native/oboe/src/opensles/AudioInputStreamOpenSLES.cpp +++ b/modules/juce_audio_devices/native/oboe/src/opensles/AudioInputStreamOpenSLES.cpp @@ -36,6 +36,7 @@ static SLuint32 OpenSLES_convertInputPreset(InputPreset oboePreset) { openslPreset = SL_ANDROID_RECORDING_PRESET_CAMCORDER; break; case InputPreset::VoiceRecognition: + case InputPreset::VoicePerformance: openslPreset = SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION; break; case InputPreset::VoiceCommunication: @@ -155,14 +156,19 @@ Result AudioInputStreamOpenSLES::open() { LOGW("%s() GetInterface(SL_IID_ANDROIDCONFIGURATION) failed with %s", __func__, getSLErrStr(result)); } else { + if (getInputPreset() == InputPreset::VoicePerformance) { + LOGD("OpenSL ES does not support InputPreset::VoicePerformance. Use VoiceRecognition."); + mInputPreset = InputPreset::VoiceRecognition; + } SLuint32 presetValue = OpenSLES_convertInputPreset(getInputPreset()); result = (*configItf)->SetConfiguration(configItf, SL_ANDROID_KEY_RECORDING_PRESET, &presetValue, sizeof(SLuint32)); if (SL_RESULT_SUCCESS != result - && presetValue != SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION) { + && presetValue != SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION) { presetValue = SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION; + LOGD("Setting InputPreset %d failed. Using VoiceRecognition instead.", getInputPreset()); mInputPreset = InputPreset::VoiceRecognition; (*configItf)->SetConfiguration(configItf, SL_ANDROID_KEY_RECORDING_PRESET, @@ -214,19 +220,16 @@ error: Result AudioInputStreamOpenSLES::close() { LOGD("AudioInputStreamOpenSLES::%s()", __func__); - mLock.lock(); + std::lock_guard lock(mLock); Result result = Result::OK; if (getState() == StreamState::Closed){ result = Result::ErrorClosed; } else { - mLock.unlock(); // avoid recursive lock - requestStop(); - mLock.lock(); + requestStop_l(); // invalidate any interfaces mRecordInterface = nullptr; - result = AudioStreamOpenSLES::close(); + result = AudioStreamOpenSLES::close_l(); } - mLock.unlock(); // avoid recursive lock return result; } @@ -294,8 +297,12 @@ Result AudioInputStreamOpenSLES::requestFlush() { Result AudioInputStreamOpenSLES::requestStop() { LOGD("AudioInputStreamOpenSLES(): %s() called", __func__); - std::lock_guard lock(mLock); + return requestStop_l(); +} + +// Call under mLock +Result AudioInputStreamOpenSLES::requestStop_l() { StreamState initialState = getState(); switch (initialState) { case StreamState::Stopping: diff --git a/modules/juce_audio_devices/native/oboe/src/opensles/AudioInputStreamOpenSLES.h b/modules/juce_audio_devices/native/oboe/src/opensles/AudioInputStreamOpenSLES.h index 7be1c96d..08e7a056 100644 --- a/modules/juce_audio_devices/native/oboe/src/opensles/AudioInputStreamOpenSLES.h +++ b/modules/juce_audio_devices/native/oboe/src/opensles/AudioInputStreamOpenSLES.h @@ -46,6 +46,7 @@ public: Result requestStop() override; protected: + Result requestStop_l(); Result updateServiceFrameCounter() override; diff --git a/modules/juce_audio_devices/native/oboe/src/opensles/AudioOutputStreamOpenSLES.cpp b/modules/juce_audio_devices/native/oboe/src/opensles/AudioOutputStreamOpenSLES.cpp index cdb88832..5791b5ec 100644 --- a/modules/juce_audio_devices/native/oboe/src/opensles/AudioOutputStreamOpenSLES.cpp +++ b/modules/juce_audio_devices/native/oboe/src/opensles/AudioOutputStreamOpenSLES.cpp @@ -243,19 +243,17 @@ Result AudioOutputStreamOpenSLES::onAfterDestroy() { } Result AudioOutputStreamOpenSLES::close() { - mLock.lock(); + LOGD("AudioOutputStreamOpenSLES::%s()", __func__); + std::lock_guard lock(mLock); Result result = Result::OK; if (getState() == StreamState::Closed){ result = Result::ErrorClosed; } else { - mLock.unlock(); // avoid recursive lock - requestPause(); - mLock.lock(); + requestPause_l(); // invalidate any interfaces mPlayInterface = nullptr; - result = AudioStreamOpenSLES::close(); + result = AudioStreamOpenSLES::close_l(); } - mLock.unlock(); // avoid recursive lock return result; } @@ -317,8 +315,12 @@ Result AudioOutputStreamOpenSLES::requestStart() { Result AudioOutputStreamOpenSLES::requestPause() { LOGD("AudioOutputStreamOpenSLES(): %s() called", __func__); - std::lock_guard lock(mLock); + return requestPause_l(); +} + +// Call under mLock +Result AudioOutputStreamOpenSLES::requestPause_l() { StreamState initialState = getState(); switch (initialState) { case StreamState::Pausing: @@ -374,8 +376,8 @@ Result AudioOutputStreamOpenSLES::requestFlush_l() { Result AudioOutputStreamOpenSLES::requestStop() { LOGD("AudioOutputStreamOpenSLES(): %s() called", __func__); - std::lock_guard lock(mLock); + StreamState initialState = getState(); switch (initialState) { case StreamState::Stopping: diff --git a/modules/juce_audio_devices/native/oboe/src/opensles/AudioOutputStreamOpenSLES.h b/modules/juce_audio_devices/native/oboe/src/opensles/AudioOutputStreamOpenSLES.h index d74faf67..ed11eb9b 100644 --- a/modules/juce_audio_devices/native/oboe/src/opensles/AudioOutputStreamOpenSLES.h +++ b/modules/juce_audio_devices/native/oboe/src/opensles/AudioOutputStreamOpenSLES.h @@ -45,6 +45,7 @@ public: Result requestStop() override; protected: + Result requestPause_l(); void setFramesRead(int64_t framesRead); diff --git a/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamBuffered.cpp b/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamBuffered.cpp index 85b9f8e4..298c1eb8 100644 --- a/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamBuffered.cpp +++ b/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamBuffered.cpp @@ -110,12 +110,22 @@ int64_t AudioStreamBuffered::predictNextCallbackTime() { // Common code for read/write. // @return Result::OK with frames read/written, or Result::Error* -ResultWithValue AudioStreamBuffered::transfer(void *buffer, - int32_t numFrames, - int64_t timeoutNanoseconds) { +ResultWithValue AudioStreamBuffered::transfer( + void *readBuffer, + const void *writeBuffer, + int32_t numFrames, + int64_t timeoutNanoseconds) { // Validate arguments. - if (buffer == nullptr) { - LOGE("AudioStreamBuffered::%s(): buffer is NULL", __func__); + if (readBuffer != nullptr && writeBuffer != nullptr) { + LOGE("AudioStreamBuffered::%s(): both buffers are not NULL", __func__); + return ResultWithValue(Result::ErrorInternal); + } + if (getDirection() == Direction::Input && readBuffer == nullptr) { + LOGE("AudioStreamBuffered::%s(): readBuffer is NULL", __func__); + return ResultWithValue(Result::ErrorNull); + } + if (getDirection() == Direction::Output && writeBuffer == nullptr) { + LOGE("AudioStreamBuffered::%s(): writeBuffer is NULL", __func__); return ResultWithValue(Result::ErrorNull); } if (numFrames < 0) { @@ -130,7 +140,8 @@ ResultWithValue AudioStreamBuffered::transfer(void *buffer, } int32_t result = 0; - uint8_t *data = reinterpret_cast(buffer); + uint8_t *readData = reinterpret_cast(readBuffer); + const uint8_t *writeData = reinterpret_cast(writeBuffer); int32_t framesLeft = numFrames; int64_t timeToQuit = 0; bool repeat = true; @@ -144,18 +155,22 @@ ResultWithValue AudioStreamBuffered::transfer(void *buffer, do { // read or write if (getDirection() == Direction::Input) { - result = mFifoBuffer->read(data, framesLeft); + result = mFifoBuffer->read(readData, framesLeft); + if (result > 0) { + readData += mFifoBuffer->convertFramesToBytes(result); + framesLeft -= result; + } } else { // between zero and capacity uint32_t fullFrames = mFifoBuffer->getFullFramesAvailable(); // Do not write above threshold size. int32_t emptyFrames = getBufferSizeInFrames() - static_cast(fullFrames); int32_t framesToWrite = std::max(0, std::min(framesLeft, emptyFrames)); - result = mFifoBuffer->write(data, framesToWrite); - } - if (result > 0) { - data += mFifoBuffer->convertFramesToBytes(result); - framesLeft -= result; + result = mFifoBuffer->write(writeData, framesToWrite); + if (result > 0) { + writeData += mFifoBuffer->convertFramesToBytes(result); + framesLeft -= result; + } } // If we need more data then sleep and try again. @@ -211,8 +226,9 @@ ResultWithValue AudioStreamBuffered::write(const void *buffer, if (getDirection() == Direction::Input) { return ResultWithValue(Result::ErrorUnavailable); // TODO review, better error code? } - updateServiceFrameCounter(); - return transfer(const_cast(buffer), numFrames, timeoutNanoseconds); + Result result = updateServiceFrameCounter(); + if (result != Result::OK) return ResultWithValue(static_cast(result)); + return transfer(nullptr, buffer, numFrames, timeoutNanoseconds); } // Read data from the FIFO that was written by the callback. @@ -226,8 +242,9 @@ ResultWithValue AudioStreamBuffered::read(void *buffer, if (getDirection() == Direction::Output) { return ResultWithValue(Result::ErrorUnavailable); // TODO review, better error code? } - updateServiceFrameCounter(); - return transfer(buffer, numFrames, timeoutNanoseconds); + Result result = updateServiceFrameCounter(); + if (result != Result::OK) return ResultWithValue(static_cast(result)); + return transfer(buffer, nullptr, numFrames, timeoutNanoseconds); } // Only supported when we are not using a callback. @@ -260,7 +277,7 @@ int32_t AudioStreamBuffered::getBufferCapacityInFrames() const { bool AudioStreamBuffered::isXRunCountSupported() const { // XRun count is only supported if we're using blocking I/O (not callbacks) - return (getCallback() == nullptr); + return (!isDataCallbackSpecified()); } } // namespace oboe \ No newline at end of file diff --git a/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamBuffered.h b/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamBuffered.h index 5923e8db..d7e88850 100644 --- a/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamBuffered.h +++ b/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamBuffered.h @@ -60,7 +60,7 @@ protected: DataCallbackResult onDefaultCallback(void *audioData, int numFrames) override; // If there is no callback then we need a FIFO between the App and OpenSL ES. - bool usingFIFO() const { return getCallback() == nullptr; } + bool usingFIFO() const { return !isDataCallbackSpecified(); } virtual Result updateServiceFrameCounter() = 0; @@ -74,7 +74,11 @@ private: void markCallbackTime(int32_t numFrames); // Read or write to the FIFO. - ResultWithValue transfer(void *buffer, int32_t numFrames, int64_t timeoutNanoseconds); + // Only pass one pointer and set the other to nullptr. + ResultWithValue transfer(void *readBuffer, + const void *writeBuffer, + int32_t numFrames, + int64_t timeoutNanoseconds); void incrementXRunCount() { ++mXRunCount; diff --git a/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamOpenSLES.cpp b/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamOpenSLES.cpp index 3af1a30e..2b699352 100644 --- a/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamOpenSLES.cpp +++ b/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamOpenSLES.cpp @@ -134,6 +134,13 @@ Result AudioStreamOpenSLES::configureBufferSizes(int32_t sampleRate) { if (!usingFIFO()) { mBufferCapacityInFrames = mFramesPerBurst * kBufferQueueLength; + // Check for overflow. + if (mBufferCapacityInFrames <= 0) { + mBufferCapacityInFrames = 0; + LOGE("AudioStreamOpenSLES::open() numeric overflow because mFramesPerBurst = %d", + mFramesPerBurst); + return Result::ErrorOutOfRange; + } mBufferSizeInFrames = mBufferCapacityInFrames; } @@ -208,12 +215,6 @@ void AudioStreamOpenSLES::logUnsupportedAttributes() { LOGW("SessionId [AudioStreamBuilder::setSessionId()] " "is not supported on OpenSLES streams."); } - - // Input Preset - if (mInputPreset != InputPreset::VoiceRecognition) { - LOGW("InputPreset [AudioStreamBuilder::setInputPreset()] " - "is not supported on OpenSLES streams."); - } } SLresult AudioStreamOpenSLES::configurePerformanceMode(SLAndroidConfigurationItf configItf) { @@ -266,7 +267,8 @@ SLresult AudioStreamOpenSLES::updateStreamParameters(SLAndroidConfigurationItf c return result; } -Result AudioStreamOpenSLES::close() { +// This is called under mLock. +Result AudioStreamOpenSLES::close_l() { if (mState == StreamState::Closed) { return Result::ErrorClosed; } @@ -381,7 +383,7 @@ Result AudioStreamOpenSLES::waitForStateChange(StreamState currentState, } // Did we timeout or did user ask for non-blocking? - if (timeoutNanoseconds <= 0) { + if (timeLeftNanos <= 0) { break; } diff --git a/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamOpenSLES.h b/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamOpenSLES.h index 81fdc63e..10a730b7 100644 --- a/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamOpenSLES.h +++ b/modules/juce_audio_devices/native/oboe/src/opensles/AudioStreamOpenSLES.h @@ -50,7 +50,6 @@ public: virtual ~AudioStreamOpenSLES() = default; virtual Result open() override; - virtual Result close() override; /** * Query the current state, eg. OBOE_STREAM_STATE_PAUSING @@ -80,6 +79,9 @@ public: protected: + // This must be called under mLock. + Result close_l(); + SLuint32 channelCountToChannelMaskDefault(int channelCount) const; virtual Result onBeforeDestroy() { return Result::OK; } diff --git a/modules/juce_audio_devices/native/oboe/src/opensles/OpenSLESUtilities.cpp b/modules/juce_audio_devices/native/oboe/src/opensles/OpenSLESUtilities.cpp index 071c0d08..4be23b37 100644 --- a/modules/juce_audio_devices/native/oboe/src/opensles/OpenSLESUtilities.cpp +++ b/modules/juce_audio_devices/native/oboe/src/opensles/OpenSLESUtilities.cpp @@ -24,42 +24,42 @@ namespace oboe { const char *getSLErrStr(SLresult code) { switch (code) { - case 0: + case SL_RESULT_SUCCESS: return "SL_RESULT_SUCCESS"; - case 1: - return "SL_RESULT_PRECONDITIONS_VIOLATE"; - case 2: + case SL_RESULT_PRECONDITIONS_VIOLATED: + return "SL_RESULT_PRECONDITIONS_VIOLATED"; + case SL_RESULT_PARAMETER_INVALID: return "SL_RESULT_PARAMETER_INVALID"; - case 3: + case SL_RESULT_MEMORY_FAILURE: return "SL_RESULT_MEMORY_FAILURE"; - case 4: + case SL_RESULT_RESOURCE_ERROR: return "SL_RESULT_RESOURCE_ERROR"; - case 5: + case SL_RESULT_RESOURCE_LOST: return "SL_RESULT_RESOURCE_LOST"; - case 6: + case SL_RESULT_IO_ERROR: return "SL_RESULT_IO_ERROR"; - case 7: + case SL_RESULT_BUFFER_INSUFFICIENT: return "SL_RESULT_BUFFER_INSUFFICIENT"; - case 8: + case SL_RESULT_CONTENT_CORRUPTED: return "SL_RESULT_CONTENT_CORRUPTED"; - case 9: + case SL_RESULT_CONTENT_UNSUPPORTED: return "SL_RESULT_CONTENT_UNSUPPORTED"; - case 10: + case SL_RESULT_CONTENT_NOT_FOUND: return "SL_RESULT_CONTENT_NOT_FOUND"; - case 11: + case SL_RESULT_PERMISSION_DENIED: return "SL_RESULT_PERMISSION_DENIED"; - case 12: + case SL_RESULT_FEATURE_UNSUPPORTED: return "SL_RESULT_FEATURE_UNSUPPORTED"; - case 13: + case SL_RESULT_INTERNAL_ERROR: return "SL_RESULT_INTERNAL_ERROR"; - case 14: + case SL_RESULT_UNKNOWN_ERROR: return "SL_RESULT_UNKNOWN_ERROR"; - case 15: + case SL_RESULT_OPERATION_ABORTED: return "SL_RESULT_OPERATION_ABORTED"; - case 16: + case SL_RESULT_CONTROL_LOST: return "SL_RESULT_CONTROL_LOST"; default: - return "Unknown error"; + return "Unknown SL error"; } } diff --git a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp index b2167cf4..a389d009 100644 --- a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp @@ -67,25 +67,25 @@ namespace AiffFileHelpers Loop sustainLoop; Loop releaseLoop; - void copyTo (StringPairArray& values) const + void copyTo (std::map& values) const { - values.set ("MidiUnityNote", String (baseNote)); - values.set ("Detune", String (detune)); + values.emplace ("MidiUnityNote", String (baseNote)); + values.emplace ("Detune", String (detune)); - values.set ("LowNote", String (lowNote)); - values.set ("HighNote", String (highNote)); - values.set ("LowVelocity", String (lowVelocity)); - values.set ("HighVelocity", String (highVelocity)); + values.emplace ("LowNote", String (lowNote)); + values.emplace ("HighNote", String (highNote)); + values.emplace ("LowVelocity", String (lowVelocity)); + values.emplace ("HighVelocity", String (highVelocity)); - values.set ("Gain", String ((int16) ByteOrder::swapIfLittleEndian ((uint16) gain))); + values.emplace ("Gain", String ((int16) ByteOrder::swapIfLittleEndian ((uint16) gain))); - values.set ("NumSampleLoops", String (2)); // always 2 with AIFF, WAV can have more - values.set ("Loop0Type", String (ByteOrder::swapIfLittleEndian (sustainLoop.type))); - values.set ("Loop0StartIdentifier", String (ByteOrder::swapIfLittleEndian (sustainLoop.startIdentifier))); - values.set ("Loop0EndIdentifier", String (ByteOrder::swapIfLittleEndian (sustainLoop.endIdentifier))); - values.set ("Loop1Type", String (ByteOrder::swapIfLittleEndian (releaseLoop.type))); - values.set ("Loop1StartIdentifier", String (ByteOrder::swapIfLittleEndian (releaseLoop.startIdentifier))); - values.set ("Loop1EndIdentifier", String (ByteOrder::swapIfLittleEndian (releaseLoop.endIdentifier))); + values.emplace ("NumSampleLoops", String (2)); // always 2 with AIFF, WAV can have more + values.emplace ("Loop0Type", String (ByteOrder::swapIfLittleEndian (sustainLoop.type))); + values.emplace ("Loop0StartIdentifier", String (ByteOrder::swapIfLittleEndian (sustainLoop.startIdentifier))); + values.emplace ("Loop0EndIdentifier", String (ByteOrder::swapIfLittleEndian (sustainLoop.endIdentifier))); + values.emplace ("Loop1Type", String (ByteOrder::swapIfLittleEndian (releaseLoop.type))); + values.emplace ("Loop1StartIdentifier", String (ByteOrder::swapIfLittleEndian (releaseLoop.startIdentifier))); + values.emplace ("Loop1EndIdentifier", String (ByteOrder::swapIfLittleEndian (releaseLoop.endIdentifier))); } static uint16 getValue16 (const StringPairArray& values, const char* name, const char* def) @@ -149,7 +149,7 @@ namespace AiffFileHelpers input.read (unknown, sizeof (unknown)); } - void addToMetadata (StringPairArray& metadata) const + void addToMetadata (std::map& metadata) const { const bool rootNoteSet = rootNote != 0; @@ -157,11 +157,11 @@ namespace AiffFileHelpers setBoolFlag (metadata, AiffAudioFormat::appleRootSet, rootNoteSet); if (rootNoteSet) - metadata.set (AiffAudioFormat::appleRootNote, String (rootNote)); + metadata.emplace (AiffAudioFormat::appleRootNote, String (rootNote)); - metadata.set (AiffAudioFormat::appleBeats, String (numBeats)); - metadata.set (AiffAudioFormat::appleDenominator, String (timeSigDen)); - metadata.set (AiffAudioFormat::appleNumerator, String (timeSigNum)); + metadata.emplace (AiffAudioFormat::appleBeats, String (numBeats)); + metadata.emplace (AiffAudioFormat::appleDenominator, String (timeSigDen)); + metadata.emplace (AiffAudioFormat::appleNumerator, String (timeSigNum)); const char* keyString = nullptr; @@ -175,12 +175,14 @@ namespace AiffFileHelpers } if (keyString != nullptr) - metadata.set (AiffAudioFormat::appleKey, keyString); + metadata.emplace (AiffAudioFormat::appleKey, keyString); } - void setBoolFlag (StringPairArray& values, const char* name, bool shouldBeSet) const + void setBoolFlag (std::map& values, + const char* name, + bool shouldBeSet) const { - values.set (name, shouldBeSet ? "1" : "0"); + values.emplace (name, shouldBeSet ? "1" : "0"); } uint32 flags; @@ -388,6 +390,17 @@ public: { using namespace AiffFileHelpers; + std::map metadataValuesMap; + + for (int i = 0; i != metadataValues.size(); ++i) + { + metadataValuesMap.emplace (metadataValues.getAllKeys().getReference (i), + metadataValues.getAllValues().getReference (i)); + } + + // If this fails, there were duplicate keys in the metadata + jassert ((size_t) metadataValuesMap.size() == (size_t) metadataValues.size()); + if (input->readInt() == chunkName ("FORM")) { auto len = input->readIntBigEndian(); @@ -479,8 +492,8 @@ public: auto numCues = (uint16) input->readShortBigEndian(); // these two are always the same for AIFF-read files - metadataValues.set ("NumCuePoints", String (numCues)); - metadataValues.set ("NumCueLabels", String (numCues)); + metadataValuesMap.emplace ("NumCuePoints", String (numCues)); + metadataValuesMap.emplace ("NumCueLabels", String (numCues)); for (uint16 i = 0; i < numCues; ++i) { @@ -497,18 +510,18 @@ public: input->readByte(); auto prefixCue = "Cue" + String (i); - metadataValues.set (prefixCue + "Identifier", String (identifier)); - metadataValues.set (prefixCue + "Offset", String (offset)); + metadataValuesMap.emplace (prefixCue + "Identifier", String (identifier)); + metadataValuesMap.emplace (prefixCue + "Offset", String (offset)); auto prefixLabel = "CueLabel" + String (i); - metadataValues.set (prefixLabel + "Identifier", String (identifier)); - metadataValues.set (prefixLabel + "Text", textBlock.toString()); + metadataValuesMap.emplace (prefixLabel + "Identifier", String (identifier)); + metadataValuesMap.emplace (prefixLabel + "Text", textBlock.toString()); } } else if (type == chunkName ("COMT")) { auto numNotes = (uint16) input->readShortBigEndian(); - metadataValues.set ("NumCueNotes", String (numNotes)); + metadataValuesMap.emplace ("NumCueNotes", String (numNotes)); for (uint16 i = 0; i < numNotes; ++i) { @@ -520,9 +533,9 @@ public: input->readIntoMemoryBlock (textBlock, stringLength + (stringLength & 1)); auto prefix = "CueNote" + String (i); - metadataValues.set (prefix + "TimeStamp", String (timestamp)); - metadataValues.set (prefix + "Identifier", String (identifier)); - metadataValues.set (prefix + "Text", textBlock.toString()); + metadataValuesMap.emplace (prefix + "TimeStamp", String (timestamp)); + metadataValuesMap.emplace (prefix + "Identifier", String (identifier)); + metadataValuesMap.emplace (prefix + "Text", textBlock.toString()); } } else if (type == chunkName ("INST")) @@ -530,16 +543,16 @@ public: HeapBlock inst; inst.calloc (jmax ((size_t) length + 1, sizeof (InstChunk)), 1); input->read (inst, (int) length); - inst->copyTo (metadataValues); + inst->copyTo (metadataValuesMap); } else if (type == chunkName ("basc")) { - AiffFileHelpers::BASCChunk (*input).addToMetadata (metadataValues); + AiffFileHelpers::BASCChunk (*input).addToMetadata (metadataValuesMap); } else if (type == chunkName ("cate")) { - metadataValues.set (AiffAudioFormat::appleTag, - AiffFileHelpers::CATEChunk::read (*input, length)); + metadataValuesMap.emplace (AiffAudioFormat::appleTag, + AiffFileHelpers::CATEChunk::read (*input, length)); } else if ((hasGotVer && hasGotData && hasGotType) || chunkEnd < input->getPosition() @@ -553,8 +566,10 @@ public: } } - if (metadataValues.size() > 0) - metadataValues.set ("MetaDataSource", "AIFF"); + if (metadataValuesMap.size() > 0) + metadataValuesMap.emplace ("MetaDataSource", "AIFF"); + + metadataValues.addMap (metadataValuesMap); } //============================================================================== diff --git a/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp index 44bec28e..f355b644 100644 --- a/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp @@ -492,7 +492,9 @@ struct MP3Frame return frequencies[sampleRateIndex]; } - void decodeHeader (const uint32 header) + enum class ParseSuccessful { no, yes }; + + ParseSuccessful decodeHeader (const uint32 header) { jassert (((header >> 10) & 3) != 3); @@ -527,17 +529,18 @@ struct MP3Frame jassertfalse; // This means the file is using "free format". Apparently very few decoders // support this mode, and this one certainly doesn't handle it correctly! frameSize = 0; + return ParseSuccessful::no; } - else + + switch (layer) { - switch (layer) - { - case 1: frameSize = (((frameSizes[lsf][0][bitrateIndex] * 12000) / getFrequency() + padding) * 4) - 4; break; - case 2: frameSize = (frameSizes[lsf][1][bitrateIndex] * 144000) / getFrequency() + (padding - 4); break; - case 3: frameSize = (bitrateIndex == 0) ? 0 : ((frameSizes[lsf][2][bitrateIndex] * 144000) / (getFrequency() << lsf) + (padding - 4)); break; - default: break; - } + case 1: frameSize = (((frameSizes[lsf][0][bitrateIndex] * 12000) / getFrequency() + padding) * 4) - 4; break; + case 2: frameSize = (frameSizes[lsf][1][bitrateIndex] * 144000) / getFrequency() + (padding - 4); break; + case 3: frameSize = (bitrateIndex == 0) ? 0 : ((frameSizes[lsf][2][bitrateIndex] * 144000) / (getFrequency() << lsf) + (padding - 4)); break; + default: break; } + + return ParseSuccessful::yes; } int layer, frameSize, numChannels, single; @@ -1430,7 +1433,11 @@ struct MP3Stream lastFrameSize += nextFrameOffset; } - frame.decodeHeader ((uint32) stream.readIntBigEndian()); + const auto successful = frame.decodeHeader ((uint32) stream.readIntBigEndian()); + + if (successful == MP3Frame::ParseSuccessful::no) + return -1; + headerParsed = true; frameSize = frame.frameSize; isFreeFormat = (frameSize == 0); diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp index f25261c2..7642040b 100644 --- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp @@ -993,10 +993,12 @@ public: input->skipNextBytes (2); bitsPerSample = (unsigned int) (int) input->readShort(); - if (bitsPerSample > 64) + if (bitsPerSample > 64 && (int) sampleRate != 0) { bytesPerFrame = bytesPerSec / (int) sampleRate; - bitsPerSample = 8 * (unsigned int) bytesPerFrame / numChannels; + + if (numChannels != 0) + bitsPerSample = 8 * (unsigned int) bytesPerFrame / numChannels; } else { diff --git a/modules/juce_audio_formats/juce_audio_formats.h b/modules/juce_audio_formats/juce_audio_formats.h index 257cef73..f5cf70d8 100644 --- a/modules/juce_audio_formats/juce_audio_formats.h +++ b/modules/juce_audio_formats/juce_audio_formats.h @@ -35,7 +35,7 @@ ID: juce_audio_formats vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE audio file format codecs description: Classes for reading and writing various audio file formats. website: http://www.juce.com/juce 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 3e63d337..4ee29755 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -231,9 +231,26 @@ public: return getParamForVSTParamID (bypassParamID); } + AudioProcessorParameter* getProgramParameter() const noexcept + { + return getParamForVSTParamID (JuceAudioProcessor::paramPreset); + } + static Vst::UnitID getUnitID (const AudioProcessorParameterGroup* group) { - return group == nullptr ? Vst::kRootUnitId : group->getID().hashCode(); + if (group == nullptr || group->getParent() == nullptr) + return Vst::kRootUnitId; + + // From the VST3 docs: + // Up to 2^31 parameters can be exported with id range [0, 2147483648] + // (the range [2147483649, 429496729] is reserved for host application). + auto unitID = group->getID().hashCode() & 0x7fffffff; + + // If you hit this assertion then your group ID is hashing to a value + // reserved by the VST3 SDK. Use a different group ID. + jassert (unitID != Vst::kRootUnitId); + + return unitID; } int getNumParameters() const noexcept { return vstParamIDs.size(); } @@ -263,6 +280,21 @@ private: { parameterGroups = audioProcessor->getParameterTree().getSubgroups (true); + #if JUCE_DEBUG + auto allGroups = parameterGroups; + allGroups.add (&audioProcessor->getParameterTree()); + std::unordered_set unitIDs; + + for (auto* group : allGroups) + { + auto insertResult = unitIDs.insert (getUnitID (group)); + + // If you hit this assertion then either a group ID is not unique or + // you are very unlucky and a hashed group ID is not unique + jassert (insertResult.second); + } + #endif + #if JUCE_FORCE_USE_LEGACY_PARAM_IDS const bool forceLegacyParamIDs = true; #else @@ -309,6 +341,20 @@ private: vstParamIDs.add (vstParamID); paramMap.set (static_cast (vstParamID), juceParam); } + + auto numPrograms = audioProcessor->getNumPrograms(); + + if (numPrograms > 1) + { + ownedProgramParameter = std::make_unique ("juceProgramParameter", "Program", + 0, numPrograms - 1, + audioProcessor->getCurrentProgram()); + + juceParameters.params.add (ownedProgramParameter.get()); + + vstParamIDs.add (JuceAudioProcessor::paramPreset); + paramMap.set (static_cast (JuceAudioProcessor::paramPreset), ownedProgramParameter.get()); + } } Vst::ParamID generateVSTParamIDForParam (AudioProcessorParameter* param) @@ -336,7 +382,7 @@ private: //============================================================================== LegacyAudioParametersWrapper juceParameters; HashMap paramMap; - std::unique_ptr ownedBypassParameter; + std::unique_ptr ownedBypassParameter, ownedProgramParameter; Array parameterGroups; JuceAudioProcessor() = delete; @@ -352,8 +398,7 @@ class JuceVST3EditController : public Vst::EditController, public Vst::IMidiMapping, public Vst::IUnitInfo, public Vst::ChannelContext::IInfoListener, - public AudioProcessorListener, - private AudioProcessorParameter::Listener + public AudioProcessorListener { public: JuceVST3EditController (Vst::IHostApplication* host) @@ -567,16 +612,20 @@ public: bool setNormalized (Vst::ParamValue v) override { - Vst::ParamValue program = v * info.stepCount; + auto programValue = roundToInt (toPlain (v)); - if (! isPositiveAndBelow ((int) program, owner.getNumPrograms())) - return false; - - if (valueNormalized != v) + if (isPositiveAndBelow (programValue, owner.getNumPrograms())) { - valueNormalized = v; - changed(); - return true; + if (programValue != owner.getCurrentProgram()) + owner.setCurrentProgram (programValue); + + if (valueNormalized != v) + { + valueNormalized = v; + changed(); + + return true; + } } return false; @@ -657,17 +706,8 @@ public: tresult PLUGIN_API setComponentState (IBStream* stream) override { // Cubase and Nuendo need to inform the host of the current parameter values - if (auto* pluginInstance = getPluginInstance()) - { - for (auto vstParamId : audioProcessor->vstParamIDs) - setParamNormalized (vstParamId, audioProcessor->getParamForVSTParamID (vstParamId)->getValue()); - - auto numPrograms = pluginInstance->getNumPrograms(); - - if (numPrograms > 1) - setParamNormalized (JuceAudioProcessor::paramPreset, static_cast (pluginInstance->getCurrentProgram()) - / static_cast (numPrograms - 1)); - } + for (auto vstParamId : audioProcessor->vstParamIDs) + setParamNormalized (vstParamId, audioProcessor->getParamForVSTParamID (vstParamId)->getValue()); if (auto* handler = getComponentHandler()) handler->restartComponent (Vst::kParamValuesChanged); @@ -885,7 +925,7 @@ public: } //============================================================================== - void paramChanged (Vst::ParamID vstParamId, float newValue) + void paramChanged (Vst::ParamID vstParamId, double newValue) { if (inParameterChangedCallback.get()) { @@ -894,8 +934,8 @@ public: } // NB: Cubase has problems if performEdit is called without setParamNormalized - EditController::setParamNormalized (vstParamId, (double) newValue); - performEdit (vstParamId, (double) newValue); + EditController::setParamNormalized (vstParamId, newValue); + performEdit (vstParamId, newValue); } //============================================================================== @@ -918,28 +958,29 @@ public: if (auto* pluginInstance = getPluginInstance()) { - auto newNumPrograms = pluginInstance->getNumPrograms(); - - if (newNumPrograms != lastNumPrograms) + if (audioProcessor->getProgramParameter() != nullptr) { - if (newNumPrograms > 1) + auto currentProgram = pluginInstance->getCurrentProgram(); + auto paramValue = roundToInt (EditController::normalizedParamToPlain (JuceAudioProcessor::paramPreset, + EditController::getParamNormalized (JuceAudioProcessor::paramPreset))); + + if (currentProgram != paramValue) { - auto paramValue = static_cast (pluginInstance->getCurrentProgram()) - / static_cast (pluginInstance->getNumPrograms() - 1); + beginEdit (JuceAudioProcessor::paramPreset); + paramChanged (JuceAudioProcessor::paramPreset, + EditController::plainParamToNormalized (JuceAudioProcessor::paramPreset, currentProgram)); + endEdit (JuceAudioProcessor::paramPreset); - EditController::setParamNormalized (JuceAudioProcessor::paramPreset, paramValue); flags |= Vst::kParamValuesChanged; } - - lastNumPrograms = newNumPrograms; } - auto newLatencySamples = pluginInstance->getLatencySamples(); + auto latencySamples = pluginInstance->getLatencySamples(); - if (newLatencySamples != lastLatencySamples) + if (latencySamples != lastLatencySamples) { flags |= Vst::kLatencyChanged; - lastLatencySamples = newLatencySamples; + lastLatencySamples = latencySamples; } } @@ -947,19 +988,6 @@ public: componentHandler->restartComponent (flags); } - void parameterValueChanged (int, float newValue) override - { - // this can only come from the bypass parameter - paramChanged (audioProcessor->bypassParamID, newValue); - } - - void parameterGestureChanged (int, bool gestureIsStarting) override - { - // this can only come from the bypass parameter - if (gestureIsStarting) beginEdit (audioProcessor->bypassParamID); - else endEdit (audioProcessor->bypassParamID); - } - //============================================================================== AudioProcessor* getPluginInstance() const noexcept { @@ -986,11 +1014,42 @@ private: MidiController parameterToMidiController[(int) numMIDIChannels * (int) Vst::kCountCtrlNumber]; Vst::ParamID midiControllerToParameter[numMIDIChannels][Vst::kCountCtrlNumber]; + //============================================================================== + struct OwnedParameterListener : public AudioProcessorParameter::Listener + { + OwnedParameterListener (JuceVST3EditController& editController, + AudioProcessorParameter& juceParameter, + Vst::ParamID paramID) + : owner (editController), + vstParamID (paramID) + { + juceParameter.addListener (this); + } + + void parameterValueChanged (int, float newValue) override + { + owner.paramChanged (vstParamID, newValue); + } + + void parameterGestureChanged (int, bool gestureIsStarting) override + { + if (gestureIsStarting) + owner.beginEdit (vstParamID); + else + owner.endEdit (vstParamID); + } + + JuceVST3EditController& owner; + Vst::ParamID vstParamID; + }; + + std::vector> ownedParameterListeners; + //============================================================================== std::atomic vst3IsPlaying { false }, inSetupProcessing { false }; - int lastNumPrograms = 0, lastLatencySamples = 0; + int lastLatencySamples = 0; #if ! JUCE_MAC float lastScaleFactorReceived = 1.0f; @@ -1002,10 +1061,11 @@ private: { pluginInstance->addListener (this); - // as the bypass is not part of the regular parameters - // we need to listen for it explicitly + // as the bypass is not part of the regular parameters we need to listen for it explicitly if (! audioProcessor->bypassIsRegularParameter) - audioProcessor->getBypassParameter()->addListener (this); + ownedParameterListeners.push_back (std::make_unique (*this, + *audioProcessor->getBypassParameter(), + audioProcessor->bypassParamID)); if (parameters.getParameterCount() <= 0) { @@ -1014,6 +1074,10 @@ private: for (int i = 0; i < n; ++i) { auto vstParamID = audioProcessor->getVSTParamIDForIndex (i); + + if (vstParamID == JuceAudioProcessor::paramPreset) + continue; + auto* juceParam = audioProcessor->getParamForVSTParamID (vstParamID); auto* parameterGroup = pluginInstance->getParameterTree().getGroupsForParameter (juceParam).getLast(); auto unitID = JuceAudioProcessor::getUnitID (parameterGroup); @@ -1022,8 +1086,14 @@ private: (vstParamID == audioProcessor->bypassParamID))); } - if (pluginInstance->getNumPrograms() > 1) + if (auto* programParam = audioProcessor->getProgramParameter()) + { + ownedParameterListeners.push_back (std::make_unique (*this, + *programParam, + JuceAudioProcessor::paramPreset)); + parameters.addParameter (new ProgramChangeParameter (*pluginInstance)); + } } #if JUCE_VST3_EMULATE_MIDI_CC_WITH_PARAMETERS @@ -2558,20 +2628,11 @@ public: { auto vstParamID = paramQueue->getParameterId(); - if (vstParamID == JuceAudioProcessor::paramPreset) - { - auto numPrograms = pluginInstance->getNumPrograms(); - auto programValue = roundToInt (value * (jmax (0, numPrograms - 1))); - - if (numPrograms > 1 && isPositiveAndBelow (programValue, numPrograms) - && programValue != pluginInstance->getCurrentProgram()) - pluginInstance->setCurrentProgram (programValue); - } #if JUCE_VST3_EMULATE_MIDI_CC_WITH_PARAMETERS - else if (juceVST3EditController != nullptr && juceVST3EditController->isMidiControllerParamID (vstParamID)) + if (juceVST3EditController != nullptr && juceVST3EditController->isMidiControllerParamID (vstParamID)) addParameterChangeToMidiBuffer (offsetSamples, vstParamID, value); - #endif else + #endif { auto floatValue = static_cast (value); 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 015844ee..7e43e6a9 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client.h +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client.h @@ -35,7 +35,7 @@ ID: juce_audio_plugin_client vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE audio plugin wrapper classes description: Classes for building VST, VST3, AudioUnit, AAX and RTAS plugins. website: http://www.juce.com/juce diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index 5d8eef93..19826842 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -25,6 +25,8 @@ #if JUCE_PLUGINHOST_AU && (JUCE_MAC || JUCE_IOS) +JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") + #if JUCE_MAC #include #include @@ -243,7 +245,8 @@ namespace AudioUnitFormatHelpers if (Handle h = Get1IndResource (thngType, i)) { HLock (h); - const uint32* const types = (const uint32*) *h; + uint32 types[3]; + std::memcpy (types, *h, sizeof (types)); if (types[0] == kAudioUnitType_MusicDevice || types[0] == kAudioUnitType_MusicEffect @@ -2908,4 +2911,6 @@ FileSearchPath AudioUnitPluginFormat::getDefaultLocationsToSearch() } // namespace juce +JUCE_END_IGNORE_WARNINGS_GCC_LIKE + #endif diff --git a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp index 19f1d7ac..176150e6 100644 --- a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp @@ -374,7 +374,7 @@ public: destData.setSize ((size_t) numParameters * sizeof (float)); destData.fillWith (0); - auto* p = (float*) ((char*) destData.getData()); + auto* p = unalignedPointerCast (destData.getData()); for (int i = 0; i < numParameters; ++i) if (auto* param = getParameters()[i]) diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index 23d7ae17..d3b19a21 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -55,6 +55,7 @@ namespace Vst2 JUCE_END_IGNORE_WARNINGS_GCC_LIKE JUCE_END_IGNORE_WARNINGS_MSVC +JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4355) #include "juce_VSTMidiEventList.h" @@ -1768,9 +1769,9 @@ struct VSTPluginInstance : public AudioPluginInstance, { if (i != oldProg) { - auto prog = (const fxProgram*) (((const char*) (set->programs)) + i * progLen); + auto prog = addBytesToPointer (set->programs, i * progLen); - if (((const char*) prog) - ((const char*) set) >= (ssize_t) dataSize) + if (getAddressDifference (prog, set) >= (int) dataSize) return false; if (fxbSwap (set->numPrograms) > 0) @@ -1784,9 +1785,9 @@ struct VSTPluginInstance : public AudioPluginInstance, if (fxbSwap (set->numPrograms) > 0) setCurrentProgram (oldProg); - auto prog = (const fxProgram*) (((const char*) (set->programs)) + oldProg * progLen); + auto prog = addBytesToPointer (set->programs, oldProg * progLen); - if (((const char*) prog) - ((const char*) set) >= (ssize_t) dataSize) + if (getAddressDifference (prog, set) >= (int) dataSize) return false; if (! restoreProgramSettings (prog)) @@ -1906,14 +1907,14 @@ struct VSTPluginInstance : public AudioPluginInstance, auto oldProgram = getCurrentProgram(); if (oldProgram >= 0) - setParamsInProgramBlock ((fxProgram*) (((char*) (set->programs)) + oldProgram * progLen)); + setParamsInProgramBlock (addBytesToPointer (set->programs, oldProgram * progLen)); for (int i = 0; i < numPrograms; ++i) { if (i != oldProgram) { setCurrentProgram (i); - setParamsInProgramBlock ((fxProgram*) (((char*) (set->programs)) + i * progLen)); + setParamsInProgramBlock (addBytesToPointer (set->programs, i * progLen)); } } @@ -2591,7 +2592,7 @@ private: getCurrentProgramName().copyToUTF8 ((char*) dest.getData(), 63); - auto p = (float*) (((char*) dest.getData()) + 64); + auto p = unalignedPointerCast (((char*) dest.getData()) + 64); for (int i = 0; i < numParameters; ++i) if (auto* param = getParameters()[i]) @@ -2602,7 +2603,7 @@ private: { changeProgramName (getCurrentProgram(), (const char*) m.getData()); - auto p = (float*) (((char*) m.getData()) + 64); + auto p = unalignedPointerCast (((char*) m.getData()) + 64); auto numParameters = getParameters().size(); for (int i = 0; i < numParameters; ++i) @@ -3743,6 +3744,7 @@ void VSTPluginFormat::aboutToScanVSTShellPlugin (const PluginDescription&) {} } // namespace juce +JUCE_END_IGNORE_WARNINGS_GCC_LIKE JUCE_END_IGNORE_WARNINGS_MSVC #endif diff --git a/modules/juce_audio_processors/juce_audio_processors.cpp b/modules/juce_audio_processors/juce_audio_processors.cpp index ac194a19..fb0d8e14 100644 --- a/modules/juce_audio_processors/juce_audio_processors.cpp +++ b/modules/juce_audio_processors/juce_audio_processors.cpp @@ -134,8 +134,6 @@ struct AutoResizingNSViewComponentWithParent : public AutoResizingNSViewCompone } // namespace juce -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations", "-Wcast-align") - #include "format/juce_AudioPluginFormat.cpp" #include "format/juce_AudioPluginFormatManager.cpp" #include "format_types/juce_LegacyAudioParameter.cpp" diff --git a/modules/juce_audio_processors/juce_audio_processors.h b/modules/juce_audio_processors/juce_audio_processors.h index 67d5074c..deda7366 100644 --- a/modules/juce_audio_processors/juce_audio_processors.h +++ b/modules/juce_audio_processors/juce_audio_processors.h @@ -35,7 +35,7 @@ ID: juce_audio_processors vendor: juce - version: 6.0.5 + version: 6.0.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 diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp index c8059913..1c23e9d3 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp @@ -443,6 +443,24 @@ void AudioProcessor::checkForDuplicateParamID (AudioProcessorParameter* param) #endif } +void AudioProcessor::checkForDuplicateGroupIDs (const AudioProcessorParameterGroup& newGroup) +{ + ignoreUnused (newGroup); + + #if JUCE_DEBUG + auto groups = newGroup.getSubgroups (true); + groups.add (&newGroup); + + for (auto* group : groups) + { + auto insertResult = groupIDs.insert (group->getID()); + + // If you hit this assertion then a group ID is not unique + jassert (insertResult.second); + } + #endif +} + const Array& AudioProcessor::getParameters() const { return flatParameterList; } const AudioProcessorParameterGroup& AudioProcessor::getParameterTree() const { return parameterTree; } @@ -461,6 +479,7 @@ void AudioProcessor::addParameter (AudioProcessorParameter* param) void AudioProcessor::addParameterGroup (std::unique_ptr group) { jassert (group != nullptr); + checkForDuplicateGroupIDs (*group); auto oldSize = flatParameterList.size(); flatParameterList.addArray (group->getParameters (true)); @@ -481,9 +500,12 @@ void AudioProcessor::setParameterTree (AudioProcessorParameterGroup&& newTree) { #if JUCE_DEBUG paramIDs.clear(); + groupIDs.clear(); #endif parameterTree = std::move (newTree); + checkForDuplicateGroupIDs (parameterTree); + flatParameterList = parameterTree.getParameters (true); for (int i = 0; i < flatParameterList.size(); ++i) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 02c3de12..27e43386 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -1487,10 +1487,11 @@ private: #endif bool textRecursionCheck = false; - std::unordered_set paramIDs; + std::unordered_set paramIDs, groupIDs; #endif void checkForDuplicateParamID (AudioProcessorParameter*); + void checkForDuplicateGroupIDs (const AudioProcessorParameterGroup&); AudioProcessorListener* getListenerLocked (int) const noexcept; void updateSpeakerFormatStrings(); diff --git a/modules/juce_audio_utils/juce_audio_utils.h b/modules/juce_audio_utils/juce_audio_utils.h index 4f32a51a..dde97cb8 100644 --- a/modules/juce_audio_utils/juce_audio_utils.h +++ b/modules/juce_audio_utils/juce_audio_utils.h @@ -35,7 +35,7 @@ ID: juce_audio_utils vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE extra audio utility classes description: Classes for audio-related GUI and miscellaneous tasks. website: http://www.juce.com/juce diff --git a/modules/juce_blocks_basics/juce_blocks_basics.h b/modules/juce_blocks_basics/juce_blocks_basics.h index 1058aa45..f6a95674 100644 --- a/modules/juce_blocks_basics/juce_blocks_basics.h +++ b/modules/juce_blocks_basics/juce_blocks_basics.h @@ -32,7 +32,7 @@ ID: juce_blocks_basics vendor: juce - version: 6.0.5 + version: 6.0.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 diff --git a/modules/juce_box2d/juce_box2d.h b/modules/juce_box2d/juce_box2d.h index 5db1fb9d..0f04a8ca 100644 --- a/modules/juce_box2d/juce_box2d.h +++ b/modules/juce_box2d/juce_box2d.h @@ -35,7 +35,7 @@ ID: juce_box2d vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE wrapper for the Box2D physics engine description: The Box2D physics engine and some utility classes. website: http://www.juce.com/juce diff --git a/modules/juce_core/juce_core.cpp b/modules/juce_core/juce_core.cpp index 914cae68..0c9b604f 100644 --- a/modules/juce_core/juce_core.cpp +++ b/modules/juce_core/juce_core.cpp @@ -36,9 +36,10 @@ #include "juce_core.h" -#include #include #include +#include +#include #if ! JUCE_ANDROID #include diff --git a/modules/juce_core/juce_core.h b/modules/juce_core/juce_core.h index 1f6ea804..3612d622 100644 --- a/modules/juce_core/juce_core.h +++ b/modules/juce_core/juce_core.h @@ -32,7 +32,7 @@ ID: juce_core vendor: juce - version: 6.0.5 + version: 6.0.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 diff --git a/modules/juce_core/memory/juce_Memory.h b/modules/juce_core/memory/juce_Memory.h index 03c0de3c..0f21a5a8 100644 --- a/modules/juce_core/memory/juce_Memory.h +++ b/modules/juce_core/memory/juce_Memory.h @@ -183,4 +183,18 @@ inline const Type* addBytesToPointer (const Type* basePointer, IntegerType bytes #define juce_UseDebuggingNewOperator #endif + /** Converts an owning raw pointer into a unique_ptr, deriving the + type of the unique_ptr automatically. + + This should only be used with pointers to single objects. + Do NOT pass a pointer to an array to this function, as the + destructor of the unique_ptr will incorrectly call `delete` + instead of `delete[]` on the pointer. + */ + template + std::unique_ptr rawToUniquePtr (T* ptr) + { + return std::unique_ptr (ptr); + } + } // namespace juce diff --git a/modules/juce_core/native/juce_mac_SystemStats.mm b/modules/juce_core/native/juce_mac_SystemStats.mm index 202896a5..4bbf8bee 100644 --- a/modules/juce_core/native/juce_mac_SystemStats.mm +++ b/modules/juce_core/native/juce_mac_SystemStats.mm @@ -132,7 +132,7 @@ static String getOSXVersion() #endif if (dict != nullptr) - return nsStringToJuce (dict[nsStringLiteral ("ProductVersion")]); + return nsStringToJuce ([dict objectForKey: nsStringLiteral ("ProductVersion")]); jassertfalse; return {}; @@ -157,8 +157,8 @@ SystemStats::OperatingSystemType SystemStats::getOperatingSystemType() return (OperatingSystemType) (minor + MacOSX_10_7 - 7); } - jassert (major == 11 && minor == 0); - return MacOSX_11_0; + jassert (major == 11); + return MacOS_11; #endif } diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h index 982db865..073b73d7 100644 --- a/modules/juce_core/native/juce_posix_SharedCode.h +++ b/modules/juce_core/native/juce_posix_SharedCode.h @@ -1224,217 +1224,125 @@ bool ChildProcess::start (const StringArray& args, int streamFlags) //============================================================================== struct HighResolutionTimer::Pimpl { - Pimpl (HighResolutionTimer& t) : owner (t) - { - pthread_condattr_t attr; - pthread_condattr_init (&attr); - - #if JUCE_LINUX || (JUCE_ANDROID && defined(__ANDROID_API__) && __ANDROID_API__ >= 21) - pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); - #endif - - pthread_cond_init (&stopCond, &attr); - pthread_condattr_destroy (&attr); - pthread_mutex_init (&timerMutex, nullptr); - } + explicit Pimpl (HighResolutionTimer& t) + : owner (t) + {} ~Pimpl() { - jassert (! isRunning); + jassert (periodMs == 0); stop(); } void start (int newPeriod) { - if (periodMs != newPeriod) - { - if (thread != pthread_self()) - { - stop(); - - periodMs = newPeriod; - destroyThread = false; - isRunning = true; - - if (pthread_create (&thread, nullptr, timerThread, this) == 0) - setThreadToRealtime (thread, (uint64) newPeriod); - else - jassertfalse; - } - else - { - periodMs = newPeriod; - isRunning = true; - destroyThread = false; - } - } - } - - void stop() - { - isRunning = false; - - if (thread == pthread_t()) + if (periodMs == newPeriod) return; - if (thread == pthread_self()) + if (thread.get_id() == std::this_thread::get_id()) { - periodMs = 3600000; + periodMs = newPeriod; return; } - isRunning = false; - destroyThread = true; - - pthread_mutex_lock (&timerMutex); - pthread_cond_signal (&stopCond); - pthread_mutex_unlock (&timerMutex); - - pthread_join (thread, nullptr); - thread = {}; - } - - HighResolutionTimer& owner; - std::atomic periodMs { 0 }; + stop(); -private: - pthread_t thread = {}; - pthread_cond_t stopCond; - pthread_mutex_t timerMutex; - std::atomic destroyThread { false }, isRunning { false }; + periodMs = newPeriod; - static void* timerThread (void* param) - { - #if ! JUCE_ANDROID - int dummy; - pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, &dummy); - #endif + thread = std::thread ([this, newPeriod] + { + setThisThreadToRealtime ((uint64) newPeriod); - reinterpret_cast (param)->timerThread(); - return nullptr; - } + auto lastPeriod = periodMs.load(); + Clock clock (lastPeriod); - void timerThread() - { - auto lastPeriod = periodMs.load(); - Clock clock (lastPeriod); + std::unique_lock unique_lock (timerMutex); - pthread_mutex_lock (&timerMutex); - - while (! destroyThread) - { - clock.next(); - while (! destroyThread && clock.wait (stopCond, timerMutex)); + while (periodMs != 0) + { + clock.next(); + while (periodMs != 0 && clock.wait (stopCond, unique_lock)); - if (destroyThread) - break; + if (periodMs == 0) + break; - if (isRunning) owner.hiResTimerCallback(); - auto newPeriod = periodMs.load(); + auto nextPeriod = periodMs.load(); - if (lastPeriod != newPeriod) - { - lastPeriod = newPeriod; - clock = Clock (lastPeriod); + if (lastPeriod != nextPeriod) + { + lastPeriod = nextPeriod; + clock = Clock (lastPeriod); + } } - } - periodMs = 0; - pthread_mutex_unlock (&timerMutex); - pthread_exit (nullptr); + periodMs = 0; + }); } - struct Clock + void stop() { - #if JUCE_MAC || JUCE_IOS - Clock (double millis) noexcept - { - (void) mach_timebase_info (&timebase); - delta = (((uint64_t) (millis * 1000000.0)) * timebase.denom) / timebase.numer; - time = mach_absolute_time(); - } - - bool wait (pthread_cond_t& cond, pthread_mutex_t& mutex) noexcept - { - struct timespec left; - - if (! hasExpired (left)) - return (pthread_cond_timedwait_relative_np (&cond, &mutex, &left) != ETIMEDOUT); - - return false; - } - - uint64_t time, delta; - mach_timebase_info_data_t timebase; - - bool hasExpired (struct timespec& time_left) noexcept - { - uint64_t now = mach_absolute_time(); + periodMs = 0; - if (now < time) - { - uint64_t left = time - now; - uint64_t nanos = (left * static_cast (timebase.numer)) / static_cast (timebase.denom); - time_left.tv_sec = static_cast<__darwin_time_t> (nanos / 1000000000ULL); - time_left.tv_nsec = static_cast (nanos - (static_cast (time_left.tv_sec) * 1000000000ULL)); + const auto thread_id = thread.get_id(); - return false; - } + if (thread_id == std::thread::id() || thread_id == std::this_thread::get_id()) + return; - return true; - } - #else - Clock (double millis) noexcept : delta ((uint64) (millis * 1000000)) { - struct timespec t; - clock_gettime (CLOCK_MONOTONIC, &t); - time = (uint64) (1000000000 * (int64) t.tv_sec + (int64) t.tv_nsec); + std::unique_lock unique_lock (timerMutex); + stopCond.notify_one(); } - bool wait (pthread_cond_t& cond, pthread_mutex_t& mutex) noexcept - { - struct timespec absExpire; + thread.join(); + } - if (! hasExpired (absExpire)) - return (pthread_cond_timedwait (&cond, &mutex, &absExpire) != ETIMEDOUT); + HighResolutionTimer& owner; + std::atomic periodMs { 0 }; - return false; - } +private: + std::thread thread; + std::condition_variable stopCond; + std::mutex timerMutex; - uint64 time, delta; + class Clock + { + public: + explicit Clock (std::chrono::steady_clock::rep millis) noexcept + : time (std::chrono::steady_clock::now()), + delta (std::chrono::milliseconds (millis)) + {} - bool hasExpired (struct timespec& expiryTime) noexcept + bool wait (std::condition_variable& cond, std::unique_lock& lock) noexcept { - struct timespec t; - clock_gettime (CLOCK_MONOTONIC, &t); - auto now = (uint64) (1000000000 * (int64) t.tv_sec + (int64) t.tv_nsec); - - if (now < time) - { - expiryTime.tv_sec = (time_t) (time / 1000000000); - expiryTime.tv_nsec = (long) (time % 1000000000); - - return false; - } - - return true; + return cond.wait_until (lock, time) != std::cv_status::timeout; } - #endif void next() noexcept { time += delta; } + + private: + std::chrono::time_point time; + std::chrono::steady_clock::duration delta; }; - static bool setThreadToRealtime (pthread_t thread, uint64 periodMs) + static bool setThisThreadToRealtime (uint64 periodMs) { + const auto thread = pthread_self(); + #if JUCE_MAC || JUCE_IOS + mach_timebase_info_data_t timebase; + mach_timebase_info (&timebase); + + const auto ticksPerMs = ((double) timebase.denom * 1000000.0) / (double) timebase.numer; + const auto periodTicks = (uint32_t) (ticksPerMs * periodMs); + thread_time_constraint_policy_data_t policy; - policy.period = (uint32_t) (periodMs * 1000000); - policy.computation = 50000; + policy.period = periodTicks; + policy.computation = jmin ((uint32_t) 50000, policy.period); policy.constraint = policy.period; policy.preemptible = true; @@ -1448,7 +1356,6 @@ private: struct sched_param param; param.sched_priority = sched_get_priority_max (SCHED_RR); return pthread_setschedparam (thread, SCHED_RR, ¶m) == 0; - #endif } diff --git a/modules/juce_core/system/juce_StandardHeader.h b/modules/juce_core/system/juce_StandardHeader.h index ff949799..29142b39 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 6 #define JUCE_MINOR_VERSION 0 -#define JUCE_BUILDNUMBER 5 +#define JUCE_BUILDNUMBER 7 /** Current JUCE version number. diff --git a/modules/juce_core/system/juce_SystemStats.h b/modules/juce_core/system/juce_SystemStats.h index 3260af8e..5e4d2b10 100644 --- a/modules/juce_core/system/juce_SystemStats.h +++ b/modules/juce_core/system/juce_SystemStats.h @@ -61,7 +61,7 @@ public: MacOSX_10_13 = MacOSX | 13, MacOSX_10_14 = MacOSX | 14, MacOSX_10_15 = MacOSX | 15, - MacOSX_11_0 = MacOSX | 16, + MacOS_11 = MacOSX | 16, Win2000 = Windows | 1, WinXP = Windows | 2, diff --git a/modules/juce_core/text/juce_StringArray.cpp b/modules/juce_core/text/juce_StringArray.cpp index 8523dc96..5dc50eb9 100644 --- a/modules/juce_core/text/juce_StringArray.cpp +++ b/modules/juce_core/text/juce_StringArray.cpp @@ -132,6 +132,11 @@ String& StringArray::getReference (int index) noexcept return strings.getReference (index); } +const String& StringArray::getReference (int index) const noexcept +{ + return strings.getReference (index); +} + void StringArray::add (String newString) { // NB: the local temp copy is to avoid a dangling pointer if the diff --git a/modules/juce_core/text/juce_StringArray.h b/modules/juce_core/text/juce_StringArray.h index 6f3670bd..ac597b74 100644 --- a/modules/juce_core/text/juce_StringArray.h +++ b/modules/juce_core/text/juce_StringArray.h @@ -152,6 +152,12 @@ public: */ String& getReference (int index) noexcept; + /** Returns a reference to one of the strings in the array. + This lets you modify a string in-place in the array, but you must be sure that + the index is in-range. + */ + const String& getReference (int index) const noexcept; + /** Returns a pointer to the first String in the array. This method is provided for compatibility with standard C++ iteration mechanisms. */ diff --git a/modules/juce_core/text/juce_StringPairArray.cpp b/modules/juce_core/text/juce_StringPairArray.cpp index a906bf98..b1b12f92 100644 --- a/modules/juce_core/text/juce_StringPairArray.cpp +++ b/modules/juce_core/text/juce_StringPairArray.cpp @@ -145,6 +145,11 @@ void StringPairArray::setIgnoresCase (bool shouldIgnoreCase) ignoreCase = shouldIgnoreCase; } +bool StringPairArray::getIgnoresCase() const noexcept +{ + return ignoreCase; +} + String StringPairArray::getDescription() const { String s; @@ -166,4 +171,141 @@ void StringPairArray::minimiseStorageOverheads() values.minimiseStorageOverheads(); } +void StringPairArray::addMap (const std::map& toAdd) +{ + // If we just called `set` for each item in `toAdd`, that would + // perform badly when adding to large StringPairArrays, as `set` + // has to loop through the whole container looking for matching keys. + // Instead, we use a temporary map to give us better lookup performance. + std::map contents; + + const auto normaliseKey = [this] (const String& key) + { + return ignoreCase ? key.toLowerCase() : key; + }; + + for (auto i = 0; i != size(); ++i) + contents.emplace (normaliseKey (getAllKeys().getReference (i)), i); + + for (const auto& pair : toAdd) + { + const auto key = normaliseKey (pair.first); + const auto it = contents.find (key); + + if (it != contents.cend()) + { + values.getReference (it->second) = pair.second; + } + else + { + contents.emplace (key, static_cast (contents.size())); + keys.add (pair.first); + values.add (pair.second); + } + } +} + +//============================================================================== +//============================================================================== +#if JUCE_UNIT_TESTS + +static String operator""_S (const char* chars, size_t) +{ + return String { chars }; +} + +class StringPairArrayTests : public UnitTest +{ +public: + StringPairArrayTests() + : UnitTest ("StringPairArray", UnitTestCategories::text) + {} + + void runTest() override + { + beginTest ("addMap respects case sensitivity of StringPairArray"); + { + StringPairArray insensitive { true }; + insensitive.addMap ({ { "duplicate", "a" }, + { "Duplicate", "b" } }); + + expect (insensitive.size() == 1); + expectEquals (insensitive["DUPLICATE"], "a"_S); + + StringPairArray sensitive { false }; + sensitive.addMap ({ { "duplicate", "a"_S }, + { "Duplicate", "b"_S } }); + + expect (sensitive.size() == 2); + expectEquals (sensitive["duplicate"], "a"_S); + expectEquals (sensitive["Duplicate"], "b"_S); + expectEquals (sensitive["DUPLICATE"], ""_S); + } + + beginTest ("addMap overwrites existing pairs"); + { + StringPairArray insensitive { true }; + insensitive.set ("key", "value"); + insensitive.addMap ({ { "KEY", "VALUE" } }); + + expect (insensitive.size() == 1); + expectEquals (insensitive.getAllKeys()[0], "key"_S); + expectEquals (insensitive.getAllValues()[0], "VALUE"_S); + + StringPairArray sensitive { false }; + sensitive.set ("key", "value"); + sensitive.addMap ({ { "KEY", "VALUE" }, + { "key", "another value" } }); + + expect (sensitive.size() == 2); + expect (sensitive.getAllKeys() == StringArray { "key", "KEY" }); + expect (sensitive.getAllValues() == StringArray { "another value", "VALUE" }); + } + + beginTest ("addMap doesn't change the order of existing keys"); + { + StringPairArray array; + array.set ("a", "a"); + array.set ("z", "z"); + array.set ("b", "b"); + array.set ("y", "y"); + array.set ("c", "c"); + + array.addMap ({ { "B", "B" }, + { "0", "0" }, + { "Z", "Z" } }); + + expect (array.getAllKeys() == StringArray { "a", "z", "b", "y", "c", "0" }); + expect (array.getAllValues() == StringArray { "a", "Z", "B", "y", "c", "0" }); + } + + beginTest ("addMap has equivalent behaviour to addArray"); + { + StringPairArray initial; + initial.set ("aaa", "aaa"); + initial.set ("zzz", "zzz"); + initial.set ("bbb", "bbb"); + + auto withAddMap = initial; + withAddMap.addMap ({ { "ZZZ", "ZZZ" }, + { "ddd", "ddd" } }); + + auto withAddArray = initial; + withAddArray.addArray ([] + { + StringPairArray toAdd; + toAdd.set ("ZZZ", "ZZZ"); + toAdd.set ("ddd", "ddd"); + return toAdd; + }()); + + expect (withAddMap == withAddArray); + } + } +}; + +static StringPairArrayTests stringPairArrayTests; + +#endif + } // namespace juce diff --git a/modules/juce_core/text/juce_StringPairArray.h b/modules/juce_core/text/juce_StringPairArray.h index 77d486c9..16b9a99c 100644 --- a/modules/juce_core/text/juce_StringPairArray.h +++ b/modules/juce_core/text/juce_StringPairArray.h @@ -124,6 +124,10 @@ public: */ void setIgnoresCase (bool shouldIgnoreCase); + /** Indicates whether a case-insensitive search is used when looking up a key string. + */ + bool getIgnoresCase() const noexcept; + //============================================================================== /** Returns a descriptive string containing the items. This is handy for dumping the contents of an array. @@ -139,6 +143,9 @@ public: */ void minimiseStorageOverheads(); + //============================================================================== + /** Adds the contents of a map to this StringPairArray. */ + void addMap (const std::map& mapToAdd); private: //============================================================================== diff --git a/modules/juce_core/threads/juce_HighResolutionTimer.cpp b/modules/juce_core/threads/juce_HighResolutionTimer.cpp index e03f6e81..db4e3e8e 100644 --- a/modules/juce_core/threads/juce_HighResolutionTimer.cpp +++ b/modules/juce_core/threads/juce_HighResolutionTimer.cpp @@ -23,7 +23,7 @@ namespace juce { -HighResolutionTimer::HighResolutionTimer() { pimpl.reset (new Pimpl (*this)); } +HighResolutionTimer::HighResolutionTimer() : pimpl (new Pimpl (*this)) {} HighResolutionTimer::~HighResolutionTimer() { stopTimer(); } void HighResolutionTimer::startTimer (int periodMs) { pimpl->start (jmax (1, periodMs)); } diff --git a/modules/juce_cryptography/juce_cryptography.h b/modules/juce_cryptography/juce_cryptography.h index 1c2eebc7..768b3cc3 100644 --- a/modules/juce_cryptography/juce_cryptography.h +++ b/modules/juce_cryptography/juce_cryptography.h @@ -35,7 +35,7 @@ ID: juce_cryptography vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE cryptography classes description: Classes for various basic cryptography functions, including RSA, Blowfish, MD5, SHA, etc. website: http://www.juce.com/juce diff --git a/modules/juce_data_structures/juce_data_structures.h b/modules/juce_data_structures/juce_data_structures.h index 4669261d..996f5e7a 100644 --- a/modules/juce_data_structures/juce_data_structures.h +++ b/modules/juce_data_structures/juce_data_structures.h @@ -35,7 +35,7 @@ ID: juce_data_structures vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE data model helper classes description: Classes for undo/redo management, and smart data structures. website: http://www.juce.com/juce diff --git a/modules/juce_dsp/filter_design/juce_FilterDesign.cpp b/modules/juce_dsp/filter_design/juce_FilterDesign.cpp index f1acc87a..c6a50ab0 100644 --- a/modules/juce_dsp/filter_design/juce_FilterDesign.cpp +++ b/modules/juce_dsp/filter_design/juce_FilterDesign.cpp @@ -270,19 +270,19 @@ typename FIR::Coefficients::Ptr for (int i = 0; i < hh.size(); ++i) c[i] = (float) hh[i]; - double NN; - - if (n % 2 == 0) - { - NN = 2.0 * result->getMagnitudeForFrequency (0.5, 1.0); - } - else + auto NN = [&] { + if (n % 2 == 0) + return 2.0 * result->getMagnitudeForFrequency (0.5, 1.0); + auto w01 = std::sqrt (kp * kp + (1 - kp * kp) * std::pow (std::cos (MathConstants::pi / (2.0 * n + 1.0)), 2.0)); - auto om01 = std::acos (-w01); - NN = -2.0 * result->getMagnitudeForFrequency (om01 / MathConstants::twoPi, 1.0); - } + if (std::abs (w01) > 1.0) + return 2.0 * result->getMagnitudeForFrequency (0.5, 1.0); + + auto om01 = std::acos (-w01); + return -2.0 * result->getMagnitudeForFrequency (om01 / MathConstants::twoPi, 1.0); + }(); for (int i = 0; i < hh.size(); ++i) c[i] = static_cast ((A * hn[i] + B * hnm[i]) / NN); diff --git a/modules/juce_dsp/frequency/juce_Convolution.cpp b/modules/juce_dsp/frequency/juce_Convolution.cpp index 42b6b6a4..6fb58f11 100644 --- a/modules/juce_dsp/frequency/juce_Convolution.cpp +++ b/modules/juce_dsp/frequency/juce_Convolution.cpp @@ -86,6 +86,12 @@ public: // This function is only safe to call from a single thread at a time. bool push (IncomingCommand& command) { return queue.push (command); } + void popAll() + { + const ScopedLock lock (popMutex); + queue.popAll ([] (IncomingCommand& command) { command(); command = nullptr; }); + } + using Thread::startThread; using Thread::stopThread; @@ -94,13 +100,23 @@ private: { while (! threadShouldExit()) { - if (queue.hasPendingMessages()) + const auto tryPop = [&] + { + const ScopedLock lock (popMutex); + + if (! queue.hasPendingMessages()) + return false; + queue.pop ([] (IncomingCommand& command) { command(); command = nullptr;}); - else + return true; + }; + + if (! tryPop()) sleep (10); } } + CriticalSection popMutex; Queue queue; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BackgroundMessageQueue) @@ -892,7 +908,6 @@ public: std::unique_ptr getEngine() { return factory.getEngine(); } private: - template void callLater (Fn&& fn) { @@ -1017,9 +1032,13 @@ public: void prepare (const ProcessSpec& spec) { + messageQueue->pimpl->popAll(); mixer.prepare (spec); engineQueue->prepare (spec); - currentEngine = engineQueue->getEngine(); + + if (auto newEngine = engineQueue->getEngine()) + currentEngine = std::move (newEngine); + previousEngine = nullptr; jassert (currentEngine != nullptr); } diff --git a/modules/juce_dsp/frequency/juce_Convolution_test.cpp b/modules/juce_dsp/frequency/juce_Convolution_test.cpp index d7ec4b81..af93b737 100644 --- a/modules/juce_dsp/frequency/juce_Convolution_test.cpp +++ b/modules/juce_dsp/frequency/juce_Convolution_test.cpp @@ -89,6 +89,19 @@ class ConvolutionTest : public UnitTest expect (! std::isnan (block.getSample ((int) channel, (int) sample))); } + void checkAllChannelsNonZero (const AudioBlock& block) + { + for (size_t i = 0; i != block.getNumChannels(); ++i) + { + const auto* channel = block.getChannelPointer (i); + + expect (std::any_of (channel, channel + block.getNumSamples(), [] (float sample) + { + return sample != 0.0f; + })); + } + } + template void nonAllocatingExpectWithinAbsoluteError (const T& a, const T& b, const T& error) { @@ -168,16 +181,21 @@ class ConvolutionTest : public UnitTest } }; - const auto time = Time::getMillisecondCounter(); - - // Wait 10 seconds to load the impulse response - while (Time::getMillisecondCounter() - time < 10'000) + // If we load an IR while the convolution is already running, we'll need to wait + // for it to be loaded on a background thread + if (initSequence == InitSequence::prepareThenLoad) { - processBlocksWithDiracImpulse(); + const auto time = Time::getMillisecondCounter(); + + // Wait 10 seconds to load the impulse response + while (Time::getMillisecondCounter() - time < 10'000) + { + processBlocksWithDiracImpulse(); - // Check if the impulse response was loaded - if (block.getSample (0, 1) != 0.0f) - break; + // Check if the impulse response was loaded + if (block.getSample (0, 1) != 0.0f) + break; + } } // At this point, our convolution should be loaded and the current IR size should @@ -326,6 +344,45 @@ public: checkForNans (block); } + beginTest ("Convolutions can cope with a change in samplerate and blocksize"); + { + Convolution convolution; + + auto copy = impulseData; + convolution.loadImpulseResponse (std::move (copy), + 2000, + Convolution::Stereo::yes, + Convolution::Trim::no, + Convolution::Normalise::yes); + + const dsp::ProcessSpec specs[] = { { 96'000.0, 1024, 2 }, + { 48'000.0, 512, 2 }, + { 44'100.0, 256, 2 } }; + + for (const auto& thisSpec : specs) + { + convolution.prepare (thisSpec); + + expectWithinAbsoluteError ((double) convolution.getCurrentIRSize(), + thisSpec.sampleRate * 0.5, + 1.0); + + juce::AudioBuffer thisBuffer ((int) thisSpec.numChannels, + (int) thisSpec.maximumBlockSize); + AudioBlock thisBlock { thisBuffer }; + ProcessContextReplacing thisContext { thisBlock }; + + nTimes (100, [&] + { + addDiracImpulse (thisBlock); + convolution.process (thisContext); + + checkForNans (thisBlock); + checkAllChannelsNonZero (thisBlock); + }); + } + } + beginTest ("Short uniform convolutions work"); { const auto ramp = makeRamp (static_cast (spec.maximumBlockSize) / 2); diff --git a/modules/juce_dsp/juce_dsp.cpp b/modules/juce_dsp/juce_dsp.cpp index 9e297f03..fdf1df31 100644 --- a/modules/juce_dsp/juce_dsp.cpp +++ b/modules/juce_dsp/juce_dsp.cpp @@ -54,8 +54,6 @@ #define JUCE_IPP_AVAILABLE 1 #endif -#include "containers/juce_FixedSizeFunction.h" - #include "processors/juce_FIRFilter.cpp" #include "processors/juce_IIRFilter.cpp" #include "processors/juce_FirstOrderTPTFilter.cpp" diff --git a/modules/juce_dsp/juce_dsp.h b/modules/juce_dsp/juce_dsp.h index 060494d3..15463ccc 100644 --- a/modules/juce_dsp/juce_dsp.h +++ b/modules/juce_dsp/juce_dsp.h @@ -35,7 +35,7 @@ ID: juce_dsp vendor: juce - version: 6.0.5 + version: 6.0.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 @@ -243,6 +243,7 @@ namespace juce #include "maths/juce_LookupTable.h" #include "maths/juce_LogRampedValue.h" #include "containers/juce_AudioBlock.h" +#include "containers/juce_FixedSizeFunction.h" #include "processors/juce_ProcessContext.h" #include "processors/juce_ProcessorWrapper.h" #include "processors/juce_ProcessorChain.h" diff --git a/modules/juce_events/juce_events.cpp b/modules/juce_events/juce_events.cpp index 884db8d7..922eb539 100644 --- a/modules/juce_events/juce_events.cpp +++ b/modules/juce_events/juce_events.cpp @@ -73,16 +73,12 @@ #include "native/juce_osx_MessageQueue.h" - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") - #if JUCE_MAC #include "native/juce_mac_MessageManager.mm" #else #include "native/juce_ios_MessageManager.mm" #endif - JUCE_END_IGNORE_WARNINGS_GCC_LIKE - #elif JUCE_WINDOWS #include "native/juce_win32_Messaging.cpp" #if JUCE_EVENTS_INCLUDE_WINRT_WRAPPER diff --git a/modules/juce_events/juce_events.h b/modules/juce_events/juce_events.h index 14753324..a62f530c 100644 --- a/modules/juce_events/juce_events.h +++ b/modules/juce_events/juce_events.h @@ -32,7 +32,7 @@ ID: juce_events vendor: juce - version: 6.0.5 + version: 6.0.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 diff --git a/modules/juce_events/native/juce_mac_MessageManager.mm b/modules/juce_events/native/juce_mac_MessageManager.mm index 36352ab5..972e894a 100644 --- a/modules/juce_events/native/juce_mac_MessageManager.mm +++ b/modules/juce_events/native/juce_mac_MessageManager.mm @@ -43,20 +43,24 @@ public: NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") [center addObserver: delegate selector: @selector (mainMenuTrackingBegan:) name: NSMenuDidBeginTrackingNotification object: nil]; [center addObserver: delegate selector: @selector (mainMenuTrackingEnded:) name: NSMenuDidEndTrackingNotification object: nil]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE if (JUCEApplicationBase::isStandaloneApp()) { [NSApp setDelegate: delegate]; + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") [[NSDistributedNotificationCenter defaultCenter] addObserver: delegate selector: @selector (broadcastMessageCallback:) name: getBroadcastEventName() object: nil suspensionBehavior: NSNotificationSuspensionBehaviorDeliverImmediately]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE } else { @@ -103,7 +107,6 @@ private: AppDelegateClass() : ObjCClass ("JUCEAppDelegate_") { addMethod (@selector (applicationWillFinishLaunching:), applicationWillFinishLaunching, "v@:@"); - addMethod (@selector (getUrl:withReplyEvent:), getUrl_withReplyEvent, "v@:@@"); addMethod (@selector (applicationShouldTerminate:), applicationShouldTerminate, "I@:@"); addMethod (@selector (applicationWillTerminate:), applicationWillTerminate, "v@:@"); addMethod (@selector (application:openFile:), application_openFile, "c@:@@"); @@ -111,17 +114,25 @@ private: addMethod (@selector (applicationDidBecomeActive:), applicationDidBecomeActive, "v@:@"); addMethod (@selector (applicationDidResignActive:), applicationDidResignActive, "v@:@"); addMethod (@selector (applicationWillUnhide:), applicationWillUnhide, "v@:@"); + + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") + addMethod (@selector (getUrl:withReplyEvent:), getUrl_withReplyEvent, "v@:@@"); addMethod (@selector (broadcastMessageCallback:), broadcastMessageCallback, "v@:@"); addMethod (@selector (mainMenuTrackingBegan:), mainMenuTrackingBegan, "v@:@"); addMethod (@selector (mainMenuTrackingEnded:), mainMenuTrackingEnded, "v@:@"); addMethod (@selector (dummyMethod), dummyMethod, "v@:"); + JUCE_END_IGNORE_WARNINGS_GCC_LIKE #if JUCE_PUSH_NOTIFICATIONS //============================================================================== addIvar*> ("pushNotificationsDelegate"); addMethod (@selector (applicationDidFinishLaunching:), applicationDidFinishLaunching, "v@:@"); + + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") addMethod (@selector (setPushNotificationsDelegate:), setPushNotificationsDelegate, "v@:@"); + JUCE_END_IGNORE_WARNINGS_GCC_LIKE + addMethod (@selector (application:didRegisterForRemoteNotificationsWithDeviceToken:), registeredForRemoteNotifications, "v@:@@"); addMethod (@selector (application:didFailToRegisterForRemoteNotificationsWithError:), failedToRegisterForRemoteNotifications, "v@:@@"); addMethod (@selector (application:didReceiveRemoteNotification:), didReceiveRemoteNotification, "v@:@@"); @@ -133,10 +144,12 @@ private: private: static void applicationWillFinishLaunching (id self, SEL, NSNotification*) { + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") [[NSAppleEventManager sharedAppleEventManager] setEventHandler: self andSelector: @selector (getUrl:withReplyEvent:) forEventClass: kInternetEventClass andEventID: kAEGetURL]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE } #if JUCE_PUSH_NOTIFICATIONS @@ -263,7 +276,7 @@ private: { auto* delegate = getPushNotificationsDelegate (self); - SEL selector = NSSelectorFromString (@"application:didRegisterForRemoteNotificationsWithDeviceToken:"); + SEL selector = @selector (application:didRegisterForRemoteNotificationsWithDeviceToken:); if (delegate != nil && [delegate respondsToSelector: selector]) { @@ -281,7 +294,7 @@ private: { auto* delegate = getPushNotificationsDelegate (self); - SEL selector = NSSelectorFromString (@"application:didFailToRegisterForRemoteNotificationsWithError:"); + SEL selector = @selector (application:didFailToRegisterForRemoteNotificationsWithError:); if (delegate != nil && [delegate respondsToSelector: selector]) { @@ -299,7 +312,7 @@ private: { auto* delegate = getPushNotificationsDelegate (self); - SEL selector = NSSelectorFromString (@"application:didReceiveRemoteNotification:"); + SEL selector = @selector (application:didReceiveRemoteNotification:); if (delegate != nil && [delegate respondsToSelector: selector]) { @@ -487,8 +500,10 @@ struct MountedVolumeListChangeDetector::Pimpl NSNotificationCenter* nc = [[NSWorkspace sharedWorkspace] notificationCenter]; + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") [nc addObserver: delegate selector: @selector (changed:) name: NSWorkspaceDidMountNotification object: nil]; [nc addObserver: delegate selector: @selector (changed:) name: NSWorkspaceDidUnmountNotification object: nil]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE } ~Pimpl() @@ -506,7 +521,11 @@ private: ObserverClass() : ObjCClass ("JUCEDriveObserver_") { addIvar ("owner"); + + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") addMethod (@selector (changed:), changed, "v@:@"); + JUCE_END_IGNORE_WARNINGS_GCC_LIKE + addProtocol (@protocol (NSTextInput)); registerClass(); } diff --git a/modules/juce_graphics/juce_graphics.h b/modules/juce_graphics/juce_graphics.h index 8331b1de..b2196bbf 100644 --- a/modules/juce_graphics/juce_graphics.h +++ b/modules/juce_graphics/juce_graphics.h @@ -35,7 +35,7 @@ ID: juce_graphics vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE graphics classes description: Classes for 2D vector graphics, image loading/saving, font handling, etc. website: http://www.juce.com/juce diff --git a/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp b/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp index ce106bba..d4d7266f 100644 --- a/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp +++ b/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp @@ -35,6 +35,12 @@ struct ModalComponentManager::ModalItem : public ComponentMovementWatcher jassert (comp != nullptr); } + ~ModalItem() override + { + if (autoDelete) + std::unique_ptr componentDeleter (component); + } + void componentMovedOrResized (bool, bool) override {} using ComponentMovementWatcher::componentMovedOrResized; diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp index 056ff591..c70541c9 100644 --- a/modules/juce_gui_basics/juce_gui_basics.cpp +++ b/modules/juce_gui_basics/juce_gui_basics.cpp @@ -229,8 +229,6 @@ namespace juce #endif #if JUCE_MAC || JUCE_IOS - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") - #if JUCE_IOS #include "native/juce_ios_UIViewComponentPeer.mm" #include "native/juce_ios_Windowing.mm" @@ -247,8 +245,6 @@ namespace juce #include "native/juce_mac_FileChooser.mm" #endif - JUCE_END_IGNORE_WARNINGS_GCC_LIKE - #include "native/juce_mac_MouseCursor.mm" #elif JUCE_WINDOWS diff --git a/modules/juce_gui_basics/juce_gui_basics.h b/modules/juce_gui_basics/juce_gui_basics.h index 52dd174a..615d8f63 100644 --- a/modules/juce_gui_basics/juce_gui_basics.h +++ b/modules/juce_gui_basics/juce_gui_basics.h @@ -35,7 +35,7 @@ ID: juce_gui_basics vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE GUI core classes description: Basic user-interface components and related classes. website: http://www.juce.com/juce diff --git a/modules/juce_gui_basics/native/juce_android_Windowing.cpp b/modules/juce_gui_basics/native/juce_android_Windowing.cpp index 4cb678ad..42dde156 100644 --- a/modules/juce_gui_basics/native/juce_android_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_android_Windowing.cpp @@ -1667,4 +1667,25 @@ const int KeyPress::stopKey = extendedKeyModifier + 46; const int KeyPress::fastForwardKey = extendedKeyModifier + 47; const int KeyPress::rewindKey = extendedKeyModifier + 48; +//============================================================================== +struct JuceActivityNewIntentListener +{ + #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD, CALLBACK) \ + CALLBACK (appNewIntent, "appNewIntent", "(Landroid/content/Intent;)V") + + DECLARE_JNI_CLASS (JavaActivity, JUCE_PUSH_NOTIFICATIONS_ACTIVITY) + #undef JNI_CLASS_MEMBERS + + static void JNICALL appNewIntent (JNIEnv*, jobject /*activity*/, jobject intentData) + { + #if JUCE_PUSH_NOTIFICATIONS && JUCE_MODULE_AVAILABLE_juce_gui_extra + juce_handleNotificationIntent (static_cast (intentData)); + #else + juce::ignoreUnused (intentData); + #endif + } +}; + +JuceActivityNewIntentListener::JavaActivity_Class JuceActivityNewIntentListener::JavaActivity; + } // namespace juce diff --git a/modules/juce_gui_basics/native/juce_ios_Windowing.mm b/modules/juce_gui_basics/native/juce_ios_Windowing.mm index 82c9452f..f2329055 100644 --- a/modules/juce_gui_basics/native/juce_ios_Windowing.mm +++ b/modules/juce_gui_basics/native/juce_ios_Windowing.mm @@ -198,7 +198,7 @@ namespace juce { ignoreUnused (application); - SEL selector = NSSelectorFromString (@"application:didRegisterUserNotificationSettings:"); + SEL selector = @selector (application:didRegisterUserNotificationSettings:); if (_pushNotificationsDelegate != nil && [_pushNotificationsDelegate respondsToSelector: selector]) { @@ -216,7 +216,7 @@ namespace juce { ignoreUnused (application); - SEL selector = NSSelectorFromString (@"application:didRegisterForRemoteNotificationsWithDeviceToken:"); + SEL selector = @selector (application:didRegisterForRemoteNotificationsWithDeviceToken:); if (_pushNotificationsDelegate != nil && [_pushNotificationsDelegate respondsToSelector: selector]) { @@ -234,7 +234,7 @@ namespace juce { ignoreUnused (application); - SEL selector = NSSelectorFromString (@"application:didFailToRegisterForRemoteNotificationsWithError:"); + SEL selector = @selector (application:didFailToRegisterForRemoteNotificationsWithError:); if (_pushNotificationsDelegate != nil && [_pushNotificationsDelegate respondsToSelector: selector]) { @@ -252,7 +252,7 @@ namespace juce { ignoreUnused (application); - SEL selector = NSSelectorFromString (@"application:didReceiveRemoteNotification:"); + SEL selector = @selector (application:didReceiveRemoteNotification:); if (_pushNotificationsDelegate != nil && [_pushNotificationsDelegate respondsToSelector: selector]) { @@ -271,7 +271,7 @@ namespace juce { ignoreUnused (application); - SEL selector = NSSelectorFromString (@"application:didReceiveRemoteNotification:fetchCompletionHandler:"); + SEL selector = @selector (application:didReceiveRemoteNotification:fetchCompletionHandler:); if (_pushNotificationsDelegate != nil && [_pushNotificationsDelegate respondsToSelector: selector]) { @@ -292,7 +292,7 @@ namespace juce { ignoreUnused (application); - SEL selector = NSSelectorFromString (@"application:handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler:"); + SEL selector = @selector (application:handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler:); if (_pushNotificationsDelegate != nil && [_pushNotificationsDelegate respondsToSelector: selector]) { @@ -313,7 +313,7 @@ namespace juce { ignoreUnused (application); - SEL selector = NSSelectorFromString (@"application:didReceiveLocalNotification:"); + SEL selector = @selector (application:didReceiveLocalNotification:); if (_pushNotificationsDelegate != nil && [_pushNotificationsDelegate respondsToSelector: selector]) { @@ -332,7 +332,7 @@ namespace juce { ignoreUnused (application); - SEL selector = NSSelectorFromString (@"application:handleActionWithIdentifier:forLocalNotification:completionHandler:"); + SEL selector = @selector (application:handleActionWithIdentifier:forLocalNotification:completionHandler:); if (_pushNotificationsDelegate != nil && [_pushNotificationsDelegate respondsToSelector: selector]) { @@ -354,7 +354,7 @@ namespace juce { ignoreUnused (application); - SEL selector = NSSelectorFromString (@"application:handleActionWithIdentifier:forLocalNotification:withResponseInfo:completionHandler:"); + SEL selector = @selector (application:handleActionWithIdentifier:forLocalNotification:withResponseInfo:completionHandler:); if (_pushNotificationsDelegate != nil && [_pushNotificationsDelegate respondsToSelector: selector]) { @@ -377,7 +377,7 @@ namespace juce { ignoreUnused (center); - SEL selector = NSSelectorFromString (@"userNotificationCenter:willPresentNotification:withCompletionHandler:"); + SEL selector = @selector (userNotificationCenter:willPresentNotification:withCompletionHandler:); if (_pushNotificationsDelegate != nil && [_pushNotificationsDelegate respondsToSelector: selector]) { @@ -397,7 +397,7 @@ namespace juce { ignoreUnused (center); - SEL selector = NSSelectorFromString (@"userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:"); + SEL selector = @selector (userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:); if (_pushNotificationsDelegate != nil && [_pushNotificationsDelegate respondsToSelector: selector]) { diff --git a/modules/juce_gui_basics/native/juce_linux_Windowing.cpp b/modules/juce_gui_basics/native/juce_linux_Windowing.cpp index 11446731..e8aa9191 100644 --- a/modules/juce_gui_basics/native/juce_linux_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_linux_Windowing.cpp @@ -431,15 +431,20 @@ private: return; Point translation = (parentWindow != 0 ? getScreenPosition (isPhysical) : Point()); + const auto& desktop = Desktop::getInstance(); - auto newScaleFactor = Desktop::getInstance().getDisplays().getDisplayForRect (newBounds.translated (translation.x, translation.y), isPhysical)->scale - / Desktop::getInstance().getGlobalScaleFactor(); - - if (! approximatelyEqual (newScaleFactor, currentScaleFactor)) + if (auto* display = desktop.getDisplays().getDisplayForRect (newBounds.translated (translation.x, translation.y), + isPhysical)) { - currentScaleFactor = newScaleFactor; - scaleFactorListeners.call ([&] (ScaleFactorListener& l) { l.nativeScaleFactorChanged (currentScaleFactor); }); + auto newScaleFactor = display->scale / desktop.getGlobalScaleFactor(); + + if (! approximatelyEqual (newScaleFactor, currentScaleFactor)) + { + currentScaleFactor = newScaleFactor; + scaleFactorListeners.call ([&] (ScaleFactorListener& l) { l.nativeScaleFactorChanged (currentScaleFactor); }); + } } + } //============================================================================== diff --git a/modules/juce_gui_basics/native/juce_mac_MainMenu.mm b/modules/juce_gui_basics/native/juce_mac_MainMenu.mm index 9c147caf..2389f7fa 100644 --- a/modules/juce_gui_basics/native/juce_mac_MainMenu.mm +++ b/modules/juce_gui_basics/native/juce_mac_MainMenu.mm @@ -38,7 +38,10 @@ struct JuceMainMenuBarHolder : private DeletedAtShutdown auto appMenu = [[NSMenu alloc] initWithTitle: nsStringLiteral ("Apple")]; + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") [NSApp performSelector: @selector (setAppleMenu:) withObject: appMenu]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE + [mainMenuBar setSubmenu: appMenu forItem: item]; [appMenu release]; @@ -282,9 +285,11 @@ public: } else { + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") auto item = [[NSMenuItem alloc] initWithTitle: text action: @selector (menuItemInvoked:) keyEquivalent: nsEmptyString()]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE [item setTag: topLevelIndex]; [item setEnabled: i.isEnabled]; @@ -515,7 +520,10 @@ private: { addIvar ("owner"); + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") addMethod (@selector (menuItemInvoked:), menuItemInvoked, "v@:@"); + JUCE_END_IGNORE_WARNINGS_GCC_LIKE + addMethod (@selector (menuNeedsUpdate:), menuNeedsUpdate, "v@:@"); addProtocol (@protocol (NSMenuDelegate)); diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index ed74cff7..807cdb02 100644 --- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -99,8 +99,12 @@ public: notificationCenter = [NSNotificationCenter defaultCenter]; + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") + SEL frameChangedSelector = @selector (frameChanged:); + JUCE_END_IGNORE_WARNINGS_GCC_LIKE + [notificationCenter addObserver: view - selector: @selector (frameChanged:) + selector: frameChangedSelector name: NSViewFrameDidChangeNotification object: view]; @@ -171,12 +175,12 @@ public: #endif [notificationCenter addObserver: view - selector: @selector (frameChanged:) + selector: frameChangedSelector name: NSWindowDidMoveNotification object: window]; [notificationCenter addObserver: view - selector: @selector (frameChanged:) + selector: frameChangedSelector name: NSWindowDidMiniaturizeNotification object: window]; @@ -852,6 +856,14 @@ public: if ([screen respondsToSelector: @selector (backingScaleFactor)]) displayScale = (float) screen.backingScaleFactor; + auto invalidateTransparentWindowShadow = [this] + { + // transparent NSWindows with a drop-shadow need to redraw their shadow when the content + // changes to avoid stale shadows being drawn behind the window + if (! isSharedWindow && ! [window isOpaque] && [window hasShadow]) + [window invalidateShadow]; + }; + #if USE_COREGRAPHICS_RENDERING && JUCE_COREGRAPHICS_RENDER_WITH_MULTIPLE_PAINT_CALLS // This option invokes a separate paint call for each rectangle of the clip region. // It's a long story, but this is a basically a workaround for a CGContext not having @@ -873,12 +885,14 @@ public: CGContextRestoreGState (cg); } + invalidateTransparentWindowShadow(); return; } } #endif drawRect (cg, r, displayScale); + invalidateTransparentWindowShadow(); } void drawRect (CGContextRef cg, NSRect r, float displayScale) @@ -1613,9 +1627,7 @@ struct JuceNSViewClass : public ObjCClass addMethod (@selector (isOpaque), isOpaque, "c@:"); addMethod (@selector (drawRect:), drawRect, "v@:", @encode (NSRect)); addMethod (@selector (mouseDown:), mouseDown, "v@:@"); - addMethod (@selector (asyncMouseDown:), asyncMouseDown, "v@:@"); addMethod (@selector (mouseUp:), mouseUp, "v@:@"); - addMethod (@selector (asyncMouseUp:), asyncMouseUp, "v@:@"); addMethod (@selector (mouseDragged:), mouseDragged, "v@:@"); addMethod (@selector (mouseMoved:), mouseMoved, "v@:@"); addMethod (@selector (mouseEntered:), mouseEntered, "v@:@"); @@ -1629,10 +1641,9 @@ struct JuceNSViewClass : public ObjCClass addMethod (@selector (scrollWheel:), scrollWheel, "v@:@"); addMethod (@selector (magnifyWithEvent:), magnify, "v@:@"); addMethod (@selector (acceptsFirstMouse:), acceptsFirstMouse, "c@:@"); - addMethod (@selector (frameChanged:), frameChanged, "v@:@"); addMethod (@selector (windowWillMiniaturize:), windowWillMiniaturize, "v@:@"); addMethod (@selector (windowDidDeminiaturize:), windowDidDeminiaturize, "v@:@"); - addMethod (@selector (wantsDefaultClipping:), wantsDefaultClipping, "c@:"); + addMethod (@selector (wantsDefaultClipping), wantsDefaultClipping, "c@:"); addMethod (@selector (worksWhenModal), worksWhenModal, "c@:"); addMethod (@selector (viewDidMoveToWindow), viewDidMoveToWindow, "v@:"); addMethod (@selector (keyDown:), keyDown, "v@:@"); @@ -1670,6 +1681,12 @@ struct JuceNSViewClass : public ObjCClass addMethod (@selector (viewWillMoveToWindow:), willMoveToWindow, "v@:@"); + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") + addMethod (@selector (asyncMouseDown:), asyncMouseDown, "v@:@"); + addMethod (@selector (asyncMouseUp:), asyncMouseUp, "v@:@"); + addMethod (@selector (frameChanged:), frameChanged, "v@:@"); + JUCE_END_IGNORE_WARNINGS_GCC_LIKE + addProtocol (@protocol (NSTextInput)); registerClass(); @@ -1684,27 +1701,39 @@ private: static void mouseDown (id self, SEL s, NSEvent* ev) { if (JUCEApplicationBase::isStandaloneApp()) + { asyncMouseDown (self, s, ev); + } else + { + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") // In some host situations, the host will stop modal loops from working // correctly if they're called from a mouse event, so we'll trigger // the event asynchronously.. [self performSelectorOnMainThread: @selector (asyncMouseDown:) withObject: ev waitUntilDone: NO]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE + } } static void mouseUp (id self, SEL s, NSEvent* ev) { if (JUCEApplicationBase::isStandaloneApp()) + { asyncMouseUp (self, s, ev); + } else + { + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") // In some host situations, the host will stop modal loops from working // correctly if they're called from a mouse event, so we'll trigger // the event asynchronously.. [self performSelectorOnMainThread: @selector (asyncMouseUp:) withObject: ev waitUntilDone: NO]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE + } } static void asyncMouseDown (id self, SEL, NSEvent* ev) { if (auto* p = getOwner (self)) p->redirectMouseDown (ev); } diff --git a/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp b/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp index a1a554ef..49144935 100644 --- a/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp +++ b/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp @@ -46,7 +46,7 @@ public: const File& startingFile, const String& titleToUse, const String& filtersToUse) : Thread ("Native Win32 FileChooser"), - owner (parent), title (titleToUse), filtersString (filtersToUse), + owner (parent), title (titleToUse), filtersString (filtersToUse.replaceCharacter (',', ';')), selectsDirectories ((flags & FileBrowserComponent::canSelectDirectories) != 0), isSave ((flags & FileBrowserComponent::saveMode) != 0), warnAboutOverwrite ((flags & FileBrowserComponent::warnAboutOverwriting) != 0), @@ -167,6 +167,11 @@ private: Atomic nativeDialogRef; Atomic shouldCancel; + struct FreeLPWSTR + { + void operator() (LPWSTR ptr) const noexcept { CoTaskMemFree (ptr); } + }; + bool showDialog (IFileDialog& dialog, bool async) const { FILEOPENDIALOGOPTIONS flags = {}; @@ -193,7 +198,17 @@ private: PIDLIST_ABSOLUTE pidl = {}; if (FAILED (SHParseDisplayName (initialPath.toWideCharPointer(), nullptr, &pidl, SFGAO_FOLDER, nullptr))) - return false; + { + LPWSTR ptr = nullptr; + auto result = SHGetKnownFolderPath (FOLDERID_Desktop, 0, nullptr, &ptr); + std::unique_ptr desktopPath (ptr); + + if (FAILED (result)) + return false; + + if (FAILED (SHParseDisplayName (desktopPath.get(), nullptr, &pidl, SFGAO_FOLDER, nullptr))) + return false; + } const auto item = [&] { @@ -228,17 +243,12 @@ private: { const auto getUrl = [] (IShellItem& item) { - struct Free - { - void operator() (LPWSTR ptr) const noexcept { CoTaskMemFree (ptr); } - }; - LPWSTR ptr = nullptr; if (item.GetDisplayName (SIGDN_FILESYSPATH, &ptr) != S_OK) return URL(); - const auto path = std::unique_ptr { ptr }; + const auto path = std::unique_ptr { ptr }; return URL (File (String (path.get()))); }; diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index 6ae0d3dc..cda94b0c 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -362,7 +362,9 @@ static void setDPIAwareness() if (! JUCEApplicationBase::isStandaloneApp()) return; - HMODULE shcoreModule = GetModuleHandleA ("SHCore.dll"); + const auto shcore = "SHCore.dll"; + LoadLibraryA (shcore); + const auto shcoreModule = GetModuleHandleA (shcore); if (shcoreModule != nullptr) { @@ -1415,8 +1417,7 @@ public: if (auto parentH = GetParent (hwnd)) { auto r = getWindowRect (parentH); - auto localBounds = Rectangle::leftTopRightBottom (bounds.left, bounds.top, - bounds.right, bounds.bottom).translated (-r.left, -r.top); + auto localBounds = rectangleFromRECT (bounds).translated (-r.left, -r.top); #if JUCE_WIN_PER_MONITOR_DPI_AWARE if (isPerMonitorDPIAwareWindow (hwnd)) @@ -1795,31 +1796,11 @@ public: return peer.getComponent().getLocalPoint (nullptr, screenPos); } - template - void parseFileList (const CharType* names, const SIZE_T totalLen) - { - for (unsigned int i = 0;;) - { - unsigned int len = 0; - - while (i + len < totalLen && names[i + len] != 0) - ++len; - - if (len == 0) - break; - - dragInfo.files.add (String (names + i, len)); - i += len + 1; - } - } - struct DroppedData { DroppedData (IDataObject* dataObject, CLIPFORMAT type) { FORMATETC format = { type, nullptr, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; - STGMEDIUM resetMedium = { TYMED_HGLOBAL, { nullptr }, nullptr }; - medium = resetMedium; if (SUCCEEDED (error = dataObject->GetData (&format, &medium))) { @@ -1835,11 +1816,33 @@ public: } HRESULT error; - STGMEDIUM medium; + STGMEDIUM medium { TYMED_HGLOBAL, { nullptr }, nullptr }; void* data = {}; SIZE_T dataSize; }; + void parseFileList (HDROP dropFiles) + { + dragInfo.files.clearQuick(); + + std::vector nameBuffer; + + const auto numFiles = DragQueryFile (dropFiles, ~(UINT) 0, nullptr, 0); + + for (UINT i = 0; i < numFiles; ++i) + { + const auto bufferSize = DragQueryFile (dropFiles, i, nullptr, 0); + nameBuffer.clear(); + nameBuffer.resize (bufferSize + 1, 0); // + 1 for the null terminator + + const auto readCharacters = DragQueryFile (dropFiles, i, nameBuffer.data(), (UINT) nameBuffer.size()); + ignoreUnused (readCharacters); + jassert (readCharacters == bufferSize); + + dragInfo.files.add (String (nameBuffer.data())); + } + } + HRESULT updateFileList (IDataObject* const dataObject) { if (peerIsDeleted) @@ -1852,14 +1855,7 @@ public: if (SUCCEEDED (fileData.error)) { - auto dropFiles = static_cast (fileData.data); - const void* const names = addBytesToPointer (dropFiles, sizeof (DROPFILES)); - - if (dropFiles->fWide) - parseFileList (static_cast (names), fileData.dataSize); - else - parseFileList (static_cast (names), fileData.dataSize); - + parseFileList (static_cast (fileData.data)); return S_OK; } } @@ -4514,15 +4510,20 @@ static const Displays::Display* getCurrentDisplayFromScaleFactor (HWND hwnd) //============================================================================== struct MonitorInfo { - MonitorInfo (bool main, RECT rect, double d) noexcept - : isMain (main), bounds (rect), dpi (d) {} + MonitorInfo (bool main, RECT totalArea, RECT workArea, double d) noexcept + : isMain (main), + totalAreaRect (totalArea), + workAreaRect (workArea), + dpi (d) + { + } bool isMain; - RECT bounds; + RECT totalAreaRect, workAreaRect; double dpi; }; -static BOOL CALLBACK enumMonitorsProc (HMONITOR hm, HDC, LPRECT r, LPARAM userInfo) +static BOOL CALLBACK enumMonitorsProc (HMONITOR hm, HDC, LPRECT, LPARAM userInfo) { MONITORINFO info = {}; info.cbSize = sizeof (info); @@ -4539,7 +4540,7 @@ static BOOL CALLBACK enumMonitorsProc (HMONITOR hm, HDC, LPRECT r, LPARAM userIn dpi = (dpiX + dpiY) / 2.0; } - ((Array*) userInfo)->add ({ isMain, *r, dpi }); + ((Array*) userInfo)->add ({ isMain, info.rcMonitor, info.rcWork, dpi }); return TRUE; } @@ -4553,7 +4554,10 @@ void Displays::findDisplays (float masterScale) auto globalDPI = getGlobalDPI(); if (monitors.size() == 0) - monitors.add ({ true, getWindowRect (GetDesktopWindow()), globalDPI }); + { + auto windowRect = getWindowRect (GetDesktopWindow()); + monitors.add ({ true, windowRect, windowRect, globalDPI }); + } // make sure the first in the list is the main monitor for (int i = 1; i < monitors.size(); ++i) @@ -4577,30 +4581,24 @@ void Displays::findDisplays (float masterScale) d.scale = (d.dpi / USER_DEFAULT_SCREEN_DPI) * (masterScale / Desktop::getDefaultMasterScale()); } - d.userArea = d.totalArea = Rectangle::leftTopRightBottom (monitor.bounds.left, monitor.bounds.top, - monitor.bounds.right, monitor.bounds.bottom); - - if (d.isMain) - { - RECT workArea; - SystemParametersInfo (SPI_GETWORKAREA, 0, &workArea, 0); - - d.userArea = d.userArea.getIntersection (Rectangle::leftTopRightBottom (workArea.left, workArea.top, - workArea.right, workArea.bottom)); - } + d.totalArea = rectangleFromRECT (monitor.totalAreaRect); + d.userArea = rectangleFromRECT (monitor.workAreaRect); displays.add (d); } #if JUCE_WIN_PER_MONITOR_DPI_AWARE - updateToLogical(); - #else - for (auto& d : displays) + if (isPerMonitorDPIAwareThread()) + updateToLogical(); + else + #endif { - d.totalArea /= masterScale; - d.userArea /= masterScale; + for (auto& d : displays) + { + d.totalArea /= masterScale; + d.userArea /= masterScale; + } } - #endif } //============================================================================== diff --git a/modules/juce_gui_basics/native/x11/juce_linux_X11_DragAndDrop.cpp b/modules/juce_gui_basics/native/x11/juce_linux_X11_DragAndDrop.cpp index ff523ac4..d6508e09 100644 --- a/modules/juce_gui_basics/native/x11/juce_linux_X11_DragAndDrop.cpp +++ b/modules/juce_gui_basics/native/x11/juce_linux_X11_DragAndDrop.cpp @@ -287,8 +287,11 @@ public: if (XWindowSystemUtilities::Atoms::isMimeTypeFile (getDisplay(), dragAndDropCurrentMimeType)) { - for (int i = 0; i < lines.size(); ++i) - dragInfo.files.add (URL::removeEscapeChars (lines[i].replace ("file://", String(), true))); + for (const auto& line : lines) + { + const auto escaped = line.replace ("+", "%2B").replace ("file://", String(), true); + dragInfo.files.add (URL::removeEscapeChars (escaped)); + } dragInfo.files.trim(); dragInfo.files.removeEmptyStrings(); diff --git a/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp b/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp index aee1c82e..ab207c4d 100644 --- a/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp +++ b/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp @@ -30,9 +30,11 @@ struct PropertyPanel::SectionComponent : public Component { SectionComponent (const String& sectionTitle, const Array& newProperties, - bool sectionIsOpen) + bool sectionIsOpen, + int extraPadding) : Component (sectionTitle), - isOpen (sectionIsOpen) + isOpen (sectionIsOpen), + padding (extraPadding) { lookAndFeelChanged(); @@ -63,7 +65,7 @@ struct PropertyPanel::SectionComponent : public Component for (auto* propertyComponent : propertyComps) { propertyComponent->setBounds (1, y, getWidth() - 2, propertyComponent->getPreferredHeight()); - y = propertyComponent->getBottom(); + y = propertyComponent->getBottom() + padding; } } @@ -78,10 +80,16 @@ struct PropertyPanel::SectionComponent : public Component { auto y = titleHeight; - if (isOpen) + auto numComponents = propertyComps.size(); + + if (numComponents > 0 && isOpen) + { for (auto* propertyComponent : propertyComps) y += propertyComponent->getPreferredHeight(); + y += (numComponents - 1) * padding; + } + return y; } @@ -122,6 +130,7 @@ struct PropertyPanel::SectionComponent : public Component OwnedArray propertyComps; int titleHeight; bool isOpen; + int padding; JUCE_DECLARE_NON_COPYABLE (SectionComponent) }; @@ -241,26 +250,32 @@ int PropertyPanel::getTotalContentHeight() const return propertyHolderComponent->getHeight(); } -void PropertyPanel::addProperties (const Array& newProperties) +void PropertyPanel::addProperties (const Array& newProperties, + int extraPaddingBetweenComponents) { if (isEmpty()) repaint(); - propertyHolderComponent->insertSection (-1, new SectionComponent (String(), newProperties, true)); + propertyHolderComponent->insertSection (-1, new SectionComponent ({}, newProperties, true, extraPaddingBetweenComponents)); updatePropHolderLayout(); } void PropertyPanel::addSection (const String& sectionTitle, const Array& newProperties, bool shouldBeOpen, - int indexToInsertAt) + int indexToInsertAt, + int extraPaddingBetweenComponents) { jassert (sectionTitle.isNotEmpty()); if (isEmpty()) repaint(); - propertyHolderComponent->insertSection (indexToInsertAt, new SectionComponent (sectionTitle, newProperties, shouldBeOpen)); + propertyHolderComponent->insertSection (indexToInsertAt, new SectionComponent (sectionTitle, + newProperties, + shouldBeOpen, + extraPaddingBetweenComponents)); + updatePropHolderLayout(); } diff --git a/modules/juce_gui_basics/properties/juce_PropertyPanel.h b/modules/juce_gui_basics/properties/juce_PropertyPanel.h index 94bafef8..b1272839 100644 --- a/modules/juce_gui_basics/properties/juce_PropertyPanel.h +++ b/modules/juce_gui_basics/properties/juce_PropertyPanel.h @@ -65,7 +65,8 @@ public: These properties are added without them being inside a named section. If you want them to be kept together in a collapsible section, use addSection() instead. */ - void addProperties (const Array& newPropertyComponents); + void addProperties (const Array& newPropertyComponents, + int extraPaddingBetweenComponents = 0); /** Adds a set of properties to the panel. @@ -81,7 +82,8 @@ public: void addSection (const String& sectionTitle, const Array& newPropertyComponents, bool shouldSectionInitiallyBeOpen = true, - int indexToInsertAt = -1); + int indexToInsertAt = -1, + int extraPaddingBetweenComponents = 0); /** Calls the refresh() method of all PropertyComponents in the panel */ void refreshAll() const; diff --git a/modules/juce_gui_extra/juce_gui_extra.cpp b/modules/juce_gui_extra/juce_gui_extra.cpp index d4ebed7f..bda3c872 100644 --- a/modules/juce_gui_extra/juce_gui_extra.cpp +++ b/modules/juce_gui_extra/juce_gui_extra.cpp @@ -149,8 +149,6 @@ //============================================================================== #if JUCE_MAC || JUCE_IOS - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") - #if JUCE_MAC #include "native/juce_mac_NSViewComponent.mm" #include "native/juce_mac_AppleRemote.mm" @@ -165,8 +163,6 @@ #include "native/juce_mac_WebBrowserComponent.mm" #endif - JUCE_END_IGNORE_WARNINGS_GCC_LIKE - //============================================================================== #elif JUCE_WINDOWS #include "native/juce_win32_ActiveXComponent.cpp" diff --git a/modules/juce_gui_extra/juce_gui_extra.h b/modules/juce_gui_extra/juce_gui_extra.h index 8808aa98..bcec491c 100644 --- a/modules/juce_gui_extra/juce_gui_extra.h +++ b/modules/juce_gui_extra/juce_gui_extra.h @@ -35,7 +35,7 @@ ID: juce_gui_extra vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE extended GUI classes description: Miscellaneous GUI classes for specialised tasks. website: http://www.juce.com/juce diff --git a/modules/juce_gui_extra/native/juce_android_PushNotifications.cpp b/modules/juce_gui_extra/native/juce_android_PushNotifications.cpp index e108081e..ae2f503f 100644 --- a/modules/juce_gui_extra/native/juce_android_PushNotifications.cpp +++ b/modules/juce_gui_extra/native/juce_android_PushNotifications.cpp @@ -1645,25 +1645,4 @@ bool juce_handleNotificationIntent (void* intent) return false; } -//============================================================================== -struct JuceActivityNewIntentListener -{ - #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD, CALLBACK) \ - CALLBACK (appNewIntent, "appNewIntent", "(Landroid/content/Intent;)V") - - DECLARE_JNI_CLASS (JavaActivity, JUCE_PUSH_NOTIFICATIONS_ACTIVITY) - #undef JNI_CLASS_MEMBERS - - static void JNICALL appNewIntent (JNIEnv*, jobject /*activity*/, jobject intentData) - { - #if JUCE_PUSH_NOTIFICATIONS && JUCE_MODULE_AVAILABLE_juce_gui_extra - juce_handleNotificationIntent(static_cast(intentData)); - #else - juce::ignoreUnused(intentData); - #endif - } -}; - -JuceActivityNewIntentListener::JavaActivity_Class JuceActivityNewIntentListener::JavaActivity; - } // namespace juce diff --git a/modules/juce_gui_extra/native/juce_ios_PushNotifications.cpp b/modules/juce_gui_extra/native/juce_ios_PushNotifications.cpp index 5255d835..fbccee94 100644 --- a/modules/juce_gui_extra/native/juce_ios_PushNotifications.cpp +++ b/modules/juce_gui_extra/native/juce_ios_PushNotifications.cpp @@ -422,10 +422,10 @@ struct PushNotificationsDelegate id appDelegate = [[UIApplication sharedApplication] delegate]; - SEL selector = NSSelectorFromString (@"setPushNotificationsDelegateToUse:"); - - if ([appDelegate respondsToSelector: selector]) - [appDelegate performSelector: selector withObject: delegate.get()]; + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") + if ([appDelegate respondsToSelector: @selector (setPushNotificationsDelegateToUse:)]) + [appDelegate performSelector: @selector (setPushNotificationsDelegateToUse:) withObject: delegate.get()]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE } virtual ~PushNotificationsDelegate() {} diff --git a/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm b/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm index a4d997a8..6326283b 100644 --- a/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm +++ b/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm @@ -42,10 +42,12 @@ struct NSViewResizeWatcher callback = [cls.createInstance() init]; ViewFrameChangeCallbackClass::setTarget (callback, this); + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") [[NSNotificationCenter defaultCenter] addObserver: callback selector: @selector (frameChanged:) name: NSViewFrameDidChangeNotification object: view]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE } void detachViewWatcher() @@ -69,7 +71,11 @@ private: ViewFrameChangeCallbackClass() : ObjCClass ("JUCE_NSViewCallback_") { addIvar ("target"); + + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") addMethod (@selector (frameChanged:), frameChanged, "v@:@"); + JUCE_END_IGNORE_WARNINGS_GCC_LIKE + registerClass(); } diff --git a/modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp b/modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp index 17880e77..f72d9378 100644 --- a/modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp +++ b/modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp @@ -272,10 +272,10 @@ struct PushNotificationsDelegate id appDelegate = [[NSApplication sharedApplication] delegate]; - SEL selector = NSSelectorFromString (@"setPushNotificationsDelegate:"); - - if ([appDelegate respondsToSelector: selector]) - [appDelegate performSelector: selector withObject: delegate.get()]; + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") + if ([appDelegate respondsToSelector: @selector (setPushNotificationsDelegate:)]) + [appDelegate performSelector: @selector (setPushNotificationsDelegate:) withObject: delegate.get()]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE [NSUserNotificationCenter defaultUserNotificationCenter].delegate = delegate.get(); } diff --git a/modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp b/modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp index b92b3b37..f40d1668 100644 --- a/modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp +++ b/modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp @@ -223,10 +223,12 @@ struct ViewBasedStatusItem : public StatusItemContainer SystemTrayViewClass::frameChanged (view.get(), SEL(), nullptr); + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") [[NSNotificationCenter defaultCenter] addObserver: view.get() selector: @selector (frameChanged:) name: NSWindowDidMoveNotification object: nil]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE } ~ViewBasedStatusItem() override @@ -312,7 +314,10 @@ struct ViewBasedStatusItem : public StatusItemContainer addMethod (@selector (mouseDown:), handleEventDown, "v@:@"); addMethod (@selector (rightMouseDown:), handleEventDown, "v@:@"); addMethod (@selector (drawRect:), drawRect, "v@:@"); + + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") addMethod (@selector (frameChanged:), frameChanged, "v@:@"); + JUCE_END_IGNORE_WARNINGS_GCC_LIKE registerClass(); } diff --git a/modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm b/modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm index bb76b4fd..626aaa7e 100644 --- a/modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm +++ b/modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm @@ -30,6 +30,10 @@ namespace juce #define JUCE_USE_WKWEBVIEW 1 + #if (defined (MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11) + #define WKWEBVIEW_WEBVIEWDIDCLOSE_SUPPORTED 1 + #endif + #if (defined (MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12) #define WKWEBVIEW_OPENPANEL_SUPPORTED 1 #endif @@ -106,7 +110,15 @@ private: { NSResponder* first = [[self window] firstResponder]; - if (([event modifierFlags] & NSDeviceIndependentModifierFlagsMask) == NSCommandKeyMask) + #if (defined (MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12) + constexpr auto mask = NSEventModifierFlagDeviceIndependentFlagsMask; + constexpr auto key = NSEventModifierFlagCommand; + #else + constexpr auto mask = NSDeviceIndependentModifierFlagsMask; + constexpr auto key = NSCommandKeyMask; + #endif + + if (([event modifierFlags] & mask) == key) { auto sendAction = [&] (SEL actionSelector) -> BOOL { @@ -140,7 +152,10 @@ struct WebViewDelegateClass : public ObjCClass addMethod (@selector (webView:didFailNavigation:withError:), didFailNavigation, "v@:@@@"); addMethod (@selector (webView:didFailProvisionalNavigation:withError:), didFailProvisionalNavigation, "v@:@@@"); - addMethod (@selector (webView:webViewDidClose:), webViewDidClose, "v@:@"); + #if WKWEBVIEW_WEBVIEWDIDCLOSE_SUPPORTED + addMethod (@selector (webViewDidClose:), webViewDidClose, "v@:@"); + #endif + addMethod (@selector (webView:createWebViewWithConfiguration:forNavigationAction: windowFeatures:), createWebView, "@@:@@@@"); @@ -192,10 +207,12 @@ private: displayError (getOwner (self), error); } + #if WKWEBVIEW_WEBVIEWDIDCLOSE_SUPPORTED static void webViewDidClose (id self, SEL, WKWebView*) { getOwner (self)->windowCloseRequest(); } + #endif static WKWebView* createWebView (id self, SEL, WKWebView*, WKWebViewConfiguration*, WKNavigationAction* navigationAction, WKWindowFeatures*) @@ -548,10 +565,12 @@ public: void mouseMove (const MouseEvent&) { + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") // WebKit doesn't capture mouse-moves itself, so it seems the only way to make // them work is to push them via this non-public method.. if ([webView respondsToSelector: @selector (_updateMouseoverWithFakeEvent)]) [webView performSelector: @selector (_updateMouseoverWithFakeEvent)]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE } private: diff --git a/modules/juce_opengl/juce_opengl.cpp b/modules/juce_opengl/juce_opengl.cpp index 78beeee9..76754ae0 100644 --- a/modules/juce_opengl/juce_opengl.cpp +++ b/modules/juce_opengl/juce_opengl.cpp @@ -263,16 +263,12 @@ private: //============================================================================== #if JUCE_MAC || JUCE_IOS - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") - #if JUCE_MAC #include "native/juce_OpenGL_osx.h" #else #include "native/juce_OpenGL_ios.h" #endif - JUCE_END_IGNORE_WARNINGS_GCC_LIKE - #elif JUCE_WINDOWS #include "native/juce_OpenGL_win32.h" diff --git a/modules/juce_opengl/juce_opengl.h b/modules/juce_opengl/juce_opengl.h index eebdf67f..f7bc806f 100644 --- a/modules/juce_opengl/juce_opengl.h +++ b/modules/juce_opengl/juce_opengl.h @@ -35,7 +35,7 @@ ID: juce_opengl vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE OpenGL classes description: Classes for rendering OpenGL in a JUCE window. website: http://www.juce.com/juce diff --git a/modules/juce_opengl/native/juce_OpenGL_osx.h b/modules/juce_opengl/native/juce_OpenGL_osx.h index 3a7686bf..e6378a99 100644 --- a/modules/juce_opengl/native/juce_OpenGL_osx.h +++ b/modules/juce_opengl/native/juce_OpenGL_osx.h @@ -49,10 +49,12 @@ public: if ([view respondsToSelector: @selector (setWantsBestResolutionOpenGLSurface:)]) [view setWantsBestResolutionOpenGLSurface: YES]; + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") [[NSNotificationCenter defaultCenter] addObserver: view selector: @selector (_surfaceNeedsUpdate:) name: NSViewGlobalFrameDidChangeNotification object: view]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE renderContext = [[[NSOpenGLContext alloc] initWithFormat: format shareContext: (NSOpenGLContext*) contextToShare] autorelease]; diff --git a/modules/juce_osc/juce_osc.h b/modules/juce_osc/juce_osc.h index faeecada..93986d5d 100644 --- a/modules/juce_osc/juce_osc.h +++ b/modules/juce_osc/juce_osc.h @@ -35,7 +35,7 @@ ID: juce_osc vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE OSC classes description: Open Sound Control implementation. website: http://www.juce.com/juce diff --git a/modules/juce_osc/osc/juce_OSCAddress.h b/modules/juce_osc/osc/juce_OSCAddress.h index e9ba7eff..fd2a3111 100644 --- a/modules/juce_osc/osc/juce_OSCAddress.h +++ b/modules/juce_osc/osc/juce_OSCAddress.h @@ -36,11 +36,11 @@ namespace juce Only a subset of ASCII characters are allowed in OSC addresses; see OpenSoundControl 1.0 specification for details. - OSC addresses can be used to register OSCMessageListener objects to an + OSC addresses can be used to register ListenerWithOSCAddress objects to an OSCReceiver if you wish them to only listen to certain messages with matching OSC address patterns. - @see OSCMessageListener, OSCAddressPattern, OSCMessage + @see OSCReceiver, OSCAddressPattern, OSCMessage @tags{OSC} */ diff --git a/modules/juce_osc/osc/juce_OSCArgument.h b/modules/juce_osc/osc/juce_OSCArgument.h index 20b9248b..b8456400 100644 --- a/modules/juce_osc/osc/juce_OSCArgument.h +++ b/modules/juce_osc/osc/juce_OSCArgument.h @@ -77,7 +77,7 @@ public: /** Returns whether the type of the OSCArgument is blob. */ bool isBlob() const noexcept { return type == OSCTypes::blob; } - /** Returns whether the type of the OSCArgument is blob. */ + /** Returns whether the type of the OSCArgument is colour. */ bool isColour() const noexcept { return type == OSCTypes::colour; } /** Returns the value of the OSCArgument as an int32. diff --git a/modules/juce_product_unlocking/juce_product_unlocking.h b/modules/juce_product_unlocking/juce_product_unlocking.h index decb5e34..4f3e4907 100644 --- a/modules/juce_product_unlocking/juce_product_unlocking.h +++ b/modules/juce_product_unlocking/juce_product_unlocking.h @@ -35,7 +35,7 @@ ID: juce_product_unlocking vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE Online marketplace support description: Classes for online product authentication website: http://www.juce.com/juce diff --git a/modules/juce_video/juce_video.h b/modules/juce_video/juce_video.h index 90b4cbf7..748fe605 100644 --- a/modules/juce_video/juce_video.h +++ b/modules/juce_video/juce_video.h @@ -35,7 +35,7 @@ ID: juce_video vendor: juce - version: 6.0.5 + version: 6.0.7 name: JUCE video playback and capture classes description: Classes for playing video and capturing camera input. website: http://www.juce.com/juce diff --git a/modules/juce_video/native/juce_mac_CameraDevice.h b/modules/juce_video/native/juce_mac_CameraDevice.h index 30e69328..da3ca40e 100644 --- a/modules/juce_video/native/juce_mac_CameraDevice.h +++ b/modules/juce_video/native/juce_mac_CameraDevice.h @@ -215,10 +215,12 @@ struct CameraDevice::Pimpl callbackDelegate = (id) [cls.createInstance() init]; DelegateClass::setOwner (callbackDelegate, this); + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") [[NSNotificationCenter defaultCenter] addObserver: callbackDelegate - selector: DelegateClass::runtimeErrorSel() + selector: @selector (captureSessionRuntimeError:) name: AVCaptureSessionRuntimeErrorNotification object: session]; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE } ~Pimpl() @@ -345,7 +347,9 @@ private: addMethod (@selector (captureOutput:didResumeRecordingToOutputFileAtURL: fromConnections:), didResumeRecordingToOutputFileAtURL, "v@:@@@"); addMethod (@selector (captureOutput:willFinishRecordingToOutputFileAtURL:fromConnections:error:), willFinishRecordingToOutputFileAtURL, "v@:@@@@"); - addMethod (runtimeErrorSel(), sessionRuntimeError, "v@:@"); + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") + addMethod (@selector (captureSessionRuntimeError:), sessionRuntimeError, "v@:@"); + JUCE_END_IGNORE_WARNINGS_GCC_LIKE registerClass(); } @@ -353,8 +357,6 @@ private: static void setOwner (id self, Pimpl* owner) { object_setInstanceVariable (self, "owner", owner); } static Pimpl& getOwner (id self) { return *getIvar (self, "owner"); } - static SEL runtimeErrorSel() { return NSSelectorFromString (nsStringLiteral ("captureSessionRuntimeError:")); } - private: static void didStartRecordingToOutputFileAtURL (id, SEL, AVCaptureFileOutput*, NSURL*, NSArray*) {} static void didPauseRecordingToOutputFileAtURL (id, SEL, AVCaptureFileOutput*, NSURL*, NSArray*) {}